Skip to content

A simple starter kit for those who wants to have a taste of the Binance Oracle, it allows you to query directly from your local machine or integrate it into your dapp.

Notifications You must be signed in to change notification settings

binance-cloud/binance-oracle

Repository files navigation

build npm (scoped) npm website

Binance-Oracle

Binance Oracle lets smart contracts query the price of assets on BSC. For detailed documentation, please visit docs.

Installation

If you like to import the Binance-Oracle contracts into your project, you can do so by running the following command:

npm install --save-dev @binance-oracle/binance-oracle-starter

Import contracts to solidity

After installation, for instance if you like to import the 'FeedRegistryInterface' contract, you can do so as follows:

import "@binance-oracle/binance-oracle-starter/contracts/interfaces/FeedRegistryInterface.sol";

Run standalone tests

git clone https://github.com/binance-cloud/binance-oracle.git
cd binance-oracle
cp .env.example .env
npm install
npm run test

Deploy mock consumer contracts to Testnet/ Mainnet

First make sure, you copy .env.example to .env in the root directory of the project. The .env file should be populated with the private keys and few other credentials of the environment you like to deploy to. Then run either of the scripts below to deploy to Testnet or Mainnet

npm run deploy:testnet
npm run deploy:mainnet

About

A simple starter kit for those who wants to have a taste of the Binance Oracle, it allows you to query directly from your local machine or integrate it into your dapp.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •