diff --git a/runtime/common/src/claims.rs b/runtime/common/src/claims.rs index fbc2863cc092..1f259771533d 100644 --- a/runtime/common/src/claims.rs +++ b/runtime/common/src/claims.rs @@ -182,8 +182,13 @@ decl_module! { /// - One deposit event. /// /// Total Complexity: O(1) + /// ---------------------------- + /// Base Weight: 622.6 µs + /// DB Weight: + /// - Read: Claims, Total, Claims Vesting, Vesting Vesting, Balance Lock, Account + /// - Write: Vesting Vesting, Account, Balance Lock, Total, Claim, Claims Vesting /// - #[weight = 1_000_000_000] + #[weight = T::DbWeight::get().reads_writes(6, 6) + 650_000_000] fn claim(origin, dest: T::AccountId, ethereum_signature: EcdsaSignature) { ensure_none(origin)?; @@ -229,8 +234,13 @@ decl_module! { /// - Up to one storage write to add a new vesting schedule. /// /// Total Complexity: O(1) + /// --------------------- + /// Base Weight: 25.64 µs + /// DB Weight: + /// - Reads: Total + /// - Writes: Total, Claims, Vesting /// - #[weight = 30_000_000] + #[weight = T::DbWeight::get().reads_writes(1, 3) + 25_000_000] fn mint_claim(origin, who: EthereumAddress, value: BalanceOf, @@ -292,6 +302,10 @@ impl sp_runtime::traits::ValidateUnsigned for Module { const PRIORITY: u64 = 100; match call { + // + // Base Weight: 370 µs + // DB Weight: 1 Read (Claims) + // Call::claim(account, ethereum_signature) => { let data = account.using_encoded(to_ascii_hex); let maybe_signer = Self::eth_recover(ðereum_signature, &data);