difftreelog
Merge pull request #577 from UniqueNetwork/fix/fee-multiplier-update
in: master
16 files changed
pallets/configuration/src/lib.rsdiffbeforeafterboth--- a/pallets/configuration/src/lib.rs
+++ b/pallets/configuration/src/lib.rs
@@ -25,12 +25,14 @@
};
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
-use sp_arithmetic::traits::{BaseArithmetic, Unsigned};
+use sp_arithmetic::{
+ per_things::{Perbill, PerThing},
+ traits::{BaseArithmetic, Unsigned},
+};
use smallvec::smallvec;
pub use pallet::*;
use sp_core::U256;
-use sp_runtime::Perbill;
#[pallet]
mod pallet {
@@ -46,8 +48,7 @@
#[pallet::config]
pub trait Config: frame_system::Config {
#[pallet::constant]
- type DefaultWeightToFeeCoefficient: Get<u32>;
-
+ type DefaultWeightToFeeCoefficient: Get<u64>;
#[pallet::constant]
type DefaultMinGasPrice: Get<u64>;
@@ -66,7 +67,7 @@
#[pallet::storage]
pub type WeightToFeeCoefficientOverride<T: Config> = StorageValue<
- Value = u32,
+ Value = u64,
QueryKind = ValueQuery,
OnEmpty = T::DefaultWeightToFeeCoefficient,
>;
@@ -90,7 +91,7 @@
#[pallet::weight(T::DbWeight::get().writes(1))]
pub fn set_weight_to_fee_coefficient_override(
origin: OriginFor<T>,
- coeff: Option<u32>,
+ coeff: Option<u64>,
) -> DispatchResult {
ensure_root(origin)?;
if let Some(coeff) = coeff {
@@ -156,14 +157,17 @@
impl<T, B> WeightToFeePolynomial for WeightToFee<T, B>
where
T: Config,
- B: BaseArithmetic + From<u32> + Copy + Unsigned,
+ B: BaseArithmetic + From<u32> + From<u64> + Copy + Unsigned,
{
type Balance = B;
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
smallvec!(WeightToFeeCoefficient {
- coeff_integer: <WeightToFeeCoefficientOverride<T>>::get().into(),
- coeff_frac: Perbill::zero(),
+ coeff_integer: (<WeightToFeeCoefficientOverride<T>>::get() / Perbill::ACCURACY as u64)
+ .into(),
+ coeff_frac: Perbill::from_parts(
+ (<WeightToFeeCoefficientOverride<T>>::get() % Perbill::ACCURACY as u64) as u32
+ ),
negative: false,
degree: 1,
})
primitives/common/src/constants.rsdiffbeforeafterboth--- a/primitives/common/src/constants.rs
+++ b/primitives/common/src/constants.rs
@@ -43,10 +43,10 @@
pub const UNIQUE: Balance = 100 * CENTIUNIQUE;
// Targeting 0.1 UNQ per transfer
-pub const WEIGHT_TO_FEE_COEFF: u32 = /*<weight2fee>*/175_199_920/*</weight2fee>*/;
+pub const WEIGHT_TO_FEE_COEFF: u64 = /*<weight2fee>*/77_083_524_944_487_510/*</weight2fee>*/;
// Targeting 0.15 UNQ per transfer via ETH
-pub const MIN_GAS_PRICE: u64 = /*<mingasprice>*/1_014_919_410_810/*</mingasprice>*/;
+pub const MIN_GAS_PRICE: u64 = /*<mingasprice>*/1_014_919_313_914/*</mingasprice>*/;
/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers.
/// This is used to limit the maximal weight of a single extrinsic.
@@ -60,5 +60,5 @@
.set_proof_size(MAX_POV_SIZE as u64);
parameter_types! {
- pub const TransactionByteFee: Balance = 501 * MICROUNIQUE;
+ pub const TransactionByteFee: Balance = 501 * MICROUNIQUE / 2;
}
runtime/common/config/pallets/mod.rsdiffbeforeafterboth--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -104,7 +104,7 @@
pub const DayRelayBlocks: BlockNumber = RELAY_DAYS;
}
impl pallet_configuration::Config for Runtime {
- type DefaultWeightToFeeCoefficient = ConstU32<{ up_common::constants::WEIGHT_TO_FEE_COEFF }>;
+ type DefaultWeightToFeeCoefficient = ConstU64<{ up_common::constants::WEIGHT_TO_FEE_COEFF }>;
type DefaultMinGasPrice = ConstU64<{ up_common::constants::MIN_GAS_PRICE }>;
type MaxXcmAllowedLocations = ConstU32<16>;
type AppPromotionDailyRate = AppPromotionDailyRate;
runtime/common/config/substrate.rsdiffbeforeafterboth--- a/runtime/common/config/substrate.rs
+++ b/runtime/common/config/substrate.rs
@@ -28,10 +28,12 @@
traits::{BlakeTwo256, AccountIdLookup},
Perbill, Permill, Percent,
};
+use sp_arithmetic::traits::One;
use frame_system::{
limits::{BlockLength, BlockWeights},
EnsureRoot,
};
+use pallet_transaction_payment::{Multiplier, ConstFeeMultiplier};
use crate::{
runtime_common::DealWithFees, Runtime, RuntimeEvent, RuntimeCall, RuntimeOrigin, PalletInfo,
System, Balances, Treasury, SS58Prefix, Version,
@@ -152,6 +154,8 @@
/// This value increases the priority of `Operational` transactions by adding
/// a "virtual tip" that's equal to the `OperationalFeeMultiplier * final_fee`.
pub const OperationalFeeMultiplier: u8 = 5;
+
+ pub FeeMultiplier: Multiplier = Multiplier::one();
}
impl pallet_transaction_payment::Config for Runtime {
@@ -160,7 +164,7 @@
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
type OperationalFeeMultiplier = OperationalFeeMultiplier;
type WeightToFee = pallet_configuration::WeightToFee<Self, Balance>;
- type FeeMultiplierUpdate = ();
+ type FeeMultiplierUpdate = ConstFeeMultiplier<FeeMultiplier>;
}
parameter_types! {
tests/src/calibrate.tsdiffbeforeafterboth--- a/tests/src/calibrate.ts
+++ b/tests/src/calibrate.ts
@@ -1,59 +1,186 @@
import {IKeyringPair} from '@polkadot/types/types';
-
import {usingEthPlaygrounds, EthUniqueHelper} from './eth/util';
+class Fract {
+ static ZERO = new Fract(0n);
+ constructor(public readonly a: bigint, public readonly b: bigint = 1n) {
+ if (b === 0n) throw new Error('division by zero');
+ if (b < 0n) throw new Error('missing normalization');
+ }
-function linearRegression(points: { x: bigint, y: bigint }[]) {
- let sumxy = 0n;
- let sumx = 0n;
- let sumy = 0n;
- let sumx2 = 0n;
- const n = points.length;
- for (let i = 0; i < n; i++) {
- const p = points[i];
- sumxy += p.x * p.y;
- sumx += p.x;
- sumy += p.y;
- sumx2 += p.x * p.x;
+ mul(other: Fract) {
+ return new Fract(this.a * other.a, this.b * other.b).optimize();
}
- const nb = BigInt(n);
+ div(other: Fract) {
+ return this.mul(other.inv());
+ }
- const a = (nb * sumxy - sumx * sumy) / (nb * sumx2 - sumx * sumx);
- const b = (sumy - a * sumx) / nb;
+ plus(other: Fract) {
+ if (this.b === other.b) {
+ return new Fract(this.a + other.a, this.b);
+ }
+ return new Fract(this.a * other.b + other.a * this.b, this.b * other.b).optimize();
+ }
- return {a, b};
-}
+ minus(other: Fract) {
+ return this.plus(other.neg());
+ }
-// JS has no builtin function to calculate sqrt of bigint
-// https://stackoverflow.com/a/53684036/6190169
-function sqrt(value: bigint) {
- if (value < 0n) {
- throw 'square root of negative numbers is not supported';
+ neg() {
+ return new Fract(-this.a, this.b);
+ }
+ inv() {
+ if (this.a < 0) {
+ return new Fract(-this.b, -this.a);
+ } else {
+ return new Fract(this.b, this.a);
+ }
}
- if (value < 2n) {
- return value;
+ optimize() {
+ function gcd(x: bigint, y: bigint) {
+ if (x < 0n)
+ x = -x;
+ if (y < 0n)
+ y = -y;
+ while(y) {
+ const t = y;
+ y = x % y;
+ x = t;
+ }
+ return x;
+ }
+ const v = gcd(this.a, this.b);
+ return new Fract(this.a / v, this.b / v);
+ }
+
+ toBigInt() {
+ return this.a / this.b;
+ }
+ toNumber() {
+ const v = this.optimize();
+ return Number(v.a) / Number(v.b);
+ }
+ toString() {
+ const v = this.optimize();
+ return `${v.a} / ${v.b}`;
}
- function newtonIteration(n: bigint, x0: bigint): bigint {
- const x1 = ((n / x0) + x0) >> 1n;
- if (x0 === x1 || x0 === (x1 - 1n)) {
- return x0;
+ lt(other: Fract) {
+ return this.a * other.b < other.a * this.b;
+ }
+ eq(other: Fract) {
+ return this.a * other.b === other.a * this.b;
+ }
+
+ sqrt() {
+ if (this.a < 0n) {
+ throw 'square root of negative numbers is not supported';
+ }
+
+ if (this.lt(new Fract(2n))) {
+ return this;
+ }
+
+ function newtonIteration(n: Fract, x0: Fract): Fract {
+ const x1 = rpn(n, x0, '/', x0, '+', new Fract(2n), '/');
+ if (x0.eq(x1) || x0.eq(x1.minus(new Fract(1n)))) {
+ return x0;
+ }
+ return newtonIteration(n, x1);
}
- return newtonIteration(n, x1);
+
+ return newtonIteration(this, new Fract(1n));
}
+}
- return newtonIteration(value, 1n);
+type Op = Fract | '+' | '-' | '*' | '/' | 'dup' | Op[];
+function rpn(...ops: (Op)[]) {
+ const stack: Fract[] = [];
+ for (const op of ops) {
+ if (op instanceof Fract) {
+ stack.push(op);
+ } else if (op === '+') {
+ if (stack.length < 2)
+ throw new Error('stack underflow');
+ const b = stack.pop()!;
+ const a = stack.pop()!;
+ stack.push(a.plus(b));
+ } else if (op === '*') {
+ if (stack.length < 2)
+ throw new Error('stack underflow');
+ const b = stack.pop()!;
+ const a = stack.pop()!;
+ stack.push(a.mul(b));
+ } else if (op === '-') {
+ if (stack.length < 2)
+ throw new Error('stack underflow');
+ const b = stack.pop()!;
+ const a = stack.pop()!;
+ stack.push(a.minus(b));
+ } else if (op === '/') {
+ if (stack.length < 2)
+ throw new Error('stack underflow');
+ const b = stack.pop()!;
+ const a = stack.pop()!;
+ stack.push(a.div(b));
+ } else if (op === 'dup') {
+ if (stack.length < 1)
+ throw new Error('stack underflow');
+ const a = stack.pop()!;
+ stack.push(a);
+ stack.push(a);
+ } else if (Array.isArray(op)) {
+ stack.push(rpn(...op));
+ } else {
+ throw new Error(`unknown operand: ${op}`);
+ }
+ }
+ if (stack.length != 1)
+ throw new Error('one element should be left on stack');
+ return stack[0]!;
+}
+
+function linearRegression(points: { x: Fract, y: Fract }[]) {
+ let sumxy = Fract.ZERO;
+ let sumx = Fract.ZERO;
+ let sumy = Fract.ZERO;
+ let sumx2 = Fract.ZERO;
+ const n = points.length;
+ for (let i = 0; i < n; i++) {
+ const p = points[i];
+ sumxy = rpn(p.x, p.y, '*', sumxy, '+');
+ sumx = sumx.plus(p.x);
+ sumy = sumy.plus(p.y);
+ sumx2 = rpn(p.x, p.x, '*', sumx2, '+');
+ }
+
+ const nb = new Fract(BigInt(n));
+
+ const a = rpn(
+ [nb, sumxy, '*', sumx, sumy, '*', '-'],
+ [nb, sumx2, '*', sumx, sumx, '*', '-'],
+ '/',
+ );
+ const b = rpn(
+ [sumy, a, sumx, '*', '-'],
+ nb,
+ '/',
+ );
+
+ return {a, b};
}
-function _error(points: { x: bigint, y: bigint }[], hypothesis: (a: bigint) => bigint) {
- return sqrt(points.map(p => {
+const hypothesisLinear = (a: Fract, b: Fract) => (x: Fract) => rpn(x, a, '*', b, '+');
+
+function _error(points: { x: Fract, y: Fract }[], hypothesis: (a: Fract) => Fract) {
+ return points.map(p => {
const v = hypothesis(p.x);
const vv = p.y;
- return (v - vv) ** 2n;
- }).reduce((a, b) => a + b, 0n) / BigInt(points.length));
+ return rpn(v, vv, '-', 'dup', '*');
+ }).reduce((a, b) => a.plus(b), Fract.ZERO).sqrt().div(new Fract(BigInt(points.length)));
}
async function calibrateWeightToFee(helper: EthUniqueHelper, privateKey: (account: string) => Promise<IKeyringPair>) {
@@ -68,15 +195,15 @@
await token.transfer(alice, {Substrate: bob.address});
const aliceBalanceAfter = await helper.balance.getSubstrate(alice.address);
- console.log(`Original price: ${Number(aliceBalanceBefore - aliceBalanceAfter) / Number(helper.balance.getOneTokenNominal())} UNQ`);
+ console.log(`\t[NFT transfer] Original price: ${Number(aliceBalanceBefore - aliceBalanceAfter) / Number(helper.balance.getOneTokenNominal())} UNQ`);
}
const api = helper.getApi();
- const defaultCoeff = (api.consts.configuration.defaultWeightToFeeCoefficient as any).toBigInt();
+ const base = (await api.query.configuration.weightToFeeCoefficientOverride() as any).toBigInt();
for (let i = -5; i < 5; i++) {
- await helper.signTransaction(alice, api.tx.sudo.sudo(api.tx.configuration.setWeightToFeeCoefficientOverride(defaultCoeff + defaultCoeff / 1000n * BigInt(i))));
+ await helper.signTransaction(alice, api.tx.sudo.sudo(api.tx.configuration.setWeightToFeeCoefficientOverride(base + base / 1000n * BigInt(i))));
- const coefficient = (await api.query.configuration.weightToFeeCoefficientOverride() as any).toBigInt();
+ const coefficient = new Fract((await api.query.configuration.weightToFeeCoefficientOverride() as any).toBigInt());
const collection = await helper.nft.mintCollection(alice, {name: 'New', description: 'New collection', tokenPrefix: 'NEW'});
const token = await collection.mintToken(alice, {Substrate: alice.address});
@@ -84,16 +211,18 @@
await token.transfer(alice, {Substrate: bob.address});
const aliceBalanceAfter = await helper.balance.getSubstrate(alice.address);
- const transferPrice = aliceBalanceBefore - aliceBalanceAfter;
+ const transferPrice = new Fract(aliceBalanceBefore - aliceBalanceAfter);
dataPoints.push({x: transferPrice, y: coefficient});
}
const {a, b} = linearRegression(dataPoints);
- // console.log(`Error: ${error(dataPoints, x => a*x+b)}`);
+ const hyp = hypothesisLinear(a, b);
+ // console.log(`\t[NFT transfer] Error: ${_error(dataPoints, hyp).toNumber()}`);
- const perfectValue = a * helper.balance.getOneTokenNominal() / 10n + b;
- await helper.signTransaction(alice, api.tx.sudo.sudo(api.tx.configuration.setWeightToFeeCoefficientOverride(perfectValue.toString())));
+ // 0.1 UNQ
+ const perfectValue = hyp(rpn(new Fract(helper.balance.getOneTokenNominal()), new Fract(1n, 10n), '*'));
+ await helper.signTransaction(alice, api.tx.sudo.sudo(api.tx.configuration.setWeightToFeeCoefficientOverride(perfectValue.toBigInt())));
{
const collection = await helper.nft.mintCollection(alice, {name: 'New', description: 'New collection', tokenPrefix: 'NEW'});
@@ -102,7 +231,7 @@
await token.transfer(alice, {Substrate: bob.address});
const aliceBalanceAfter = await helper.balance.getSubstrate(alice.address);
- console.log(`Calibrated price: ${Number(aliceBalanceBefore - aliceBalanceAfter) / Number(helper.balance.getOneTokenNominal())} UNQ`);
+ console.log(`\t[NFT transfer] Calibrated price: ${Number(aliceBalanceBefore - aliceBalanceAfter) / Number(helper.balance.getOneTokenNominal())} UNQ`);
}
}
@@ -121,35 +250,37 @@
const cost = await helper.eth.calculateFee({Ethereum: caller}, () => contract.methods.transfer(receiver, token.tokenId).send({from: caller, gas: helper.eth.DEFAULT_GAS}));
- console.log(`Original price: ${Number(cost) / Number(helper.balance.getOneTokenNominal())} UNQ`);
+ console.log(`\t[ETH NFT transfer] Original price: ${Number(cost) / Number(helper.balance.getOneTokenNominal())} UNQ`);
}
const api = helper.getApi();
- const defaultCoeff = (api.consts.configuration.defaultMinGasPrice as any).toBigInt();
+ // const defaultCoeff = (api.consts.configuration.defaultMinGasPrice as any).toBigInt();
+ const base = (await api.query.configuration.minGasPriceOverride() as any).toBigInt();
for (let i = -8; i < 8; i++) {
- const gasPrice = defaultCoeff + defaultCoeff / 100000n * BigInt(i);
+ const gasPrice = base + base / 100000n * BigInt(i);
const gasPriceStr = '0x' + gasPrice.toString(16);
await helper.signTransaction(alice, api.tx.sudo.sudo(api.tx.configuration.setMinGasPriceOverride(gasPrice)));
- const coefficient = (await api.query.configuration.minGasPriceOverride() as any).toBigInt();
+ const coefficient = new Fract((await api.query.configuration.minGasPriceOverride() as any).toBigInt());
const collection = await helper.nft.mintCollection(alice, {name: 'New', description: 'New collection', tokenPrefix: 'NEW'});
const token = await collection.mintToken(alice, {Ethereum: caller});
const address = helper.ethAddress.fromCollectionId(collection.collectionId);
const contract = helper.ethNativeContract.collection(address, 'nft', caller);
- const transferPrice = await helper.eth.calculateFee({Ethereum: caller}, () => contract.methods.transfer(receiver, token.tokenId).send({from: caller, gasPrice: gasPriceStr, gas: helper.eth.DEFAULT_GAS}));
+ const transferPrice = new Fract(await helper.eth.calculateFee({Ethereum: caller}, () => contract.methods.transfer(receiver, token.tokenId).send({from: caller, gasPrice: gasPriceStr, gas: helper.eth.DEFAULT_GAS})));
dataPoints.push({x: transferPrice, y: coefficient});
}
const {a, b} = linearRegression(dataPoints);
- // console.log(`Error: ${error(dataPoints, x => a*x+b)}`);
+ const hyp = hypothesisLinear(a, b);
+ // console.log(`\t[ETH NFT transfer] Error: ${_error(dataPoints, hyp).toNumber()}`);
- // * 0.15 = * 10000 / 66666
- const perfectValue = a * helper.balance.getOneTokenNominal() * 1000000n / 6666666n + b;
- await helper.signTransaction(alice, api.tx.sudo.sudo(api.tx.configuration.setMinGasPriceOverride(perfectValue.toString())));
+ // 0.15 UNQ
+ const perfectValue = hyp(rpn(new Fract(helper.balance.getOneTokenNominal()), new Fract(15n, 100n), '*'));
+ await helper.signTransaction(alice, api.tx.sudo.sudo(api.tx.configuration.setMinGasPriceOverride(perfectValue.toBigInt())));
{
const collection = await helper.nft.mintCollection(alice, {name: 'New', description: 'New collection', tokenPrefix: 'NEW'});
@@ -160,18 +291,26 @@
const cost = await helper.eth.calculateFee({Ethereum: caller}, () => contract.methods.transfer(receiver, token.tokenId).send({from: caller, gas: helper.eth.DEFAULT_GAS}));
- console.log(`Calibrated price: ${Number(cost) / Number(helper.balance.getOneTokenNominal())} UNQ`);
+ console.log(`\t[ETH NFT transfer] Calibrated price: ${Number(cost) / Number(helper.balance.getOneTokenNominal())} UNQ`);
}
}
(async () => {
await usingEthPlaygrounds(async (helper: EthUniqueHelper, privateKey) => {
- // Second run slightly reduces error sometimes, as price line is not actually straight, this is a curve
+ // Subsequent runs reduce error, as price line is not actually straight, this is a curve
+
+ const iterations = 3;
+
+ console.log('[Calibrate WeightToFee]');
+ for (let i = 0; i < iterations; i++) {
+ await calibrateWeightToFee(helper, privateKey);
+ }
- await calibrateWeightToFee(helper, privateKey);
- await calibrateWeightToFee(helper, privateKey);
+ console.log();
- await calibrateMinGasPrice(helper, privateKey);
- await calibrateMinGasPrice(helper, privateKey);
+ console.log('[Calibrate MinGasPrice]');
+ for (let i = 0; i < iterations; i++) {
+ await calibrateMinGasPrice(helper, privateKey);
+ }
});
})();
tests/src/eth/ethFeesAreCorrect.test.tsdiffbeforeafterboth--- /dev/null
+++ b/tests/src/eth/ethFeesAreCorrect.test.ts
@@ -0,0 +1,66 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://witww.gnu.org/licenses/>.
+
+import {IKeyringPair} from '@polkadot/types/types';
+import {itEth, usingEthPlaygrounds, expect} from './util';
+
+describe('Eth fees are correct', () => {
+ let donor: IKeyringPair;
+ let minter: IKeyringPair;
+ let alice: IKeyringPair;
+
+ before(async () => {
+ await usingEthPlaygrounds(async (helper, privateKey) => {
+ donor = await privateKey({filename: __filename});
+ [minter, alice] = await helper.arrange.createAccounts([100n, 200n], donor);
+ });
+ });
+
+
+ itEth('web3 fees are the same as evm.call fees', async ({helper}) => {
+ const collection = await helper.nft.mintCollection(minter, {});
+
+ const owner = await helper.eth.createAccountWithBalance(donor);
+ const receiver = await helper.eth.createAccountWithBalance(donor);
+ const aliceEth = helper.address.substrateToEth(alice.address);
+
+ const {tokenId: tokenA} = await collection.mintToken(minter, {Ethereum: owner});
+ const {tokenId: tokenB} = await collection.mintToken(minter, {Ethereum: aliceEth});
+
+ const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);
+ const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
+
+ const balanceBeforeWeb3Transfer = await helper.balance.getEthereum(owner);
+ await contract.methods.transfer(receiver, tokenA).send({from: owner});
+ const balanceAfterWeb3Transfer = await helper.balance.getEthereum(owner);
+ const web3Diff = balanceBeforeWeb3Transfer - balanceAfterWeb3Transfer;
+
+ const encodedCall = contract.methods.transfer(receiver, tokenB)
+ .encodeABI();
+
+ const balanceBeforeEvmCall = await helper.balance.getSubstrate(alice.address);
+ await helper.eth.sendEVM(
+ alice,
+ collectionAddress,
+ encodedCall,
+ '0',
+ );
+ const balanceAfterEvmCall = await helper.balance.getSubstrate(alice.address);
+ const evmCallDiff = balanceBeforeEvmCall - balanceAfterEvmCall;
+
+ expect(web3Diff).to.be.equal(evmCallDiff);
+ });
+});
tests/src/interfaces/augment-api-consts.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-consts.ts
+++ b/tests/src/interfaces/augment-api-consts.ts
@@ -82,7 +82,7 @@
appPromotionDailyRate: Perbill & AugmentedConst<ApiType>;
dayRelayBlocks: u32 & AugmentedConst<ApiType>;
defaultMinGasPrice: u64 & AugmentedConst<ApiType>;
- defaultWeightToFeeCoefficient: u32 & AugmentedConst<ApiType>;
+ defaultWeightToFeeCoefficient: u64 & AugmentedConst<ApiType>;
maxXcmAllowedLocations: u32 & AugmentedConst<ApiType>;
/**
* Generic const
tests/src/interfaces/augment-api-query.tsdiffbeforeafterboth1// Auto-generated via `yarn polkadot-types-from-chain`, do not edit2/* eslint-disable */34// import type lookup before we augment - in some environments5// this is required to allow for ambient/previous definitions6import '@polkadot/api-base/types/storage';78import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';9import type { BTreeMap, Bytes, Option, U256, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';10import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';11import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';12import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumLog, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlTokensAccountData, OrmlTokensBalanceLock, OrmlTokensReserveData, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletConfigurationAppPromotionConfiguration, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletForeignAssetsAssetIds, PalletForeignAssetsModuleAssetMetadata, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PhantomTypeUpDataStructs, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, SpRuntimeDigest, SpTrieStorageProof, SpWeightsWeightV2Weight, UpDataStructsCollection, UpDataStructsCollectionStats, UpDataStructsProperties, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsSponsorshipStateBasicCrossAccountIdRepr, UpDataStructsTokenChild, XcmV1MultiLocation } from '@polkadot/types/lookup';13import type { Observable } from '@polkadot/types/types';1415export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;16export type __QueryableStorageEntry<ApiType extends ApiTypes> = QueryableStorageEntry<ApiType>;1718declare module '@polkadot/api-base/types/storage' {19 interface AugmentedQueries<ApiType extends ApiTypes> {20 appPromotion: {21 /**22 * Stores the `admin` account. Some extrinsics can only be executed if they were signed by `admin`.23 **/24 admin: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;25 /**26 * Stores amount of stakes for an `Account`.27 * 28 * * **Key** - Staker account.29 * * **Value** - Amount of stakes.30 **/31 pendingUnstake: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[AccountId32, u128]>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;32 /**33 * Stores a key for record for which the revenue recalculation was performed.34 * If `None`, then recalculation has not yet been performed or calculations have been completed for all stakers.35 **/36 previousCalculatedRecord: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[AccountId32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;37 /**38 * Stores the amount of tokens staked by account in the blocknumber.39 * 40 * * **Key1** - Staker account.41 * * **Key2** - Relay block number when the stake was made.42 * * **(Balance, BlockNumber)** - Balance of the stake.43 * The number of the relay block in which we must perform the interest recalculation44 **/45 staked: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<ITuple<[u128, u32]>>, [AccountId32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32]>;46 /**47 * Stores amount of stakes for an `Account`.48 * 49 * * **Key** - Staker account.50 * * **Value** - Amount of stakes.51 **/52 stakesPerAccount: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<u8>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;53 /**54 * Stores the total staked amount.55 **/56 totalStaked: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;57 /**58 * Generic query59 **/60 [key: string]: QueryableStorageEntry<ApiType>;61 };62 balances: {63 /**64 * The Balances pallet example of storing the balance of an account.65 * 66 * # Example67 * 68 * ```nocompile69 * impl pallet_balances::Config for Runtime {70 * type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>71 * }72 * ```73 * 74 * You can also store the balance of an account in the `System` pallet.75 * 76 * # Example77 * 78 * ```nocompile79 * impl pallet_balances::Config for Runtime {80 * type AccountStore = System81 * }82 * ```83 * 84 * But this comes with tradeoffs, storing account balances in the system pallet stores85 * `frame_system` data alongside the account data contrary to storing account balances in the86 * `Balances` pallet, which uses a `StorageMap` to store balances data only.87 * NOTE: This is only used in the case that this pallet is used to store balances.88 **/89 account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;90 /**91 * Any liquidity locks on some account balances.92 * NOTE: Should only be accessed when setting, changing and freeing a lock.93 **/94 locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesBalanceLock>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;95 /**96 * Named reserves on some account balances.97 **/98 reserves: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesReserveData>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;99 /**100 * Storage version of the pallet.101 * 102 * This is set to v2.0.0 for new networks.103 **/104 storageVersion: AugmentedQuery<ApiType, () => Observable<PalletBalancesReleases>, []> & QueryableStorageEntry<ApiType, []>;105 /**106 * The total units issued in the system.107 **/108 totalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;109 /**110 * Generic query111 **/112 [key: string]: QueryableStorageEntry<ApiType>;113 };114 charging: {115 /**116 * Generic query117 **/118 [key: string]: QueryableStorageEntry<ApiType>;119 };120 common: {121 /**122 * Storage of the amount of collection admins.123 **/124 adminAmount: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;125 /**126 * Allowlisted collection users.127 **/128 allowlist: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;129 /**130 * Storage of collection info.131 **/132 collectionById: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<UpDataStructsCollection>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;133 /**134 * Storage of collection properties.135 **/136 collectionProperties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;137 /**138 * Storage of token property permissions of a collection.139 **/140 collectionPropertyPermissions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<BTreeMap<Bytes, UpDataStructsPropertyPermission>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;141 /**142 * Storage of the count of created collections. Essentially contains the last collection ID.143 **/144 createdCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;145 /**146 * Storage of the count of deleted collections.147 **/148 destroyedCollectionCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;149 /**150 * Not used by code, exists only to provide some types to metadata.151 **/152 dummyStorageValue: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[UpDataStructsCollectionStats, u32, u32, UpDataStructsTokenChild, PhantomTypeUpDataStructs]>>>, []> & QueryableStorageEntry<ApiType, []>;153 /**154 * List of collection admins.155 **/156 isAdmin: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;157 /**158 * Generic query159 **/160 [key: string]: QueryableStorageEntry<ApiType>;161 };162 configuration: {163 appPromomotionConfigurationOverride: AugmentedQuery<ApiType, () => Observable<PalletConfigurationAppPromotionConfiguration>, []> & QueryableStorageEntry<ApiType, []>;164 minGasPriceOverride: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;165 weightToFeeCoefficientOverride: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;166 xcmAllowedLocationsOverride: AugmentedQuery<ApiType, () => Observable<Option<Vec<XcmV1MultiLocation>>>, []> & QueryableStorageEntry<ApiType, []>;167 /**168 * Generic query169 **/170 [key: string]: QueryableStorageEntry<ApiType>;171 };172 dmpQueue: {173 /**174 * The configuration.175 **/176 configuration: AugmentedQuery<ApiType, () => Observable<CumulusPalletDmpQueueConfigData>, []> & QueryableStorageEntry<ApiType, []>;177 /**178 * The overweight messages.179 **/180 overweight: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u32, Bytes]>>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;181 /**182 * The page index.183 **/184 pageIndex: AugmentedQuery<ApiType, () => Observable<CumulusPalletDmpQueuePageIndexData>, []> & QueryableStorageEntry<ApiType, []>;185 /**186 * The queue pages.187 **/188 pages: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, Bytes]>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;189 /**190 * Generic query191 **/192 [key: string]: QueryableStorageEntry<ApiType>;193 };194 ethereum: {195 blockHash: AugmentedQuery<ApiType, (arg: U256 | AnyNumber | Uint8Array) => Observable<H256>, [U256]> & QueryableStorageEntry<ApiType, [U256]>;196 /**197 * The current Ethereum block.198 **/199 currentBlock: AugmentedQuery<ApiType, () => Observable<Option<EthereumBlock>>, []> & QueryableStorageEntry<ApiType, []>;200 /**201 * The current Ethereum receipts.202 **/203 currentReceipts: AugmentedQuery<ApiType, () => Observable<Option<Vec<EthereumReceiptReceiptV3>>>, []> & QueryableStorageEntry<ApiType, []>;204 /**205 * The current transaction statuses.206 **/207 currentTransactionStatuses: AugmentedQuery<ApiType, () => Observable<Option<Vec<FpRpcTransactionStatus>>>, []> & QueryableStorageEntry<ApiType, []>;208 /**209 * Injected transactions should have unique nonce, here we store current210 **/211 injectedNonce: AugmentedQuery<ApiType, () => Observable<U256>, []> & QueryableStorageEntry<ApiType, []>;212 /**213 * Current building block's transactions and receipts.214 **/215 pending: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[EthereumTransactionTransactionV2, FpRpcTransactionStatus, EthereumReceiptReceiptV3]>>>, []> & QueryableStorageEntry<ApiType, []>;216 /**217 * Generic query218 **/219 [key: string]: QueryableStorageEntry<ApiType>;220 };221 evm: {222 accountCodes: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<Bytes>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;223 accountStorages: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<H256>, [H160, H256]> & QueryableStorageEntry<ApiType, [H160, H256]>;224 /**225 * Written on log, reset after transaction226 * Should be empty between transactions227 **/228 currentLogs: AugmentedQuery<ApiType, () => Observable<Vec<EthereumLog>>, []> & QueryableStorageEntry<ApiType, []>;229 /**230 * Generic query231 **/232 [key: string]: QueryableStorageEntry<ApiType>;233 };234 evmCoderSubstrate: {235 /**236 * Generic query237 **/238 [key: string]: QueryableStorageEntry<ApiType>;239 };240 evmContractHelpers: {241 /**242 * Storage for users that allowed for sponsorship.243 * 244 * ### Usage245 * Prefer to delete record from storage if user no more allowed for sponsorship.246 * 247 * * **Key1** - contract address.248 * * **Key2** - user that allowed for sponsorship.249 * * **Value** - allowance for sponsorship.250 **/251 allowlist: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H160 | string | Uint8Array) => Observable<bool>, [H160, H160]> & QueryableStorageEntry<ApiType, [H160, H160]>;252 /**253 * Storege for contracts with [`Allowlisted`](SponsoringModeT::Allowlisted) sponsoring mode.254 * 255 * ### Usage256 * Prefer to delete collection from storage if mode chaged to non `Allowlisted`, than set **Value** to **false**.257 * 258 * * **Key** - contract address.259 * * **Value** - is contract in [`Allowlisted`](SponsoringModeT::Allowlisted) mode.260 **/261 allowlistEnabled: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;262 /**263 * Store owner for contract.264 * 265 * * **Key** - contract address.266 * * **Value** - owner for contract.267 **/268 owner: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<H160>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;269 selfSponsoring: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;270 sponsorBasket: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H160 | string | Uint8Array) => Observable<Option<u32>>, [H160, H160]> & QueryableStorageEntry<ApiType, [H160, H160]>;271 /**272 * Store for contract sponsorship state.273 * 274 * * **Key** - contract address.275 * * **Value** - sponsorship state.276 **/277 sponsoring: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<UpDataStructsSponsorshipStateBasicCrossAccountIdRepr>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;278 /**279 * Storage for last sponsored block.280 * 281 * * **Key1** - contract address.282 * * **Key2** - sponsored user address.283 * * **Value** - last sponsored block number.284 **/285 sponsoringFeeLimit: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<BTreeMap<u32, U256>>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;286 /**287 * Store for sponsoring mode.288 * 289 * ### Usage290 * Prefer to delete collection from storage if mode chaged to [`Disabled`](SponsoringModeT::Disabled).291 * 292 * * **Key** - contract address.293 * * **Value** - [`sponsoring mode`](SponsoringModeT).294 **/295 sponsoringMode: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<Option<PalletEvmContractHelpersSponsoringModeT>>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;296 /**297 * Storage for sponsoring rate limit in blocks.298 * 299 * * **Key** - contract address.300 * * **Value** - amount of sponsored blocks.301 **/302 sponsoringRateLimit: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<u32>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;303 /**304 * Generic query305 **/306 [key: string]: QueryableStorageEntry<ApiType>;307 };308 evmMigration: {309 migrationPending: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;310 /**311 * Generic query312 **/313 [key: string]: QueryableStorageEntry<ApiType>;314 };315 foreignAssets: {316 /**317 * The storages for assets to fungible collection binding318 * 319 **/320 assetBinding: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;321 /**322 * The storages for AssetMetadatas.323 * 324 * AssetMetadatas: map AssetIds => Option<AssetMetadata>325 **/326 assetMetadatas: AugmentedQuery<ApiType, (arg: PalletForeignAssetsAssetIds | { ForeignAssetId: any } | { NativeAssetId: any } | string | Uint8Array) => Observable<Option<PalletForeignAssetsModuleAssetMetadata>>, [PalletForeignAssetsAssetIds]> & QueryableStorageEntry<ApiType, [PalletForeignAssetsAssetIds]>;327 /**328 * The storages for MultiLocations.329 * 330 * ForeignAssetLocations: map ForeignAssetId => Option<MultiLocation>331 **/332 foreignAssetLocations: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<XcmV1MultiLocation>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;333 /**334 * The storages for CurrencyIds.335 * 336 * LocationToCurrencyIds: map MultiLocation => Option<ForeignAssetId>337 **/338 locationToCurrencyIds: AugmentedQuery<ApiType, (arg: XcmV1MultiLocation | { parents?: any; interior?: any } | string | Uint8Array) => Observable<Option<u32>>, [XcmV1MultiLocation]> & QueryableStorageEntry<ApiType, [XcmV1MultiLocation]>;339 /**340 * Next available Foreign AssetId ID.341 * 342 * NextForeignAssetId: ForeignAssetId343 **/344 nextForeignAssetId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;345 /**346 * Generic query347 **/348 [key: string]: QueryableStorageEntry<ApiType>;349 };350 fungible: {351 /**352 * Storage for assets delegated to a limited extent to other users.353 **/354 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;355 /**356 * Amount of tokens owned by an account inside a collection.357 **/358 balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;359 /**360 * Total amount of fungible tokens inside a collection.361 **/362 totalSupply: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;363 /**364 * Generic query365 **/366 [key: string]: QueryableStorageEntry<ApiType>;367 };368 inflation: {369 /**370 * Current inflation for `InflationBlockInterval` number of blocks371 **/372 blockInflation: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;373 /**374 * Next target (relay) block when inflation will be applied375 **/376 nextInflationBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;377 /**378 * Next target (relay) block when inflation is recalculated379 **/380 nextRecalculationBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;381 /**382 * Relay block when inflation has started383 **/384 startBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;385 /**386 * starting year total issuance387 **/388 startingYearTotalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;389 /**390 * Generic query391 **/392 [key: string]: QueryableStorageEntry<ApiType>;393 };394 maintenance: {395 enabled: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;396 /**397 * Generic query398 **/399 [key: string]: QueryableStorageEntry<ApiType>;400 };401 nonfungible: {402 /**403 * Amount of tokens owned by an account in a collection.404 **/405 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;406 /**407 * Allowance set by a token owner for another user to perform one of certain transactions on a token.408 **/409 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletEvmAccountBasicCrossAccountIdRepr>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;410 /**411 * Operator set by a wallet owner that could perform certain transactions on all tokens in the wallet.412 **/413 collectionAllowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;414 /**415 * Used to enumerate tokens owned by account.416 **/417 owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]>;418 /**419 * Custom data of a token that is serialized to bytes,420 * primarily reserved for on-chain operations,421 * normally obscured from the external users.422 * 423 * Auxiliary properties are slightly different from424 * usual [`TokenProperties`] due to an unlimited number425 * and separately stored and written-to key-value pairs.426 * 427 * Currently used to store RMRK data.428 **/429 tokenAuxProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: UpDataStructsPropertyScope | 'None' | 'Rmrk' | number | Uint8Array, arg4: Bytes | string | Uint8Array) => Observable<Option<Bytes>>, [u32, u32, UpDataStructsPropertyScope, Bytes]> & QueryableStorageEntry<ApiType, [u32, u32, UpDataStructsPropertyScope, Bytes]>;430 /**431 * Used to enumerate token's children.432 **/433 tokenChildren: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array]) => Observable<bool>, [u32, u32, ITuple<[u32, u32]>]> & QueryableStorageEntry<ApiType, [u32, u32, ITuple<[u32, u32]>]>;434 /**435 * Token data, used to partially describe a token.436 **/437 tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNonfungibleItemData>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;438 /**439 * Map of key-value pairs, describing the metadata of a token.440 **/441 tokenProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;442 /**443 * Amount of burnt tokens in a collection.444 **/445 tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;446 /**447 * Total amount of minted tokens in a collection.448 **/449 tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;450 /**451 * Generic query452 **/453 [key: string]: QueryableStorageEntry<ApiType>;454 };455 parachainInfo: {456 parachainId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;457 /**458 * Generic query459 **/460 [key: string]: QueryableStorageEntry<ApiType>;461 };462 parachainSystem: {463 /**464 * The number of HRMP messages we observed in `on_initialize` and thus used that number for465 * announcing the weight of `on_initialize` and `on_finalize`.466 **/467 announcedHrmpMessagesPerCandidate: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;468 /**469 * The next authorized upgrade, if there is one.470 **/471 authorizedUpgrade: AugmentedQuery<ApiType, () => Observable<Option<H256>>, []> & QueryableStorageEntry<ApiType, []>;472 /**473 * A custom head data that should be returned as result of `validate_block`.474 * 475 * See [`Pallet::set_custom_validation_head_data`] for more information.476 **/477 customValidationHeadData: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;478 /**479 * Were the validation data set to notify the relay chain?480 **/481 didSetValidationCode: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;482 /**483 * The parachain host configuration that was obtained from the relay parent.484 * 485 * This field is meant to be updated each block with the validation data inherent. Therefore,486 * before processing of the inherent, e.g. in `on_initialize` this data may be stale.487 * 488 * This data is also absent from the genesis.489 **/490 hostConfiguration: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2AbridgedHostConfiguration>>, []> & QueryableStorageEntry<ApiType, []>;491 /**492 * HRMP messages that were sent in a block.493 * 494 * This will be cleared in `on_initialize` of each new block.495 **/496 hrmpOutboundMessages: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotCorePrimitivesOutboundHrmpMessage>>, []> & QueryableStorageEntry<ApiType, []>;497 /**498 * HRMP watermark that was set in a block.499 * 500 * This will be cleared in `on_initialize` of each new block.501 **/502 hrmpWatermark: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;503 /**504 * The last downward message queue chain head we have observed.505 * 506 * This value is loaded before and saved after processing inbound downward messages carried507 * by the system inherent.508 **/509 lastDmqMqcHead: AugmentedQuery<ApiType, () => Observable<H256>, []> & QueryableStorageEntry<ApiType, []>;510 /**511 * The message queue chain heads we have observed per each channel incoming channel.512 * 513 * This value is loaded before and saved after processing inbound downward messages carried514 * by the system inherent.515 **/516 lastHrmpMqcHeads: AugmentedQuery<ApiType, () => Observable<BTreeMap<u32, H256>>, []> & QueryableStorageEntry<ApiType, []>;517 /**518 * The relay chain block number associated with the last parachain block.519 **/520 lastRelayChainBlockNumber: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;521 /**522 * Validation code that is set by the parachain and is to be communicated to collator and523 * consequently the relay-chain.524 * 525 * This will be cleared in `on_initialize` of each new block if no other pallet already set526 * the value.527 **/528 newValidationCode: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;529 /**530 * Upward messages that are still pending and not yet send to the relay chain.531 **/532 pendingUpwardMessages: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;533 /**534 * In case of a scheduled upgrade, this storage field contains the validation code to be applied.535 * 536 * As soon as the relay chain gives us the go-ahead signal, we will overwrite the [`:code`][well_known_keys::CODE]537 * which will result the next block process with the new validation code. This concludes the upgrade process.538 * 539 * [well_known_keys::CODE]: sp_core::storage::well_known_keys::CODE540 **/541 pendingValidationCode: AugmentedQuery<ApiType, () => Observable<Bytes>, []> & QueryableStorageEntry<ApiType, []>;542 /**543 * Number of downward messages processed in a block.544 * 545 * This will be cleared in `on_initialize` of each new block.546 **/547 processedDownwardMessages: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;548 /**549 * The state proof for the last relay parent block.550 * 551 * This field is meant to be updated each block with the validation data inherent. Therefore,552 * before processing of the inherent, e.g. in `on_initialize` this data may be stale.553 * 554 * This data is also absent from the genesis.555 **/556 relayStateProof: AugmentedQuery<ApiType, () => Observable<Option<SpTrieStorageProof>>, []> & QueryableStorageEntry<ApiType, []>;557 /**558 * The snapshot of some state related to messaging relevant to the current parachain as per559 * the relay parent.560 * 561 * This field is meant to be updated each block with the validation data inherent. Therefore,562 * before processing of the inherent, e.g. in `on_initialize` this data may be stale.563 * 564 * This data is also absent from the genesis.565 **/566 relevantMessagingState: AugmentedQuery<ApiType, () => Observable<Option<CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot>>, []> & QueryableStorageEntry<ApiType, []>;567 /**568 * The weight we reserve at the beginning of the block for processing DMP messages. This569 * overrides the amount set in the Config trait.570 **/571 reservedDmpWeightOverride: AugmentedQuery<ApiType, () => Observable<Option<SpWeightsWeightV2Weight>>, []> & QueryableStorageEntry<ApiType, []>;572 /**573 * The weight we reserve at the beginning of the block for processing XCMP messages. This574 * overrides the amount set in the Config trait.575 **/576 reservedXcmpWeightOverride: AugmentedQuery<ApiType, () => Observable<Option<SpWeightsWeightV2Weight>>, []> & QueryableStorageEntry<ApiType, []>;577 /**578 * An option which indicates if the relay-chain restricts signalling a validation code upgrade.579 * In other words, if this is `Some` and [`NewValidationCode`] is `Some` then the produced580 * candidate will be invalid.581 * 582 * This storage item is a mirror of the corresponding value for the current parachain from the583 * relay-chain. This value is ephemeral which means it doesn't hit the storage. This value is584 * set after the inherent.585 **/586 upgradeRestrictionSignal: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2UpgradeRestriction>>, []> & QueryableStorageEntry<ApiType, []>;587 /**588 * Upward messages that were sent in a block.589 * 590 * This will be cleared in `on_initialize` of each new block.591 **/592 upwardMessages: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;593 /**594 * The [`PersistedValidationData`] set for this block.595 * This value is expected to be set only once per block and it's never stored596 * in the trie.597 **/598 validationData: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2PersistedValidationData>>, []> & QueryableStorageEntry<ApiType, []>;599 /**600 * Generic query601 **/602 [key: string]: QueryableStorageEntry<ApiType>;603 };604 randomnessCollectiveFlip: {605 /**606 * Series of block headers from the last 81 blocks that acts as random seed material. This607 * is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of608 * the oldest hash.609 **/610 randomMaterial: AugmentedQuery<ApiType, () => Observable<Vec<H256>>, []> & QueryableStorageEntry<ApiType, []>;611 /**612 * Generic query613 **/614 [key: string]: QueryableStorageEntry<ApiType>;615 };616 refungible: {617 /**618 * Amount of tokens (not pieces) partially owned by an account within a collection.619 **/620 accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;621 /**622 * Allowance set by a token owner for another user to perform one of certain transactions on a number of pieces of a token.623 **/624 allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg4: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;625 /**626 * Amount of token pieces owned by account.627 **/628 balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr]>;629 /**630 * Operator set by a wallet owner that could perform certain transactions on all tokens in the wallet.631 **/632 collectionAllowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;633 /**634 * Used to enumerate tokens owned by account.635 **/636 owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]>;637 /**638 * Token data, used to partially describe a token.639 **/640 tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<PalletRefungibleItemData>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;641 /**642 * Amount of pieces a refungible token is split into.643 **/644 tokenProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<UpDataStructsProperties>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;645 /**646 * Amount of tokens burnt in a collection.647 **/648 tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;649 /**650 * Total amount of minted tokens in a collection.651 **/652 tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;653 /**654 * Total amount of pieces for token655 **/656 totalSupply: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;657 /**658 * Generic query659 **/660 [key: string]: QueryableStorageEntry<ApiType>;661 };662 rmrkCore: {663 /**664 * Latest yet-unused collection ID.665 **/666 collectionIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;667 /**668 * Mapping from RMRK collection ID to Unique's.669 **/670 uniqueCollectionId: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;671 /**672 * Generic query673 **/674 [key: string]: QueryableStorageEntry<ApiType>;675 };676 rmrkEquip: {677 /**678 * Checkmark that a Base has a Theme NFT named "default".679 **/680 baseHasDefaultTheme: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;681 /**682 * Map of a Base ID and a Part ID to an NFT in the Base collection serving as the Part.683 **/684 inernalPartId: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;685 /**686 * Generic query687 **/688 [key: string]: QueryableStorageEntry<ApiType>;689 };690 structure: {691 /**692 * Generic query693 **/694 [key: string]: QueryableStorageEntry<ApiType>;695 };696 sudo: {697 /**698 * The `AccountId` of the sudo key.699 **/700 key: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;701 /**702 * Generic query703 **/704 [key: string]: QueryableStorageEntry<ApiType>;705 };706 system: {707 /**708 * The full account information for a particular account ID.709 **/710 account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<FrameSystemAccountInfo>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;711 /**712 * Total length (in bytes) for all extrinsics put together, for the current block.713 **/714 allExtrinsicsLen: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;715 /**716 * Map of block numbers to block hashes.717 **/718 blockHash: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<H256>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;719 /**720 * The current weight for the block.721 **/722 blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportDispatchPerDispatchClassWeight>, []> & QueryableStorageEntry<ApiType, []>;723 /**724 * Digest of the current block, also part of the block header.725 **/726 digest: AugmentedQuery<ApiType, () => Observable<SpRuntimeDigest>, []> & QueryableStorageEntry<ApiType, []>;727 /**728 * The number of events in the `Events<T>` list.729 **/730 eventCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;731 /**732 * Events deposited for the current block.733 * 734 * NOTE: The item is unbound and should therefore never be read on chain.735 * It could otherwise inflate the PoV size of a block.736 * 737 * Events have a large in-memory size. Box the events to not go out-of-memory738 * just in case someone still reads them from within the runtime.739 **/740 events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;741 /**742 * Mapping between a topic (represented by T::Hash) and a vector of indexes743 * of events in the `<Events<T>>` list.744 * 745 * All topic vectors have deterministic storage locations depending on the topic. This746 * allows light-clients to leverage the changes trie storage tracking mechanism and747 * in case of changes fetch the list of events of interest.748 * 749 * The value has the type `(T::BlockNumber, EventIndex)` because if we used only just750 * the `EventIndex` then in case if the topic has the same contents on the next block751 * no notification will be triggered thus the event might be lost.752 **/753 eventTopics: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Vec<ITuple<[u32, u32]>>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;754 /**755 * The execution phase of the block.756 **/757 executionPhase: AugmentedQuery<ApiType, () => Observable<Option<FrameSystemPhase>>, []> & QueryableStorageEntry<ApiType, []>;758 /**759 * Total extrinsics count for the current block.760 **/761 extrinsicCount: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;762 /**763 * Extrinsics data for the current block (maps an extrinsic's index to its data).764 **/765 extrinsicData: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;766 /**767 * Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened.768 **/769 lastRuntimeUpgrade: AugmentedQuery<ApiType, () => Observable<Option<FrameSystemLastRuntimeUpgradeInfo>>, []> & QueryableStorageEntry<ApiType, []>;770 /**771 * The current block number being processed. Set by `execute_block`.772 **/773 number: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;774 /**775 * Hash of the previous block.776 **/777 parentHash: AugmentedQuery<ApiType, () => Observable<H256>, []> & QueryableStorageEntry<ApiType, []>;778 /**779 * True if we have upgraded so that AccountInfo contains three types of `RefCount`. False780 * (default) if not.781 **/782 upgradedToTripleRefCount: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;783 /**784 * True if we have upgraded so that `type RefCount` is `u32`. False (default) if not.785 **/786 upgradedToU32RefCount: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;787 /**788 * Generic query789 **/790 [key: string]: QueryableStorageEntry<ApiType>;791 };792 testUtils: {793 enabled: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;794 testValue: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;795 /**796 * Generic query797 **/798 [key: string]: QueryableStorageEntry<ApiType>;799 };800 timestamp: {801 /**802 * Did the timestamp get updated in this block?803 **/804 didUpdate: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;805 /**806 * Current time for the current block.807 **/808 now: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;809 /**810 * Generic query811 **/812 [key: string]: QueryableStorageEntry<ApiType>;813 };814 tokens: {815 /**816 * The balance of a token type under an account.817 * 818 * NOTE: If the total is ever zero, decrease account ref account.819 * 820 * NOTE: This is only used in the case that this module is used to store821 * balances.822 **/823 accounts: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: PalletForeignAssetsAssetIds | { ForeignAssetId: any } | { NativeAssetId: any } | string | Uint8Array) => Observable<OrmlTokensAccountData>, [AccountId32, PalletForeignAssetsAssetIds]> & QueryableStorageEntry<ApiType, [AccountId32, PalletForeignAssetsAssetIds]>;824 /**825 * Any liquidity locks of a token type under an account.826 * NOTE: Should only be accessed when setting, changing and freeing a lock.827 **/828 locks: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: PalletForeignAssetsAssetIds | { ForeignAssetId: any } | { NativeAssetId: any } | string | Uint8Array) => Observable<Vec<OrmlTokensBalanceLock>>, [AccountId32, PalletForeignAssetsAssetIds]> & QueryableStorageEntry<ApiType, [AccountId32, PalletForeignAssetsAssetIds]>;829 /**830 * Named reserves on some account balances.831 **/832 reserves: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: PalletForeignAssetsAssetIds | { ForeignAssetId: any } | { NativeAssetId: any } | string | Uint8Array) => Observable<Vec<OrmlTokensReserveData>>, [AccountId32, PalletForeignAssetsAssetIds]> & QueryableStorageEntry<ApiType, [AccountId32, PalletForeignAssetsAssetIds]>;833 /**834 * The total issuance of a token type.835 **/836 totalIssuance: AugmentedQuery<ApiType, (arg: PalletForeignAssetsAssetIds | { ForeignAssetId: any } | { NativeAssetId: any } | string | Uint8Array) => Observable<u128>, [PalletForeignAssetsAssetIds]> & QueryableStorageEntry<ApiType, [PalletForeignAssetsAssetIds]>;837 /**838 * Generic query839 **/840 [key: string]: QueryableStorageEntry<ApiType>;841 };842 transactionPayment: {843 nextFeeMultiplier: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;844 storageVersion: AugmentedQuery<ApiType, () => Observable<PalletTransactionPaymentReleases>, []> & QueryableStorageEntry<ApiType, []>;845 /**846 * Generic query847 **/848 [key: string]: QueryableStorageEntry<ApiType>;849 };850 treasury: {851 /**852 * Proposal indices that have been approved but not yet awarded.853 **/854 approvals: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;855 /**856 * Number of proposals that have been made.857 **/858 proposalCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;859 /**860 * Proposals that have been made.861 **/862 proposals: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletTreasuryProposal>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;863 /**864 * Generic query865 **/866 [key: string]: QueryableStorageEntry<ApiType>;867 };868 unique: {869 /**870 * Used for migrations871 **/872 chainVersion: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;873 /**874 * (Collection id (controlled?2), who created (real))875 * TODO: Off chain worker should remove from this map when collection gets removed876 **/877 createItemBasket: AugmentedQuery<ApiType, (arg: ITuple<[u32, AccountId32]> | [u32 | AnyNumber | Uint8Array, AccountId32 | string | Uint8Array]) => Observable<Option<u32>>, [ITuple<[u32, AccountId32]>]> & QueryableStorageEntry<ApiType, [ITuple<[u32, AccountId32]>]>;878 /**879 * Last sponsoring of fungible tokens approval in a collection880 **/881 fungibleApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;882 /**883 * Collection id (controlled?2), owning user (real)884 **/885 fungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;886 /**887 * Last sponsoring of NFT approval in a collection888 **/889 nftApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;890 /**891 * Collection id (controlled?2), token id (controlled?2)892 **/893 nftTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;894 /**895 * Last sponsoring of RFT approval in a collection896 **/897 refungibleApproveBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, u32, AccountId32]>;898 /**899 * Collection id (controlled?2), token id (controlled?2)900 **/901 reFungibleTransferBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u32, u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, u32, AccountId32]>;902 /**903 * Last sponsoring of token property setting // todo:doc rephrase this and the following904 **/905 tokenPropertyBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;906 /**907 * Variable metadata sponsoring908 * Collection id (controlled?2), token id (controlled?2)909 **/910 variableMetaDataBasket: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;911 /**912 * Generic query913 **/914 [key: string]: QueryableStorageEntry<ApiType>;915 };916 vesting: {917 /**918 * Vesting schedules of an account.919 * 920 * VestingSchedules: map AccountId => Vec<VestingSchedule>921 **/922 vestingSchedules: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<OrmlVestingVestingSchedule>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;923 /**924 * Generic query925 **/926 [key: string]: QueryableStorageEntry<ApiType>;927 };928 xcmpQueue: {929 /**930 * Inbound aggregate XCMP messages. It can only be one per ParaId/block.931 **/932 inboundXcmpMessages: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;933 /**934 * Status of the inbound XCMP channels.935 **/936 inboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<CumulusPalletXcmpQueueInboundChannelDetails>>, []> & QueryableStorageEntry<ApiType, []>;937 /**938 * The messages outbound in a given XCMP channel.939 **/940 outboundXcmpMessages: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u16 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32, u16]> & QueryableStorageEntry<ApiType, [u32, u16]>;941 /**942 * The non-empty XCMP channels in order of becoming non-empty, and the index of the first943 * and last outbound message. If the two indices are equal, then it indicates an empty944 * queue and there must be a non-`Ok` `OutboundStatus`. We assume queues grow no greater945 * than 65535 items. Queue indices for normal messages begin at one; zero is reserved in946 * case of the need to send a high-priority signal message this block.947 * The bool is true if there is a signal message waiting to be sent.948 **/949 outboundXcmpStatus: AugmentedQuery<ApiType, () => Observable<Vec<CumulusPalletXcmpQueueOutboundChannelDetails>>, []> & QueryableStorageEntry<ApiType, []>;950 /**951 * The messages that exceeded max individual message weight budget.952 * 953 * These message stay in this storage map until they are manually dispatched via954 * `service_overweight`.955 **/956 overweight: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u32, u32, Bytes]>>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;957 /**958 * The number of overweight messages ever recorded in `Overweight`. Also doubles as the next959 * available free overweight index.960 **/961 overweightCount: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;962 /**963 * The configuration which controls the dynamics of the outbound queue.964 **/965 queueConfig: AugmentedQuery<ApiType, () => Observable<CumulusPalletXcmpQueueQueueConfigData>, []> & QueryableStorageEntry<ApiType, []>;966 /**967 * Whether or not the XCMP queue is suspended from executing incoming XCMs or not.968 **/969 queueSuspended: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;970 /**971 * Any signal messages waiting to be sent.972 **/973 signalMessages: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;974 /**975 * Generic query976 **/977 [key: string]: QueryableStorageEntry<ApiType>;978 };979 } // AugmentedQueries980} // declare moduletests/src/interfaces/augment-api-rpc.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-rpc.ts
+++ b/tests/src/interfaces/augment-api-rpc.ts
@@ -16,7 +16,7 @@
import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
-import type { CodeUploadRequest, CodeUploadResult, ContractCallRequest, ContractExecResult, ContractInstantiateResult, InstantiateRequest } from '@polkadot/types/interfaces/contracts';
+import type { CodeUploadRequest, CodeUploadResult, ContractCallRequest, ContractExecResult, ContractInstantiateResult, InstantiateRequestV1 } from '@polkadot/types/interfaces/contracts';
import type { BlockStats } from '@polkadot/types/interfaces/dev';
import type { CreatedBlock } from '@polkadot/types/interfaces/engine';
import type { EthAccount, EthCallRequest, EthFeeHistory, EthFilter, EthFilterChanges, EthLog, EthReceipt, EthRichBlock, EthSubKind, EthSubParams, EthSyncStatus, EthTransaction, EthTransactionRequest, EthWork } from '@polkadot/types/interfaces/eth';
@@ -24,7 +24,7 @@
import type { EncodedFinalityProofs, JustificationNotification, ReportedRoundStates } from '@polkadot/types/interfaces/grandpa';
import type { MmrLeafBatchProof, MmrLeafProof } from '@polkadot/types/interfaces/mmr';
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
-import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
+import type { FeeDetails, RuntimeDispatchInfoV1 } from '@polkadot/types/interfaces/payment';
import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
import type { AccountId, AccountId32, BlockNumber, H160, H256, H64, Hash, Header, Index, Justification, KeyValue, SignedBlock, StorageData } from '@polkadot/types/interfaces/runtime';
import type { MigrationStatusResult, ReadProof, RuntimeVersion, TraceBlockResponse } from '@polkadot/types/interfaces/state';
@@ -174,7 +174,7 @@
* @deprecated Use the runtime interface `api.call.contractsApi.instantiate` instead
* Instantiate a new contract
**/
- instantiate: AugmentedRpc<(request: InstantiateRequest | { origin?: any; value?: any; gasLimit?: any; storageDepositLimit?: any; code?: any; data?: any; salt?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractInstantiateResult>>;
+ instantiate: AugmentedRpc<(request: InstantiateRequestV1 | { origin?: any; value?: any; gasLimit?: any; code?: any; data?: any; salt?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractInstantiateResult>>;
/**
* @deprecated Not available in newer versions of the contracts interfaces
* Returns the projected time a given contract will be able to sustain paying its rent
@@ -426,13 +426,15 @@
};
payment: {
/**
+ * @deprecated Use `api.call.transactionPaymentApi.queryFeeDetails` instead
* Query the detailed fee of a given encoded extrinsic
**/
queryFeeDetails: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<FeeDetails>>;
/**
+ * @deprecated Use `api.call.transactionPaymentApi.queryInfo` instead
* Retrieves the fee information for an encoded extrinsic
**/
- queryInfo: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<RuntimeDispatchInfo>>;
+ queryInfo: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<RuntimeDispatchInfoV1>>;
};
rmrk: {
/**
tests/src/interfaces/augment-api-runtime.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-runtime.ts
+++ b/tests/src/interfaces/augment-api-runtime.ts
@@ -6,7 +6,7 @@
import '@polkadot/api-base/types/calls';
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
-import type { Bytes, Null, Option, Result, U256, Vec, bool, u256, u64 } from '@polkadot/types-codec';
+import type { Bytes, Null, Option, Result, U256, Vec, bool, u256, u32, u64 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
import type { BlockHash } from '@polkadot/types/interfaces/chain';
@@ -16,6 +16,7 @@
import type { EvmAccount, EvmCallInfo, EvmCreateInfo } from '@polkadot/types/interfaces/evm';
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
+import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { AccountId, Block, H160, H256, Header, Index, KeyTypeId, Permill, SlotDuration } from '@polkadot/types/interfaces/runtime';
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
import type { ApplyExtrinsicResult, DispatchError } from '@polkadot/types/interfaces/system';
@@ -228,5 +229,20 @@
**/
[key: string]: DecoratedCallBase<ApiType>;
};
+ /** 0x37c8bb1350a9a2a8/2 */
+ transactionPaymentApi: {
+ /**
+ * The transaction fee details
+ **/
+ queryFeeDetails: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
+ /**
+ * The transaction info
+ **/
+ queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
+ /**
+ * Generic call
+ **/
+ [key: string]: DecoratedCallBase<ApiType>;
+ };
} // AugmentedCalls
} // declare module
tests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-tx.ts
+++ b/tests/src/interfaces/augment-api-tx.ts
@@ -217,7 +217,7 @@
configuration: {
setAppPromotionConfigurationOverride: AugmentedSubmittable<(configuration: PalletConfigurationAppPromotionConfiguration | { recalculationInterval?: any; pendingInterval?: any; intervalIncome?: any; maxStakersPerCalculation?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletConfigurationAppPromotionConfiguration]>;
setMinGasPriceOverride: AugmentedSubmittable<(coeff: Option<u64> | null | Uint8Array | u64 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u64>]>;
- setWeightToFeeCoefficientOverride: AugmentedSubmittable<(coeff: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
+ setWeightToFeeCoefficientOverride: AugmentedSubmittable<(coeff: Option<u64> | null | Uint8Array | u64 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u64>]>;
setXcmAllowedLocations: AugmentedSubmittable<(locations: Option<Vec<XcmV1MultiLocation>> | null | Uint8Array | Vec<XcmV1MultiLocation> | (XcmV1MultiLocation | { parents?: any; interior?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Option<Vec<XcmV1MultiLocation>>]>;
/**
* Generic tx
@@ -1432,6 +1432,23 @@
**/
destroyCollection: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
+ * Repairs a collection if the data was somehow corrupted.
+ *
+ * # Arguments
+ *
+ * * `collection_id`: ID of the collection to repair.
+ **/
+ forceRepairCollection: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
+ /**
+ * Repairs a token if the data was somehow corrupted.
+ *
+ * # Arguments
+ *
+ * * `collection_id`: ID of the collection the item belongs to.
+ * * `item_id`: ID of the item.
+ **/
+ forceRepairItem: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
+ /**
* Remove admin of a collection.
*
* An admin address can remove itself. List of admins may become empty,
@@ -1474,15 +1491,6 @@
* * `address`: ID of the address to be removed from the allowlist.
**/
removeFromAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
- /**
- * Repairs a broken item
- *
- * # Arguments
- *
- * * `collection_id`: ID of the collection the item belongs to.
- * * `item_id`: ID of the item.
- **/
- repairItem: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
/**
* Re-partition a refungible token, while owning all of its parts/pieces.
*
tests/src/interfaces/augment-types.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-types.ts
+++ b/tests/src/interfaces/augment-types.ts
@@ -24,7 +24,7 @@
import type { StatementKind } from '@polkadot/types/interfaces/claims';
import type { CollectiveOrigin, MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';
import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';
-import type { AliveContractInfo, CodeHash, CodeSource, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractInstantiateResultTo299, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateRequestV1, InstantiateRequestV2, InstantiateReturnValue, InstantiateReturnValueOk, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
+import type { AliveContractInfo, CodeHash, CodeSource, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractExecResultU64, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractInstantiateResultTo299, ContractInstantiateResultU64, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateRequestV1, InstantiateRequestV2, InstantiateReturnValue, InstantiateReturnValueOk, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractContractSpecV4, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractMetadataV4, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';
import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';
import type { CollationInfo, CollationInfoV1, ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';
@@ -47,7 +47,7 @@
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateEvent, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, CoreState, DisputeLocation, DisputeResult, DisputeState, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, GroupRotationInfo, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OccupiedCore, OccupiedCoreAssumption, OldV1SessionInfo, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, PvfCheckStatement, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, ReplacementTimes, Retriable, ScheduledCore, Scheduling, ScrapedOnChainVotes, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, SlotRange10, Statement, SubId, SystemInherentData, TransientValidationData, UpgradeGoAhead, UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationCodeHash, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersData10, WinnersDataTuple, WinnersDataTuple10, WinningData, WinningData10, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
-import type { FeeDetails, InclusionFee, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
+import type { FeeDetails, InclusionFee, RuntimeDispatchInfo, RuntimeDispatchInfoV1, RuntimeDispatchInfoV2 } from '@polkadot/types/interfaces/payment';
import type { Approvals } from '@polkadot/types/interfaces/poll';
import type { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces/proxy';
import type { AccountStatus, AccountValidity } from '@polkadot/types/interfaces/purchase';
@@ -273,10 +273,12 @@
ContractExecResultTo255: ContractExecResultTo255;
ContractExecResultTo260: ContractExecResultTo260;
ContractExecResultTo267: ContractExecResultTo267;
+ ContractExecResultU64: ContractExecResultU64;
ContractInfo: ContractInfo;
ContractInstantiateResult: ContractInstantiateResult;
ContractInstantiateResultTo267: ContractInstantiateResultTo267;
ContractInstantiateResultTo299: ContractInstantiateResultTo299;
+ ContractInstantiateResultU64: ContractInstantiateResultU64;
ContractLayoutArray: ContractLayoutArray;
ContractLayoutCell: ContractLayoutCell;
ContractLayoutEnum: ContractLayoutEnum;
@@ -1057,6 +1059,8 @@
RpcMethods: RpcMethods;
RuntimeDbWeight: RuntimeDbWeight;
RuntimeDispatchInfo: RuntimeDispatchInfo;
+ RuntimeDispatchInfoV1: RuntimeDispatchInfoV1;
+ RuntimeDispatchInfoV2: RuntimeDispatchInfoV2;
RuntimeVersion: RuntimeVersion;
RuntimeVersionApi: RuntimeVersionApi;
RuntimeVersionPartial: RuntimeVersionPartial;
tests/src/interfaces/default/types.tsdiffbeforeafterboth--- a/tests/src/interfaces/default/types.ts
+++ b/tests/src/interfaces/default/types.ts
@@ -1303,7 +1303,7 @@
export interface PalletConfigurationCall extends Enum {
readonly isSetWeightToFeeCoefficientOverride: boolean;
readonly asSetWeightToFeeCoefficientOverride: {
- readonly coeff: Option<u32>;
+ readonly coeff: Option<u64>;
} & Struct;
readonly isSetMinGasPriceOverride: boolean;
readonly asSetMinGasPriceOverride: {
@@ -2319,12 +2319,16 @@
readonly operator: PalletEvmAccountBasicCrossAccountIdRepr;
readonly approve: bool;
} & Struct;
- readonly isRepairItem: boolean;
- readonly asRepairItem: {
+ readonly isForceRepairCollection: boolean;
+ readonly asForceRepairCollection: {
+ readonly collectionId: u32;
+ } & Struct;
+ readonly isForceRepairItem: boolean;
+ readonly asForceRepairItem: {
readonly collectionId: u32;
readonly itemId: u32;
} & Struct;
- readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition' | 'SetAllowanceForAll' | 'RepairItem';
+ readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition' | 'SetAllowanceForAll' | 'ForceRepairCollection' | 'ForceRepairItem';
}
/** @name PalletUniqueError */
tests/src/interfaces/lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/lookup.ts
+++ b/tests/src/interfaces/lookup.ts
@@ -2282,8 +2282,11 @@
operator: 'PalletEvmAccountBasicCrossAccountIdRepr',
approve: 'bool',
},
- repair_item: {
+ force_repair_collection: {
collectionId: 'u32',
+ },
+ force_repair_item: {
+ collectionId: 'u32',
itemId: 'u32'
}
}
@@ -2452,7 +2455,7 @@
PalletConfigurationCall: {
_enum: {
set_weight_to_fee_coefficient_override: {
- coeff: 'Option<u32>',
+ coeff: 'Option<u64>',
},
set_min_gas_price_override: {
coeff: 'Option<u64>',
tests/src/interfaces/types-lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/types-lookup.ts
+++ b/tests/src/interfaces/types-lookup.ts
@@ -2517,12 +2517,16 @@
readonly operator: PalletEvmAccountBasicCrossAccountIdRepr;
readonly approve: bool;
} & Struct;
- readonly isRepairItem: boolean;
- readonly asRepairItem: {
+ readonly isForceRepairCollection: boolean;
+ readonly asForceRepairCollection: {
+ readonly collectionId: u32;
+ } & Struct;
+ readonly isForceRepairItem: boolean;
+ readonly asForceRepairItem: {
readonly collectionId: u32;
readonly itemId: u32;
} & Struct;
- readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition' | 'SetAllowanceForAll' | 'RepairItem';
+ readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition' | 'SetAllowanceForAll' | 'ForceRepairCollection' | 'ForceRepairItem';
}
/** @name UpDataStructsCollectionMode (237) */
@@ -2675,7 +2679,7 @@
interface PalletConfigurationCall extends Enum {
readonly isSetWeightToFeeCoefficientOverride: boolean;
readonly asSetWeightToFeeCoefficientOverride: {
- readonly coeff: Option<u32>;
+ readonly coeff: Option<u64>;
} & Struct;
readonly isSetMinGasPriceOverride: boolean;
readonly asSetMinGasPriceOverride: {
tests/src/nesting/collectionProperties.test.tsdiffbeforeafterboth--- a/tests/src/nesting/collectionProperties.test.ts
+++ b/tests/src/nesting/collectionProperties.test.ts
@@ -209,7 +209,7 @@
before(async () => {
await usingPlaygrounds(async (helper, privateKey) => {
const donor = await privateKey({filename: __filename});
- [alice, bob] = await helper.arrange.createAccounts([100n, 10n], donor);
+ [alice, bob] = await helper.arrange.createAccounts([1000n, 100n], donor);
});
});