Class IgnisArdorRates<InvocationData,ReturnedData>

java.lang.Object
nxt.addons.AbstractContract<InvocationData,ReturnedData>
com.jelurida.ardor.contracts.IgnisArdorRates<InvocationData,ReturnedData>
All Implemented Interfaces:
Contract<InvocationData,ReturnedData>

public class IgnisArdorRates<InvocationData,ReturnedData> extends AbstractContract<InvocationData,ReturnedData>
This sample Oracle contract loads the Ignis per Ardor exchange rate from Bittrex and from the internal coin exchange. It can be used to identify arbitrage opportunities. The contract demonstrates interface with an external service (Bittrex exchange) and how to send a different response when triggered by block, by transaction, by API call. Since the contract interfaces with an external class which loads the exchange rates, it has to be bundled and deployed as a Jar file together with its dependencies to the blockchain.