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 to new chains #1864

Merged
merged 14 commits into from
Aug 30, 2023
Merged

Conversation

@Ashar2shahid
Copy link
Contributor Author

Ashar2shahid commented Aug 23, 2023

@andreogle can you take a look at api3dao/chains#64 and publish the package once merged so I can then make this ready for review ?

@Ashar2shahid Ashar2shahid marked this pull request as ready for review August 23, 2023 17:39
@andreogle
Copy link
Member

fyi, ChainAPI has received a request to support Polygon zkEVM (mainnet and testnet). Once this PR is merged, the above networks will also be added to ChainAPI

Copy link
Contributor

@dcroote dcroote left a comment

Choose a reason for hiding this comment

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

@Ashar2shahid - shouldn't the "Verify Protocol Deployments" CI workflow have run here given all of the new packages/airnode-protocol paths?

@Ashar2shahid
Copy link
Contributor Author

Ashar2shahid commented Aug 25, 2023

@Ashar2shahid - shouldn't the "Verify Protocol Deployments" CI workflow have run here given all of the new packages/airnode-protocol paths?

@dcroote yes it should have executed for this PR, strange that it didn't trigger. I will look into it.

update: @dcroote I pushed the following PR to address the CI issue: #1865

Copy link
Contributor

@dcroote dcroote left a comment

Choose a reason for hiding this comment

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

Looks good, one minor question: mantle deployments are deterministic but mantle-goerli-testnet aren't? (Here is the CI run for reference)

@Ashar2shahid
Copy link
Contributor Author

Ashar2shahid commented Aug 28, 2023

@dcroote mantle-testnet desterminstic deployments were failing because I suspect the factory isn't deployed there: https://explorer.testnet.mantle.xyz/address/0x4e59b44847b379578588920cA78FbF26c0B4956C/transactions#address-tabs . When hardhat attempts to deploy it, I kept getting this error:

NETWORK=mantle-goerli-testnet yarn deploy:deterministic
yarn run v1.22.19
$ DETERMINISTIC=true hardhat deploy --network $NETWORK --tags deploy && yarn run deploy:generate-references
Nothing to compile
sending eth to create2 contract deployer address (0x3fab184622dc19b6109349b94811493bf2a45362) (tx: 0xeb71a5d76e5b4295e79c2bb9da530758905b43b99a8a2fe828e0974728c9424c)...
deploying create2 deployer contract (at 0x4e59b44847b379578588920ca78fbf26c0b4956c) using deterministic deployment (https://github.com/Arachnid/deterministic-deployment-proxy)An unexpected error occurred:

Error: ERROR processing /Users/ashar/Desktop/API3/Ubuntu/airnode/packages/airnode-protocol/deploy/1_deploy.js:
ProviderError: gas price too high: 100000000000 wei, use at most tx.gasPrice = 1 wei

I tried with minimal gas price but it kept failing

@dcroote
Copy link
Contributor

dcroote commented Aug 29, 2023

Not sure what the issue is with the create2 deployer contract at 0x4e59b44847b379578588920ca78fbf26c0b4956c, but it's absence looks like the issue. Transient gas issues? Otherwise, while it's not ideal, this wouldn't be the first chain with nondeterministic deployments and we now have functionality where these addresses don't need to be manually specified in the config as of v0.12 so it's even less of an issue.

@Ashar2shahid Ashar2shahid merged commit 87cee03 into master Aug 30, 2023
29 checks passed
@Ashar2shahid Ashar2shahid deleted the deploy_new_chains branch August 30, 2023 05:13
@bbenligiray
Copy link
Member

bbenligiray commented Sep 1, 2023

Our current protocol is try deterministic deployments with hardhat-deploy, if it doesn't work, deploy undeterministically, so this is fine. (Same with contract verification, try verifying the contract with hardhat-etherscan, if it doesn't work, don't verify.)

@dcroote dcroote added this to the 0.13.0 milestone Sep 19, 2023
Ashar2shahid added a commit that referenced this pull request Jan 18, 2024
* deploy contracts to mantle

* deploy contracts to linea

* deploy contracts on base

* deploy contracts to polygon-zkevm

* deploy contracts to linea-testnet,base-testnet,mantle-testnet,polygon-zkevm-testnet

* update @api3/chains version
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.

4 participants