April 2017
Intermediate to advanced
266 pages
7h 4m
English
If you would like to know how much a query would cost before making the actual query, then you can use the Oraclize.getPrice() function to get the amount of wei required. The first argument it takes is the data source, and the second argument is optional, which is the custom gas.
One popular use case of this is to notify the client to add ether to the contract if there isn't enough to make the query.
Read now
Unlock full access