@bisonai/orakl-contracts
TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

Orakl Network Contracts

Installation

yarn install

Compilation

yarn compile

Package

yarn build

Deployment

Deployment scripts are stored in deploy directory. The deployment scripts are separate based on service (Aggregator, Prepayment, Request-Response, VRF). Each script can handle deployment to any network, but the network has to be specified in hardhat.config.ts within networks object, and there must be a migration file for the specific service and network. The general path for deployment script is deploy/${network}/${service}.

Migration

Migration files are stored under migration directory. The migration files are separated based on the network and service. The general path to migration directory is migration/${network}/${service}. Every migration directory should contain JSON migration files that contain migration definitions, and migration.lock which stores which migration has already been executed.

The names of migration files should be consistent. We recommend to use the following script to generate a new migration file.

MIGRATION_NAME=
touch `date +%Y%m%d%H%M%S_${MIGRATION_NAME}.json`

Local Deployment

For local testing, it is best to both launch node and deploy with a single command. The command below can be used for launching local test network.

npx hardhat node --hostname 127.0.0.1 --no-deploy

VRF

yarn deploy:localhost:prepayment
yarn deploy:localhost:vrf

Request-Response

yarn deploy:localhost:prepayment
yarn deploy:localhost:rr

Aggregator

yarn deploy:localhost:aggregator

Hardhat library confliction issue

Script

  • run scripts/v0.1/generate-aggregator-deployments.cjs to creates migration, wallets, and bulk json files
  • migration files are saved in migration folder while wallets and bulk files are saved in scripts/**/tmp/ folder
  • call example node ./scripts/v0.1/admin-aggregator/generate-aggregator-deployments.cjs --pairs '["usd-krw", "jpy-usd", "joy-usdc"]' --chain baobab

Package Sidebar

Install

npm i @bisonai/orakl-contracts

Weekly Downloads

33

Version

1.4.0

License

MIT

Unpacked Size

20.9 MB

Total Files

530

Last publish

Collaborators

  • bayram98
  • martinkersner