Skip to content

Commit b20ba6a

Browse files
Make REVM address coincide with the one of Linera (#4003)
## Motivation The smart contract addresses that we are using in the EVM are internally all the same: `Address::ZERO.create(0)`. This creates consistency problems between Ethereum and Linera. This internal address is available in solidity-based EVM smart contracts as `address(this)`. ## Proposal We use the `CreateScheme::Custom { address }` that was previously introduced in REVM and merged in REVM-23.1.0. We also switched to version 24.0.0 of REVM. Next steps: * Add the create/create2 functionality to the code. * Add the transfer functionalities to the code and unify them with Linera. ## Test Plan * A CI test of the `address(this)` feature is being introduced. * Also, additional checks are done for the contract address in `fn check_contract_initialization`. ## Release Plan - Nothing to do / These changes follow the usual release cycle. ## Links None.
1 parent e0762d8 commit b20ba6a

File tree

9 files changed

+299
-124
lines changed

9 files changed

+299
-124
lines changed

Cargo.lock

Lines changed: 48 additions & 80 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)