Actions

AccessControlledOffchainAggregator Reads: Difference between revisions

From Chainlink Community Wiki

No edit summary
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
==='''EACAggregatorProxy''' ===
==='''AccessControlledOffchainAggregator''' ===
'''LINK / USD EAC AggregatorProxy contract address: [https://etherscan.io/address/0x2c1d072e956affc0d435cb7ac38ef18d24d9127c#readContract 0x2c1d072e956affc0d435cb7ac38ef18d24d9127c]'''
'''LINK / USD AccessControlledOffchainAggregator contract address: [https://etherscan.io/address/0xdfd03bfc3465107ce570a0397b247f546a42d0fa 0xDfd03BfC3465107Ce570a0397b247F546a42D0fA]'''


The Access Controlled Aggregator Proxy is a proxy contract that enables the owner to point it to other contracts as needed/desired.
The Access Controlled Offchain Aggregator is the Aggregator contract that each Chainlink Node sends its observations/transmissions to.


This prevents the users from having to update anything if they wanted to move to a new contract version/release
This contract is read by the <code>EACAggregatorProxy</code>
===='''Read Calls'''====
===='''Read Calls'''====
This page contains all of the read calls you can make to the <code>EACAggregatorProxy</code> contracts.
This page contains all of the read calls you can make to the <code>AccessControlledOffchainAggregator</code> contracts.


If you'd like to check out the write calls, please check the [[EACAggregatorProxy_Writes]] page.
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:
**<code>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</code>


*Example Response:
**<code>0x000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca</code>
***(remove leading 24 <code>0</code>'s)
****LINK = <code>'''0x514910771af9ca656af840dff83e8264ecf986ca'''</code>
----
----
====='''accessController'''=====
====='''billingAccessController'''=====
The <code>accessController</code> is a smart contract that acts as a whitelist for which addresses are able to call the contract.  For the LINK / USD price feed, the referenced <code>accessController</code> smart contract is a null value set to <code>0x0000000000000000000000000000000000000000</code>
The <code>billingAccessController</code> 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 <code>[[Test|getBilling]]</code> call
*Example Query:
*Example Query:
**<code>ACCESS_CONTROLLER=$(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":"0xbc43cbaf"}, "latest"]}' | jq -r .result) && echo "$ACCESS_CONTROLLER"</code>
**<code>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</code>


*Example Response:
*Example Response:
** <code>0x0000000000000000000000000000000000000000000000000000000000000000</code>
**<code>0x0000000000000000000000009db83cef9f68b63989e4e82d65d549e7ff2acda9</code>
***(remove leading 24 <code>0</code>'s)
***(remove leading 24 <code>0</code>'s)
****accessController = <code>'''0x0000000000000000000000000000000000000000'''</code>
****billingAccessController = <code>'''0x9db83cef9f68b63989e4e82d65d549e7ff2acda9'''</code>
----
----
====='''aggregator''' =====
====='''checkEnabled''' =====
The <code>aggregator</code> is the on-chain contract that each of the Chainlink Nodes responds to.  The <code>AggregatorProxy</code> contract points to the configured Aggregator as it's primary source of information
The <code>checkEnabled</code> call will return a boolean.  If true, then the read access of the aggregator contract is limited by the <code>AccessController</code> contract.
*Example Query:
*Example Query:
**<code>AGGREGATOR=$(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":"0x245a7bfc"}, "latest"]}' | jq -r .result) && echo "$AGGREGATOR"</code>
**<code>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</code>


*Example Response:
*Example Response:
**<code>0x000000000000000000000000dfd03bfc3465107ce570a0397b247f546a42d0fa</code>
**<code>0x0000000000000000000000000000000000000000000000000000000000000001</code>
***(remove leading 24 <code>0</code>'s)
***<code>0x0...1</code> is <code>true</code> and <code>0x0...0</code> is <code>false</code>
****aggregator = <code>'''0xdfd03bfc3465107ce570a0397b247f546a42d0fa'''</code>
****checkEnabled = <code>'''true'''</code>
----
 
===== '''decimals''' =====
The <code>decimals</code> value tells the reader of the contract how many decimal places they need to adjust to get the proper value.
 
For example, if the <code>LINK / USD</code> price feed has a decimlas value of <code>8</code>, and the latest round shows a response of <code>726792272</code>, then we would shift the decimal 8 places to end with a value of <code>7.26792272</code>.
 
* Example Request:
** <code>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))"</code>
* Example Response:
** <code>8</code>
*** decimals = <code>'''8'''</code>
 
----
 
===== '''description''' =====
The <code>desctiption</code> of the Proxy is just a friendly name, in this case displaying LINK / USD*Example Query:
 
* Example Request:
** <code>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</code>
 
* Example Response:
** <code>LINK / USD</code>
*** description = <code>'''LINK / USD'''</code>
 
----
 
===== '''getAnswer''' =====
This call will provide you with the data for the round you have specified.
 
* Example Request:
** <code>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))"</code>
* Example Response
** <code>726792272</code>
*** getAnswer = <code>'''726792272'''</code> or, after adjusting decimals, <code>'''7.26792272'''</code>
 
----
 
===== '''getBilling''' =====
The <code>getBilling</code> call will return a few values.  These values are intended to be updated semi regularly via the <code>setBilling</code> write call.  The values and a brief description are below
 
* Example Request
** <code>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</code>
 
* Example Response:
** <code>0x0000000000000000000000000000000000000000000000000000000000000bb80000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000001082af400000000000000000000000000000000000000000000000000000000005b3f1e10000000000000000000000000000000000000000000000000000000022379f81</code>
 
* Converting the Response to Friendly Values
** maximumGasPrice -- the maximum gas price is the highest gas price that the contract will reimburse transaction fees.
*** <code>uint32</code>
*** <code>0000000000000000000000000000000000000000000000000000000000000bb8</code>
**** maximumGasPrice = <code>'''3000'''</code>
** reasonableGasPrice -- reasonable gas price is a gas price that the contract pays 100% of.
*** <code>uint32</code>
*** <code>0000000000000000000000000000000000000000000000000000000000000064</code>
**** reasonableGasPrice = <code>'''100'''</code>
** microLinkPerEth -- the ratio of LINK to ETH used for calculating the reimbursement of transaction fees.
*** <code>uint256</code>
*** <code>000000000000000000000000000000000000000000000000000000001082af40</code>
**** microLinkPerEth = <code>'''277000000'''</code>
** linkGweiPerObservation -- This is the amount of LINK (in gwei) paid to the node operators for submitting observations.
*** <code>uint32</code>
*** <code>0000000000000000000000000000000000000000000000000000000005b3f1e1</code>
**** linkGweiPerObservation = <code>'''95678945'''</code>
** 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.
*** <code>uint32</code>
*** <code>0000000000000000000000000000000000000000000000000000000022379f81</code>
**** linkGweiPerTransmission = <code>'''574070657'''</code>
 
----
 
===== '''getRoundData''' =====
Similar to the  <code>getAnswer</code> call, this call will get additional information from the round you have specified.
 
* Example Request
** <code>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</code>
* Example Response
** <code>0x000000000000000000000000000000000000000000000005000000000000349300000000000000000000000000000000000000000000000000000000287aa86900000000000000000000000000000000000000000000000000000000628ce73900000000000000000000000000000000000000000000000000000000628ce7390000000000000000000000000000000000000000000000050000000000003493</code>
* Converting the Response to Friendly Values
** roundId
*** <code>uint80</code>
*** <code>0000000000000000000000000000000000000000000000050000000000003493</code>
**** roundId = <code>'''92233720368547771539'''</code>
** answer
*** <code>int256</code>
*** <code>00000000000000000000000000000000000000000000000000000000287aa869</code>
**** answer = <code>'''679127145'''</code>
** startedAt
*** <code>uint256</code>
*** <code>00000000000000000000000000000000000000000000000000000000628ce739</code>
**** startedAt = <code>'''1653401401'''</code>
** updatedAt
*** <code>uint256</code>
*** <code>00000000000000000000000000000000000000000000000000000000628ce739</code>
**** updatedAt = <code>'''1653401401'''</code>
** answeredInRound
*** <code>uint80</code>
*** <code>0000000000000000000000000000000000000000000000050000000000003493</code>
**** answeredInRound = <code>'''92233720368547771539'''</code>
 
----
 
===== '''getTimestamp''' =====
This <code>getTimestamp</code> call will provide you with the timestamp of the block containing the data from the round you have specified.
 
* Example Request:
** <code>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</code>
* Example Response
** <code>'''Mon 23 May 2022 03:47:51 PM CDT'''</code>
 
----
 
===== '''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 (<code>0x21f73D42Eb58Ba49dDB685dc29D3bF5c0f0373CA</code>)has permissions to request a new round (<code>98e5b12a</code>).
**<code>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</code>
 
*Example Response:
**<code>0x0000000000000000000000000000000000000000000000000000000000000000</code>
***<code>0x0...1</code> is <code>true</code> and <code>0x0...0</code> is <code>false</code>
****hasAccess = <code>'''false'''</code>
----
 
===== '''latestAnswer''' =====
The <code>latestAnswer</code> call provides you with the value that was written to chain during the most recent completed round
 
* Example Request:
** <code>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))"</code>
* Example Response
** <code>701697722</code>
*** latestAnswer = <code>'''701697722'''</code> or, after adjusting decimals, <code>'''7.01697722'''</code>
 
----
 
===== '''latestConfigDetails''' =====
This call will provide you with the aggregator contract's
 
* Example Request
** <code>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</code>
 
* Example Response
** <code>0x00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000be394f5fe8b4285e42eec4b0f9ab7add44b00e00000000000000000000000000000000</code>
 
* Converting the Response to Friendly Values
** configCount
*** <code>uint32</code>
*** <code>0000000000000000000000000000000000000000000000000000000000000002</code>
**** roundId = <code>'''2'''</code>
** blockNumber
*** <code>uint32</code>
*** <code>0000000000000000000000000000000000000000000000000000000000be394f</code>
**** answer = <code>'''12466511'''</code>
** configDigest
*** <code>bytes16</code>
*** <code>5fe8b4285e42eec4b0f9ab7add44b00e00000000000000000000000000000000</code>
**** configDigest = <code>'''0x5fe8b4285e42eec4b0f9ab7add44b00e'''</code>
 
----
 
===== '''latestRound''' =====
This call will provide you with the most recent completed round number.
 
* Example Request:
** <code>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))"</code>
* Example Response
** <code>13462</code>
*** latestRound = <code>'''13462'''</code>
 
----
 
===== '''latestRoundData''' =====
This call is similar to <code>getRoundData</code>, but it will automatically get the round data for the most recently completed round.
 
* Example Request:
** <code>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</code>
* Example Response
** <code>0x00000000000000000000000000000000000000000000000500000000000034960000000000000000000000000000000000000000000000000000000029d30eba00000000000000000000000000000000000000000000000000000000628cfe6400000000000000000000000000000000000000000000000000000000628cfe640000000000000000000000000000000000000000000000050000000000003496</code>
 
* Converting the Response to Friendly Values
** roundId
*** <code>uint80</code>
*** <code>0000000000000000000000000000000000000000000000050000000000003496</code>
**** roundId = <code>'''92233720368547771542'''</code>
** answer
*** <code>int256</code> <code>0000000000000000000000000000000000000000000000000000000029d30eba</code>
**** answer = <code>'''701697722'''</code>
** startedAt
*** <code>uint256</code>
*** <code>00000000000000000000000000000000000000000000000000000000628cfe64</code>
**** startedAt = <code>'''1653407332'''</code>
** updatedAt
*** <code>uint256</code>
*** <code>00000000000000000000000000000000000000000000000000000000628cfe64</code>
**** updatedAt = <code>'''1653407332'''</code>
** answeredInRound
*** <code>uint80</code>
*** <code>0000000000000000000000000000000000000000000000050000000000003496</code>
**** answeredInRound = <code>'''92233720368547771542'''</code>
 
----
 
===== '''latestTimestamp''' =====
This call will provide you with the most timestamp (unix epoch format) of the most recently completed round.
 
* Example Request:
** <code>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</code>
* Example Response
** <code>'''Wed 31 Dec 1969 06:00:00 PM CST'''</code>
 
----
 
===== '''latestTransmissionDetails''' =====
This call will provide you with some detailed information regarding the most recently completed round.
 
* Example Request:
** <code>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</code>
* Example Response
** <code>0x5fe8b4285e42eec4b0f9ab7add44b00e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c2d200000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000029e4922600000000000000000000000000000000000000000000000000000000628e9818</code>
 
* Converting the Response to Friendly Values
** configDigest -- The digest of the most recently applied configuration.
*** <code>bytes16</code>
*** <code>5fe8b4285e42eec4b0f9ab7add44b00e00000000000000000000000000000000</code>
**** configDigest = <code>'''0x5fe8b4285e42eec4b0f9ab7add44b00e'''</code>
** epoch --
*** <code>uint32</code>
*** <code>000000000000000000000000000000000000000000000000000000000002c2d2</code>
**** epoch = <code>'''180926'''</code>
** round -- The round number of the most recently completed round.
*** <code>uint8</code>
*** <code>0000000000000000000000000000000000000000000000000000000000000006</code>
**** round = <code>'''6'''</code>
** latestAnswer -- The most recently transmitted value to the most recently completed round.
*** <code>int192</code>
*** <code>0000000000000000000000000000000000000000000000000000000029e49226</code>
**** latestAnswer = <code>'''702845478'''</code>
** latestTimestamp -- The timestamp of the block containing the most recently completed round
*** <code>uint64</code>
*** <code>00000000000000000000000000000000000000000000000000000000628e9818</code>
**** latestTimestamp = <code>'''1653512216'''</code>
 
----
 
===== '''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:
** <code>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</code>
* Example Response
** <code>0x00000000000000000000000000000000000000000000013fdaf35c23ebc34a40</code>
*Converting the Response to Friendly Values
** linkAvailableForPayment
***<code>int256</code>
***<code>00000000000000000000000000000000000000000000013fdaf35c23ebc34a40</code>
****linkAvailableForPayment = <code>5900288414742305000000</code>
*****Adjust decimal 18 places
******linkAvailableForPayment = <code>'''5900.288414742305000000'''</code>
 
----
 
===== '''maxAnswer''' =====
The <code>maxAnswer</code>is the largest value that the aggregator contract will accept as valid.
*Example Request:
** <code>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</code>
* Example Response
** <code>0x000000000000000000000000000000000000000000000000000000174876e800</code>
*Converting the Response to Friendly Values
** minAnswer
***<code>int192</code>
***<code>0x00000000000000000000000000000000000000000000000000000000000f4240</code>
****maxAnswer = <code>100000000000</code>
*****adjusting for 8 decimals as per [https://wiki.dextrac.com/index.php/AccessControlledOffchainAggregator_Reads#decimals decimals value]
******maxAnswer = <code>'''1000.00000000'''</code>
 
----
 
===== '''minAnswer''' =====
The <code>minAnswer</code>is the smallest value that the aggregator contract will accept as valid.
*Example Request:
** <code>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</code>
* Example Response
** <code>0x00000000000000000000000000000000000000000000000000000000000f4240</code>
*Converting the Response to Friendly Values
** minAnswer
***<code>int192</code>
***<code>0x00000000000000000000000000000000000000000000000000000000000f4240</code>
****minAnswer = <code>1000000</code>
*****adjusting for 8 decimals as per [https://wiki.dextrac.com/index.php/AccessControlledOffchainAggregator_Reads#decimals decimals value]
******minAnswer = <code>'''0.01000000'''</code>
 
----
 
===== '''oracleObservationCount''' =====
The response will provide you with the number of observations the specified Chainlink Node has made
 
*Example Request:
**We'll query the contract to see how many observations LinkPool's node (<code>0xcC29be4Ca92D4Ecc43C8451fBA94C200B83991f6</code>)has made
*** <code>OBSERV_COUNT=$(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":"0xe4902f82000000000000000000000000cc29be4ca92d4ecc43c8451fba94c200b83991f6"}, "latest"]}' | jq -r .result) && echo "$((OBSERV_COUNT))"</code>
* Example Response
** <code>9</code>
***oracleObservationCount = <code>'''9'''</code>
 
----
 
===== '''owedPayment''' =====
Querying this will provide you with the amount of LINK (in gwei) that is owed to the specified Chianlink Node
*Example Request:
**We'll query the contract to see how much LINK is owed to Fiews Chianlin knode.
*** <code>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":"0x0eafb25b000000000000000000000000218B5a7861dBf368D09A84E0dBfF6C6DDbf99DB8"}, "latest"]}' | jq -r .result</code>
* Example Response
** <code>0x0000000000000000000000000000000000000000000000000bf3477122e1da00</code>
*Converting the Response to Friendly Values
**owedPayment
***<code>uint256</code>
***<code>0000000000000000000000000000000000000000000000000bf3477122e1da00</code>
****owedPayment = <code>861110505000000000</code>
*****Adjust decimal 18 places
******owedPayment = <code>'''0.861110505000000000'''</code>
 
----
 
===== '''owner''' =====
This query will provide you with the address of the owner of the aggregator contract
*Example Request:
** <code>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":"0x8da5cb5b"}, "latest"]}' | jq -r .result</code>
* Example Response
** <code>0x00000000000000000000000021f73d42eb58ba49ddb685dc29d3bf5c0f0373ca</code>
***Remove the leading 24 <code>0</code>'s
****owner = <code>'''0x21f73d42eb58ba49ddb685dc29d3bf5c0f0373ca'''</code>
----
===== '''requesterAccessController''' =====
This call will provide you with the address of the AccessController contract
 
* Example Request:
** <code>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":"0x70efdf2d"}, "latest"]}' | jq -r .result</code>
* Example Response
** <code>0x000000000000000000000000641b698ad1c6e503470520b0eecb472c0589dfe6</code>
*** (remove leading 24 <code>0</code>'s)
****billingAccessController = <code>'''0x641B698aD1C6E503470520B0EeCb472c0589dfE6'''</code>
 
----
 
===== '''transmitters''' =====
This will provide you with the Chainlink Node accound addresses of each Chainlink Node Operator participating in the specified price feed
 
* Example Request:
** <code>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":"0x81411834"}, "latest"]}' | jq -r .result</code>
* Example Response
** <code>0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001f000000000000000000000000e3e0596ac55ae6044b757bab27426f7dc9e018d4000000000000000000000000cf4be57aa078dc7568c631be7a73adc1cda992f800000000000000000000000057cd4848b12469618b689163f507817940acca020000000000000000000000007663c5790e1ebf04197245d541279d13f3c2f362000000000000000000000000bbf078a8849d74623e36e6dbbdc8e0a35e657c26000000000000000000000000c74ce67bfc623c803d48afc74a09a6ff6b599003000000000000000000000000b976d01275b809333e3efd76d1d31fe9264466d00000000000000000000000005565b5362ff9f468ba2f144f38b87187c9a010a8000000000000000000000000218b5a7861dbf368d09a84e0dbff6c6ddbf99db8000000000000000000000000edbed9f5dea03dd0ec484577c41502af68b7c46a0000000000000000000000002a4a7afa40a9d03b425752fb4cfd5f0ff5b3964c000000000000000000000000dbfea8d5822141c13f92caa06eb94d0f3d67c243000000000000000000000000f16e77a989529aa4c58318acee8a1548df3fccc10000000000000000000000003c4ad65f5b4884397e1f09596c7ac7f8f95b3ff3000000000000000000000000cc29be4ca92d4ecc43c8451fba94c200b83991f60000000000000000000000009cfab1513ffa293e7023159b3c7a4c984b6a3480000000000000000000000000f07131f578a5f708ae2ccb9faf98458099e0ffb40000000000000000000000008b1d49a93a84b5da0917a1ed42d8a3e191c28524000000000000000000000000f34ac04a28f7cb5324a167c96b24ade9c742b44f00000000000000000000000061317c73d0225b2e37140fb9664d607b450613c600000000000000000000000043793ee58e0a3d920e3e4a115a9fa07dc4b09715000000000000000000000000f42336e35d5c1d1d0db3140e174bcfc3945f6822000000000000000000000000ddeb598fe902a13cc523aaff5240e9988edce1700000000000000000000000007bfb89db2d7217c57c3ad3d4b55826efd17dc2e90000000000000000000000008f3ab0e87b70a57bd4980111a99a1b2c4b8334f40000000000000000000000000312ea121df0a323ff535b753172736cc9d53d13000000000000000000000000a938d77590af1d98bab7dc4a0bde594fc3f9c40300000000000000000000000064c735d72eab90c04da523b6b9895773acb60f5d0000000000000000000000005a8216a9c47ee2e8df1c874252fdee467215c25b000000000000000000000000dde59ceec7a2cc8b2bd78199877ba22018966813000000000000000000000000c4b732fd121f2f3783a9ac2a6c62fd535fd13fda</code>
* Converting the Response to Friendly Format
**transmitters
***<code>addresses []</code> (an array of addresses)
***<code>0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001f000000000000000000000000e3e0596ac55ae6044b757bab27426f7dc9e018d4000000000000000000000000cf4be57aa078dc7568c631be7a73adc1cda992f800000000000000000000000057cd4848b12469618b689163f507817940acca020000000000000000000000007663c5790e1ebf04197245d541279d13f3c2f362000000000000000000000000bbf078a8849d74623e36e6dbbdc8e0a35e657c26000000000000000000000000c74ce67bfc623c803d48afc74a09a6ff6b599003000000000000000000000000b976d01275b809333e3efd76d1d31fe9264466d00000000000000000000000005565b5362ff9f468ba2f144f38b87187c9a010a8000000000000000000000000218b5a7861dbf368d09a84e0dbff6c6ddbf99db8000000000000000000000000edbed9f5dea03dd0ec484577c41502af68b7c46a0000000000000000000000002a4a7afa40a9d03b425752fb4cfd5f0ff5b3964c000000000000000000000000dbfea8d5822141c13f92caa06eb94d0f3d67c243000000000000000000000000f16e77a989529aa4c58318acee8a1548df3fccc10000000000000000000000003c4ad65f5b4884397e1f09596c7ac7f8f95b3ff3000000000000000000000000cc29be4ca92d4ecc43c8451fba94c200b83991f60000000000000000000000009cfab1513ffa293e7023159b3c7a4c984b6a3480000000000000000000000000f07131f578a5f708ae2ccb9faf98458099e0ffb40000000000000000000000008b1d49a93a84b5da0917a1ed42d8a3e191c28524000000000000000000000000f34ac04a28f7cb5324a167c96b24ade9c742b44f00000000000000000000000061317c73d0225b2e37140fb9664d607b450613c600000000000000000000000043793ee58e0a3d920e3e4a115a9fa07dc4b09715000000000000000000000000f42336e35d5c1d1d0db3140e174bcfc3945f6822000000000000000000000000ddeb598fe902a13cc523aaff5240e9988edce1700000000000000000000000007bfb89db2d7217c57c3ad3d4b55826efd17dc2e90000000000000000000000008f3ab0e87b70a57bd4980111a99a1b2c4b8334f40000000000000000000000000312ea121df0a323ff535b753172736cc9d53d13000000000000000000000000a938d77590af1d98bab7dc4a0bde594fc3f9c40300000000000000000000000064c735d72eab90c04da523b6b9895773acb60f5d0000000000000000000000005a8216a9c47ee2e8df1c874252fdee467215c25b000000000000000000000000dde59ceec7a2cc8b2bd78199877ba22018966813000000000000000000000000c4b732fd121f2f3783a9ac2a6c62fd535fd13fda</code>
****transmitters = <code>'''[0xe3E0596AC55Ae6044b757baB27426F7dC9e018d4,0xCF4Be57aA078Dc7568C631BE7A73adc1cdA992F8,0x57CD4848b12469618b689163f507817940AccA02,0x7663C5790E1eBf04197245d541279D13f3c2f362,0xBbf078A8849D74623e36E6DBBdC8e0a35E657C26,0xc74cE67BfC623c803D48AFc74a09A6FF6b599003,0xb976d01275B809333E3EfD76D1d31fE9264466D0,0x5565b5362FF9f468bA2f144f38b87187C9a010A8,0x218B5a7861dBf368D09A84E0dBfF6C6DDbf99DB8,0xEdBED9F5dEA03dD0ec484577C41502af68B7c46a,0x2a4a7afA40a9D03B425752fb4cFd5f0FF5b3964C,0xDbfea8D5822141c13f92CaA06EB94d0F3d67C243,0xf16e77a989529AA4C58318acEe8A1548Df3fcCc1,0x3C4ad65F5b4884397e1F09596c7ac7F8F95b3fF3,0xcC29be4Ca92D4Ecc43C8451fBA94C200B83991f6,0x9cFAb1513FFA293E7023159B3C7A4C984B6a3480,0xF07131F578a5F708AE2CCB9faF98458099E0FFB4,0x8b1d49a93A84B5dA0917a1ed42D8a3E191C28524,0xf34aC04a28F7CB5324A167C96B24ADE9c742B44f,0x61317C73d0225b2E37140fb9664d607B450613C6,0x43793ee58E0a3D920e3e4a115A9FA07dc4B09715,0xF42336e35D5C1D1D0DB3140E174BcFc3945f6822,0xddEB598fe902A13Cc523aaff5240e9988eDCE170,0x7BFb89db2d7217c57C3Ad3d4B55826eFD17dC2e9,0x8F3Ab0e87B70a57bD4980111a99a1b2c4b8334F4,0x0312EA121df0a323fF535B753172736cc9d53d13,0xa938d77590aF1d98BaB7dc4a0bde594fC3F9c403,0x64c735D72EAB90C04da523B6b9895773ACb60F5D,0x5a8216a9c47ee2E8Df1c874252fDEe467215C25b,0xDdE59ceeC7A2cC8B2bD78199877BA22018966813,0xC4b732Fd121F2f3783A9Ac2a6C62fD535FD13FdA]'''</code>
 
----'''typeAndVersion'''
 
This query will provide you with the type and the release version of the aggregator.
 
* Example Request:
** <code>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":"0x181f5a77"}, "latest"]}' | jq -r .result</code>
* Example Response
** <code>0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000028416363657373436f6e74726f6c6c65644f6666636861696e41676772656761746f7220322e302e30000000000000000000000000000000000000000000000000</code>
* Converting the Response to a Friendly Format
**typeAndVersion
***<code>string</code>
***<code>0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000028416363657373436f6e74726f6c6c65644f6666636861696e41676772656761746f7220322e302e30000000000000000000000000000000000000000000000000</code>
****typeAndVersion = <code>'''AccessControlledOffchainAggregator 2.0.0'''</code>
 
----
 
===== '''validatorConfig''' =====
This will respond with the address of the validator contract and the gasLimit
 
* Example Request:
** <code>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":"0x8e0566de"}, "latest"]}' | jq -r .result</code>
* Example Response
** <code>0x000000000000000000000000bcfd9b1a97ccd0a3942f0408350cdc281cdca1b10000000000000000000000000000000000000000000000000000000000033450</code>
*Converting the Response to a Friendly Format
**validator
***<code>address</code>
***<code>000000000000000000000000bcfd9b1a97ccd0a3942f0408350cdc281cdca1b1</code>
****validator = <code>'''0xBcFd9b1a97cCD0a3942f0408350cdc281cDCa1B1'''</code>
**gasLimit
***<code>uint32</code>
***<code>0000000000000000000000000000000000000000000000000000000000033450</code>
****gasLimit = <code>'''210000'''</code>
 
----
----
===== '''version''' =====
This gets you the version of the contract you're querying.
* Example Request:
** <code>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))"</code>
* Example Response
** <code>4</code>
*** version = <code>'''4'''</code>

Latest revision as of 21:57, 25 May 2022

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

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

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 is true and 0x0...0 is false
        • checkEnabled = true

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

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

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

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
    • reasonableGasPrice -- reasonable gas price is a gas price that the contract pays 100% of.
      • uint32
      • 0000000000000000000000000000000000000000000000000000000000000064
        • reasonableGasPrice = 100
    • microLinkPerEth -- the ratio of LINK to ETH used for calculating the reimbursement of transaction fees.
      • uint256
      • 000000000000000000000000000000000000000000000000000000001082af40
        • microLinkPerEth = 277000000
    • linkGweiPerObservation -- This is the amount of LINK (in gwei) paid to the node operators for submitting observations.
      • uint32
      • 0000000000000000000000000000000000000000000000000000000005b3f1e1
        • linkGweiPerObservation = 95678945
    • 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

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
    • answer
      • int256
      • 00000000000000000000000000000000000000000000000000000000287aa869
        • answer = 679127145
    • startedAt
      • uint256
      • 00000000000000000000000000000000000000000000000000000000628ce739
        • startedAt = 1653401401
    • updatedAt
      • uint256
      • 00000000000000000000000000000000000000000000000000000000628ce739
        • updatedAt = 1653401401
    • answeredInRound
      • uint80
      • 0000000000000000000000000000000000000000000000050000000000003493
        • answeredInRound = 92233720368547771539

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
  • Example Response:
    • 0x0000000000000000000000000000000000000000000000000000000000000000
      • 0x0...1 is true and 0x0...0 is false
        • hasAccess = false

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

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
    • blockNumber
      • uint32
      • 0000000000000000000000000000000000000000000000000000000000be394f
        • answer = 12466511
    • configDigest
      • bytes16
      • 5fe8b4285e42eec4b0f9ab7add44b00e00000000000000000000000000000000
        • configDigest = 0x5fe8b4285e42eec4b0f9ab7add44b00e

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

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
    • answer
      • int256 0000000000000000000000000000000000000000000000000000000029d30eba
        • answer = 701697722
    • startedAt
      • uint256
      • 00000000000000000000000000000000000000000000000000000000628cfe64
        • startedAt = 1653407332
    • updatedAt
      • uint256
      • 00000000000000000000000000000000000000000000000000000000628cfe64
        • updatedAt = 1653407332
    • answeredInRound
      • uint80
      • 0000000000000000000000000000000000000000000000050000000000003496
        • answeredInRound = 92233720368547771542

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
    • epoch --
      • uint32
      • 000000000000000000000000000000000000000000000000000000000002c2d2
        • epoch = 180926
    • round -- The round number of the most recently completed round.
      • uint8
      • 0000000000000000000000000000000000000000000000000000000000000006
        • round = 6
    • latestAnswer -- The most recently transmitted value to the most recently completed round.
      • int192
      • 0000000000000000000000000000000000000000000000000000000029e49226
        • latestAnswer = 702845478
    • latestTimestamp -- The timestamp of the block containing the most recently completed round
      • uint64
      • 00000000000000000000000000000000000000000000000000000000628e9818
        • latestTimestamp = 1653512216

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 18 places
            • linkAvailableForPayment = 5900.288414742305000000

maxAnswer

The maxAnsweris 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

minAnswer

The minAnsweris 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

oracleObservationCount

The response will provide you with the number of observations the specified Chainlink Node has made

  • Example Request:
    • We'll query the contract to see how many observations LinkPool's node (0xcC29be4Ca92D4Ecc43C8451fBA94C200B83991f6)has made
      • OBSERV_COUNT=$(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":"0xe4902f82000000000000000000000000cc29be4ca92d4ecc43c8451fba94c200b83991f6"}, "latest"]}' | jq -r .result) && echo "$((OBSERV_COUNT))"
  • Example Response
    • 9
      • oracleObservationCount = 9

owedPayment

Querying this will provide you with the amount of LINK (in gwei) that is owed to the specified Chianlink Node

  • Example Request:
    • We'll query the contract to see how much LINK is owed to Fiews Chianlin knode.
      • 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":"0x0eafb25b000000000000000000000000218B5a7861dBf368D09A84E0dBfF6C6DDbf99DB8"}, "latest"]}' | jq -r .result
  • Example Response
    • 0x0000000000000000000000000000000000000000000000000bf3477122e1da00
  • Converting the Response to Friendly Values
    • owedPayment
      • uint256
      • 0000000000000000000000000000000000000000000000000bf3477122e1da00
        • owedPayment = 861110505000000000
          • Adjust decimal 18 places
            • owedPayment = 0.861110505000000000

owner

This query will provide you with the address of the owner of the aggregator contract

  • 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":"0x8da5cb5b"}, "latest"]}' | jq -r .result
  • Example Response
    • 0x00000000000000000000000021f73d42eb58ba49ddb685dc29d3bf5c0f0373ca
      • Remove the leading 24 0's
        • owner = 0x21f73d42eb58ba49ddb685dc29d3bf5c0f0373ca

requesterAccessController

This call will provide you with the address of the AccessController contract

  • 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":"0x70efdf2d"}, "latest"]}' | jq -r .result
  • Example Response
    • 0x000000000000000000000000641b698ad1c6e503470520b0eecb472c0589dfe6
      • (remove leading 24 0's)
        • billingAccessController = 0x641B698aD1C6E503470520B0EeCb472c0589dfE6

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 -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":"0x81411834"}, "latest"]}' | jq -r .result
  • Example Response
    • 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001f000000000000000000000000e3e0596ac55ae6044b757bab27426f7dc9e018d4000000000000000000000000cf4be57aa078dc7568c631be7a73adc1cda992f800000000000000000000000057cd4848b12469618b689163f507817940acca020000000000000000000000007663c5790e1ebf04197245d541279d13f3c2f362000000000000000000000000bbf078a8849d74623e36e6dbbdc8e0a35e657c26000000000000000000000000c74ce67bfc623c803d48afc74a09a6ff6b599003000000000000000000000000b976d01275b809333e3efd76d1d31fe9264466d00000000000000000000000005565b5362ff9f468ba2f144f38b87187c9a010a8000000000000000000000000218b5a7861dbf368d09a84e0dbff6c6ddbf99db8000000000000000000000000edbed9f5dea03dd0ec484577c41502af68b7c46a0000000000000000000000002a4a7afa40a9d03b425752fb4cfd5f0ff5b3964c000000000000000000000000dbfea8d5822141c13f92caa06eb94d0f3d67c243000000000000000000000000f16e77a989529aa4c58318acee8a1548df3fccc10000000000000000000000003c4ad65f5b4884397e1f09596c7ac7f8f95b3ff3000000000000000000000000cc29be4ca92d4ecc43c8451fba94c200b83991f60000000000000000000000009cfab1513ffa293e7023159b3c7a4c984b6a3480000000000000000000000000f07131f578a5f708ae2ccb9faf98458099e0ffb40000000000000000000000008b1d49a93a84b5da0917a1ed42d8a3e191c28524000000000000000000000000f34ac04a28f7cb5324a167c96b24ade9c742b44f00000000000000000000000061317c73d0225b2e37140fb9664d607b450613c600000000000000000000000043793ee58e0a3d920e3e4a115a9fa07dc4b09715000000000000000000000000f42336e35d5c1d1d0db3140e174bcfc3945f6822000000000000000000000000ddeb598fe902a13cc523aaff5240e9988edce1700000000000000000000000007bfb89db2d7217c57c3ad3d4b55826efd17dc2e90000000000000000000000008f3ab0e87b70a57bd4980111a99a1b2c4b8334f40000000000000000000000000312ea121df0a323ff535b753172736cc9d53d13000000000000000000000000a938d77590af1d98bab7dc4a0bde594fc3f9c40300000000000000000000000064c735d72eab90c04da523b6b9895773acb60f5d0000000000000000000000005a8216a9c47ee2e8df1c874252fdee467215c25b000000000000000000000000dde59ceec7a2cc8b2bd78199877ba22018966813000000000000000000000000c4b732fd121f2f3783a9ac2a6c62fd535fd13fda
  • Converting the Response to Friendly Format
    • transmitters
      • addresses [] (an array of addresses)
      • 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001f000000000000000000000000e3e0596ac55ae6044b757bab27426f7dc9e018d4000000000000000000000000cf4be57aa078dc7568c631be7a73adc1cda992f800000000000000000000000057cd4848b12469618b689163f507817940acca020000000000000000000000007663c5790e1ebf04197245d541279d13f3c2f362000000000000000000000000bbf078a8849d74623e36e6dbbdc8e0a35e657c26000000000000000000000000c74ce67bfc623c803d48afc74a09a6ff6b599003000000000000000000000000b976d01275b809333e3efd76d1d31fe9264466d00000000000000000000000005565b5362ff9f468ba2f144f38b87187c9a010a8000000000000000000000000218b5a7861dbf368d09a84e0dbff6c6ddbf99db8000000000000000000000000edbed9f5dea03dd0ec484577c41502af68b7c46a0000000000000000000000002a4a7afa40a9d03b425752fb4cfd5f0ff5b3964c000000000000000000000000dbfea8d5822141c13f92caa06eb94d0f3d67c243000000000000000000000000f16e77a989529aa4c58318acee8a1548df3fccc10000000000000000000000003c4ad65f5b4884397e1f09596c7ac7f8f95b3ff3000000000000000000000000cc29be4ca92d4ecc43c8451fba94c200b83991f60000000000000000000000009cfab1513ffa293e7023159b3c7a4c984b6a3480000000000000000000000000f07131f578a5f708ae2ccb9faf98458099e0ffb40000000000000000000000008b1d49a93a84b5da0917a1ed42d8a3e191c28524000000000000000000000000f34ac04a28f7cb5324a167c96b24ade9c742b44f00000000000000000000000061317c73d0225b2e37140fb9664d607b450613c600000000000000000000000043793ee58e0a3d920e3e4a115a9fa07dc4b09715000000000000000000000000f42336e35d5c1d1d0db3140e174bcfc3945f6822000000000000000000000000ddeb598fe902a13cc523aaff5240e9988edce1700000000000000000000000007bfb89db2d7217c57c3ad3d4b55826efd17dc2e90000000000000000000000008f3ab0e87b70a57bd4980111a99a1b2c4b8334f40000000000000000000000000312ea121df0a323ff535b753172736cc9d53d13000000000000000000000000a938d77590af1d98bab7dc4a0bde594fc3f9c40300000000000000000000000064c735d72eab90c04da523b6b9895773acb60f5d0000000000000000000000005a8216a9c47ee2e8df1c874252fdee467215c25b000000000000000000000000dde59ceec7a2cc8b2bd78199877ba22018966813000000000000000000000000c4b732fd121f2f3783a9ac2a6c62fd535fd13fda
        • transmitters = [0xe3E0596AC55Ae6044b757baB27426F7dC9e018d4,0xCF4Be57aA078Dc7568C631BE7A73adc1cdA992F8,0x57CD4848b12469618b689163f507817940AccA02,0x7663C5790E1eBf04197245d541279D13f3c2f362,0xBbf078A8849D74623e36E6DBBdC8e0a35E657C26,0xc74cE67BfC623c803D48AFc74a09A6FF6b599003,0xb976d01275B809333E3EfD76D1d31fE9264466D0,0x5565b5362FF9f468bA2f144f38b87187C9a010A8,0x218B5a7861dBf368D09A84E0dBfF6C6DDbf99DB8,0xEdBED9F5dEA03dD0ec484577C41502af68B7c46a,0x2a4a7afA40a9D03B425752fb4cFd5f0FF5b3964C,0xDbfea8D5822141c13f92CaA06EB94d0F3d67C243,0xf16e77a989529AA4C58318acEe8A1548Df3fcCc1,0x3C4ad65F5b4884397e1F09596c7ac7F8F95b3fF3,0xcC29be4Ca92D4Ecc43C8451fBA94C200B83991f6,0x9cFAb1513FFA293E7023159B3C7A4C984B6a3480,0xF07131F578a5F708AE2CCB9faF98458099E0FFB4,0x8b1d49a93A84B5dA0917a1ed42D8a3E191C28524,0xf34aC04a28F7CB5324A167C96B24ADE9c742B44f,0x61317C73d0225b2E37140fb9664d607B450613C6,0x43793ee58E0a3D920e3e4a115A9FA07dc4B09715,0xF42336e35D5C1D1D0DB3140E174BcFc3945f6822,0xddEB598fe902A13Cc523aaff5240e9988eDCE170,0x7BFb89db2d7217c57C3Ad3d4B55826eFD17dC2e9,0x8F3Ab0e87B70a57bD4980111a99a1b2c4b8334F4,0x0312EA121df0a323fF535B753172736cc9d53d13,0xa938d77590aF1d98BaB7dc4a0bde594fC3F9c403,0x64c735D72EAB90C04da523B6b9895773ACb60F5D,0x5a8216a9c47ee2E8Df1c874252fDEe467215C25b,0xDdE59ceeC7A2cC8B2bD78199877BA22018966813,0xC4b732Fd121F2f3783A9Ac2a6C62fD535FD13FdA]

typeAndVersion

This query will provide you with the type and the release version of the aggregator.

  • 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":"0x181f5a77"}, "latest"]}' | jq -r .result
  • Example Response
    • 0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000028416363657373436f6e74726f6c6c65644f6666636861696e41676772656761746f7220322e302e30000000000000000000000000000000000000000000000000
  • Converting the Response to a Friendly Format
    • typeAndVersion
      • string
      • 0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000028416363657373436f6e74726f6c6c65644f6666636861696e41676772656761746f7220322e302e30000000000000000000000000000000000000000000000000
        • typeAndVersion = AccessControlledOffchainAggregator 2.0.0

validatorConfig

This will respond with the address of the validator contract and the gasLimit

  • 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":"0x8e0566de"}, "latest"]}' | jq -r .result
  • Example Response
    • 0x000000000000000000000000bcfd9b1a97ccd0a3942f0408350cdc281cdca1b10000000000000000000000000000000000000000000000000000000000033450
  • Converting the Response to a Friendly Format
    • validator
      • address
      • 000000000000000000000000bcfd9b1a97ccd0a3942f0408350cdc281cdca1b1
        • validator = 0xBcFd9b1a97cCD0a3942f0408350cdc281cDCa1B1
    • gasLimit
      • uint32
      • 0000000000000000000000000000000000000000000000000000000000033450
        • gasLimit = 210000

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