/Tellorflex-kadena

Tellor Oracle implementation in PACT

Primary LanguagePact

CI

tellor.io tellor.io

Twitter WeAreTellor

Tellorflex-kadena

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.

Tests

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)

Modules

Tellorflex

  • Reporters

(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) )
  • Users

(defun get-data-before (query-id:string timestamp:integer) )
(defun retrieve-data (query-id:string timestamp:integer) )

Governance

  • Begin a dispute

(defun begin-dispute (account:string query-id:string timestamp:integer) )
  • Execute Vote

(defun execute-vote (dispute-id:integer) )
  • Tally Vote

(defun tally-votes (dispute-id:integer) )
  • Vote

(defun vote (dispute-id:integer supports:bool invalid:bool voter-account:string) )
  • Tests

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
Currently deployed module-names on chain 1

(updated on Feb 15, 2023)

(namespace "n_61b7d03ff34ca7e599e3551df8dcd4a3c1bf7524")

Maintainers

This repository is maintained by the Tellor team

How to Contribute

Join our Discord:

Check out our issues log here on Github or feel free to reach out anytime info@tellor.io

Copyright

Tellor Inc. 2023