Skip to content

Repository files navigation

token-ctrl

Prerequisites

  1. Deployer secret key (Nova and BSC chains)

  2. NodeJs v16+ see

  3. yarn

    npm install --global yarn

Development

  1. install dependencies

    yarn i
  2. prepare .env files, see .env.sample

    # secret key of Nova deployer
    NOVA_ACCOUNTS=
    # secret key of Bsc deployer
    BSC_ACCOUNTS=
    # secret key of Bsc Testnet deployer
    BSC_TESTNET_ACCOUNTS=
    # address of the contract authority, deployer is not authority by default
    
    AUTHORITY=
  3. run the following command to deploy the smart contract to NOVA and BSC chain

    # Deploy to Nova chain
    yarn hardhat deploy --tags TokenCtrl --network nova
    
    # Deploy to BSC chain
    yarn hardhat deploy --tags TokenCtrl --network bsc
    
    # Deploy to BSC Testnet chain
    yarn hardhat deploy --tags TokenCtrl --network bsc_testnet
  4. Take note of the contract addresses. These will be used in setting token portal configuration.

    Below example of deployment output, as the contract was successfully deployed at 0x7730b55BcC64276b224819a03109b3D21079C3a2 on bsc_testnet

    =================
    
    Network:         bsc_testnet
    Token Ctrl:      0x7730b55BcC64276b224819a03109b3D21079C3a2
    Authority:       0x111b0fbA4E94ff9A312B517D5F817F4a8957375F
    Token Template:  0xF437aFA354eE0A428D905Fe2396f75DdecCf2886
    
    =================
    

Verifying Contract with Standard JSON Input

  1. for bsc and bscTestnet run the following command. Api key of bscscan.com must be provided (BSCSCAN_APIKEY).

    # for bsc_testnet
    yarn hardhat verify <ContractAddress> --network bsc_testnet
    
    # for bsc
    yarn hardhat verify <ContractAddress> --network bsc
  2. for Nova chain, the deployed smart contracts can be manually verified by Standard Input Json file, see instructions here.

  3. Verification process needs to be completed with TokenCtrl (token controller) and Token (token template) separately

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages