1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
pub mod pallet_asset_index;
pub mod pallet_chainlink_feed;
pub mod pallet_committee;
pub mod pallet_local_treasury;
pub mod pallet_price_feed;
pub mod pallet_remote_asset_manager;
pub mod pallet_saft_registry;
use crate::traits::XcmRuntimeCallWeights;
use frame_support::weights::{constants::RocksDbWeight, Weight};
use xcm_calls::{proxy::ProxyWeights, staking::StakingWeights};
impl XcmRuntimeCallWeights for StakingWeights {
fn polkadot() -> Self {
#![allow(clippy::unnecessary_cast)]
let weight = RocksDbWeight::get();
Self {
bond: (75_102_000 as Weight)
.saturating_add(weight.reads(5 as Weight))
.saturating_add(weight.writes(4 as Weight)),
bond_extra: (57_637_000 as Weight)
.saturating_add(weight.reads(3 as Weight))
.saturating_add(weight.writes(2 as Weight)),
unbond: (52_115_000 as Weight)
.saturating_add(weight.reads(4 as Weight))
.saturating_add(weight.writes(3 as Weight)),
withdraw_unbonded: (52_115_000 as Weight)
.saturating_add(weight.reads(4 as Weight))
.saturating_add(weight.writes(3 as Weight)),
}
}
fn kusama() -> Self {
#![allow(clippy::unnecessary_cast)]
let weight = RocksDbWeight::get();
Self {
bond: (70_648_000 as Weight)
.saturating_add(weight.reads(5 as Weight))
.saturating_add(weight.writes(4 as Weight)),
bond_extra: (54_235_000 as Weight)
.saturating_add(weight.reads(3 as Weight))
.saturating_add(weight.writes(2 as Weight)),
unbond: (57_950_000 as Weight)
.saturating_add(weight.reads(6 as Weight))
.saturating_add(weight.writes(3 as Weight)),
withdraw_unbonded: (57_950_000 as Weight)
.saturating_add(weight.reads(6 as Weight))
.saturating_add(weight.writes(3 as Weight)),
}
}
}
impl XcmRuntimeCallWeights for ProxyWeights {
fn polkadot() -> Self {
#![allow(clippy::unnecessary_cast)]
let weight = RocksDbWeight::get();
Self {
add_proxy: (34_650_000 as Weight)
.saturating_add((212_000 as Weight).saturating_mul(32 as Weight))
.saturating_add(weight.reads(1 as Weight))
.saturating_add(weight.writes(1 as Weight)),
remove_proxy: (34_378_000 as Weight)
.saturating_add((240_000 as Weight).saturating_mul(32 as Weight))
.saturating_add(weight.reads(1 as Weight))
.saturating_add(weight.writes(1 as Weight)),
}
}
fn kusama() -> Self {
#![allow(clippy::unnecessary_cast)]
let weight = RocksDbWeight::get();
Self {
add_proxy: (36_114_000 as Weight)
.saturating_add((223_000 as Weight).saturating_mul(32 as Weight))
.saturating_add(weight.reads(1 as Weight))
.saturating_add(weight.writes(1 as Weight)),
remove_proxy: (35_456_000 as Weight)
.saturating_add((246_000 as Weight).saturating_mul(32 as Weight))
.saturating_add(weight.reads(1 as Weight))
.saturating_add(weight.writes(1 as Weight)),
}
}
}