Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade revm dependency #1074

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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