mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 15:11:02 +00:00
contracts: Convert to framev2 macros (#8157)
* contracts: Convert to framev2 * Reduce the API surface of the crate * Remove unused import * Merge import block * Use pallet::metadata to reduce metadata diff * Remove the explicit "Null" from AccountCounter
This commit is contained in:
committed by
GitHub
parent
4f4a0c5b38
commit
b2f393945a
@@ -20,11 +20,11 @@
|
||||
use crate::{
|
||||
HostFnWeights, Config, CodeHash, BalanceOf, Error,
|
||||
exec::{Ext, StorageKey, TopicOf},
|
||||
gas::{Gas, GasMeter, Token, ChargedAmount},
|
||||
gas::{GasMeter, Token, ChargedAmount},
|
||||
wasm::env_def::ConvertibleToWasm,
|
||||
};
|
||||
use parity_wasm::elements::ValueType;
|
||||
use frame_support::{dispatch::DispatchError, ensure, traits::Get};
|
||||
use frame_support::{dispatch::DispatchError, ensure, traits::Get, weights::Weight};
|
||||
use sp_std::prelude::*;
|
||||
use codec::{Decode, DecodeAll, Encode};
|
||||
use sp_runtime::traits::SaturatedConversion;
|
||||
@@ -223,7 +223,7 @@ where
|
||||
{
|
||||
type Metadata = HostFnWeights<T>;
|
||||
|
||||
fn calculate_amount(&self, s: &Self::Metadata) -> Gas {
|
||||
fn calculate_amount(&self, s: &Self::Metadata) -> Weight {
|
||||
use self::RuntimeToken::*;
|
||||
match *self {
|
||||
MeteringBlock(amount) => s.gas.saturating_add(amount.into()),
|
||||
|
||||
Reference in New Issue
Block a user