Observed since 20 Oct, 22:49 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
General Wanchain utility module with helper functions for the Wanchain blockchain.
General Wanchain utility module with helper functions for the Wanchain blockchain.
The 0xcert Framework is a free and open-source JavaScript library that provides tools for building powerful decentralized applications. Please refer to the official documentation for more details.
This module is one of the bricks of the 0xcert Framework. It's written with TypeScript and it's actively maintained. The source code is available on GitHub where you can also find our issue tracker.
This module wraps several useful Wanchain functions which will be useful through the 0xcert Framework. Currently supported are these functions and classes from ethers.js:
This converts the value to and from the packed Ethereum ABI encoding.
encodeParameters(types: any, values: Array<any>): stringdecodeParameters(types: any, data: any): anyEncoding example:
import { decodeParameters, encodeParameters } from '0xcert/ethereum-utils/abi';
const types = ['tuple(uint256, uint256[])'];
const values = [[ 42, [ 45 ] ]];
const encodedValues = encodeParameters(types, values);
Decoding example:
import { decodeParameters, encodeParameters } from '0xcert/ethereum-utils/abi';
const types = ['tuple(uint256, uint256[])'];
const encoded = '0x' +
'0000000000000000000000000000000000000000000000000000000000000020' +
'000000000000000000000000000000000000000000000000000000000000002a' +
'0000000000000000000000000000000000000000000000000000000000000040' +
'0000000000000000000000000000000000000000000000000000000000000001' +
'000000000000000000000000000000000000000000000000000000000000002d';
const values = decodeParameters(types, values);
Here is a basic example adapted from the ethers.js documentation.
import { bigNumberify } from '0xcert/ethereum-utils/big-number';
let gasPriceWei = bigNumberify("20902747399");
let gasLimit = bigNumberify(3000000);
let maxCostWei = gasPriceWei.mul(gasLimit)
console.log("Max Cost: " + maxCostWei.toString());
// "Max Cost: 62708242197000000"
console.log("Number: " + maxCostWei.toNumber());
// throws an Error, the value is too large for JavaScript to handle safely
The ethers.js address normalization function implements EIP-55 Mixed-case checksum address encoding.
import { getAddress } from '0xcert/ethereum-utils/normalize-address';
let zxcTokenAddress = '0x83e2be8d114f9661221384b3a50d24b96a5653f5';
let zxcTokenAddressNormalized = normalizeAddress(zxcToenAddress);
// 0x83e2BE8d114F9661221384B3a50d24B96a5653F5
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 2.1.1Registry latest | 15 Mar 2021 | 13 | |
| 2.1.0 | 14 Jan 2021 | 13 | |
| 2.0.3 | 12 Aug 2020 | 13 | |
| 2.0.2 | 4 May 2020 | 7 | |
| 2.0.1 | 6 Mar 2020 | 7 | |
| 2.0.1-beta0 | 5 Mar 2020 | 7 | |
| 2.0.0 | 2 Mar 2020 | 7 | |
| 2.0.0-beta5 | 22 Feb 2020 | 7 | |
| 2.0.0-beta4 | 19 Feb 2020 | 7 | |
| 2.0.0-beta3 | 5 Feb 2020 | 7 | |
| 2.0.0-beta2 | 30 Jan 2020 | 7 | |
| 2.0.0-beta1 | 20 Jan 2020 | 7 | |
| 2.0.0-beta | 17 Jan 2020 | 7 | |
| 2.0.0-alpha17 | 14 Jan 2020 | 7 | |
| 2.0.0-alpha16 | 13 Jan 2020 | 7 | |
| 2.0.0-alpha15 | 8 Jan 2020 | 7 | |
| 2.0.0-alpha14 | 12 Dec 2019 | 7 | |
| 2.0.0-alpha13 | 6 Dec 2019 | 7 | |
| 2.0.0-alpha12 | 29 Nov 2019 | 7 | |
| 2.0.0-alpha11 | 6 Nov 2019 | 7 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:49 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:21c94b72c038e2cb5dcd4e8dd87bc9d2197d1064c9acd142a2b5eb8945382a62