Skip to content

FairCrypto/xenblock-tokens

Repository files navigation

XenBlocks Tokens

Install

npm install

// for deployment
export PRIVATE_KEY=<private key>

Test

npx hardhat test

with coverage report

npx hardhat coverage

with gas report

REPORT_GAS=1 npx hardhat test

Code Style

Check

npm run lint

Fix

npm run format

Docs

See docs for more information.

Generate docs

npx hardhat markup

Deploy Contracts

The 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 .env

Verify Contracts

source .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-testnet

Upgrade Contracts

Upgrade vote manager

npx hardhat run scripts/upgrade-vote-manager.ts --network x1-testnet

Upgrade xenium

npx hardhat run scripts/upgrade-xenium.ts --network x1-testnet

Upgrade xuni

npx hardhat run scripts/upgrade-xuni.ts --network x1-testnet

Upgrade Superblock

npx hardhat run scripts/upgrade-super-block.ts --network x1-testnet

Upgrade token registry

npx hardhat run scripts/upgrade-token-registry.ts --network x1-testnet

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published