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.
-
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.
-
Compile the contract for deployment.
solc -o ./build --optimize --optimize-runs=200 --abi --bin ./contract/PriceOracle.sol
-
Deploy compiled binary file
./build/TechPayBallot.bin
into the blockchain. -
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.