Actions

AccessControlledOffchainAggregator Reads: Difference between revisions

From Chainlink Community Wiki

No edit summary
No edit summary
Line 9: Line 9:


If you'd like to check out the write calls, please check the [[AccessControlledOffchainAggregator_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>
----
----
====='''billingAccessController'''=====
====='''billingAccessController'''=====
The <code>billingAccessController</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>curl</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>example</code>
**<code>0x0000000000000000000000009db83cef9f68b63989e4e82d65d549e7ff2acda9</code>
***(remove leading 24 <code>0</code>'s)
****billingAccessController = <code>'''0x9db83cef9f68b63989e4e82d65d549e7ff2acda9'''</code>
----
----
====='''checkEnabled''' =====
====='''checkEnabled''' =====
The <code>checkEnabled</code> call  
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>curl</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>example</code>
**<code>0x0000000000000000000000000000000000000000000000000000000000000001</code>
***<code>0x0...1</code> is <code>true</code> and <code>0x0...0</code> is <code>false</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>curl</code>
* Example Response
** <code>response</code>
----
===== '''latestTransmissionDetails''' =====
This call will provide you with some detailed information regarding the most recently completed round.
* Example Request:
** <code>curl</code>
* Example Response
** <code>response</code>
* Converting the Response to Friendly Values
** configDigest -- The digest of the most recently applied configuration.
*** <code>bytes16</code>
*** <code>0000000000000000000000000000000000000000000000050000000000003496</code>
**** configDigest = <code>'''0x5fe8b4285e42eec4b0f9ab7add44b00e'''</code>
** epoch --
*** <code>uint32</code>
*** <code>000000</code>
**** epoch = <code>'''180926'''</code>
** round -- The round number of the most recently completed round.
*** <code>uint8</code>
*** <code>00000</code>
**** round = <code>'''6'''</code>
** latestAnswer -- The most recently transmitted value to the most recently completed round.
*** <code>int192</code>
*** <code>00000</code>
**** latestAnswer = <code>'''702102035'''</code>
** latestTimestamp -- The timestamp of the block containing the most recently completed round
*** <code>uint64</code>
*** <code>00000</code>
**** latestTimestamp = <code>'''1653508533'''</code>
----
===== '''requestAccessController''' =====
This call will provide you with the address of the AccessController contract
* Example Request:
** <code>curl</code>
* Example Response
** <code>response</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</code>
* Example Response
** <code>response</code>
*** (remove leading 24 <code>0</code>'s)
****transmitters = <code>'''0x641B698aD1C6E503470520B0EeCb472c0589dfE6'''</code>''','''
----'''typeAndVersion'''
This query will provide you with the type and the release version of the aggregator.
* Example Request:
** <code>curl</code>
* Example Response
** <code>response</code>
***
----
===== '''validatorConfig''' =====
This will respond with the address of the validator contract and the gasLimit
* Example Request:
** <code>curl</code>
* Example Response
** <code>response</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>

Revision as of 21:04, 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:
    • curl
  • Example Response
    • response

latestTransmissionDetails

This call will provide you with some detailed information regarding the most recently completed round.

  • Example Request:
    • curl
  • Example Response
    • response
  • Converting the Response to Friendly Values
    • configDigest -- The digest of the most recently applied configuration.
      • bytes16
      • 0000000000000000000000000000000000000000000000050000000000003496
        • configDigest = 0x5fe8b4285e42eec4b0f9ab7add44b00e
    • epoch --
      • uint32
      • 000000
        • epoch = 180926
    • round -- The round number of the most recently completed round.
      • uint8
      • 00000
        • round = 6
    • latestAnswer -- The most recently transmitted value to the most recently completed round.
      • int192
      • 00000
        • latestAnswer = 702102035
    • latestTimestamp -- The timestamp of the block containing the most recently completed round
      • uint64
      • 00000
        • latestTimestamp = 1653508533

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

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,

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