Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy protocol contracts on new chains #1562

Merged
merged 27 commits into from
Feb 2, 2023
Merged

Conversation

Ashar2shahid
Copy link
Contributor

@Ashar2shahid Ashar2shahid commented Nov 29, 2022

Closes #1626

This PR deploys the protocol contracts on the following chains:

  • boba-ethereum
  • boba-avalanche
  • boba-bnb
  • boba-moonbeam
  • arbitrum-nova
  • sx-network
  • sx-network-testnet
  • aurora
  • aurora-testnet
  • godwoken
  • godwoken-testnet

Used deterministic deployment whenever possible

@dcroote
Copy link
Contributor

dcroote commented Nov 29, 2022

@Ashar2shahid the E2E test failure will be resolved once you update this branch to the latest master

Copy link
Member

@bbenligiray bbenligiray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions

.changeset/happy-starfishes-tickle.md Outdated Show resolved Hide resolved
@@ -9,6 +9,7 @@
"sepolia": "",
"arbitrumOne": "<arbitrum>",
"arbitrumTestnet": "<arbitrum-testnet>",
"aurora": "<aurora>",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is added but I'm seeing that the contracts are not verified on https://aurorascan.dev/

Copy link
Contributor Author

@Ashar2shahid Ashar2shahid Dec 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hardhat does support aurora but when I try to run the verify command I get the following error:

airnode-protocol/deploy/2_verify.js:
: ENOENT: no such file or directory, open '/home/ashar/API3/airnode/packages/airnode-protocol/artifacts/build-info/37ae4407f650f87f7cba868b566e365f.json'
    at DeploymentsManager.executeDeployScripts (/home/ashar/API3/airnode/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1222:19)
    at DeploymentsManager.runDeploy (/home/ashar/API3/airnode/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1052:5)
    at SimpleTaskDefinition.action (/home/ashar/API3/airnode/node_modules/hardhat-deploy/src/index.ts:438:5)
    at Environment._runTaskDefinition (/home/ashar/API3/airnode/node_modules/hardhat/src/internal/core/runtime-environment.ts:219:14)
    at Environment.run (/home/ashar/API3/airnode/node_modules/hardhat/src/internal/core/runtime-environment.ts:131:14)
    at SimpleTaskDefinition.action (/home/ashar/API3/airnode/node_modules/hardhat-deploy/src/index.ts:584:32)
    at Environment._runTaskDefinition (/home/ashar/API3/airnode/node_modules/hardhat/src/internal/core/runtime-environment.ts:219:14)
    at Environment.run (/home/ashar/API3/airnode/node_modules/hardhat/src/internal/core/runtime-environment.ts:131:14)
    at SimpleTaskDefinition.action (/home/ashar/API3/airnode/node_modules/hardhat-deploy/src/index.ts:669:5)
    at Environment._runTaskDefinition (/home/ashar/API3/airnode/node_modules/hardhat/src/internal/core/runtime-environment.ts:219:14)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.Error:: command not found

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The contracts do get verified locally

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had all previous deployments verified on the etherscan/blockscout block explorers manually. You can find the flattened versions at ftmscan.com or flatten them yourself using hardhat flatten.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed for decoding of transactions and in the etherscan case to allow the user interact with the contract over etherscan, it's not necessarily about verification that the contract is correct (that's what deterministic deployments and verify-local are for).

packages/airnode-protocol/credentials.example.json Outdated Show resolved Hide resolved
packages/airnode-protocol/credentials.example.json Outdated Show resolved Hide resolved
packages/airnode-protocol/deployments/references.json Outdated Show resolved Hide resolved
packages/airnode-protocol/deployments/references.json Outdated Show resolved Hide resolved
packages/airnode-protocol/deployments/references.json Outdated Show resolved Hide resolved
packages/airnode-protocol/deployments/references.json Outdated Show resolved Hide resolved
@Ashar2shahid
Copy link
Contributor Author

Added

  • aurora-testnet
  • godwoken-testnet
  • sx-network-testnet

@Ashar2shahid
Copy link
Contributor Author

All Contracts are getting verified locally @bbenligiray this should be good for review

@Ashar2shahid Ashar2shahid self-assigned this Jan 24, 2023
@bbenligiray
Copy link
Member

This is actively on my to do list

@Ashar2shahid Ashar2shahid changed the title Deploy Protocol Contract on new chains Deploy protocol contracts on new chains Jan 30, 2023
Copy link
Member

@bbenligiray bbenligiray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aurora-testnet contracts are not verified on https://testnet.aurorascan.dev/
aurora contracts are verified on https://aurorascan.dev/ but Aurora is migrating to https://explorer.mainnet.aurora.dev/ on Feb 1 https://twitter.com/auroraisnear/status/1610297709272899584 They don't seem to have Blockscout set up for the testnet so we'll have to skip that.
Rest of the deployments except boba-ethereum and AccessControlRegistry on godwoken are not verified. Verify everything you can and document the remaining ones in a Github issue to be done later.

@Ashar2shahid
Copy link
Contributor Author

Ashar2shahid commented Jan 31, 2023

arbitrum-nova
All contracts verified on nova.arbiscan.io
AccessControlRegistry
AirnodeRrpV0
RequesterAuthorizerWithAirnode

aurora
(etherscan being discontinued from 1st Feb)
blockscout gives error when clicking on the code tab to verify the contracts

aurora-testnet
(etherscan being discontinued from 1st Feb)
it looks like etherscan doesn't see it as a contract, maybe because of deterministic deployment

NomicLabsHardhatPluginError: Failed to send contract verification request.
Endpoint URL: https://api-testnet.aurorascan.dev/api
Reason: The Etherscan API responded that the address 0x92E5125adF385d86beDb950793526106143b6Df1 does not have bytecode.
This can happen if the contract was recently deployed and this fact hasn't propagated to the backend yet.

I tried sending transactions to the functions a few days ago but etherscan still doesn't see it as a contract

boba-avalanche
All Contracts verified on blockexplorer.avax.boba.network
AccessControlRegistry
AirnodeRrpV0
RequesterAuthorizerWithAirnode

boba-bnb
All Contracts verified on blockexplorer.avax.boba.network
AccessControlRegistry
AirnodeRrpV0
RequesterAuthorizerWithAirnode

boba-moonbeam
All Contracts verified on blockexplorer.bobabeam.boba.network
AccessControlRegistry
AirnodeRrpV0
RequesterAuthorizerWithAirnode

godwoken
All Contracts verified on gw-mainnet-explorer.nervosdao.community
AccessControlRegistry
AirnodeRrpV0
RequesterAuthorizerWithAirnode

godwoken-testnet
Verification API not responding on gw-explorer.nervosdao.community
AccessControlRegistry
AirnodeRrpV0
RequesterAuthorizerWithAirnode

sx-network
Verification API not responding on explorer.sx.technology
AccessControlRegistry
AirnodeRrpV0
RequesterAuthorizerWithAirnode

sx-network-testnet
Verification API not responding on explorer.toronto.sx.technology
AccessControlRegistry
AirnodeRrpV0
RequesterAuthorizerWithAirnode
While I was verifying the contracts on each testnet, I was sending test transactions to call the functions of each of the contracts. sx-network-testnet deterministic deployments were not callable even though the local verification passes. I remember running into this issue with the sx-network deterministic deployment, which is why I did an undeterministic deployment later. I did the same here. Just to be sure, I went back and tested the functions of all the contracts on all chains that fail verification.

@Ashar2shahid
Copy link
Contributor Author

Created issue for verifying contracts on block explorers: #1630

@bbenligiray bbenligiray self-requested a review January 31, 2023 14:23
Copy link
Member

@bbenligiray bbenligiray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the issue and 👍 for the sx-network-testnet redeployment

@Ashar2shahid Ashar2shahid merged commit 3b80c8b into master Feb 2, 2023
@Ashar2shahid Ashar2shahid deleted the chain_deployments branch February 2, 2023 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deploy protocol contracts on new chains
3 participants