Skip to content

3. Contracts

Dmitry edited this page Nov 23, 2018 · 1 revision

Stats

Web interface: https://tools.cryptokylin.io/#/tx/volentestacc

CLI: cleos --url http://api.kylin.alohaeos.com get account volentestacc

Credentials

Account name: volentestacc

Wallets: testwallet and testwalletbob

Unlock the wallets:

cleos wallet unlock -n testwallet --password PW5JFDtGbytzVNYiTWSgYbuU9s5H8TopYX3BeCkQZ876pha6dE1kV
cleos wallet unlock -n testwalletbob --password PW5Jh6SuQ7ZMHuxmTmmqsJjQBkc8kdd16u8mh7ZBaPTbnqjKRN8dt

Contract

Go to your contracts folder:

cd /home/username/contracts

Creating contract

mkdir volentestcontract
cd volentestcontract
touch volentestcontract.cpp

Write your contract: ...

Compile:

eosio-cpp -o volentestcontract.wasm volentestcontract.cpp --abigen

Set contract to your account in the crypto kylin test net:

cleos --url http://api.kylin.alohaeos.com set code volentestacc /home/username/contracts/volentestcontract/volentestcontract.wasm

cleos --url http://api.kylin.alohaeos.com set abi volentestacc /home/username/contracts/volentestcontract/volentestcontract.abi

Now you can use your contract by pushing actions into it:

cleos --url http://api.kylin.alohaeos.com push action volentestacc methodname '[ "parameter1", "parameter2"]'
Clone this wiki locally