Skip to content

Instantly share code, notes, and snippets.

View johnX9's full-sized avatar

John X johnX9

  • @infiniteXLabs
View GitHub Profile
./cleos set contract eosio build/contracts/eosio.bios/ build/contracts/eosio.bios/eosio.bios.wast build/contracts/eosio.bios/eosio.bios.abi
Reading WAST...
Assembling WASM...
Publishing contract...
executed transaction: 0fc1804197a46717554013d9c1fc0073e1d3c7b61f1029c87eb285e27af6e710 4068 bytes 10000 cycles
# eosio <= eosio::setcode {"account":eosio","vmtype":0,"vmversion":0,"code":"0061736d0100000001ab011960037f7e7f0060057f7e7e7e...
# eosio <= eosio::setabi {"account":"eosio","abi":{"types":[],"structs":[{"name":"set_account_limits","base":"","fields":[{"n...
cleos create key # OwnerKey
cleos create key # ActiveKey
cleos wallet import --private-key={private-OwnerKey}
cleos wallet import --private-key={private-ActiveKey}
cleos create account eosio token {public-OwnerKey} {public-ActiveKey}
executed transaction: e0d7f17de1e7f1a7b73dfda511ce7714d25fceec6b43d86ddf997fb38852e0c2 200 bytes 2774 us
# eosio <= eosio::newaccount {"creator":"eosio","name":"token","owner":{"threshold":1,"keys":[{"key":"EOS6EhzztSvBp1K76GqF6A893bL...
cleos get account token --json
{
"account_name": "token",
"head_block_num": 70942,
"head_block_time": "2018-07-29T16:53:48.000",
"privileged": false,
"last_code_update": "1970-01-01T00:00:00.000",
"created": "2018-07-29T16:49:47.500",
"ram_quota": -1,
"net_weight": -1,
"cpu_weight": -1,
./cleos get code currency
code hash: 0000000000000000000000000000000000000000000000000000000000000000
# cleos set contract token {path_to_contract_folder} {path_to_wast_file} {path_to_abi_file}
cleos set contract token ./contracts/eosio.token/ ./contracts/eosio.token/eosio.token.wast ./contracts/eosio.token/eosio.token.abi
Reading WAST/WASM from ./contracts/eosio.token/eosio.token.wast...
Assembling WASM...
Publishing contract...
executed transaction: 82f252b7b1e71197626cf912a975562c08cd452e47b6582399b47baca22d83b5 8096 bytes 8986 us
# eosio <= eosio::setcode {"account":"token","vmtype":0,"vmversion":0,"code":"0061736d01000000017e1560037f7e7f0060057f7e7e7f7f...
# eosio <= eosio::setabi {"account":"token","abi":"0e656f73696f3a3a6162692f312e30010c6163636f756e745f6e616d65046e616d65050874...
cleos get code token
code hash: 48a05166e9a5493b422288d137a08a7b2ccf7fb2c3473b630909440d7bbf177a