Skip to content

tadejrola/oracle-solidity

Repository files navigation

Oracle - Solidity - Ropsten

This is oracle implementation on Ropsten test network. We are using web3 on Heroku cloud platform. Easy client implementation.

How to use on client

pragma solidity ^0.4.24;
import "github.com/tadejrola/oracle-solidity/Oracle_Ropsten.sol";

contract Client is Oracle{
    
    string public data;
    
    function __callback(string _data){
        require (msg.sender == get_os_address());
        data=_data;
    }
    
    
    //example
    //_apiUrl= "https://api.coinmarketcap.com/v1/ticker/ethereum/"
    //_pathToData= "[0].price_usd"
    function getMyData(string _apiUrl, string _pathToData) public {
        api_call(_apiUrl, _pathToData, address(this));
    }
}

Support

Reach out to me @:


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published