1. Home
  2. Beginner
  3. Smart Contract Development using Cloud VM & Docker – Part 4

Smart Contract Development using Cloud VM & Docker – Part 4

Move contracts into docker container:
docker cp contracts/. eos:/root/eos/contracts

Generate *.gen.cpp file:
eoscpp -g /root/eos/contracts/mydapp.abi -gs /root/eos/contracts/mydapp.hpp

Compile contracts:
eoscpp -o /root/eos/contracts/mydapp.wast /root/eos/contracts/mydapp.cpp

Deploy contract:
eos wallet import [accountName private key]
eosc -H testnet1.eos.io -p 80 set contract [accountName] /root/eos/contracts/mydapp.wast /root/eos/contracts/mydapp.abi

Push message to contract:
eosc -H testnet1.eos.io -p 80 push message [accountName] change ‘{“key”:”hello world”, “value”:”2018-01-08T01:02:11″}’ -S [accountName]

Query data inserted in previous step from blockchain:
eosc -H testnet1.eos.io -p 80 get table [accountName] [accountName] keyvalue

Updated on March 16, 2018

Was this article helpful?

Related Articles

Leave a Comment