Migrate Contract

Zeus migrate allows developers to easily migrate code between different environments such as the EOS Mainnet and the CryptoKylin testnet.

If you want to easily compile, test, and deploy your code to different environments (locally, testnet, mainnet), then you've come to the right place.

You can also use Truffle to migrate npx truffle migrate.

First we'll create a contract deployment JSON file with the following command:

# zeus create contract-deployment tokenpeg tokenpegacct kylin
zeus create contract-deployment <CONTRACT_FILE_NAME> <CONTRACT_ACCOUNT_NAME> <CHAIN_NAME>

To set code on the kylin testnet or any EOSIO network run the following

# zeus migrate tokenpeg --network=kylin --creator=tokenpegacct --creator-key ... --no-reset
zeus migrate [CONTRACT] --network=kylin --creator=[ACCOUNT_NAME] --creator-key [ACTIVE_PRIVATE_KEY_ACCOUNT_NAME]

Before migrating, you can also import the keys and not need to pass the creator key

You can also run combinations like:

# specify key for deployment
zeus migrate cronconsumer --creator natdeveloper --creator-key 5JxD6PbUpUSQQhunwGDK9ajWFZQ17h4Qa4271SzMdhivhwunQ4x --network=kylin          
# all kylin cronconsumer contract deployments on jungle3
zeus migrate cronconsumer --network=jungle3
# all migrations
zeus migrate
# all migrations on kylin
zeus migrate --network=kylin
# all migrations for creator natdeveloper on development
zeus migrate --creator natdeveloper --network=development
# do not compile and do not reset environment
zeus migrate --no-compile-all --no-reset

Last updated