Actions

EACAggregatorProxy Writes: Difference between revisions

From Chainlink Community Wiki

No edit summary
No edit summary
 
Line 6: Line 6:
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
===='''Write Calls'''====
===='''Write Calls'''====
This page contains all of the write calls you can make to the EACAggregatorProxy contracts.
This page contains all of the write calls you can make to the <code>EACAggregatorProxy</code> contracts.


If you'd like to check out the read calls, please check the [[EACAggregatorProxy_Reads]] page.
If you'd like to check out the read calls, please check the [[EACAggregatorProxy_Reads]] page.
Due to key handling practices, these docs will not include examples on how to write to the contract via bash and curl


----
----
====='''acceptOwnership'''=====
====='''acceptOwnership'''=====
The <code>acceptOwnership</code> call is dependent upon the <code>transferOwnership</code> call.  In order to prevent accidentally transferring the contract to an address that cannot manage it, the ownership will only transfer once the <code>acceptOwnership</code> call has been made from the same address that the <code>transferOwnership</code> call had previously been made to.
The <code>acceptOwnership</code> call is dependent upon the <code>transferOwnership</code> call.  In order to prevent accidentally transferring the contract to an address that cannot manage it, the ownership will only transfer once the <code>acceptOwnership</code> call has been made from the same address that the <code>transferOwnership</code> call had previously been made to
*Example Query:
----
**<code>curl</code>
====='''confirmAggregator''' =====
*Example Response ('''valid'''):
The <code>confirmAggregator</code> call is going to complete the process of pointing the <code>EACAggregatorProxy</code> to a different <code>AccessControlledAggregator</code> contract.  In order for it to process completely, the specified Aggregator must first be proposed via the <code>proposeAggregator</code> call
** <code>0x0000000000000000000000000000000000000000000000000000000000000000</code>
***(remove leading 24 <code>0</code>'s)
****accessController = <code>'''0x0000000000000000000000000000000000000000'''</code>
*Example Response ('''invalid'''):
** <code>0x0000000000000000000000000000000000000000000000000000000000000000</code>
***(remove leading 24 <code>0</code>'s)
****accessController = <code>'''0x0000000000000000000000000000000000000000'''</code>
----
----
====='''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>


*Example Response:
===== '''proposeAggregator''' =====
**<code>0x000000000000000000000000dfd03bfc3465107ce570a0397b247f546a42d0fa</code>
The <code>proposeAggregator</code> call is intended to propose a new aggregator contract address as the proxy's source of information.  If for some reason you need to redeploy an aggregator contract, you can use both <code>proposeAggregator</code> and then <code>confirmAggregator</code> calls to change which contract the proxy points to.
***(remove leading 24 <code>0</code>'s)
****aggregator = <code>'''0xdfd03bfc3465107ce570a0397b247f546a42d0fa'''</code>
----
----
===== '''transferOwnership''' =====
The <code>transferOwnership</code> call is used to transfer the ownership of the contract.  In order to complete the transfer, the desired owner must <code>acceptOwnership</code> of the contract once the <code>transferOwnership</code> call has been confirmed.

Latest revision as of 19:34, 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

Write Calls

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

If you'd like to check out the read calls, please check the EACAggregatorProxy_Reads page.

Due to key handling practices, these docs will not include examples on how to write to the contract via bash and curl


acceptOwnership

The acceptOwnership call is dependent upon the transferOwnership call. In order to prevent accidentally transferring the contract to an address that cannot manage it, the ownership will only transfer once the acceptOwnership call has been made from the same address that the transferOwnership call had previously been made to


confirmAggregator

The confirmAggregator call is going to complete the process of pointing the EACAggregatorProxy to a different AccessControlledAggregator contract. In order for it to process completely, the specified Aggregator must first be proposed via the proposeAggregator call


proposeAggregator

The proposeAggregator call is intended to propose a new aggregator contract address as the proxy's source of information. If for some reason you need to redeploy an aggregator contract, you can use both proposeAggregator and then confirmAggregator calls to change which contract the proxy points to.


transferOwnership

The transferOwnership call is used to transfer the ownership of the contract. In order to complete the transfer, the desired owner must acceptOwnership of the contract once the transferOwnership call has been confirmed.