@gxchain2/common
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

@gxchain2/common

NPM Version License

The basic settings of gxchain2, based on @gxchain2-ethereumjs/common, including parameters of the mainnet and testnet:

  • chains Chain information of each chain
  • genesisStates Initial state of each chain
  • GIP(GXChain2.0 Improvement Proposal) of each chain
  • hardforks Fork information of each chain

INSTALL

npm install @gxchain2/common

USAGE

// create chain start common with chain name
Common.createChainStartCommon("gxc2-mainnet");
// create with chain id
Common.createCommonByBlockNumber(0, 12347);
// create with chain name
Common.createCommonByBlockNumber(0, "goerli");
// create with an object containing chain information
Common.createCommonByBlockNumber(0, {
  chain: "mychain",
  networkId: 100,
  genesis: {
    // ...genesis block
  },
  hardforks: [],
  bootstrapNodes: [],
});

License

GNU General Public License v3.0

/@gxchain2/common/

    Package Sidebar

    Install

    npm i @gxchain2/common

    Weekly Downloads

    3

    Version

    0.0.2

    License

    GPL-3.0-or-later

    Unpacked Size

    654 kB

    Total Files

    48

    Last publish

    Collaborators

    • lanhaoxiang
    • samlior