From 8a7868b54676e772b4cdd2d4ede81260bd6857f0 Mon Sep 17 00:00:00 2001 From: MrishoLukamba Date: Sun, 22 Dec 2024 23:22:27 +0300 Subject: [PATCH] feat(benchmarks) pallet token gateway --- Cargo.lock | 5 + evm/lib/forge-std | 2 +- modules/ismp/pallets/token-gateway/Cargo.toml | 14 +- .../pallets/token-gateway/src/benchmarking.rs | 193 ++++++++++++++++++ modules/ismp/pallets/token-gateway/src/lib.rs | 20 +- .../ismp/pallets/token-gateway/src/weights.rs | 28 +++ parachain/runtimes/gargantua/Cargo.toml | 7 +- parachain/runtimes/gargantua/src/lib.rs | 30 +++ .../runtimes/gargantua/src/weights/mod.rs | 1 + .../src/weights/pallet_token_gateway.rs | 132 ++++++++++++ 10 files changed, 420 insertions(+), 12 deletions(-) create mode 100644 modules/ismp/pallets/token-gateway/src/benchmarking.rs create mode 100644 modules/ismp/pallets/token-gateway/src/weights.rs create mode 100644 parachain/runtimes/gargantua/src/weights/pallet_token_gateway.rs diff --git a/Cargo.lock b/Cargo.lock index ec2f24e71..0e931dd57 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6126,6 +6126,7 @@ dependencies = [ "pallet-collator-selection", "pallet-collective", "pallet-fishermen", + "pallet-hyperbridge", "pallet-ismp", "pallet-ismp-demo", "pallet-ismp-host-executive", @@ -6138,6 +6139,7 @@ dependencies = [ "pallet-state-coprocessor", "pallet-sudo", "pallet-timestamp", + "pallet-token-gateway", "pallet-token-gateway-inspector", "pallet-token-governor", "pallet-transaction-payment", @@ -12992,10 +12994,13 @@ dependencies = [ "alloy-sol-macro", "alloy-sol-types", "anyhow", + "frame-benchmarking", "frame-support 37.0.0", "frame-system", "ismp", "log", + "pallet-assets", + "pallet-balances", "pallet-hyperbridge", "pallet-ismp", "parity-scale-codec", diff --git a/evm/lib/forge-std b/evm/lib/forge-std index ae570fec0..d3db4ef90 160000 --- a/evm/lib/forge-std +++ b/evm/lib/forge-std @@ -1 +1 @@ -Subproject commit ae570fec082bfe1c1f45b0acca4a2b4f84d345ce +Subproject commit d3db4ef90a72b7d24aa5a2e5c649593eaef7801d diff --git a/modules/ismp/pallets/token-gateway/Cargo.toml b/modules/ismp/pallets/token-gateway/Cargo.toml index 3b50b0a6e..07fd04b77 100644 --- a/modules/ismp/pallets/token-gateway/Cargo.toml +++ b/modules/ismp/pallets/token-gateway/Cargo.toml @@ -14,6 +14,7 @@ readme = "./README.md" [dependencies] frame-support = { workspace = true } frame-system = { workspace = true } +frame-benchmarking = { workspace = true} sp-runtime = { workspace = true } sp-core = { workspace = true } sp-io = { workspace = true } @@ -33,12 +34,15 @@ alloy-sol-types = { workspace = true } token-gateway-primitives = { workspace = true } pallet-hyperbridge = { workspace = true } +pallet-balances = { workspace = true } +pallet-assets = { workspace = true} [features] default = ["std"] std = [ "frame-support/std", "frame-system/std", + "frame-benchmarking/std", "sp-runtime/std", "sp-core/std", "sp-io/std", @@ -50,6 +54,14 @@ std = [ "anyhow/std", "alloy-primitives/std", "pallet-hyperbridge/std", - "token-gateway-primitives/std" + "token-gateway-primitives/std", + "pallet-balances/std", + "pallet-assets/std" +] +runtime-benchmarks = [ + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", ] try-runtime = [] diff --git a/modules/ismp/pallets/token-gateway/src/benchmarking.rs b/modules/ismp/pallets/token-gateway/src/benchmarking.rs new file mode 100644 index 000000000..00a315ff2 --- /dev/null +++ b/modules/ismp/pallets/token-gateway/src/benchmarking.rs @@ -0,0 +1,193 @@ +#![cfg(feature = "runtime-benchmarks")] + +use crate::*; +use frame_benchmarking::v2::*; +use frame_support::BoundedVec; +use frame_system::RawOrigin; +use ismp::host::StateMachine; +use pallet_balances::AdjustmentDirection; +use scale_info::prelude::collections::BTreeMap; +use sp_runtime::{traits::StaticLookup, AccountId32}; +use token_gateway_primitives::{GatewayAssetRegistration, GatewayAssetUpdate}; + +fn dummy_teleport_asset( +) -> TeleportParams, <::NativeCurrency as Currency>::Balance> + where + T: Config, + <::Assets as fungibles::Inspect>::AssetId: From, + <::NativeCurrency as Currency>::Balance: From, +{ + TeleportParams { + asset_id: <::Assets as fungibles::Inspect>::AssetId::from( + H256::zero(), + ), + destination: StateMachine::Evm(100), + recepient: H256::from([1u8; 32]), + amount: 1100000000u128.into(), + timeout: 10, + token_gateway: vec![1, 2, 3, 4, 5], + relayer_fee: 1000000002u128.into(), + } +} + +fn create_dummy_asset( + asset_details: GatewayAssetRegistration, +) -> AssetRegistration> + where + <::Assets as fungibles::Inspect>::AssetId: From, +{ + AssetRegistration { local_id: H256::zero().into(), reg: asset_details } +} + +#[benchmarks( + where + T: pallet_balances::Config, + T: pallet_assets::Config, + <::Assets as fungibles::Inspect>::AssetId: From, + <::NativeCurrency as Currency>::Balance: From, + ::AccountId: From<[u8; 32]>, + u128: From<<::NativeCurrency as Currency>::Balance>, + ::Balance: From<<::NativeCurrency as Currency>::Balance>, + <::Assets as fungibles::Inspect>::Balance: From<<::NativeCurrency as Currency>::Balance>, + <::Assets as fungibles::Inspect>::Balance: From, + [u8; 32]: From<::AccountId>, + ::RuntimeOrigin: From>, +)] +mod benches { + use super::*; + + #[benchmark] + fn create_erc6160_asset() -> Result<(), BenchmarkError> { + let account: T::AccountId = whitelisted_caller(); + + let asset_details = GatewayAssetRegistration { + name: BoundedVec::try_from(b"Spectre".to_vec()).unwrap(), + symbol: BoundedVec::try_from(b"SPC".to_vec()).unwrap(), + chains: vec![StateMachine::Evm(100)], + minimum_balance: Some(10), + }; + let asset = create_dummy_asset::(asset_details); + + // Set balances + let ed = ::ExistentialDeposit::get(); + + // Adjust total issuance + pallet_balances::Pallet::::force_adjust_total_issuance( + RawOrigin::Root.into(), + AdjustmentDirection::Increase, + ed * 1000, + )?; + + let acc = <::Lookup as StaticLookup>::unlookup(account.clone()); + + pallet_balances::Pallet::::force_set_balance(RawOrigin::Root.into(), acc, ed * 100u128)?; + + #[extrinsic_call] + _(RawOrigin::Signed(account), asset); + + Ok(()) + } + + #[benchmark] + fn teleport() -> Result<(), BenchmarkError> { + let account: T::AccountId = whitelisted_caller(); + + let asset_details = GatewayAssetRegistration { + name: BoundedVec::try_from(b"Spectre".to_vec()).unwrap(), + symbol: BoundedVec::try_from(b"SPC".to_vec()).unwrap(), + chains: vec![StateMachine::Evm(100)], + minimum_balance: None, + }; + let asset = create_dummy_asset::(asset_details); + + Pallet::::create_erc6160_asset(RawOrigin::Signed(account.clone()).into(), asset)?; + + let dummy_teleport_params = dummy_teleport_asset::(); + + // Set balances + let ed = ::ExistentialDeposit::get(); + + // Adjust total issuance + pallet_balances::Pallet::::force_adjust_total_issuance( + RawOrigin::Root.into(), + AdjustmentDirection::Increase, + ed * 1000, + )?; + + let acc = <::Lookup as StaticLookup>::unlookup(account.clone()); + + pallet_balances::Pallet::::force_set_balance( + RawOrigin::Root.into(), + acc.clone(), + ed * 100u128, + )?; + + #[extrinsic_call] + teleport(RawOrigin::Signed(account), dummy_teleport_params); + Ok(()) + } + + #[benchmark] + fn set_token_gateway_addresses() -> Result<(), BenchmarkError> { + let mut addresses = BTreeMap::new(); + for i in 0..50 { + let addr = i.to_string().as_bytes().to_vec(); + addresses.insert(StateMachine::Evm(100), addr); + } + + #[extrinsic_call] + _(RawOrigin::Root, addresses); + Ok(()) + } + + #[benchmark] + fn update_erc6160_asset() -> Result<(), BenchmarkError> { + let acc_origin: T::AccountId = whitelisted_caller(); + + let asset_details = GatewayAssetRegistration { + name: BoundedVec::try_from(b"Spectre".to_vec()).unwrap(), + symbol: BoundedVec::try_from(b"SPC".to_vec()).unwrap(), + chains: vec![StateMachine::Evm(100)], + minimum_balance: None, + }; + let asset = create_dummy_asset::(asset_details); + let asset_id: H256 = sp_io::hashing::keccak_256(asset.reg.symbol.as_ref()).into(); + + // set balances + + let acc_o = + <::Lookup as StaticLookup>::unlookup(acc_origin.clone()); + let ed = ::ExistentialDeposit::get(); + pallet_balances::Pallet::::force_set_balance( + RawOrigin::Root.into(), + acc_o.clone(), + ed * 100u128, + )?; + + // set asset balance + pallet_assets::Pallet::::create( + RawOrigin::Signed(acc_origin.clone()).into(), + H256::zero().into(), + acc_o.clone(), + 1000000000, + )?; + + Pallet::::create_erc6160_asset( + RawOrigin::Signed(acc_origin.clone()).into(), + asset.clone(), + )?; + + let asset_update = GatewayAssetUpdate { + asset_id, + add_chains: BoundedVec::try_from(vec![StateMachine::Evm(200)]).unwrap(), + remove_chains: BoundedVec::try_from(Vec::new()).unwrap(), + new_admins: BoundedVec::try_from(Vec::new()).unwrap(), + }; + + #[extrinsic_call] + _(RawOrigin::Signed(acc_origin), asset_update); + Ok(()) + } + +} + diff --git a/modules/ismp/pallets/token-gateway/src/lib.rs b/modules/ismp/pallets/token-gateway/src/lib.rs index 0bba2de4d..61999372b 100644 --- a/modules/ismp/pallets/token-gateway/src/lib.rs +++ b/modules/ismp/pallets/token-gateway/src/lib.rs @@ -20,13 +20,16 @@ extern crate alloc; pub mod impls; pub mod types; + +mod benchmarking; +mod weights; +pub use weights::WeightInfo; use crate::impls::{convert_to_balance, convert_to_erc20}; use alloy_sol_types::SolValue; use anyhow::anyhow; use codec::Decode; use frame_support::{ ensure, - pallet_prelude::Weight, traits::{ fungibles::{self, Mutate}, tokens::{fungible::Mutate as FungibleMutate, Preservation}, @@ -113,6 +116,9 @@ pub mod pallet { /// The decimals of the native currency #[pallet::constant] type Decimals: Get; + + /// weights + type WeightInfo: WeightInfo; } /// Assets supported by this instance of token gateway @@ -218,7 +224,7 @@ pub mod pallet { /// Teleports a registered asset /// locks the asset and dispatches a request to token gateway on the destination #[pallet::call_index(0)] - #[pallet::weight(weight())] + #[pallet::weight(T::WeightInfo::teleport())] pub fn teleport( origin: OriginFor, params: TeleportParams< @@ -301,7 +307,7 @@ pub mod pallet { /// Set the token gateway address for specified chains #[pallet::call_index(1)] - #[pallet::weight(weight())] + #[pallet::weight(T::WeightInfo::set_token_gateway_addresses())] pub fn set_token_gateway_addresses( origin: OriginFor, addresses: BTreeMap>, @@ -318,7 +324,7 @@ pub mod pallet { /// This works by dispatching a request to the TokenGateway module on each requested chain /// to create the asset. #[pallet::call_index(2)] - #[pallet::weight(weight())] + #[pallet::weight(T::WeightInfo::create_erc6160_asset())] pub fn create_erc6160_asset( origin: OriginFor, asset: AssetRegistration>, @@ -371,7 +377,7 @@ pub mod pallet { /// This works by dispatching a request to the TokenGateway module on each requested chain /// to create the asset. #[pallet::call_index(3)] - #[pallet::weight(weight())] + #[pallet::weight(T::WeightInfo::update_erc6160_asset())] pub fn update_erc6160_asset( origin: OriginFor, asset: GatewayAssetUpdate, @@ -654,10 +660,6 @@ where } } -/// Static weights because benchmarks suck, and we'll be getting PolkaVM soon anyways -fn weight() -> Weight { - Weight::from_parts(300_000_000, 0) -} impl Pallet { /// Ensure the signer is the asset admin diff --git a/modules/ismp/pallets/token-gateway/src/weights.rs b/modules/ismp/pallets/token-gateway/src/weights.rs new file mode 100644 index 000000000..cb282ca1e --- /dev/null +++ b/modules/ismp/pallets/token-gateway/src/weights.rs @@ -0,0 +1,28 @@ +use frame_support::weights::Weight; + +// ============================== INTERFACE ============================================ // +/// Weight functions needed for `pallet_token_gateway. +pub trait WeightInfo { + fn create_erc6160_asset() -> Weight; + fn teleport() -> Weight; + fn set_token_gateway_addresses() -> Weight; + fn update_erc6160_asset() -> Weight; +} + +impl WeightInfo for () { + fn create_erc6160_asset() -> Weight { + Weight::zero() + } + + fn teleport() -> Weight { + Weight::zero() + } + + fn set_token_gateway_addresses() -> Weight { + Weight::zero() + } + + fn update_erc6160_asset() -> Weight { + Weight::zero() + } +} \ No newline at end of file diff --git a/parachain/runtimes/gargantua/Cargo.toml b/parachain/runtimes/gargantua/Cargo.toml index 8439515f5..219d9bc2b 100644 --- a/parachain/runtimes/gargantua/Cargo.toml +++ b/parachain/runtimes/gargantua/Cargo.toml @@ -104,6 +104,8 @@ sp-mmr-primitives = { workspace = true } simnode-runtime-api = { workspace = true } hyperbridge-client-machine = { workspace = true } pallet-token-gateway-inspector = { workspace = true } +pallet-token-gateway = { workspace = true } +pallet-hyperbridge = { workspace = true } [features] default = [ @@ -188,7 +190,9 @@ std = [ "simnode-runtime-api/std", "hyperbridge-client-machine/std", "frame-metadata-hash-extension/std", - "anyhow/std" + "anyhow/std", + "pallet-token-gateway/std", + "pallet-hyperbridge/std" ] runtime-benchmarks = [ @@ -216,6 +220,7 @@ runtime-benchmarks = [ "pallet-sudo/runtime-benchmarks", "parachains-common/runtime-benchmarks", "ismp-grandpa/runtime-benchmarks", + "pallet-token-gateway/runtime-benchmarks" ] try-runtime = [ diff --git a/parachain/runtimes/gargantua/src/lib.rs b/parachain/runtimes/gargantua/src/lib.rs index 5821a2022..cfbc31530 100644 --- a/parachain/runtimes/gargantua/src/lib.rs +++ b/parachain/runtimes/gargantua/src/lib.rs @@ -582,6 +582,9 @@ parameter_types! { pub const TechnicalMaxProposals: u32 = 100; pub const TechnicalMaxMembers: u32 = 10; pub MaxCollectivesProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block; + pub const NativeAssetId: H256 = H256::zero(); + // Set the correct precision for the native currency + pub const Decimals: u8 = 12; } #[cfg(feature = "runtime-benchmarks")] @@ -675,6 +678,30 @@ impl pallet_collective::Config for Runtime { type SetMembersOrigin = EnsureRoot; type MaxProposalWeight = MaxCollectivesProposalWeight; } + +impl pallet_token_gateway::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + + type Dispatcher = Ismp; + + type NativeCurrency = Balances; + + type AssetAdmin = TreasuryAccount; + + type Assets = Assets; + + type NativeAssetId = NativeAssetId; + + type AssetIdFactory = (); + + type Decimals = Decimals; + type WeightInfo = weights::pallet_token_gateway::WeightInfo; +} + +impl pallet_hyperbridge::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type IsmpHost = Ismp; +} // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime @@ -726,6 +753,8 @@ construct_runtime!( Fishermen: pallet_fishermen = 61, TokenGatewayInspector: pallet_token_gateway_inspector = 62, IsmpSyncCommitteeGno: ismp_sync_committee::pallet:: = 63, + TokenGateway: pallet_token_gateway = 64, + HyperBridge: pallet_hyperbridge = 65, // Governance TechnicalCollective: pallet_collective = 80, @@ -760,6 +789,7 @@ mod benches { [cumulus_pallet_parachain_system, ParachainSystem] [pallet_session, SessionBench::] [ismp_grandpa, IsmpGrandpa] + [pallet_token_gateway, TokenGateway] ); } diff --git a/parachain/runtimes/gargantua/src/weights/mod.rs b/parachain/runtimes/gargantua/src/weights/mod.rs index c312fb487..0fd520242 100644 --- a/parachain/runtimes/gargantua/src/weights/mod.rs +++ b/parachain/runtimes/gargantua/src/weights/mod.rs @@ -37,6 +37,7 @@ pub mod pallet_sudo; pub mod pallet_timestamp; pub mod pallet_treasury; pub mod pallet_utility; +pub mod pallet_token_gateway; pub use block_weights::constants::BlockExecutionWeight; pub use extrinsic_weights::constants::ExtrinsicBaseWeight; diff --git a/parachain/runtimes/gargantua/src/weights/pallet_token_gateway.rs b/parachain/runtimes/gargantua/src/weights/pallet_token_gateway.rs new file mode 100644 index 000000000..da56337a3 --- /dev/null +++ b/parachain/runtimes/gargantua/src/weights/pallet_token_gateway.rs @@ -0,0 +1,132 @@ + +//! Autogenerated weights for `pallet_token_gateway` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-12-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `Lukambas-M2-MAX.local`, CPU: `` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// ./target/release/hyperbridge +// benchmark +// pallet +// --runtime=target/release/wbuild/gargantua-runtime/gargantua_runtime.compact.wasm +// --genesis-builder=runtime +// --pallet=pallet-token-gateway +// --extrinsic=* +// --steps=50 +// --repeat=20 +// --output=parachain/runtimes/gargantua/token-gateway-weights.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_token_gateway`. +pub struct WeightInfo(PhantomData); +impl pallet_token_gateway::WeightInfo for WeightInfo { + /// Storage: `HyperBridge::HostParams` (r:1 w:0) + /// Proof: `HyperBridge::HostParams` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Ismp::Nonce` (r:1 w:1) + /// Proof: `Ismp::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Mmr::CounterForIntermediateLeaves` (r:1 w:1) + /// Proof: `Mmr::CounterForIntermediateLeaves` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Mmr::NumberOfLeaves` (r:1 w:0) + /// Proof: `Mmr::NumberOfLeaves` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Mmr::IntermediateLeaves` (r:1 w:1) + /// Proof: `Mmr::IntermediateLeaves` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TokenGateway::Decimals` (r:0 w:1) + /// Proof: `TokenGateway::Decimals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TokenGateway::LocalAssets` (r:0 w:1) + /// Proof: `TokenGateway::LocalAssets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TokenGateway::SupportedAssets` (r:0 w:1) + /// Proof: `TokenGateway::SupportedAssets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x52657175657374436f6d6d69746d656e7473f69464d93c5ef13116a0e1aec2dd` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x52657175657374436f6d6d69746d656e7473f69464d93c5ef13116a0e1aec2dd` (r:1 w:1) + fn create_erc6160_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3465` + // Minimum execution time: 57_000_000 picoseconds. + Weight::from_parts(59_000_000, 0) + .saturating_add(Weight::from_parts(0, 3465)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(7)) + } + /// Storage: `TokenGateway::SupportedAssets` (r:1 w:0) + /// Proof: `TokenGateway::SupportedAssets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `TokenGateway::Decimals` (r:1 w:0) + /// Proof: `TokenGateway::Decimals` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Ismp::Nonce` (r:1 w:1) + /// Proof: `Ismp::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Mmr::CounterForIntermediateLeaves` (r:1 w:1) + /// Proof: `Mmr::CounterForIntermediateLeaves` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Mmr::NumberOfLeaves` (r:1 w:0) + /// Proof: `Mmr::NumberOfLeaves` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Mmr::IntermediateLeaves` (r:1 w:1) + /// Proof: `Mmr::IntermediateLeaves` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x52657175657374436f6d6d69746d656e747366379cd08ce2b1618974e688611a` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x52657175657374436f6d6d69746d656e747366379cd08ce2b1618974e688611a` (r:1 w:1) + fn teleport() -> Weight { + // Proof Size summary in bytes: + // Measured: `362` + // Estimated: `6196` + // Minimum execution time: 270_000_000 picoseconds. + Weight::from_parts(274_000_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `TokenGateway::TokenGatewayAddresses` (r:0 w:1) + /// Proof: `TokenGateway::TokenGatewayAddresses` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn set_token_gateway_addresses() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `TokenGateway::LocalAssets` (r:1 w:0) + /// Proof: `TokenGateway::LocalAssets` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Assets::Asset` (r:1 w:0) + /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(238), added: 2713, mode: `MaxEncodedLen`) + /// Storage: `HyperBridge::HostParams` (r:1 w:0) + /// Proof: `HyperBridge::HostParams` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Ismp::Nonce` (r:1 w:1) + /// Proof: `Ismp::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Mmr::CounterForIntermediateLeaves` (r:1 w:1) + /// Proof: `Mmr::CounterForIntermediateLeaves` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Mmr::NumberOfLeaves` (r:1 w:0) + /// Proof: `Mmr::NumberOfLeaves` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Mmr::IntermediateLeaves` (r:1 w:1) + /// Proof: `Mmr::IntermediateLeaves` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x52657175657374436f6d6d69746d656e7473536a84a5a5e4654066eda0b5daf7` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x52657175657374436f6d6d69746d656e7473536a84a5a5e4654066eda0b5daf7` (r:1 w:1) + fn update_erc6160_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `555` + // Estimated: `4020` + // Minimum execution time: 74_000_000 picoseconds. + Weight::from_parts(77_000_000, 0) + .saturating_add(Weight::from_parts(0, 4020)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) + } +}