Skip to content

Commit df0667d

Browse files
committed
eip 7702 support (authorization list)
1 parent 2c8b392 commit df0667d

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ proc-macro-warning = { version = "1", default-features = false }
112112
expander = "2"
113113
ahash = { version = "0.8", default-features = false }
114114
regex = { version = "1.11.1", default-features = false }
115+
ethereum = { version = "0.18.2", default-features = false }
115116

116117
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2506-1", default-features = false }
117118
frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2506-1", default-features = false }

runtime/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ ark-serialize = { workspace = true, features = ["derive"] }
148148
# Crowdloan
149149
pallet-crowdloan.workspace = true
150150

151+
ethereum.workspace = true
152+
151153
[dev-dependencies]
152154
frame-metadata.workspace = true
153155
sp-io.workspace = true
@@ -267,6 +269,7 @@ std = [
267269
"pallet-subtensor-swap/std",
268270
"pallet-subtensor-swap-runtime-api/std",
269271
"subtensor-swap-interface/std",
272+
"ethereum/std",
270273
]
271274
runtime-benchmarks = [
272275
"frame-benchmarking/runtime-benchmarks",

runtime/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ use sp_version::RuntimeVersion;
6565
use subtensor_precompiles::Precompiles;
6666
use subtensor_runtime_common::{AlphaCurrency, TaoCurrency, time::*, *};
6767
use subtensor_swap_interface::{OrderType, SwapHandler};
68+
use ethereum::AuthorizationList;
6869

6970
// A few exports that help ease life for downstream crates.
7071
pub use frame_support::{
@@ -1955,6 +1956,7 @@ impl_runtime_apis! {
19551956
nonce: Option<U256>,
19561957
estimate: bool,
19571958
access_list: Option<Vec<(H160, Vec<H256>)>>,
1959+
authorization_list: Option<AuthorizationList>,
19581960
) -> Result<pallet_evm::CallInfo, sp_runtime::DispatchError> {
19591961
use pallet_evm::GasWeightMapping as _;
19601962

@@ -2016,6 +2018,7 @@ impl_runtime_apis! {
20162018
max_priority_fee_per_gas,
20172019
nonce,
20182020
access_list.unwrap_or_default(),
2021+
authorization_list.unwrap_or_default(),
20192022
false,
20202023
true,
20212024
weight_limit,
@@ -2034,6 +2037,7 @@ impl_runtime_apis! {
20342037
nonce: Option<U256>,
20352038
estimate: bool,
20362039
access_list: Option<Vec<(H160, Vec<H256>)>>,
2040+
authorization_list: Option<AuthorizationList>,
20372041
) -> Result<pallet_evm::CreateInfo, sp_runtime::DispatchError> {
20382042
use pallet_evm::GasWeightMapping as _;
20392043

@@ -2098,6 +2102,7 @@ impl_runtime_apis! {
20982102
access_list.unwrap_or_default(),
20992103
whitelist,
21002104
whitelist_disabled,
2105+
authorization_list.unwrap_or_default(),
21012106
false,
21022107
true,
21032108
weight_limit,

0 commit comments

Comments
 (0)