Follow instructions in the pact repository of the Kadena org github to install the pact interpeter Here. Although the atom code editor is no longer maintained, it has great tools for writing code in Pact check here for instructions. Checkout the devnet-playground folder for a full installation and contract interaction using nix package manager on linux that includes a pact install among other packages. Step by step instructions are provided for an easy install on ubuntu 22.04.
After cloning repo and installing the pact interpeter you can run tests in tests folder.
# Example running a file in the interpeter
# enter the pact interpeter
pact
# run a test (if not set to true the test will persist causing it to fail on the second run)
(load "tests/tellorflex/e2e-1.repl" true)
(defun deposit-stake (staker:string guard:guard amount:integer) )
(defun submit-value (query-id:string value:string nonce:integer query-data:string staker:string) )
(defun request-staking-withdraw (staker:string amount:integer) )
(defun withdraw-stake (staker:string) )
(defun get-data-before (query-id:string timestamp:integer) )
(defun retrieve-data (query-id:string timestamp:integer) )
(defun begin-dispute (account:string query-id:string timestamp:integer) )
(defun execute-vote (dispute-id:integer) )
(defun tally-votes (dispute-id:integer) )
(defun vote (dispute-id:integer supports:bool invalid:bool voter-account:string) )
To run tests execute shell script like so:
./run-test.sh <module-name (ie tellorflex, autopay, or governance)> <Optional flag: --show-trace>
example:
./run-test.sh tellorflex -t
(updated on Feb 15, 2023)
(namespace "n_61b7d03ff34ca7e599e3551df8dcd4a3c1bf7524")
This repository is maintained by the Tellor team
Check out our issues log here on Github or feel free to reach out anytime [email protected]
Tellor Inc. 2023