Skip to content

Commit

Permalink
chore: upgrade revm dependency (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhani-cw authored Jun 11, 2024
1 parent 10d11e7 commit eb8dd1a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
25 changes: 13 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ petgraph = "=0.6.5"
# ------------------------------------------------------------------------------

[target.'cfg(not(all(target_arch = "aarch64", target_os = "linux")))'.dependencies]
revm = { version = "=8.0.0", features = ["asm-keccak"]}
revm = { version = "=9.0.0", features = ["asm-keccak"]}

[target.'cfg(all(target_arch = "aarch64", target_os = "linux"))'.dependencies]
revm = { version = "=8.0.0" }
revm = { version = "=9.0.0" }

# ------------------------------------------------------------------------------
# Patches
Expand Down
5 changes: 2 additions & 3 deletions src/eth/evm/revm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use itertools::Itertools;
use revm::primitives::AccountInfo;
use revm::primitives::Address as RevmAddress;
use revm::primitives::Bytecode as RevmBytecode;
use revm::primitives::CreateScheme;
use revm::primitives::ExecutionResult as RevmExecutionResult;
use revm::primitives::ResultAndState as RevmResultAndState;
use revm::primitives::SpecId;
Expand Down Expand Up @@ -83,7 +82,7 @@ impl Revm {
});

// handler custom instructions
let instructions = handler.take_instruction_table().unwrap();
let instructions = handler.take_instruction_table();
handler.set_instruction_table(instructions);

// configure revm
Expand Down Expand Up @@ -130,7 +129,7 @@ impl Evm for Revm {
tx_env.caller = input.from.into();
tx_env.transact_to = match input.to {
Some(contract) => TransactTo::Call(contract.into()),
None => TransactTo::Create(CreateScheme::Create),
None => TransactTo::Create,
};
tx_env.gas_limit = min(input.gas_limit.into(), GAS_MAX_LIMIT);
tx_env.gas_price = input.gas_price.into();
Expand Down
2 changes: 1 addition & 1 deletion src/eth/primitives/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl From<EthersBytes> for Bytes {

impl From<RevmBytecode> for Bytes {
fn from(value: RevmBytecode) -> Self {
Self(value.bytecode.0.into())
Self(value.bytecode().clone().into())
}
}

Expand Down

0 comments on commit eb8dd1a

Please sign in to comment.