New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@hexcommunity/hex

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hexcommunity/hex

a repo for all things hex solidity / truffle development

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

HEX

a repo for all things hex solidity / truffle development

WARNING

this package is untested

need tests for all code (.sol + .js)

contracts

use contracts/* to test the contracts you plan to build on hex.

utils

const { UNITS, fromHeart, toHeart, convert } = require('@hexcommunity/hex/utils')

UNITS

an object with the units as keys and the factor (1e8) as values.

heart
microhex
millihex
hex
hectohex
kilohex
megahex
gigahex
terahex

convert

convert any unit into any other unit returns a BN.js value

convert('heart', 200000000, 'hex') // 2<BN>

fromHeart

convert heart unit to any other unit, default destination hex

fromHeart(200000000)             // 2<BN>
fromHeart(200000000, 'hex')      // 2<BN>
fromHeart(200000000, 'millihex') // 2000<BN>

toHeart

convert from any other unit to heart, default source hex

fromHeart(2)                // 200000000<BN>
fromHeart(2, 'hex')         // 200000000<BN>
fromHeart(2000, 'millihex') // 200000000<BN>

FAQs

Package last updated on 09 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts