AccessControlledOffchainAggregator Reads
From Chainlink Community Wiki
AccessControlledOffchainAggregator
LINK / USD AccessControlledOffchainAggregator contract address: 0xDfd03BfC3465107Ce570a0397b247F546a42D0fA
The Access Controlled Offchain Aggregator is the Aggregator contract that each Chainlink Node sends its observations/transmissions to.
This contract is read by the EACAggregatorProxy
Read Calls
This page contains all of the read calls you can make to the AccessControlledOffchainAggregator
contracts.
If you'd like to check out the write calls, please check the AccessControlledOffchainAggregator_Writes page.
LINK
The LINK query will provide you with the contract address of the Chainlink token that the contract compensates the nodes in
- Example Query:
curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"0x1b6b6d23"}, "latest"]}' | jq -r .result
- Example Response:
0x000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
- (remove leading 24
0
's)- LINK =
0x514910771af9ca656af840dff83e8264ecf986ca
- LINK =
- (remove leading 24
billingAccessController
The billingAccessController
is the address that has the permissions to modify the billing variables for the contract. More details regarding the billing variables are available below in the getBilling
call
- Example Query:
curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"0x996e8298"}, "latest"]}' | jq -r .result
- Example Response:
0x0000000000000000000000009db83cef9f68b63989e4e82d65d549e7ff2acda9
- (remove leading 24
0
's)- billingAccessController =
0x9db83cef9f68b63989e4e82d65d549e7ff2acda9
- billingAccessController =
- (remove leading 24
checkEnabled
The checkEnabled
call will return a boolean. If true, then the read access of the aggregator contract is limited by the AccessController
contract.
- Example Query:
curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"0xdc7f0124"}, "latest"]}' | jq -r .result
- Example Response:
0x0000000000000000000000000000000000000000000000000000000000000001
0x0...1
istrue
and0x0...0
isfalse
- checkEnabled =
true
- checkEnabled =
decimals
The decimals
value tells the reader of the contract how many decimal places they need to adjust to get the proper value.
For example, if the LINK / USD
price feed has a decimlas value of 8
, and the latest round shows a response of 726792272
, then we would shift the decimal 8 places to end with a value of 7.26792272
.
- Example Request:
DECIMALS=$(curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"0x313ce567"}, "latest"]}' | jq -r .result) && echo "$((DECIMALS))"
- Example Response:
8
- decimals =
8
- decimals =
description
The desctiption
of the Proxy is just a friendly name, in this case displaying LINK / USD*Example Query:
- Example Request:
DESCRIPTION=$(curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"0x7284e416"}, "latest"]}' | jq -r .result) && echo $DESCRIPTION | xxd -r -p
- Example Response:
LINK / USD
- description =
LINK / USD
- description =
getAnswer
This call will provide you with the data for the round you have specified.
- Example Request:
GET_ANSWER=$(curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"0xb5ab58dc000000000000000000000000000000000000000000000005000000000000347a"}, "latest"]}' | jq -r .result) && echo "$((GET_ANSWER))"
- Example Response
726792272
- getAnswer =
726792272
or, after adjusting decimals,7.26792272
- getAnswer =
getBilling
The getBilling
call will return a few values. These values are intended to be updated semi regularly via the setBilling
write call. The values and a brief description are below
- Example Request
curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"0x29937268"}, "latest"]}' | jq -r .result
- Example Response:
0x0000000000000000000000000000000000000000000000000000000000000bb80000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000001082af400000000000000000000000000000000000000000000000000000000005b3f1e10000000000000000000000000000000000000000000000000000000022379f81
- Converting the Response to Friendly Values
- maximumGasPrice -- the maximum gas price is the highest gas price that the contract will reimburse transaction fees.
uint32
0000000000000000000000000000000000000000000000000000000000000bb8
- maximumGasPrice =
3000
- maximumGasPrice =
- reasonableGasPrice -- reasonable gas price is a gas price that the contract pays 100% of.
uint32
0000000000000000000000000000000000000000000000000000000000000064
- reasonableGasPrice =
100
- reasonableGasPrice =
- microLinkPerEth -- the ratio of LINK to ETH used for calculating the reimbursement of transaction fees.
uint256
000000000000000000000000000000000000000000000000000000001082af40
- microLinkPerEth =
277000000
- microLinkPerEth =
- linkGweiPerObservation -- This is the amount of LINK (in gwei) paid to the node operators for submitting observations.
uint32
0000000000000000000000000000000000000000000000000000000005b3f1e1
- linkGweiPerObservation =
95678945
- linkGweiPerObservation =
- linkGweiPerTransmission -- This is the amount of LINK (in gwei) paid to the Chainlink Node that successfully transmits the collection of observations to the aggregator contract.
uint32
0000000000000000000000000000000000000000000000000000000022379f81
- linkGweiPerTransmission =
574070657
- linkGweiPerTransmission =
- maximumGasPrice -- the maximum gas price is the highest gas price that the contract will reimburse transaction fees.
getRoundData
Similar to the getAnswer
call, this call will get additional information from the round you have specified.
- Example Request
curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"0x9a6fc8f50000000000000000000000000000000000000000000000050000000000003493"}, "latest"]}' | jq -r .result
- Example Response
0x000000000000000000000000000000000000000000000005000000000000349300000000000000000000000000000000000000000000000000000000287aa86900000000000000000000000000000000000000000000000000000000628ce73900000000000000000000000000000000000000000000000000000000628ce7390000000000000000000000000000000000000000000000050000000000003493
- Converting the Response to Friendly Values
- roundId
uint80
0000000000000000000000000000000000000000000000050000000000003493
- roundId =
92233720368547771539
- roundId =
- answer
int256
00000000000000000000000000000000000000000000000000000000287aa869
- answer =
679127145
- answer =
- startedAt
uint256
00000000000000000000000000000000000000000000000000000000628ce739
- startedAt =
1653401401
- startedAt =
- updatedAt
uint256
00000000000000000000000000000000000000000000000000000000628ce739
- updatedAt =
1653401401
- updatedAt =
- answeredInRound
uint80
0000000000000000000000000000000000000000000000050000000000003493
- answeredInRound =
92233720368547771539
- answeredInRound =
- roundId
getTimestamp
This getTimestamp
call will provide you with the timestamp of the block containing the data from the round you have specified.
- Example Request:
GET_TIMESTAMP=$(curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"0xb633620c000000000000000000000000000000000000000000000005000000000000347a"}, "latest"]}' | jq -r .result) && LOCALTIME=$((GET_TIMESTAMP)) && date -d @$LOCALTIME
- Example Response
Mon 23 May 2022 03:47:51 PM CDT
hasAccess
This call will let you know if the provided address has access to the specified call function. For example, does Address A have permissions to request a new round? The response is a bool.
- Example Query:
- We will check to see if the owner of the contract (
0x21f73D42Eb58Ba49dDB685dc29D3bF5c0f0373CA
)has permissions to request a new round (98e5b12a
). curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"0x6b14daf800000000000000000000000021f73d42eb58ba49ddb685dc29d3bf5c0f0373ca0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000498e5b12a00000000000000000000000000000000000000000000000000000000"}, "latest"]}' | jq -r .result
- We will check to see if the owner of the contract (
- Example Response:
0x0000000000000000000000000000000000000000000000000000000000000000
0x0...1
istrue
and0x0...0
isfalse
- hasAccess =
false
- hasAccess =
latestAnswer
The latestAnswer
call provides you with the value that was written to chain during the most recent completed round
- Example Request:
LATEST_ANSWER=$(curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"0x50d25bcd"}, "latest"]}' | jq -r .result) && echo "$((LATEST_ANSWER))"
- Example Response
701697722
- latestAnswer =
701697722
or, after adjusting decimals,7.01697722
- latestAnswer =
latestConfigDetails
This call will provide you with the aggregator contract's
- Example Request
curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"0x81ff7048"}, "latest"]}' | jq -r .result
- Example Response
0x00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000be394f5fe8b4285e42eec4b0f9ab7add44b00e00000000000000000000000000000000
- Converting the Response to Friendly Values
- configCount
uint32
0000000000000000000000000000000000000000000000000000000000000002
- roundId =
2
- roundId =
- blockNumber
uint32
0000000000000000000000000000000000000000000000000000000000be394f
- answer =
12466511
- answer =
- configDigest
bytes16
5fe8b4285e42eec4b0f9ab7add44b00e00000000000000000000000000000000
- configDigest =
0x5fe8b4285e42eec4b0f9ab7add44b00e
- configDigest =
- configCount
latestRound
This call will provide you with the most recent completed round number.
- Example Request:
LATEST_ROUND=$(curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"0x668a0f02"}, "latest"]}' | jq -r .result) && echo "$((LATEST_ROUND))"
- Example Response
13462
- latestRound =
13462
- latestRound =
latestRoundData
This call is similar to getRoundData
, but it will automatically get the round data for the most recently completed round.
- Example Request:
curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","data":"0xfeaf968c"}, "latest"]}' | jq -r .result
- Example Response
0x00000000000000000000000000000000000000000000000500000000000034960000000000000000000000000000000000000000000000000000000029d30eba00000000000000000000000000000000000000000000000000000000628cfe6400000000000000000000000000000000000000000000000000000000628cfe640000000000000000000000000000000000000000000000050000000000003496
- Converting the Response to Friendly Values
- roundId
uint80
0000000000000000000000000000000000000000000000050000000000003496
- roundId =
92233720368547771542
- roundId =
- answer
int256
0000000000000000000000000000000000000000000000000000000029d30eba
- answer =
701697722
- answer =
- startedAt
uint256
00000000000000000000000000000000000000000000000000000000628cfe64
- startedAt =
1653407332
- startedAt =
- updatedAt
uint256
00000000000000000000000000000000000000000000000000000000628cfe64
- updatedAt =
1653407332
- updatedAt =
- answeredInRound
uint80
0000000000000000000000000000000000000000000000050000000000003496
- answeredInRound =
92233720368547771542
- answeredInRound =
- roundId
latestTimestamp
This call will provide you with the most timestamp (unix epoch format) of the most recently completed round.
- Example Request:
LATEST_TIMESTAMP=$(curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"8205bf6a"}, "latest"]}' | jq -r .result) && LOCALTIME=$((LATEST_TIMESTAMP)) && date -d @$LOCALTIME
- Example Response
Wed 31 Dec 1969 06:00:00 PM CST
latestTransmissionDetails
This call will provide you with some detailed information regarding the most recently completed round.
- Example Request:
curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"0xe5fe4577"}, "latest"]}' | jq -r .result
- Example Response
0x5fe8b4285e42eec4b0f9ab7add44b00e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c2d200000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000029e4922600000000000000000000000000000000000000000000000000000000628e9818
- Converting the Response to Friendly Values
- configDigest -- The digest of the most recently applied configuration.
bytes16
5fe8b4285e42eec4b0f9ab7add44b00e00000000000000000000000000000000
- configDigest =
0x5fe8b4285e42eec4b0f9ab7add44b00e
- configDigest =
- epoch --
uint32
000000000000000000000000000000000000000000000000000000000002c2d2
- epoch =
180926
- epoch =
- round -- The round number of the most recently completed round.
uint8
0000000000000000000000000000000000000000000000000000000000000006
- round =
6
- round =
- latestAnswer -- The most recently transmitted value to the most recently completed round.
int192
0000000000000000000000000000000000000000000000000000000029e49226
- latestAnswer =
702845478
- latestAnswer =
- latestTimestamp -- The timestamp of the block containing the most recently completed round
uint64
00000000000000000000000000000000000000000000000000000000628e9818
- latestTimestamp =
1653512216
- latestTimestamp =
- configDigest -- The digest of the most recently applied configuration.
linkAvailableForPayment
This will respond with the amount of LINK that is available in the contract to pay the node operators. The value is in gwei
- Example Request:
curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"0xd09dc339"}, "latest"]}' | jq -r .result
- Example Response
0x00000000000000000000000000000000000000000000013fdaf35c23ebc34a40
- Converting the Response to Friendly Values
- linkAvailableForPayment
int256
00000000000000000000000000000000000000000000013fdaf35c23ebc34a40
- linkAvailableForPayment =
5900288414742305000000
- Adjust decimal place 18 places
- linkAvailableForPayment =
5900.288414742305000000
- linkAvailableForPayment =
- Adjust decimal place 18 places
- linkAvailableForPayment =
- linkAvailableForPayment
maxAnswer
The maxAnswer
is the largest value that the aggregator contract will accept as valid.
- Example Request:
curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"0x70da2f67"}, "latest"]}' | jq -r .result
- Example Response
0x000000000000000000000000000000000000000000000000000000174876e800
- Converting the Response to Friendly Values
- minAnswer
int192
0x00000000000000000000000000000000000000000000000000000000000f4240
- maxAnswer =
100000000000
- adjusting for 8 decimals as per decimals value
- maxAnswer =
1000.00000000
- maxAnswer =
- adjusting for 8 decimals as per decimals value
- maxAnswer =
- minAnswer
minAnswer
The minAnswer
is the smallest value that the aggregator contract will accept as valid.
- Example Request:
curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0xDfd03BfC3465107Ce570a0397b247F546a42D0fA","data":"0x22adbc78"}, "latest"]}' | jq -r .result
- Example Response
0x00000000000000000000000000000000000000000000000000000000000f4240
- Converting the Response to Friendly Values
- minAnswer
int192
0x00000000000000000000000000000000000000000000000000000000000f4240
- minAnswer =
1000000
- adjusting for 8 decimals as per decimals value
- minAnswer =
0.01000000
- minAnswer =
- adjusting for 8 decimals as per decimals value
- minAnswer =
- minAnswer
oracleObservationCount
The response will provide you with the number of observations the specified Chainlink Node has made
- Example Request:
curl
- Example Response
response
owedPayment
- Example Request:
curl
- Example Response
response
owner
- Example Request:
curl
- Example Response
response
requestAccessController
This call will provide you with the address of the AccessController contract
- Example Request:
curl
- Example Response
response
- (remove leading 24
0
's)- billingAccessController =
0x641B698aD1C6E503470520B0EeCb472c0589dfE6
- billingAccessController =
- (remove leading 24
transmitters
This will provide you with the Chainlink Node accound addresses of each Chainlink Node Operator participating in the specified price feed
- Example Request:
curl
- Example Response
response
- (remove leading 24
0
's)- transmitters =
0x641B698aD1C6E503470520B0EeCb472c0589dfE6
,
- transmitters =
- (remove leading 24
typeAndVersion
This query will provide you with the type and the release version of the aggregator.
- Example Request:
curl
- Example Response
response
validatorConfig
This will respond with the address of the validator contract and the gasLimit
- Example Request:
curl
- Example Response
response
version
This gets you the version of the contract you're querying.
- Example Request:
VERSION=$(curl -s -H "Content-Type: application/json" https://$YOUR_RPC_ENDPOINT -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","data":"0x54fd4d50"}, "latest"]}' | jq -r .result) && echo "$((VERSION))"
- Example Response
4
- version =
4
- version =