npm install
// for deployment
export PRIVATE_KEY=<private key>npx hardhat testwith coverage report
npx hardhat coveragewith gas report
REPORT_GAS=1 npx hardhat testCheck
npm run lintFix
npm run formatSee docs for more information.
Generate docs
npx hardhat markupThe initial deployment of the contracts is done using the create-* scripts. The upgrade-* scripts are used to upgrade the contracts.
For convenience, the create-all script will deploy and verify all contracts.
# add BLOCK_STORAGE_ADDRESS and SFC_LIB_ADDRESS to .env
echo "BLOCK_STORAGE_ADDRESS=0xf7E0CF7453ac619fD64b3D46D7De3638510F15eA" >> .env
echo "SFC_LIB_ADDRESS=0xFC00FACE00000000000000000000000000000000" >> .env
source .env
npx hardhat run scripts/create-all.ts --network x1-testnet
# add the env variables to .envsource .env
npx hardhat verify $VOTE_MANAGER_ADDRESS --network x1-testnet
npx hardhat verify $XENIUM_ADDRESS --network x1-testnet
npx hardhat verify $XUNI_ADDRESS --network x1-testnet
npx hardhat verify $SUPER_BLOCK_ADDRESS --network x1-testnet
npx hardhat verify $TOKEN_REGISTRY_ADDRESS --network x1-testnetUpgrade vote manager
npx hardhat run scripts/upgrade-vote-manager.ts --network x1-testnetUpgrade xenium
npx hardhat run scripts/upgrade-xenium.ts --network x1-testnetUpgrade xuni
npx hardhat run scripts/upgrade-xuni.ts --network x1-testnetUpgrade Superblock
npx hardhat run scripts/upgrade-super-block.ts --network x1-testnetUpgrade token registry
npx hardhat run scripts/upgrade-token-registry.ts --network x1-testnet