class BasicRequestClient
A basic request client contract that implements the IOracleClient
interface.
Properties
Methods
init()
Initializes the instance.
This method initializes the instance by calling the 'init' method of the super class, and setting the value of 'this.data0' to 'Field(0)'.
init(): void;
onFulfillRequest(data0)
Callback method for fulfilling an Oracle request.
Name | Type | Description |
---|---|---|
|
|
The data to fulfill the request with. |
Returns |
|
{Bool} A boolean indicating success (always true in this implementation, potentially requiring verification). |
onFulfillRequest(data0: Field): Promise<void>;
sendErc677RequestTo(req0, req1, req2, req3)
Sends an ERC677 request to the Oracle contract.
Name | Type | Description |
---|---|---|
|
|
The first field of the request. |
|
|
The second field of the request. |
|
|
The third field of the request. |
|
|
The fourth field of the request. {Bool} - Returns true if the request was successfully sent to the Oracle contract. |
Returns |
|
sendErc677RequestTo(req0: Field, req1: Field, req2: Field, req3: Field): Promise<void>;
sendOracleRequest(req0, req1, req2, req3)
Sends an Oracle request to the stored Oracle contract.
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 |
|
{Bool} - A boolean indicating success (determined by the Oracle contract). |
sendOracleRequest(req0: Field, req1: Field, req2: Field, req3: Field): Promise<void>;
sendOracleRequestWithAddr(oracleAddress, req0, req1, req2, req3)
Sends an Oracle request to the stored Oracle contract.
Name | Type | Description |
---|---|---|
|
|
The new Oracle contract address to set. |
|
|
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 |
|
{Bool} - A boolean indicating success (determined by the Oracle contract). |
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 client.
Name | Type | Description |
---|---|---|
|
|
The new PublicKey of the ERC-677 token. {Bool} - True to indicate successful execution. |
Returns |
|
setErc677Token(tokenAddress: PublicKey): Promise<void>;
setOracleContract(oracleAddress)
Sets the stored Oracle contract address.
Name | Type | Description |
---|---|---|
|
|
The new Oracle contract address to set. |
Returns |
|
{Bool} - A boolean indicating success (always true in this implementation). |
setOracleContract(oracleAddress: PublicKey): Promise<void>;