Skip to content

Solidity smart contract implementing simplified price feeds oracle for TechPay Photon network.

License

Notifications You must be signed in to change notification settings

TechPay-io/TechPay-Oracle-Pricefeed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TechPay Oracle Price Feed Contract

The repository contains Solidity smart contract implementing simplified price feeds oracle for TechPay Photon network.

A deployed smart contract offers price exachange pair values indexed and identified by exchange symbols. The actual price is fed into the contract from an external off-chain data source. The backend service implementing this function is available on the techpay GitHub as the TechPay Oracle Backend.

Contract compilation

  1. Install appropriate Solidity compiler. The contract expects Solidity version to be from the branch 0.5.0. The latest available Solidity compiler of this branch is the Solidity Version 0.5.17.

  2. Compile the contract for deployment.

    solc -o ./build --optimize --optimize-runs=200 --abi --bin ./contract/PriceOracle.sol

  3. Deploy compiled binary file ./build/TechPayBallot.bin into the blockchain.

  4. Use generated ABI file ./build/TechPayBallot.abi to interact with the contract.

A simple deployment script supported by Web3 library is available in the deployment folder. Use NPM to install dependecies using npm install and node.js to run the deployment script. Please make sure to set internal variables to your liking.

About

Solidity smart contract implementing simplified price feeds oracle for TechPay Photon network.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published