Compile and Deploy

The following sections covers compiling your created smart contract. Or you can use the ipfsconsumer example contract.

Compile

See the unit testing section for details on adding unit tests.

zeus compile
# zeus compile mycontract
# zeus compile ipfsconsumer

Deploy Contract

Here we will use cleos (EOSIO's command line interface tool) to:

  • buy RAM so that we have enough to store the smart contract

  • set the smart contract to the Kylin account created in the previous section

  • give the contract the eosio.code permission level which allows the smart contract to sign transactions itself

export DSP_ENDPOINT=https://kylin-dsp-1.liquidapps.io
export KYLIN_TEST_ACCOUNT=<ACCOUNT_NAME>
export KYLIN_TEST_PUBLIC_KEY=<ACTIVE_PUBLIC_KEY>
# Buy RAM:
cleos -u $DSP_ENDPOINT system buyram $KYLIN_TEST_ACCOUNT $KYLIN_TEST_ACCOUNT "200.0000 EOS" -p $KYLIN_TEST_ACCOUNT@active
# Set contract code and abi
cleos -u $DSP_ENDPOINT set contract $KYLIN_TEST_ACCOUNT ipfsconsumer -p $KYLIN_TEST_ACCOUNT@active

# Set contract permissions, add eosio.code
cleos -u $DSP_ENDPOINT set account permission $KYLIN_TEST_ACCOUNT active "{\"threshold\":1,\"keys\":[

Last updated