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

EIP-2470 support + Universal deployer support #889

Merged
merged 5 commits into from
Oct 9, 2024
Merged

Conversation

zees-dev
Copy link
Contributor

@zees-dev zees-dev commented Oct 8, 2024

Context

This PR adds support for EIP-2470 and Universal deployer via a runtime upgrade.
Bytcode would be manually injected into the EVM - to mimic the effects of a transaction (post contract deployment).

Why can we not simply create a transaction which deploys these contracts?

Contract deployment (using Nick's method) requires that the canonical transaction be constructed with 100 gwei gasPrice.
This is not possible on TRN EVM due to the base gas price being 7500 gwei; hence the transaction for deployment of the contract(s) cannot be executed.

Changelog

  • Create EIP-2470 factory at 0xce0042B868300000d44A59004Da54A005ffdcf9f with relevant bytecode
  • Increment nonce of EIP-2470 contract deployer 0xBb6e024b9cFFACB947A71991E386681B1Cd1477D
  • Create Universal deployer factory at 0x1b926fbb24a9f78dcdd3272f2d86f5d0660e59c0 with relevant bytecode
  • Increment nonce of Universal deployer EOA account (which deploys the contract) 0x9c5a87452d4FAC0cbd53BDCA580b20A45526B3AB
  • Migration tests

Note: The migrations will always be run if the factory contract addresses are empty (i.e. they don't have the relevant bytecode - implying that the factory is not deployed on the chain).

Copy link
Contributor

@surangap surangap left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

@JasonTulp JasonTulp 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! Nice work, hard to verify contract_data but execution looks correct, verification will be done through testing on Sprout

@zees-dev zees-dev merged commit ab90d33 into main Oct 9, 2024
2 checks passed
@zees-dev zees-dev deleted the feat/eip-2470 branch October 9, 2024 03:11
@zees-dev zees-dev restored the feat/eip-2470 branch October 9, 2024 03:11
@zees-dev zees-dev deleted the feat/eip-2470 branch October 9, 2024 03:11
@zees-dev zees-dev mentioned this pull request Oct 9, 2024
4 tasks
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.

3 participants