AccessControlledAggregator Reads: Difference between revisions
From Chainlink Community Wiki
(Created page with " === '''AccessControlledAggregator''' === ==== '''ETH / USD AccessControlledAggregator contract address: [https://etherscan.io/address/0x00c7A37B03690fb9f41b5C5AF8131735C7275446 0x00c7A37B03690fb9f41b5C5AF8131735C7275446]''' ==== The Access Controlled Aggregator is the Aggregator contract that each Chainlink Node sends its observations/transmissions to. This contract is read by the <code>EACAggregatorProxy</code> ==== '''Read Calls''' ==== This page contains all of th...") |
No edit summary |
||
Line 42: | Line 42: | ||
*** <code>0000000000000000000000000000000000000000000000000000000000000000</code> | *** <code>0000000000000000000000000000000000000000000000000000000000000000</code> | ||
**** availableFunds = <code>'''0'''</code> | **** availableFunds = <code>'''0'''</code> | ||
---- | |||
===== '''checkEnabled''' ===== | |||
The <code>checkEnabled</code> call will return a bool value (0 = no, 1 = yes) | |||
* 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":"0x00c7A37B03690fb9f41b5C5AF8131735C7275446","data":"0xdc7f0124"}, "latest"]}' | jq -r .result</code> | |||
* Example Response: | |||
** <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> call will return with the number of decimal places that need to be adjusted for the price feed. | |||
* 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":"0x00c7A37B03690fb9f41b5C5AF8131735C7275446","data":"0x313ce567"}, "latest"]}' | jq -r .result</code> | |||
* Example Response: | |||
** <code>0x0000000000000000000000000000000000000000000000000000000000000008</code> | |||
* Converting Response to Friendly Values | |||
** decimals | |||
*** <code>uint8</code> | |||
*** <code>0000000000000000000000000000000000000000000000000000000000000008</code> | |||
**** decimals = <code>'''8'''</code> | |||
---- | |||
===== '''description''' ===== | |||
The <code>desctiption</code> of the AccessControlledAggregator is just a friendly name, in this case displaying ETH / USD | |||
* 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":"0x00c7A37B03690fb9f41b5C5AF8131735C7275446","data":"0x7284e416"}, "latest"]}' | jq -r .result) && echo $DESCRIPTION | xxd -r -p</code> | |||
* Example Response: | |||
** <code>ETH / USD</code> | |||
*** description = <code>ETH / USD</code> | |||
---- | |||
===== '''getAdmin''' ===== | |||
The <code>getAdmin</code> request will provide you with the <code>adminAdddress</code> associated with the specified Chainlink Node Account Address (the wallet of the Chainlink Node that pays transaction fees) | |||
* 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":"0x00c7A37B03690fb9f41b5C5AF8131735C7275446","data":"0x64efb22b000000000000000000000000abbabb17965310949842323f06eede92fd787d0d"}, "latest"]}' | jq -r .result</code> | |||
* Example Response: | |||
** <code>0x0000000000000000000000001b17eb8fae3c28cb2463235f9d407b527ba4e6dd</code> | |||
*** (remove leading 24 <code>0</code>'s) | |||
**** getAdmin = <code>'''0x1b17eb8fae3c28cb2463235f9d407b527ba4e6dd'''</code> | |||
---- | |||
===== '''getAnswer''' ===== | |||
<code>getAnswer</code> will respond with the aggregated value for the specified round number | |||
* Example Query: | |||
** <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":"0x00c7A37B03690fb9f41b5C5AF8131735C7275446","data":"0xb5ab58dc00000000000000000000000000000000000000000000000000000000000067f5"}, "latest"]}' | jq -r .result) && echo $((GET_ANSWER))</code> | |||
* Example Response: | |||
** <code>412512867055</code> | |||
*** Adjust for the decimal places. In this case, 8 decimal places | |||
**** getAnswer = <code>'''4125.12867055'''</code> | |||
---- | |||
===== '''getOracles''' ===== | |||
The Query getOracles will respond with all of the Chainlink Nodes' Account Addresses that are participating in the queried feed. | |||
* 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":"0x00c7A37B03690fb9f41b5C5AF8131735C7275446","data":"0x40884c52"}, "latest"]}' | jq -r .result</code> | |||
* Example Response: | |||
** <code>0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000015000000000000000000000000abbabb17965310949842323f06eede92fd787d0d0000000000000000000000001d0f12e3546e4734d7521a46ed02ef2c2df51e59000000000000000000000000c7310123914f624da9c376f8ec590055e62733c10000000000000000000000002ad9b7b9386c2f45223ddfc4a4d81c2957bae19a000000000000000000000000501698a6f6f762c79e4d28e3815c135e3f9af996000000000000000000000000c8f53fae35468100df31901e939d8ff80b667166000000000000000000000000a14ebb5909fba95a9305cbcaa6ea069733fcd443000000000000000000000000c4a92358757ef8d22580c5efed30d5241ac725ae0000000000000000000000006d1b8ee3d1b5834dde3ae8ba6d7a587ae6d14dc3000000000000000000000000ff2b320cf904d78eae7298ed10ec143c5e7e2314000000000000000000000000cf2d187d3833dd9063b019d0c39e4566576c3c560000000000000000000000000699a397c3cf614c9a7db23a4be28fc4c8f3a7550000000000000000000000001edb9539d67b0ceb929ae1f334a6c24499ae9cb90000000000000000000000009ab2a7af33d50738caf23e9283e584d954dfb2870000000000000000000000006a9dec02a37f08a7420186c8d273221fd462f7e8000000000000000000000000f687bfa503376e088c6032cd277eebdf19af4c7d000000000000000000000000ac94a69b0996c8edcf19cb7548a644836cb7750900000000000000000000000098db8c499016aa9d860fcd1a9b75a1d7ef3fc3b00000000000000000000000002183464128d6f4020cb4c1c908bae2e87f83214a00000000000000000000000087bf62ec62f872a4c74b1a39bb143702c536478500000000000000000000000074722f39a94485aacd43c14be4c76f7fe914d764</code> | |||
* Formatting Response into Friendly Values | |||
** getOracles | |||
*** <code>address[]</code> | |||
**** getOracles = <code>'''[0xabbabb17965310949842323f06eede92fd787d0d,0x1d0f12e3546e4734d7521a46ed02ef2c2df51e59,0xc7310123914f624da9c376f8ec590055e62733c1,0x2ad9b7b9386c2f45223ddfc4a4d81c2957bae19a,0x501698a6f6f762c79e4d28e3815c135e3f9af996,0xc8f53fae35468100df31901e939d8ff80b667166,0xa14ebb5909fba95a9305cbcaa6ea069733fcd443,0xc4a92358757ef8d22580c5efed30d5241ac725ae,0x6d1b8ee3d1b5834dde3ae8ba6d7a587ae6d14dc3,0xff2b320cf904d78eae7298ed10ec143c5e7e2314,0xcf2d187d3833dd9063b019d0c39e4566576c3c56,0x0699a397c3cf614c9a7db23a4be28fc4c8f3a755,0x1edb9539d67b0ceb929ae1f334a6c24499ae9cb9,0x9ab2a7af33d50738caf23e9283e584d954dfb287,0x6a9dec02a37f08a7420186c8d273221fd462f7e8,0xf687bfa503376e088c6032cd277eebdf19af4c7d,0xac94a69b0996c8edcf19cb7548a644836cb77509,0x98db8c499016aa9d860fcd1a9b75a1d7ef3fc3b0,0x2183464128d6f4020cb4c1c908bae2e87f83214a,0x87bf62ec62f872a4c74b1a39bb143702c5364785,0x74722f39a94485aacd43c14be4c76f7fe914d764]'''</code> | |||
---- | |||
===== '''getRoundData''' ===== | |||
<code>getRoundData</code> will respond with the answer, as well as additional information, for the specified round | |||
* 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":"0x00c7A37B03690fb9f41b5C5AF8131735C7275446","data":"0x9a6fc8f500000000000000000000000000000000000000000000000000000000000067f5"}, "latest"]}' | jq -r .result</code> | |||
* Example Response: | |||
** <code>0x00000000000000000000000000000000000000000000000000000000000067f5000000000000000000000000000000000000000000000000000000600baed2ef0000000000000000000000000000000000000000000000000000000061ac71dc0000000000000000000000000000000000000000000000000000000061ba1a6700000000000000000000000000000000000000000000000000000000000067f3</code> | |||
* Converting Response to Friendly Values | |||
** roundId | |||
*** <code>uint80</code> | |||
*** <code>00000000000000000000000000000000000000000000000000000000000067f5</code> | |||
**** roundId = <code>'''26613'''</code> | |||
** answer | |||
*** <code>int256</code> | |||
*** <code>000000000000000000000000000000000000000000000000000000600baed2ef</code> | |||
**** answer = <code>'''412512867055'''</code> | |||
** startedAd | |||
*** <code>uint256</code> | |||
*** <code>0000000000000000000000000000000000000000000000000000000061ac71dc</code> | |||
**** startedAt = <code>'''1638691292'''</code> | |||
** updatedAt | |||
*** <code>uint256</code> | |||
*** <code>0000000000000000000000000000000000000000000000000000000061ba1a67f</code> | |||
**** updatedAt = <code>'''1639586407'''</code> | |||
** answeredInRound | |||
*** <code>uint80</code> | |||
*** <code>00000000000000000000000000000000000000000000000000000000000067f3</code> | |||
**** answeredInRound = <code>'''26611'''</code> | |||
----getTimestamp | |||
hasAccess | |||
latestAnswer | |||
latestRound | |||
latestRoundData | |||
latestTimestamp | |||
linkToken | |||
maxSubmissionCount | |||
maxSubmissionvalue | |||
minSubmissionCount | |||
minSubmissionValue | |||
oracleCount | |||
oracleRoundState | |||
owner | |||
paymentAmount | |||
restartDelay | |||
timeout | |||
validator | |||
version | |||
withdrawablePayment | |||
---- | ---- |
Latest revision as of 21:54, 7 June 2022
AccessControlledAggregator
ETH / USD AccessControlledAggregator contract address: 0x00c7A37B03690fb9f41b5C5AF8131735C7275446
The Access Controlled 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 AccessControlledAggregator
contracts.
If you'd like to check out the write calls, please check the AccessControlledAggregator_Writes page.
allocatedFunds
The allocatedFunds query will provide you with the amount of LINK (in gwei -- 18 decimal places) that is yet to be withdrawn by Chainlink Nodes.
- 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":"0x00c7A37B03690fb9f41b5C5AF8131735C7275446","data":"0xd4cc54e4"}, "latest"]}' | jq -r .result
- Example Response:
0x00000000000000000000000000000000000000000000001c978fc68e5c470000
- Converting the Response to Friendly Values
- allocatedFunds
uint128
00000000000000000000000000000000000000000000001c978fc68e5c470000
- allocatedFunds =
527430000000000000000
- allocatedFunds =
- allocatedFunds
availableFunds
The availableFunds
call will provide you with the amount of LINK (in gwei -- 18 decimal places) that is available to pay Chainlink Nodes.
- 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":"0x00c7A37B03690fb9f41b5C5AF8131735C7275446","data":"0x46fcff4c"}, "latest"]}' | jq -r .result
- Example Response:
0x0000000000000000000000000000000000000000000000000000000000000000
- Converting the Response to Friendly Values
- availableFunds
uint128
0000000000000000000000000000000000000000000000000000000000000000
- availableFunds =
0
- availableFunds =
- availableFunds
checkEnabled
The checkEnabled
call will return a bool value (0 = no, 1 = yes)
- 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":"0x00c7A37B03690fb9f41b5C5AF8131735C7275446","data":"0xdc7f0124"}, "latest"]}' | jq -r .result
- Example Response:
0x0000000000000000000000000000000000000000000000000000000000000001
0x0...1
istrue
and0x0...0
isfalse
- checkEnabled =
true
- checkEnabled =
decimals
The decimals
call will return with the number of decimal places that need to be adjusted for the price feed.
- 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":"0x00c7A37B03690fb9f41b5C5AF8131735C7275446","data":"0x313ce567"}, "latest"]}' | jq -r .result
- Example Response:
0x0000000000000000000000000000000000000000000000000000000000000008
- Converting Response to Friendly Values
- decimals
uint8
0000000000000000000000000000000000000000000000000000000000000008
- decimals =
8
- decimals =
- decimals
description
The desctiption
of the AccessControlledAggregator is just a friendly name, in this case displaying ETH / USD
- Example Query:
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":"0x00c7A37B03690fb9f41b5C5AF8131735C7275446","data":"0x7284e416"}, "latest"]}' | jq -r .result) && echo $DESCRIPTION | xxd -r -p
- Example Response:
ETH / USD
- description =
ETH / USD
- description =
getAdmin
The getAdmin
request will provide you with the adminAdddress
associated with the specified Chainlink Node Account Address (the wallet of the Chainlink Node that pays transaction fees)
- 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":"0x00c7A37B03690fb9f41b5C5AF8131735C7275446","data":"0x64efb22b000000000000000000000000abbabb17965310949842323f06eede92fd787d0d"}, "latest"]}' | jq -r .result
- Example Response:
0x0000000000000000000000001b17eb8fae3c28cb2463235f9d407b527ba4e6dd
- (remove leading 24
0
's)- getAdmin =
0x1b17eb8fae3c28cb2463235f9d407b527ba4e6dd
- getAdmin =
- (remove leading 24
getAnswer
getAnswer
will respond with the aggregated value for the specified round number
- Example Query:
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":"0x00c7A37B03690fb9f41b5C5AF8131735C7275446","data":"0xb5ab58dc00000000000000000000000000000000000000000000000000000000000067f5"}, "latest"]}' | jq -r .result) && echo $((GET_ANSWER))
- Example Response:
412512867055
- Adjust for the decimal places. In this case, 8 decimal places
- getAnswer =
4125.12867055
- getAnswer =
- Adjust for the decimal places. In this case, 8 decimal places
getOracles
The Query getOracles will respond with all of the Chainlink Nodes' Account Addresses that are participating in the queried feed.
- 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":"0x00c7A37B03690fb9f41b5C5AF8131735C7275446","data":"0x40884c52"}, "latest"]}' | jq -r .result
- Example Response:
0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000015000000000000000000000000abbabb17965310949842323f06eede92fd787d0d0000000000000000000000001d0f12e3546e4734d7521a46ed02ef2c2df51e59000000000000000000000000c7310123914f624da9c376f8ec590055e62733c10000000000000000000000002ad9b7b9386c2f45223ddfc4a4d81c2957bae19a000000000000000000000000501698a6f6f762c79e4d28e3815c135e3f9af996000000000000000000000000c8f53fae35468100df31901e939d8ff80b667166000000000000000000000000a14ebb5909fba95a9305cbcaa6ea069733fcd443000000000000000000000000c4a92358757ef8d22580c5efed30d5241ac725ae0000000000000000000000006d1b8ee3d1b5834dde3ae8ba6d7a587ae6d14dc3000000000000000000000000ff2b320cf904d78eae7298ed10ec143c5e7e2314000000000000000000000000cf2d187d3833dd9063b019d0c39e4566576c3c560000000000000000000000000699a397c3cf614c9a7db23a4be28fc4c8f3a7550000000000000000000000001edb9539d67b0ceb929ae1f334a6c24499ae9cb90000000000000000000000009ab2a7af33d50738caf23e9283e584d954dfb2870000000000000000000000006a9dec02a37f08a7420186c8d273221fd462f7e8000000000000000000000000f687bfa503376e088c6032cd277eebdf19af4c7d000000000000000000000000ac94a69b0996c8edcf19cb7548a644836cb7750900000000000000000000000098db8c499016aa9d860fcd1a9b75a1d7ef3fc3b00000000000000000000000002183464128d6f4020cb4c1c908bae2e87f83214a00000000000000000000000087bf62ec62f872a4c74b1a39bb143702c536478500000000000000000000000074722f39a94485aacd43c14be4c76f7fe914d764
- Formatting Response into Friendly Values
- getOracles
address[]
- getOracles =
[0xabbabb17965310949842323f06eede92fd787d0d,0x1d0f12e3546e4734d7521a46ed02ef2c2df51e59,0xc7310123914f624da9c376f8ec590055e62733c1,0x2ad9b7b9386c2f45223ddfc4a4d81c2957bae19a,0x501698a6f6f762c79e4d28e3815c135e3f9af996,0xc8f53fae35468100df31901e939d8ff80b667166,0xa14ebb5909fba95a9305cbcaa6ea069733fcd443,0xc4a92358757ef8d22580c5efed30d5241ac725ae,0x6d1b8ee3d1b5834dde3ae8ba6d7a587ae6d14dc3,0xff2b320cf904d78eae7298ed10ec143c5e7e2314,0xcf2d187d3833dd9063b019d0c39e4566576c3c56,0x0699a397c3cf614c9a7db23a4be28fc4c8f3a755,0x1edb9539d67b0ceb929ae1f334a6c24499ae9cb9,0x9ab2a7af33d50738caf23e9283e584d954dfb287,0x6a9dec02a37f08a7420186c8d273221fd462f7e8,0xf687bfa503376e088c6032cd277eebdf19af4c7d,0xac94a69b0996c8edcf19cb7548a644836cb77509,0x98db8c499016aa9d860fcd1a9b75a1d7ef3fc3b0,0x2183464128d6f4020cb4c1c908bae2e87f83214a,0x87bf62ec62f872a4c74b1a39bb143702c5364785,0x74722f39a94485aacd43c14be4c76f7fe914d764]
- getOracles =
- getOracles
getRoundData
getRoundData
will respond with the answer, as well as additional information, for the specified round
- 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":"0x00c7A37B03690fb9f41b5C5AF8131735C7275446","data":"0x9a6fc8f500000000000000000000000000000000000000000000000000000000000067f5"}, "latest"]}' | jq -r .result
- Example Response:
0x00000000000000000000000000000000000000000000000000000000000067f5000000000000000000000000000000000000000000000000000000600baed2ef0000000000000000000000000000000000000000000000000000000061ac71dc0000000000000000000000000000000000000000000000000000000061ba1a6700000000000000000000000000000000000000000000000000000000000067f3
- Converting Response to Friendly Values
- roundId
uint80
00000000000000000000000000000000000000000000000000000000000067f5
- roundId =
26613
- roundId =
- answer
int256
000000000000000000000000000000000000000000000000000000600baed2ef
- answer =
412512867055
- answer =
- startedAd
uint256
0000000000000000000000000000000000000000000000000000000061ac71dc
- startedAt =
1638691292
- startedAt =
- updatedAt
uint256
0000000000000000000000000000000000000000000000000000000061ba1a67f
- updatedAt =
1639586407
- updatedAt =
- answeredInRound
uint80
00000000000000000000000000000000000000000000000000000000000067f3
- answeredInRound =
26611
- answeredInRound =
- roundId
getTimestamp
hasAccess
latestAnswer
latestRound
latestRoundData
latestTimestamp
linkToken
maxSubmissionCount
maxSubmissionvalue
minSubmissionCount
minSubmissionValue
oracleCount
oracleRoundState
owner
paymentAmount
restartDelay
timeout
validator
version
withdrawablePayment