Skip to content

Commit 6025b3b

Browse files
committed
do not concat with runtime code in FE
1 parent 499f2bd commit 6025b3b

File tree

2 files changed

+2
-7
lines changed
  • era-compiler-solidity/src/build_evm/contract
  • era-solc/src/standard_json/output/contract/evm

2 files changed

+2
-7
lines changed

era-compiler-solidity/src/build_evm/contract/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,11 @@ impl Contract {
179179
self,
180180
standard_json_contract: &mut era_solc::StandardJsonOutputContract,
181181
) -> anyhow::Result<()> {
182-
let deploy_bytecode = hex::encode(self.deploy_object.bytecode);
183-
let runtime_bytecode = hex::encode(self.runtime_object.bytecode);
184-
185182
standard_json_contract.metadata = self.metadata_json;
186183
standard_json_contract
187184
.evm
188185
.get_or_insert_with(era_solc::StandardJsonOutputContractEVM::default)
189-
.modify_evm(deploy_bytecode, runtime_bytecode);
186+
.modify_evm(hex::encode(self.deploy_object.bytecode));
190187
standard_json_contract
191188
.missing_libraries
192189
.extend(self.missing_libraries);

era-solc/src/standard_json/output/contract/evm/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ impl EVM {
4646
///
4747
/// Sets the EVM and deploy and runtime bytecode.
4848
///
49-
pub fn modify_evm(&mut self, deploy_bytecode: String, runtime_bytecode: String) {
50-
let mut bytecode = deploy_bytecode;
51-
bytecode.push_str(runtime_bytecode.as_str());
49+
pub fn modify_evm(&mut self, bytecode: String) {
5250
self.bytecode = Some(Bytecode::new(bytecode));
5351
}
5452

0 commit comments

Comments
 (0)