Example
Zeus runs on the Mocha / Chai framework. In the below example, we will run ./tests/ethtokenpeg.spec.js.
This test runs:
  • block producing state history nodeos instance
  • ETH node via gnache
  • IPFS node
  • PostgreSQL database to handle service requests
  • 2 full DSPs with
    • demux (services listening to nodeos web socket)
    • DSP API (default:13115)
    • All DSP related services (vRAM, LiquidHarmony, LiquidScheduler, LiquidLink)
  • Setup all system contracts (eosio.bpay, eosio.names, eosio.token, eosio.ram, eosio.ramfee, eosio.saving, eosio.msig, eosio.stake, and eosio.vpay)
  • creates and manages all private keys ~/.zeus/networks/development/accounts/
  • handles resource allocation (CPU/NET/RAM for EOSIO, gas for ETH)
  • compiles the dapp client library typescript
To setup our environment, we'll run the following commands:
1
mkdir ethtokenpeg; cd ethtokenpeg
2
# creates the box, like npm init
3
zeus box create
4
# installs all boxes and their sub-dependencies
5
zeus unbox ethtokenpeg
6
# compiles all contracts then runs full unit testing suite
7
zeus test -c --services "cron,ipfs,oracle,sign"
Copied!
Logs are available in the ./logs directory. Logs may also be cleared by running zeus test with the -d flag to delete the ./logs folder.
Copy link