Skip to content

Latest commit

 

History

History

example

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

oracle-17 example

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.

run example

  1. install prerequirements
  • Node.js v18.16.0. or newer
  • jq-1.6 or newer
  • everdev
  1. install dependencies
yarn install
  1. setup venom devnet network endpoints
export RPC=https://everspace.center/venom-devnet/jsonRpc
npx everdev n add devnet https://gql-devnet.venom.network/graphql
  1. deploy Example.sol smart contract

Use Eye address from ../README.md insted of $ADDRESS

yarn deploy $ADDRESS

Then follow the instructions in your terminal

  1. send request with smart contract
yarn request https://mainnet-v4.tonhubapi.com/block/30081623
  1. 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)"