Actions

AccessControlledOffchainAggregator Verification

From Chainlink Community Wiki

Revision as of 20:49, 30 May 2022 by Devtrace (talk | contribs) (Created page with "This page provides specific instructions on how to verify a deployed <code>AccessControlledOffchainAggregator.sol</code> contract on etherscan. This enables you to view and manage the contract via etherscan's web UI. == Verifying an AccessControlledOffchainAggregator Contract == The instructions in this example will contain an example OCR Aggregator contract on Rinkeby, but the directions will be equally applicable to any network that uses an etherscan-based explorer....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page provides specific instructions on how to verify a deployed AccessControlledOffchainAggregator.sol contract on etherscan.

This enables you to view and manage the contract via etherscan's web UI.

Verifying an AccessControlledOffchainAggregator Contract

The instructions in this example will contain an example OCR Aggregator contract on Rinkeby, but the directions will be equally applicable to any network that uses an etherscan-based explorer.

https://rinkeby.etherscan.io/address/0x2699615F3B7F43518c227cc0889e48cCA99A8680#code


Set Base Variables for Verifying the Contract

Navigate the your deployed contract's address in Etherscan, then click on the Contract tab.

If the contract is not verified, then you will see a page with the contract's ByteCode and an option to "Verify and Publish" the contract.

EtherscanUnverifiedAccessControlledoffchainAggregatorContract.png


We'll go ahead and click on "Verify and Publish", which takes us to a new page.

Here we will want to confirm the contract's address, set the compiler type to Solidity (Single file), and then set the Compiler Version to 0.7.6+commit.7338295f.

Lastly, since Chainlink uses the MIT License (MIT), we'll want to select that as well.

Then click "Continue"

EtherscanUnverifiedAccessControlledOffchainAggregatorSetVarsForVerification.png


Copy Over the Source Code of the Contract

Once on the next page, be sure to open the drop-down for "Optimization" and set it to Yes.

The AccessControlledOffchainAggregator.sol source code is available in the drop down below:



Copy the contents on that page and paste it into the empty field titled "Enter the Solidity Contract Code below"


Copy in the Constructor Arguments

The details of how to locate the Constructor arguments is outside the scope of this particular page, but if you'd like to know how, check out the Locating Constructor Arguments page.

To locate the constructor arguments for your deployed AccessControlledOffchainAggregator contract, you will have to find the Input Data in the transaction hash containing the deployed contract.

In the Etherscan explorer, nNavigate to the contract address of the desired AccessControlledOffchainAggregator. In the top right corner, you'll see the address that deployed the contract at tx ...

LocateTransactionHashForDeployedContract.png

That tx address is the transaction has of the deployed contract. We will click that which brings us to the transactions details page. towards the bottom, click on "Click to see More"

This expands a drop-down showing the "Input Data" of the transaction.

A lot of this information is universal constructor arguments, but we will need to locate where our deployment variables begin.

Search for "7060033"

Everything after the ending 3 in that search string is what we need to copy.

For example, all of the characters after the highlighted 3 in the image below (all of the characters highlighted in blue) need to be copied into the "Constructor Arguments" field in the Verify and Publish Contract page.

LocateBeginningOfConstructorArguments.png

Once you've copied the Constructor Arguments over, we can now click on "Verify and Publish"