Actions

EACAggregatorProxy Reads: Difference between revisions

From Chainlink Community Wiki

(Created page with "EACAggregatorProxy LINK / USD EAC AggregatorProxy contract address: 0x2c1d072e956affc0d435cb7ac38ef18d24d9127c The Access Controlled Aggregator Proxy is a proxy contract that enables the owner to point it to other contracts as needed/desired. This prevents the users from having to update anything if they wanted to move to a new contract version/release Read Calls accessController The accessController is a smart contract that acts as a whitelist for which addresses a...")
 
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
EACAggregatorProxy
==='''EACAggregatorProxy''' ===
 
'''LINK / USD EAC AggregatorProxy contract address: [https://etherscan.io/address/0x2c1d072e956affc0d435cb7ac38ef18d24d9127c#readContract 0x2c1d072e956affc0d435cb7ac38ef18d24d9127c]'''
LINK / USD EAC AggregatorProxy contract address: 0x2c1d072e956affc0d435cb7ac38ef18d24d9127c


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 Aggregator Proxy is a proxy contract that enables the owner to point it to other contracts as needed/desired.


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


Read Calls
If you'd like to check out the write calls, please check the [[EACAggregatorProxy_Writes]] page.
accessController
 
The accessController 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 accessController smart contract is a null value set to 0x0000000000000000000000000000000000000000
 
Example Query:
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"
Example Response:
0x0000000000000000000000000000000000000000000000000000000000000000
(remove leading 24 0's)
aggregator


The aggregator is the on-chain contract that each of the Chainlink Nodes responds to. The AggregatorProxy contract points to the configured Aggregator as it's primary source of information
----
====='''accessController'''=====
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>
*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>


Example Query:
*Example Response:
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>0x0000000000000000000000000000000000000000000000000000000000000000</code>
Example Response:
***(remove leading 24 <code>0</code>'s)
0x000000000000000000000000dfd03bfc3465107ce570a0397b247f546a42d0fa
****accessController = <code>'''0x0000000000000000000000000000000000000000'''</code>
(remove leading 24 0's)
----
decimals
====='''aggregator''' =====
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
*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>


The decimals value tells the reader of the contract how many decimal places they need to adjust to get the proper value.
*Example Response:
**<code>0x000000000000000000000000dfd03bfc3465107ce570a0397b247f546a42d0fa</code>
***(remove leading 24 <code>0</code>'s)
****aggregator = <code>'''0xdfd03bfc3465107ce570a0397b247f546a42d0fa'''</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 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.
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:
Example Query:
**<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":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","data":"0x313ce567"}, "latest"]}' | jq -r .result) && echo "$((DECIMALS))"</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":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","data":"0x313ce567"}, "latest"]}' | jq -r .result) && echo "$((DECIMALS))"
*Example Response:
Example Response:
**<code>8</code>
8
***decimals = <code>'''8'''</code>
description
----
 
====='''description'''=====
The desctiption of the Proxy is just a friendly name, in this case displaying LINK / USD
The <code>desctiption</code> of the Proxy is just a friendly name, in this case displaying LINK / USD*Example Query:
 
*Example Request:
Example Query:
**<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":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","data":"0x7284e416"}, "latest"]}' | jq -r .result) && echo $DESCRIPTION | xxd -r -p</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":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","data":"0x7284e416"}, "latest"]}' | jq -r .result) && echo $DESCRIPTION | xxd -r -p
Example Response:
LINK / USD
getAnswer


*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.
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":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","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>
----
====='''getRoundData'''=====
Similar to the above <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":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","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":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","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>
----


Example Query:
====='''latestAnswer'''=====
GET_ANSWER=$(curl -s -H "Content-Type: application/json" https://mainnet.infura.io/v3/8b07d2973270487998be1a0c2dbfdffb -d '{"jsonrpc": "2.0", "id": 123, "method": "eth_call", "params":[{"from":null,"to":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","data":"0xb5ab58dc000000000000000000000000000000000000000000000005000000000000347a"}, "latest"]}' | jq -r .result) && echo "$((GET_ANSWER))"
The <code>latestAnswer</code> call provides you with the value that was written to chain during the most recent completed round
Example Response
*Example Request:
726792272
**<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":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","data":"0x50d25bcd"}, "latest"]}' | jq -r .result) && echo "$((LATEST_ANSWER))"</code>
getRoundData
*Example Response
 
**<code>701697722</code>
Similar to the above getAnswer call, this call will get additional information from the round you have specified.
***latestAnswer = <code>'''701697722'''</code> or, after adjusting decimals, <code>'''7.01697722'''</code>
 
----
Example Query:
====='''latestRound''' =====
curl
Example Response
asdf
getTimestamp
 
This getTimestamp call will provide you with the timestamp of the block containing the data from the round you have specified.
 
Example Query:
curl
Example Response
asdf
latestAnswer
 
The latestAnswer call provides you with the value that was written to chain during the most recent completed round
 
Example Query:
curl
Example Response
asdf
latestRound
 
This call will provide you with the most recent completed round number.
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":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","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>


Example Query:
*Converting the Response to Friendly Values
curl
** roundId
Example Response
*** <code>uint80</code>
asdf
*** <code>0000000000000000000000000000000000000000000000050000000000003496</code>
latestRoundData
**** roundId =  <code>'''92233720368547771542'''</code>
 
** answer
This call is similar to getRoundData, but it will automatically get the round data for the most recently completed round.
*** <code>int256</code>  <code>0000000000000000000000000000000000000000000000000000000029d30eba</code>
 
**** answer = <code>'''701697722'''</code>
Example Query:
** startedAt
curl
*** <code>uint256</code>
Example Response
*** <code>00000000000000000000000000000000000000000000000000000000628cfe64</code>
asdf
**** startedAt = <code>'''1653407332'''</code>
latestTimestamp
** updatedAt
 
*** <code>uint256</code>
Similar to latestRoundData and getTimestamp, the latestTimestamp call will provide you with the timestamp of the block containing the response from the latest completed round.
*** <code>00000000000000000000000000000000000000000000000000000000628cfe64</code>
 
**** updatedAt = <code>'''1653407332'''</code>
Example Query:
** answeredInRound
curl
*** <code>uint80</code>
Example Response
*** <code>0000000000000000000000000000000000000000000000050000000000003496</code>
asdf
**** answeredInRound = <code>'''92233720368547771542'''</code>
owner
----


====='''owner'''=====
The owner query will respond with the address that has ownership of the contract you query.
The owner query will respond with the address that has ownership of the contract you query.
 
*Example Request:
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":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","data":"0x8da5cb5b"}, "latest"]}' | jq -r .result</code>
curl
*Example Response
Example Response
**<code>0x00000000000000000000000021f73d42eb58ba49ddb685dc29d3bf5c0f0373ca</code>
asdf
***(remove leading 24 <code>0</code>'s)
phaseAggregators
****owner = <code>'''0x21f73d42eb58ba49ddb685dc29d3bf5c0f0373ca'''</code>
phaseId
----
proposedAggregator
====='''phaseAggregators'''=====
 
----
The proposedAggregator query will give you the address of the proposed aggregator, if there is one.
====='''phaseId'''=====
 
----
Example Query:
====='''proposedAggregator'''=====
curl
The <code>proposedAggregator</code> query will give you the address of the proposed aggregator, if there is one.
Example Response
*Example Request:
asdf
**<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":"0xe8c4be30"}, "latest"]}' | jq -r .result</code>
proposedGetRoundData
*Example Response
 
**<code>0x0000000000000000000000000000000000000000000000000000000000000000</code>
***(remove leading 24 <code>0</code>'s)
****proposedAggregator = <code>'''0x0000000000000000000000000000000000000000'''</code>
----
====='''proposedGetRoundData'''=====
This call provides you with the round data for the requested round from the proposed aggregator, if there is one.
This call provides you with the round data for the requested round from the proposed aggregator, if there is one.
 
*Because the proposedAggregator is a zero'd out value, this call will not provide a response
Example Query:
----
curl
====='''proposedLatestRoundData'''=====
Example Response
asdf
proposedLatestRoundData
 
Similar to the above, this call will get you the data from the latest round of the proposed aggregator.
Similar to the above, this call will get you the data from the latest round of the proposed aggregator.
 
*Because the proposedAggregator is a zero'd out value, this call will not provide a response
Example Query:
----
curl
====='''version'''=====
Example Response
asdf
version
 
This gets you the version of the contract you're querying.
This gets you the version of the contract you're querying.
 
*Example Request:
Example Query:
**<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>
curl
*Example Response
Example Response
**<code>4</code>
asdf
***version = <code>'''4'''</code>
----

Latest revision as of 20:15, 25 May 2022

EACAggregatorProxy

LINK / USD EAC AggregatorProxy contract address: 0x2c1d072e956affc0d435cb7ac38ef18d24d9127c

The Access Controlled Aggregator Proxy is a proxy contract that enables the owner to point it to other contracts as needed/desired.

This prevents the users from having to update anything if they wanted to move to a new contract version/release

Read Calls

This page contains all of the read calls you can make to the EACAggregatorProxy contracts.

If you'd like to check out the write calls, please check the EACAggregatorProxy_Writes page.


accessController

The accessController 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 accessController smart contract is a null value set to 0x0000000000000000000000000000000000000000

  • Example Query:
    • 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"
  • Example Response:
    • 0x0000000000000000000000000000000000000000000000000000000000000000
      • (remove leading 24 0's)
        • accessController = 0x0000000000000000000000000000000000000000

aggregator

The aggregator is the on-chain contract that each of the Chainlink Nodes responds to. The AggregatorProxy contract points to the configured Aggregator as it's primary source of information

  • Example Query:
    • 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"
  • Example Response:
    • 0x000000000000000000000000dfd03bfc3465107ce570a0397b247f546a42d0fa
      • (remove leading 24 0's)
        • aggregator = 0xdfd03bfc3465107ce570a0397b247f546a42d0fa

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":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","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":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","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":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","data":"0xb5ab58dc000000000000000000000000000000000000000000000005000000000000347a"}, "latest"]}' | jq -r .result) && echo "$((GET_ANSWER))"
  • Example Response
    • 726792272
      • getAnswer = 726792272 or, after adjusting decimals, 7.26792272

getRoundData

Similar to the above 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":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","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":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","data":"0xb633620c000000000000000000000000000000000000000000000005000000000000347a"}, "latest"]}' | jq -r .result) && LOCALTIME=$((GET_TIMESTAMP)) && date -d @$LOCALTIME
  • Example Response
    • Mon 23 May 2022 03:47:51 PM CDT

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":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","data":"0x50d25bcd"}, "latest"]}' | jq -r .result) && echo "$((LATEST_ANSWER))"
  • Example Response
    • 701697722
      • latestAnswer = 701697722 or, after adjusting decimals, 7.01697722

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":"0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c","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

owner

The owner query will respond with the address that has ownership of the contract you query.

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

phaseAggregators

phaseId

proposedAggregator

The proposedAggregator query will give you the address of the proposed aggregator, if there is one.

  • 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":"0xe8c4be30"}, "latest"]}' | jq -r .result
  • Example Response
    • 0x0000000000000000000000000000000000000000000000000000000000000000
      • (remove leading 24 0's)
        • proposedAggregator = 0x0000000000000000000000000000000000000000

proposedGetRoundData

This call provides you with the round data for the requested round from the proposed aggregator, if there is one.

  • Because the proposedAggregator is a zero'd out value, this call will not provide a response

proposedLatestRoundData

Similar to the above, this call will get you the data from the latest round of the proposed aggregator.

  • Because the proposedAggregator is a zero'd out value, this call will not provide a 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