Reference Transform adapters read the value from a given reference feed before using that value to transform the result from the data provider.
The adapter takes the following environment variables:
Required? | Name | Description | Options | Defaults to |
---|---|---|---|---|
✅ | {SOURCE}_ADAPTER_URL |
The URL location for the price data provider adapter when source={SOURCE} |
||
✅ | {NETWORK}_RPC_URL |
RPC URL to read the on-chain reference data value (e.g. ETHEREUM_RPC_URL ) |
See the Composite Adapter README for more information on how to get started.
Required? | Name | Description | Options | Defaults to |
---|---|---|---|---|
✅ | source |
The source external adapter to request a value from | ||
✅ | referenceContract |
The reference contract to get a value from | ||
✅ | operator |
The operator to use for the value transformation | multiply ,divide |
|
network |
The blockchain network to use. | 'ETHEREUM' |
||
🟡 | multiply |
Multiply amount for the on-chain value | 100000000 | |
🟡 | dividend |
Which value to use as dividend when operator is "divide" | on-chain , off-chain |
off-chain |
In addition to these parameters the input parameters to make a request to the source will need to be provided. Please see the specified source's README for more details.
{
"jobID": "1",
"data": {}
}
{
"jobRunID": "1",
"data": {
"result": 0
},
"result": 0,
"statusCode": 200
}