Skip to content

Commit

Permalink
Use bytecode of default account for evm simulator in gas test sc
Browse files Browse the repository at this point in the history
  • Loading branch information
IAvecilla committed Sep 19, 2024
1 parent c98683d commit c1b3620
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/bin/system-constants-generator/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub static GAS_TEST_SYSTEM_CONTRACTS: Lazy<BaseSystemContracts> = Lazy::new(|| {
let bytecode = read_sys_contract_bytecode("", "DefaultAccount", ContractLanguage::Sol);
let hash = hash_bytecode(&bytecode);

let mut evm_simulator_bytecode = vec![];
let mut evm_simulator_bytecode = bytecode.clone();
let mut evm_simulator_hash =
H256::from_str("0x01000563374c277a2c1e34659a2a1e87371bb6d852ce142022d497bfb50b9e32")
.unwrap();
Expand Down
3 changes: 2 additions & 1 deletion core/lib/types/src/system_contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ pub fn get_system_smart_contracts_from_dir(path: PathBuf) -> Vec<DeployedContrac
let evm_simulator_is_used = use_evm_simulator::UseEvmSimulator::from_env()
.unwrap()
.use_evm_simulator;
let repo = SystemContractsRepo { root: path };
SYSTEM_CONTRACT_LIST
.iter()
.filter_map(|(path, name, address, contract_lang)| {
Expand All @@ -238,7 +239,7 @@ pub fn get_system_smart_contracts_from_dir(path: PathBuf) -> Vec<DeployedContrac
} else {
Some(DeployedContract {
account_id: AccountTreeId::new(*address),
bytecode: read_sys_contract_bytecode(path, name, contract_lang.clone()),
bytecode: repo.read_sys_contract_bytecode(path, name, contract_lang.clone()),
})
};
result
Expand Down

0 comments on commit c1b3620

Please sign in to comment.