class IOracleClient
Abstract class representing an Oracle client.
Methods
onFulfillRequest(data0)
Handles the fulfillment of an Oracle request.
Name | Type | Description |
---|---|---|
|
|
The data0 data from the Oracle. |
Returns |
|
A boolean indicating success. |
abstract onFulfillRequest(data0: Field): Promise<void>;
sendErc677RequestTo(req0, req1, req2, req3)
Sends an Erc677 TransferAndCall request.
Name | Type | Description |
---|---|---|
|
|
The first field of the request data. |
|
|
The second field of the request data. |
|
|
The third field of the request data. |
|
|
The fourth field of the request data. |
Returns |
|
A boolean indicating success. |
abstract sendErc677RequestTo(req0: Field, req1: Field, req2: Field, req3: Field): Promise<void>;
sendOracleRequest(req0, req1, req2, req3)
Sends an Oracle request.
Name | Type | Description |
---|---|---|
|
|
The first field of the request data. |
|
|
The second field of the request data. |
|
|
The third field of the request data. |
|
|
The fourth field of the request data. |
Returns |
|
A boolean indicating success. |
abstract sendOracleRequest(req0: Field, req1: Field, req2: Field, req3: Field): Promise<void>;
sendOracleRequestWithAddr(oracleAddress, req0, req1, req2, req3)
Sends an Oracle request with Address.
Name | Type | Description |
---|---|---|
|
|
The public key of the Oracle contract. |
|
|
The first field of the request data. |
|
|
The second field of the request data. |
|
|
The third field of the request data. |
|
|
The fourth field of the request data. |
Returns |
|
A boolean indicating success. |
abstract sendOracleRequestWithAddr(oracleAddress: PublicKey, req0: Field, req1: Field, req2: Field, req3: Field): Promise<void>;
setErc677Token(tokenAddress)
Updates the stored ERC-677 token address associated with this oracle contract.
Name | Type | Description |
---|---|---|
|
|
The new PublicKey of the ERC-677 token. |
Returns |
|
True to indicate successful execution. |
abstract setErc677Token(tokenAddress: PublicKey): Promise<void>;