Skip to content

madfish-solutions/yapfy

Repository files navigation

Yet Another Price Feed for Yupana

Yupana's price feed implementation, allows to use multiple oracles with one contract.

Requirements

  • Installed NodeJS (tested with NodeJS v14+)

  • Installed Yarn

  • Docker

  • Installed node modules:

yarn install

Compile

Compile contract

yarn compile -c router

Compile bytes

WARNING: before compiling parsers make sure that .env file has all needed variables, especially correct oracle addresses

Compile parser contract

yarn compile-parser ${parserName}

ex.

yarn compile-parser harbinger

Compile and prepare parser bytes

yarn parser-to-bytes ${parserName}

ex.

yarn parser-to-bytes harbinger

Compile all

yarn compile-all

Testing

Start Tezos Flextesa sandbox local chain

Flextesa sandbox run in Docker container, but you can change the config file properties to connect to another RPC nodes if you want to.

yarn start-sandbox

Start Jest tests

Repository has some tests with Taquito and Jest located inside tests folder.

yarn test

Stop local chain

If you had started the local chain before the running tests, recomended to stop the chain right after the tests.

yarn stop-sandbox

Deploy contract

yarn migrate