Contract/Unit Test

Creates a basic unit test and EOSIO smart contract.
To test a basic EOSIO contract without DAPP Network services, run the following:
This will create your new working directory, create your zeus-box.json (package.json), install the necessary zeus_boxes (node_modules) dependencies, create the example contract and unit test, compile the contract, start the local environment, and run the example unit tests.
Contract
Options
# create dir
mkdir eosio-contract; cd eosio-contract
# create zeus-box.json/package.json default
zeus box create
# unbox unit testing associated boxes
zeus unbox seed-tests
# create your own contract
zeus create contract mycontract --template=simplecontract # if using an old cdt --legacy-cdt
# compile
zeus compile mycontract # if using an old cdt --legacy-cdt
# start local env and test
zeus test mycontract
zeus create contract <contractname>
​
generates an empty contract
​
Options:
--version Show version number [boolean]
--storage-path path for persistent storage [default: "/home/ubuntu/.zeus"]
--rc-file use rc file to load options from
[default: "/home/ubuntu/.zeus/zeusrc.json"]
--rc-ignore ignore rc file [default: false]
--verbose, -v [default: false]
-h, --help Show help [boolean]
--chain [default: "eos"]
--language [default: "cpp"]
--template [default: "emptycontract"]
--legacy-cdt unbox cmake files using cdt version < 3.0.0 [default: false]
​
Examples:
zeus create contract testcontract --chain=eos --language=cpp
--template=emptycontract
Files created:
  • ./contracts/eos/mycontract/mycontract.cpp basic of basic contracts with a simple action
  • ./test/mycontract.spec.js basic unit test