This repository contains an example of a smart contract that sends a request to the ORACLE-17 system and subsequently receives a response to that query.
- install prerequirements
Node.js v18.16.0. or newer
jq-1.6 or newer
everdev
- install dependencies
yarn install
- setup venom devnet network endpoints
export RPC=https://everspace.center/venom-devnet/jsonRpc
npx everdev n add devnet https://gql-devnet.venom.network/graphql
- deploy
Example.sol
smart contract
Use Eye address from ../README.md
insted of $ADDRESS
yarn deploy $ADDRESS
Then follow the instructions in your terminal
- send request with smart contract
yarn request https://mainnet-v4.tonhubapi.com/block/30081623
- read the result by calling the
get_last_result
method
printf "\n$(npx everdev c l -n devnet -a $(cat build/Example.addr.txt) build/Example.abi.json get_last_result | awk -v RS='' -F 'Execution has finished with result:\n' '{print $2}' | jq -r .output.value0)"