Skip to content

Commit

Permalink
fix: adjust system contracts directories (#270)
Browse files Browse the repository at this point in the history
* updating etc/ path to contracts/

* fix fee_estimate_impersonating path

* fix rust format issue

---------

Co-authored-by: Henrique Scocco <henrique.scocco@openzeppelin.com>
Co-authored-by: Nicolas Villanueva <nicolasvillanueva@msn.com>
  • Loading branch information
3 people authored Mar 15, 2024
1 parent b3ed0ff commit 574c0d8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/system_contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ pub fn playground(options: &Options) -> BaseSystemContracts {
include_bytes!("deps/contracts/playground_batch.yul.zbin").to_vec()
}
Options::Local => read_zbin_bytecode(
"etc/system-contracts/bootloader/build/artifacts/playground_batch.yul.zbin",
"contracts/system-contracts/bootloader/build/artifacts/playground_batch.yul.zbin",
),
};

Expand All @@ -153,7 +153,7 @@ pub fn fee_estimate_contracts(options: &Options) -> BaseSystemContracts {
include_bytes!("deps/contracts/fee_estimate.yul.zbin").to_vec()
}
Options::Local => read_zbin_bytecode(
"etc/system-contracts/bootloader/build/artifacts/fee_estimate.yul.zbin",
"contracts/system-contracts/bootloader/build/artifacts/fee_estimate.yul.zbin",
),
};

Expand All @@ -165,9 +165,12 @@ pub fn fee_estimate_impersonating_contracts(options: &Options) -> BaseSystemCont
Options::BuiltIn | Options::BuiltInWithoutSecurity => {
include_bytes!("deps/contracts/fee_estimate_impersonating.yul.zbin").to_vec()
}
Options::Local =>
Options::Local => {
// Account impersonating is not supported with the local contracts
read_zbin_bytecode("etc/system-contracts/bootloader/build/artifacts/fee_estimate.yul/fee_estimate.yul.zbin")
read_zbin_bytecode(
"contracts/system-contracts/bootloader/build/artifacts/fee_estimate.yul.zbin",
)
}
};

bsc_load_with_bootloader(bootloader_bytecode, options)
Expand Down

0 comments on commit 574c0d8

Please sign in to comment.