diff --git a/Cargo.lock b/Cargo.lock index 185b07773..8a2b30ef9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1795,8 +1795,8 @@ dependencies = [ [[package]] name = "evm" -version = "0.45.2" -source = "git+https://github.com/aurora-is-near/sputnikvm.git?tag=v0.45.4-aurora#1d9d1dc299fe379913347a71ca00f06344a07262" +version = "0.46.1" +source = "git+https://github.com/aurora-is-near/sputnikvm.git?tag=v0.46.1-aurora#aca614cde83d1207183f7ec2d4be72a5a164d5b3" dependencies = [ "auto_impl", "environmental", @@ -1811,12 +1811,13 @@ dependencies = [ "scale-info", "serde", "sha3", + "smallvec", ] [[package]] name = "evm-core" -version = "0.45.2" -source = "git+https://github.com/aurora-is-near/sputnikvm.git?tag=v0.45.4-aurora#1d9d1dc299fe379913347a71ca00f06344a07262" +version = "0.46.1" +source = "git+https://github.com/aurora-is-near/sputnikvm.git?tag=v0.46.1-aurora#aca614cde83d1207183f7ec2d4be72a5a164d5b3" dependencies = [ "parity-scale-codec", "primitive-types 0.12.2", @@ -1826,8 +1827,8 @@ dependencies = [ [[package]] name = "evm-gasometer" -version = "0.45.2" -source = "git+https://github.com/aurora-is-near/sputnikvm.git?tag=v0.45.4-aurora#1d9d1dc299fe379913347a71ca00f06344a07262" +version = "0.46.1" +source = "git+https://github.com/aurora-is-near/sputnikvm.git?tag=v0.46.1-aurora#aca614cde83d1207183f7ec2d4be72a5a164d5b3" dependencies = [ "environmental", "evm-core", @@ -1837,8 +1838,8 @@ dependencies = [ [[package]] name = "evm-runtime" -version = "0.45.2" -source = "git+https://github.com/aurora-is-near/sputnikvm.git?tag=v0.45.4-aurora#1d9d1dc299fe379913347a71ca00f06344a07262" +version = "0.46.1" +source = "git+https://github.com/aurora-is-near/sputnikvm.git?tag=v0.46.1-aurora#aca614cde83d1207183f7ec2d4be72a5a164d5b3" dependencies = [ "auto_impl", "environmental", diff --git a/Cargo.toml b/Cargo.toml index 7f80c916b..dfd5a2039 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,10 +31,10 @@ byte-slice-cast = { version = "1", default-features = false } criterion = "0.5" digest = "0.10" ethabi = { version = "18", default-features = false } -evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.45.4-aurora", default-features = false } -evm-core = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.45.4-aurora", default-features = false, features = ["std"] } -evm-gasometer = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.45.4-aurora", default-features = false, features = ["std", "tracing"] } -evm-runtime = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.45.4-aurora", default-features = false, features = ["std", "tracing"] } +evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.46.1-aurora", default-features = false } +evm-core = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.46.1-aurora", default-features = false, features = ["std"] } +evm-gasometer = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.46.1-aurora", default-features = false, features = ["std", "tracing"] } +evm-runtime = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.46.1-aurora", default-features = false, features = ["std", "tracing"] } fixed-hash = { version = "0.8", default-features = false } function_name = "0.3" git2 = "0.19" diff --git a/engine-precompiles/src/lib.rs b/engine-precompiles/src/lib.rs index 454ccd203..932c44475 100644 --- a/engine-precompiles/src/lib.rs +++ b/engine-precompiles/src/lib.rs @@ -41,11 +41,11 @@ use aurora_engine_sdk::env::Env; use aurora_engine_sdk::io::IO; use aurora_engine_sdk::promise::ReadOnlyPromiseHandler; use aurora_engine_types::{account_id::AccountId, types::Address, vec, BTreeMap, BTreeSet, Box}; +use evm::backend::Log; use evm::executor::{ self, stack::{PrecompileFailure, PrecompileHandle}, }; -use evm::{backend::Log, executor::stack::IsPrecompileResult}; use evm::{Context, ExitError, ExitFatal, ExitSucceed}; use promise_result::PromiseResult; use xcc::cross_contract_call; @@ -156,12 +156,8 @@ impl<'a, I: IO + Copy, E: Env, H: ReadOnlyPromiseHandler> executor::stack::Preco Some(result.and_then(|output| post_process(output, handle))) } - fn is_precompile(&self, address: prelude::H160, _remaining_gas: u64) -> IsPrecompileResult { - let is_precompile = self.all_precompiles.contains_key(&Address::new(address)); - IsPrecompileResult::Answer { - is_precompile, - extra_cost: 0, - } + fn is_precompile(&self, address: prelude::H160) -> bool { + self.all_precompiles.contains_key(&Address::new(address)) } } diff --git a/engine-tests/src/tests/repro.rs b/engine-tests/src/tests/repro.rs index 5dd1aad47..7bbde7b2e 100644 --- a/engine-tests/src/tests/repro.rs +++ b/engine-tests/src/tests/repro.rs @@ -91,7 +91,7 @@ fn repro_5bEgfRQ() { block_timestamp: 1_651_073_772_931_594_646, input_path: "src/tests/res/input_5bEgfRQ.hex", evm_gas_used: 6_414_105, - near_gas_used: 650, + near_gas_used: 649, }); }