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.
1
zeus compile
2
# zeus compile mycontract
3
# zeus compile ipfsconsumer
Copied!

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
1
export DSP_ENDPOINT=https://kylin-dsp-1.liquidapps.io
2
export KYLIN_TEST_ACCOUNT=<ACCOUNT_NAME>
3
export KYLIN_TEST_PUBLIC_KEY=<ACTIVE_PUBLIC_KEY>
4
# Buy RAM:
5
cleos -u $DSP_ENDPOINT system buyram $KYLIN_TEST_ACCOUNT $KYLIN_TEST_ACCOUNT "200.0000 EOS" -p $KYLIN_TEST_ACCOUNT@active
6
# Set contract code and abi
7
cleos -u $DSP_ENDPOINT set contract $KYLIN_TEST_ACCOUNT ipfsconsumer -p $KYLIN_TEST_ACCOUNT@active
8
​
9
# Set contract permissions, add eosio.code
10
cleos -u $DSP_ENDPOINT set account permission $KYLIN_TEST_ACCOUNT active "{\"threshold\":1,\"keys\":[
Copied!
Copy link