class OracleContract
An Oracle contract implementing the IOracleContract
interface.
Methods
fulfillOracleRequest(callbackAddress, data0, signature)
Fulfills an Oracle request, verifies a signature, and potentially sends a callback to the specified address.
Name | Type | Description |
---|---|---|
|
|
The public key of the contract to send the callback to (optional). |
|
|
The first field of the data to be sent in the callback (optional). |
|
|
The signature to be verified (associated with the request or data). |
Returns |
|
A boolean indicating success (always true in this implementation, potentially modify based on requirements). |
fulfillOracleRequest(callbackAddress: PublicKey, data0: Field, signature: Signature): Promise<void>;
oracleRequest(req0, req1, req2, req3)
Makes an Oracle request based on provided data.
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 (always true in this implementation). |
oracleRequest(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. |
setErc677Token(tokenAddress: PublicKey): Promise<void>;