Skip to content

Commit

Permalink
fix: deploy the identity precompile
Browse files Browse the repository at this point in the history
  • Loading branch information
hedgar2017 committed Dec 6, 2024
1 parent 67a9b35 commit 5dc927d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[submodule "tests"]
path = tests
url = https://github.com/matter-labs/era-compiler-tests
branch = main
branch = az-identity-precompile-no-memcopy
[submodule "solidity"]
path = solidity
url = https://github.com/ethereum/solidity
Expand Down
10 changes: 9 additions & 1 deletion compiler_tester/src/vm/eravm/system_contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ impl SystemContracts {
const PATH_SHA256: &'static str =
"era-contracts/system-contracts/contracts/precompiles/SHA256.yul";

/// The `identity` system contract implementation path.
const PATH_IDENTITY: &'static str = "tests/solidity/simple/system/identity.sol:Identity";

/// The `ecadd` system contract implementation path.
const PATH_ECADD: &'static str =
"era-contracts/system-contracts/contracts/precompiles/EcAdd.yul";
Expand Down Expand Up @@ -194,6 +197,10 @@ impl SystemContracts {

let solidity_system_contracts = vec![
(web3::types::Address::zero(), Self::PATH_EMPTY_CONTRACT),
(
web3::types::Address::from_low_u64_be(zkevm_opcode_defs::ADDRESS_IDENTITY.into()),
Self::PATH_IDENTITY,
),
(
web3::types::Address::from_low_u64_be(
zkevm_opcode_defs::ADDRESS_ACCOUNT_CODE_STORAGE.into(),
Expand Down Expand Up @@ -274,8 +281,9 @@ impl SystemContracts {
debug_config.clone(),
)?;

let mut solidity_file_paths = Vec::with_capacity(solidity_system_contracts.len() + 1);
let mut solidity_file_paths = Vec::with_capacity(solidity_system_contracts.len() + 2);
for pattern in [
"tests/solidity/simple/system/identity.sol",
"era-contracts/system-contracts/contracts/*.sol",
"era-contracts/system-contracts/contracts/libraries/**/*.sol",
"era-contracts/system-contracts/contracts/interfaces/**/*.sol",
Expand Down
Binary file modified system-contracts-stable-build
Binary file not shown.
2 changes: 1 addition & 1 deletion tests

0 comments on commit 5dc927d

Please sign in to comment.