Skip to content

Commit

Permalink
wip5
Browse files Browse the repository at this point in the history
  • Loading branch information
abukosek committed Jan 13, 2025
1 parent 9670053 commit 74704de
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 59 deletions.
74 changes: 24 additions & 50 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion runtime-sdk/modules/evm-new/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ once_cell = "1.8.0"
# Ethereum.
ethabi = { version = "18.0.0", default-features = false, features = ["std"] }
ethereum = "0.15"
revm = { git = "https://github.com/bluealloy/revm", tag = "v42" }
revm = { git = "https://github.com/bluealloy/revm", tag = "v52", default-features = false, features = ["std", "serde", "optional_eip3607"] }
fixed-hash = "0.8.0"
primitive-types = { version = "0.12", default-features = false, features = ["rlp", "num-traits"] }
rlp = "0.5.2"
Expand Down
3 changes: 3 additions & 0 deletions runtime-sdk/modules/evm-new/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,9 @@ impl<Cfg: Config> Module<Cfg> {
let db = db::OasisDB::<'_, C, Cfg>::new(ctx);
let mut evm = Evm::builder()
.with_spec_id(SpecId::SHANGHAI)
.modify_cfg_env(|cfg| {
cfg.disable_eip3607 = true;
})
.with_db(db)
.modify_tx_env(f)
.build();
Expand Down
16 changes: 8 additions & 8 deletions runtime-sdk/modules/evm-new/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ fn do_test_evm_calls<C: Config>(force_plain: bool) {
},
};
// Run authentication handler to simulate nonce increments.
Accounts::authenticate_tx(&ctx, &create_tx).unwrap();
//Accounts::authenticate_tx(&ctx, &create_tx).unwrap();

let call = create_tx.call.clone();
let erc20_addr =
Expand Down Expand Up @@ -252,7 +252,7 @@ fn do_test_evm_calls<C: Config>(force_plain: bool) {
},
};
// Run authentication handler to simulate nonce increments.
Accounts::authenticate_tx(&ctx, &call_name_tx).unwrap();
//Accounts::authenticate_tx(&ctx, &call_name_tx).unwrap();

let call = call_name_tx.call.clone();
let erc20_name =
Expand Down Expand Up @@ -348,7 +348,7 @@ fn test_c10l_evm_balance_transfer() {
},
};
// Run authentication handler to simulate nonce increments.
Accounts::authenticate_tx(&ctx, &transfer_tx).unwrap();
//Accounts::authenticate_tx(&ctx, &transfer_tx).unwrap();

let call = transfer_tx.call.clone();
CurrentState::with_transaction_opts(Options::new().with_tx(transfer_tx.into()), || {
Expand Down Expand Up @@ -517,7 +517,7 @@ fn do_test_evm_runtime<C: Config>() {
},
};
// Run authentication handler to simulate nonce increments.
<EVMRuntime<C> as Runtime>::Modules::authenticate_tx(&ctx, &create_tx).unwrap();
//<EVMRuntime<C> as Runtime>::Modules::authenticate_tx(&ctx, &create_tx).unwrap();

let call = create_tx.call.clone();
let erc20_addr =
Expand Down Expand Up @@ -565,7 +565,7 @@ fn do_test_evm_runtime<C: Config>() {
},
};
// Run authentication handler to simulate nonce increments.
<EVMRuntime<C> as Runtime>::Modules::authenticate_tx(&ctx, &out_of_gas_create).unwrap();
//<EVMRuntime<C> as Runtime>::Modules::authenticate_tx(&ctx, &out_of_gas_create).unwrap();

let call = out_of_gas_create.call.clone();
CurrentState::with_transaction_opts(
Expand Down Expand Up @@ -624,7 +624,7 @@ fn do_test_evm_runtime<C: Config>() {
},
};
// Run authentication handler to simulate nonce increments.
<EVMRuntime<C> as Runtime>::Modules::authenticate_tx(&ctx, &call_name_tx).unwrap();
//<EVMRuntime<C> as Runtime>::Modules::authenticate_tx(&ctx, &call_name_tx).unwrap();

// Test transaction call in simulate mode.
let call = call_name_tx.call.clone();
Expand Down Expand Up @@ -705,7 +705,7 @@ fn do_test_evm_runtime<C: Config>() {
},
};
// Run authentication handler to simulate nonce increments.
<EVMRuntime<C> as Runtime>::Modules::authenticate_tx(&ctx, &call_transfer_tx).unwrap();
//<EVMRuntime<C> as Runtime>::Modules::authenticate_tx(&ctx, &call_transfer_tx).unwrap();

let call = call_transfer_tx.call.clone();
let transfer_ret = CurrentState::with_transaction_opts(
Expand Down Expand Up @@ -755,7 +755,7 @@ fn do_test_evm_runtime<C: Config>() {
..Default::default()
},
};
<EVMRuntime<C> as Runtime>::Modules::authenticate_tx(&ctx, &out_of_gas_tx).unwrap();
//<EVMRuntime<C> as Runtime>::Modules::authenticate_tx(&ctx, &out_of_gas_tx).unwrap();

let call = out_of_gas_tx.call.clone();
CurrentState::with_transaction_opts(
Expand Down

0 comments on commit 74704de

Please sign in to comment.