This toy contract implements coin mining and secret transfers. A single transfer is stored in a separate channel which is only accessible by recipient and sender. Additionally swap operation is implemented - a two transfer back and forth between two KAs to make use of contract events.
Haskell Stack installed, Podman and ~/.symbiont
with SDK installed present on the system.
./runpodman buildimage
To start the assembly node inside the container:
./runpodman start
To deploy the contract from workspace/secretaccounts/secretaccounts.sympl
run:
./runpodman deploy
There are two tests implemented:
- Mine and transfer:
./runpodman t-validate-transfer
- Mine and execute swap:
./runpodman t-validate-transfer
To interact with the node and contract one can use the following commands:
start
- start container with Assembly nodestop
- stop & remove containershell
- start interactive shell inside the containerdashboard
- start Assembly dashboard GUIcreate-ka
- create new key aliasdeploy
- deploy the contract
The following commands expect KA
environment variable (with key alias) to run:
c-mine-coin
- mine a coinc-get-all-transfers
- get all transfers for KAc-get-balance
- get balance for KAc-send
- transfer coin between KAs