From 74185d79a9747185f72ebde77d1f0a8bd8f6a186 Mon Sep 17 00:00:00 2001 From: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com> Date: Fri, 14 Jul 2023 16:59:05 +0300 Subject: [PATCH] Feature/staking module (#553) * add StakingModule skeleton * add stats methods * add basic subscriptions and extrinsics * wip extrinsics * submit extrinsic signer * added get account pair & pass pair to staking extrinsics * add elected validator request * improve methods * improve methods * remove unused code * Bump * Fix issue * Update types --------- Co-authored-by: Stefan Popov Co-authored-by: Stefan Popov <17688105+stefashkaa@users.noreply.github.com> --- packages/api/package.json | 4 +- packages/connection/package.json | 4 +- packages/liquidity-proxy/package.json | 4 +- packages/math/package.json | 2 +- packages/type-definitions/package.json | 2 +- packages/types/package.json | 4 +- .../src/interfaces/augment-api-errors.ts | 12 +- .../types/src/interfaces/augment-api-tx.ts | 1 + packages/types/src/interfaces/lookup.ts | 385 ++++++------- packages/types/src/interfaces/types-lookup.ts | 389 +++++++------- packages/util/package.json | 12 +- packages/util/src/BaseApi.ts | 15 +- packages/util/src/api.ts | 2 + packages/util/src/logger.ts | 1 + packages/util/src/staking/index.ts | 508 ++++++++++++++++++ packages/util/src/staking/types.ts | 68 +++ 16 files changed, 1009 insertions(+), 404 deletions(-) create mode 100644 packages/util/src/staking/index.ts create mode 100644 packages/util/src/staking/types.ts diff --git a/packages/api/package.json b/packages/api/package.json index 0f3b2bd79..e3a502107 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@sora-substrate/api", - "version": "1.18.3", + "version": "1.18.4", "license": "Apache-2.0", "main": "./build/index.js", "typings": "./build/index.d.ts", @@ -10,6 +10,6 @@ "dependencies": { "@open-web3/orml-api-derive": "1.1.4", "@polkadot/api": "9.14.2", - "@sora-substrate/types": "1.18.3" + "@sora-substrate/types": "1.18.4" } } diff --git a/packages/connection/package.json b/packages/connection/package.json index bbcd3f69c..8582ea4a9 100644 --- a/packages/connection/package.json +++ b/packages/connection/package.json @@ -1,6 +1,6 @@ { "name": "@sora-substrate/connection", - "version": "1.18.3", + "version": "1.18.4", "license": "Apache-2.0", "main": "./build/index.js", "typings": "./build/index.d.ts", @@ -8,6 +8,6 @@ "access": "public" }, "dependencies": { - "@sora-substrate/api": "1.18.3" + "@sora-substrate/api": "1.18.4" } } diff --git a/packages/liquidity-proxy/package.json b/packages/liquidity-proxy/package.json index de3a045df..3a09bd570 100644 --- a/packages/liquidity-proxy/package.json +++ b/packages/liquidity-proxy/package.json @@ -1,6 +1,6 @@ { "name": "@sora-substrate/liquidity-proxy", - "version": "1.18.3", + "version": "1.18.4", "license": "Apache-2.0", "main": "./build/index.js", "typings": "./build/index.d.ts", @@ -8,6 +8,6 @@ "access": "public" }, "dependencies": { - "@sora-substrate/math": "1.18.3" + "@sora-substrate/math": "1.18.4" } } diff --git a/packages/math/package.json b/packages/math/package.json index 9978ab9e9..bcc3ba8fb 100644 --- a/packages/math/package.json +++ b/packages/math/package.json @@ -1,6 +1,6 @@ { "name": "@sora-substrate/math", - "version": "1.18.3", + "version": "1.18.4", "license": "Apache-2.0", "main": "./build/index.js", "typings": "./build/index.d.ts", diff --git a/packages/type-definitions/package.json b/packages/type-definitions/package.json index b9e0084bd..83f21699d 100644 --- a/packages/type-definitions/package.json +++ b/packages/type-definitions/package.json @@ -1,6 +1,6 @@ { "name": "@sora-substrate/type-definitions", - "version": "1.18.3", + "version": "1.18.4", "license": "Apache-2.0", "main": "./build/index.js", "typings": "./build/index.d.ts", diff --git a/packages/types/package.json b/packages/types/package.json index ab06546dd..7894aa08e 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@sora-substrate/types", - "version": "1.18.3", + "version": "1.18.4", "license": "Apache-2.0", "main": "./build/index.js", "typings": "./build/index.d.ts", @@ -13,7 +13,7 @@ "@polkadot/api": "9.14.2", "@polkadot/typegen": "9.14.2", "@polkadot/types": "9.14.2", - "@sora-substrate/type-definitions": "1.18.3" + "@sora-substrate/type-definitions": "1.18.4" }, "devDependencies": { "@types/websocket": "^1.0.0", diff --git a/packages/types/src/interfaces/augment-api-errors.ts b/packages/types/src/interfaces/augment-api-errors.ts index 61a35258e..41840125e 100644 --- a/packages/types/src/interfaces/augment-api-errors.ts +++ b/packages/types/src/interfaces/augment-api-errors.ts @@ -2015,14 +2015,14 @@ declare module '@polkadot/api-base/types/errors' { * There are no bids/asks for the price **/ NoDataForPrice: AugmentedError; - /** - * The asset is not allowed to be base. Only dex base asset can be a quote asset for order book - **/ - NotAllowedBaseAsset: AugmentedError; /** * Orderbooks cannot be created with given dex id. **/ NotAllowedDEXId: AugmentedError; + /** + * The asset is not allowed to be quote. Only the dex base asset can be a quote asset for order book + **/ + NotAllowedQuoteAsset: AugmentedError; /** * There is not enough liquidity in the order book to cover the deal **/ @@ -2051,6 +2051,10 @@ declare module '@polkadot/api-base/types/errors' { * Indicated limit for slippage has not been met during transaction execution. **/ SlippageLimitExceeded: AugmentedError; + /** + * Synthetic assets are forbidden for order book. + **/ + SyntheticAssetIsForbidden: AugmentedError; /** * Tick size & step lot size are too big and their multiplication overflows Balance **/ diff --git a/packages/types/src/interfaces/augment-api-tx.ts b/packages/types/src/interfaces/augment-api-tx.ts index a9fe48f66..4fb01add5 100644 --- a/packages/types/src/interfaces/augment-api-tx.ts +++ b/packages/types/src/interfaces/augment-api-tx.ts @@ -1971,6 +1971,7 @@ declare module '@polkadot/api-base/types/submittable' { }; orderBook: { cancelLimitOrder: AugmentedSubmittable<(orderBookId: OrderBookOrderBookId | { dexId?: any; base?: any; quote?: any } | string | Uint8Array, orderId: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [OrderBookOrderBookId, u128]>; + cancelLimitOrdersBatch: AugmentedSubmittable<(limitOrdersToCancel: Vec]>> | ([OrderBookOrderBookId | { dexId?: any; base?: any; quote?: any } | string | Uint8Array, Vec | (u128 | AnyNumber | Uint8Array)[]])[]) => SubmittableExtrinsic, [Vec]>>]>; changeOrderbookStatus: AugmentedSubmittable<(orderBookId: OrderBookOrderBookId | { dexId?: any; base?: any; quote?: any } | string | Uint8Array, status: OrderBookOrderBookStatus | 'Trade' | 'PlaceAndCancel' | 'OnlyCancel' | 'Stop' | number | Uint8Array) => SubmittableExtrinsic, [OrderBookOrderBookId, OrderBookOrderBookStatus]>; createOrderbook: AugmentedSubmittable<(orderBookId: OrderBookOrderBookId | { dexId?: any; base?: any; quote?: any } | string | Uint8Array) => SubmittableExtrinsic, [OrderBookOrderBookId]>; deleteOrderbook: AugmentedSubmittable<(orderBookId: OrderBookOrderBookId | { dexId?: any; base?: any; quote?: any } | string | Uint8Array) => SubmittableExtrinsic, [OrderBookOrderBookId]>; diff --git a/packages/types/src/interfaces/lookup.ts b/packages/types/src/interfaces/lookup.ts index e010bb7b8..54ff58480 100644 --- a/packages/types/src/interfaces/lookup.ts +++ b/packages/types/src/interfaces/lookup.ts @@ -4166,12 +4166,15 @@ export default { }, cancel_limit_order: { orderBookId: 'OrderBookOrderBookId', - orderId: 'u128' + orderId: 'u128', + }, + cancel_limit_orders_batch: { + limitOrdersToCancel: 'Vec<(OrderBookOrderBookId,Vec)>' } } }, /** - * Lookup537: bridge_proxy::pallet::Call + * Lookup539: bridge_proxy::pallet::Call **/ BridgeProxyCall: { _enum: { @@ -4184,7 +4187,7 @@ export default { } }, /** - * Lookup538: bridge_types::GenericAccount + * Lookup540: bridge_types::GenericAccount **/ BridgeTypesGenericAccount: { _enum: { @@ -4196,7 +4199,7 @@ export default { } }, /** - * Lookup539: ethereum_light_client::pallet::Call + * Lookup541: ethereum_light_client::pallet::Call **/ EthereumLightClientCall: { _enum: { @@ -4219,7 +4222,7 @@ export default { } }, /** - * Lookup540: bridge_types::network_config::NetworkConfig + * Lookup542: bridge_types::network_config::NetworkConfig **/ BridgeTypesNetworkConfig: { _enum: { @@ -4237,7 +4240,7 @@ export default { } }, /** - * Lookup541: bridge_types::network_config::Consensus + * Lookup543: bridge_types::network_config::Consensus **/ BridgeTypesNetworkConfigConsensus: { _enum: { @@ -4254,7 +4257,7 @@ export default { } }, /** - * Lookup542: bridge_types::difficulty::ForkConfig + * Lookup544: bridge_types::difficulty::ForkConfig **/ BridgeTypesDifficultyForkConfig: { byzantiumForkBlock: 'u64', @@ -4265,14 +4268,14 @@ export default { grayGlacierForkBlock: 'u64' }, /** - * Lookup543: bridge_types::difficulty::ClassicForkConfig + * Lookup545: bridge_types::difficulty::ClassicForkConfig **/ BridgeTypesDifficultyClassicForkConfig: { ecip1041Block: 'u64', ecip1099Block: 'u64' }, /** - * Lookup544: bridge_types::header::Header + * Lookup546: bridge_types::header::Header **/ BridgeTypesHeader: { parentHash: 'H256', @@ -4292,22 +4295,22 @@ export default { baseFee: 'Option' }, /** - * Lookup545: ethbloom::Bloom + * Lookup547: ethbloom::Bloom **/ EthbloomBloom: '[u8;256]', /** - * Lookup549: bridge_types::ethashproof::DoubleNodeWithMerkleProof + * Lookup551: bridge_types::ethashproof::DoubleNodeWithMerkleProof **/ BridgeTypesEthashproofDoubleNodeWithMerkleProof: { dagNodes: '[H512;2]', proof: 'Vec' }, /** - * Lookup553: bridge_types::ethashproof::MixNonce + * Lookup555: bridge_types::ethashproof::MixNonce **/ BridgeTypesEthashproofMixNonce: '[u8;32]', /** - * Lookup554: sp_runtime::MultiSignature + * Lookup556: sp_runtime::MultiSignature **/ SpRuntimeMultiSignature: { _enum: { @@ -4317,7 +4320,7 @@ export default { } }, /** - * Lookup555: bridge_inbound_channel::pallet::Call + * Lookup557: bridge_inbound_channel::pallet::Call **/ BridgeInboundChannelCall: { _enum: { @@ -4342,7 +4345,7 @@ export default { } }, /** - * Lookup556: bridge_types::log::Log + * Lookup558: bridge_types::log::Log **/ BridgeTypesLog: { address: 'H160', @@ -4350,7 +4353,7 @@ export default { data: 'Bytes' }, /** - * Lookup557: bridge_types::evm::Proof + * Lookup559: bridge_types::evm::Proof **/ BridgeTypesEvmProof: { blockHash: 'H256', @@ -4358,7 +4361,7 @@ export default { data: 'Vec' }, /** - * Lookup558: eth_app::pallet::Call + * Lookup560: eth_app::pallet::Call **/ EthAppCall: { _enum: { @@ -4388,7 +4391,7 @@ export default { } }, /** - * Lookup559: erc20_app::pallet::Call + * Lookup561: erc20_app::pallet::Call **/ Erc20AppCall: { _enum: { @@ -4436,7 +4439,7 @@ export default { } }, /** - * Lookup560: migration_app::pallet::Call + * Lookup562: migration_app::pallet::Call **/ MigrationAppCall: { _enum: { @@ -4458,7 +4461,7 @@ export default { } }, /** - * Lookup563: beefy_light_client::pallet::Call + * Lookup565: beefy_light_client::pallet::Call **/ BeefyLightClientCall: { _enum: { @@ -4478,7 +4481,7 @@ export default { } }, /** - * Lookup564: sp_beefy::mmr::BeefyAuthoritySet + * Lookup566: sp_beefy::mmr::BeefyAuthoritySet **/ SpBeefyMmrBeefyAuthoritySet: { id: 'u64', @@ -4486,7 +4489,7 @@ export default { root: 'H256' }, /** - * Lookup565: sp_beefy::commitment::Commitment + * Lookup567: sp_beefy::commitment::Commitment **/ SpBeefyCommitment: { payload: 'SpBeefyPayload', @@ -4494,11 +4497,11 @@ export default { validatorSetId: 'u64' }, /** - * Lookup566: sp_beefy::payload::Payload + * Lookup568: sp_beefy::payload::Payload **/ SpBeefyPayload: 'Vec<([u8;2],Bytes)>', /** - * Lookup569: bridge_common::beefy_types::ValidatorProof + * Lookup571: bridge_common::beefy_types::ValidatorProof **/ BridgeCommonBeefyTypesValidatorProof: { validatorClaimsBitfield: 'BitVec', @@ -4508,11 +4511,11 @@ export default { publicKeyMerkleProofs: 'Vec>' }, /** - * Lookup572: bitvec::order::Msb0 + * Lookup574: bitvec::order::Msb0 **/ BitvecOrderMsb0: 'Null', /** - * Lookup574: sp_beefy::mmr::MmrLeaf> + * Lookup576: sp_beefy::mmr::MmrLeaf> **/ SpBeefyMmrMmrLeaf: { version: 'u8', @@ -4521,21 +4524,21 @@ export default { leafExtra: 'BridgeTypesLeafExtraData' }, /** - * Lookup575: bridge_types::types::LeafExtraData + * Lookup577: bridge_types::types::LeafExtraData **/ BridgeTypesLeafExtraData: { randomSeed: 'H256', digestHash: 'H256' }, /** - * Lookup578: bridge_common::simplified_proof::Proof + * Lookup580: bridge_common::simplified_proof::Proof **/ BridgeCommonSimplifiedProofProof: { order: 'u64', items: 'Vec' }, /** - * Lookup579: substrate_bridge_channel::inbound::pallet::Call + * Lookup581: substrate_bridge_channel::inbound::pallet::Call **/ SubstrateBridgeChannelInboundPalletCall: { _enum: { @@ -4547,7 +4550,7 @@ export default { } }, /** - * Lookup580: bridge_types::GenericCommitment + * Lookup582: bridge_types::GenericCommitment **/ BridgeTypesGenericCommitment: { _enum: { @@ -4556,21 +4559,21 @@ export default { } }, /** - * Lookup581: bridge_types::substrate::Commitment + * Lookup583: bridge_types::substrate::Commitment **/ BridgeTypesSubstrateCommitment: { messages: 'Vec', nonce: 'u64' }, /** - * Lookup583: bridge_types::substrate::BridgeMessage + * Lookup585: bridge_types::substrate::BridgeMessage **/ BridgeTypesSubstrateBridgeMessage: { payload: 'Bytes', timepoint: 'BridgeTypesGenericTimepoint' }, /** - * Lookup586: bridge_types::evm::Commitment + * Lookup588: bridge_types::evm::Commitment **/ BridgeTypesEvmCommitment: { nonce: 'u64', @@ -4578,7 +4581,7 @@ export default { messages: 'Vec' }, /** - * Lookup588: bridge_types::evm::Message + * Lookup590: bridge_types::evm::Message **/ BridgeTypesEvmMessage: { target: 'H160', @@ -4586,7 +4589,7 @@ export default { payload: 'Bytes' }, /** - * Lookup590: framenode_runtime::MultiProof + * Lookup592: framenode_runtime::MultiProof **/ FramenodeRuntimeMultiProof: { _enum: { @@ -4595,7 +4598,7 @@ export default { } }, /** - * Lookup591: beefy_light_client::SubstrateBridgeMessageProof + * Lookup593: beefy_light_client::SubstrateBridgeMessageProof **/ BeefyLightClientSubstrateBridgeMessageProof: { proof: 'BridgeCommonSimplifiedProofProof', @@ -4603,13 +4606,13 @@ export default { digest: 'BridgeTypesAuxiliaryDigest' }, /** - * Lookup592: bridge_types::types::AuxiliaryDigest + * Lookup594: bridge_types::types::AuxiliaryDigest **/ BridgeTypesAuxiliaryDigest: { logs: 'Vec' }, /** - * Lookup594: bridge_types::types::AuxiliaryDigestItem + * Lookup596: bridge_types::types::AuxiliaryDigestItem **/ BridgeTypesAuxiliaryDigestItem: { _enum: { @@ -4617,14 +4620,14 @@ export default { } }, /** - * Lookup595: multisig_verifier::Proof + * Lookup597: multisig_verifier::Proof **/ MultisigVerifierProof: { digest: 'BridgeTypesAuxiliaryDigest', proof: 'Vec' }, /** - * Lookup596: substrate_bridge_app::pallet::Call + * Lookup598: substrate_bridge_app::pallet::Call **/ SubstrateBridgeAppCall: { _enum: { @@ -4674,13 +4677,13 @@ export default { } }, /** - * Lookup597: bridge_types::types::AssetKind + * Lookup599: bridge_types::types::AssetKind **/ BridgeTypesAssetKind: { _enum: ['Thischain', 'Sidechain'] }, /** - * Lookup598: xcm::v3::multiasset::AssetId + * Lookup600: xcm::v3::multiasset::AssetId **/ XcmV3MultiassetAssetId: { _enum: { @@ -4689,7 +4692,7 @@ export default { } }, /** - * Lookup600: bridge_data_signer::pallet::Call + * Lookup602: bridge_data_signer::pallet::Call **/ BridgeDataSignerCall: { _enum: { @@ -4719,7 +4722,7 @@ export default { } }, /** - * Lookup601: multisig_verifier::pallet::Call + * Lookup603: multisig_verifier::pallet::Call **/ MultisigVerifierCall: { _enum: { @@ -4736,7 +4739,7 @@ export default { } }, /** - * Lookup602: pallet_sudo::pallet::Call + * Lookup604: pallet_sudo::pallet::Call **/ PalletSudoCall: { _enum: { @@ -4760,7 +4763,7 @@ export default { } }, /** - * Lookup603: faucet::pallet::Call + * Lookup605: faucet::pallet::Call **/ FaucetCall: { _enum: { @@ -4776,26 +4779,26 @@ export default { } }, /** - * Lookup605: pallet_multisig::pallet::Error + * Lookup607: pallet_multisig::pallet::Error **/ PalletMultisigError: { _enum: ['MinimumThreshold', 'AlreadyApproved', 'NoApprovalsNeeded', 'TooFewSignatories', 'TooManySignatories', 'SignatoriesOutOfOrder', 'SenderNotInSignatories', 'NotInSignatories', 'AlreadyInSignatories', 'NotFound', 'NotOwner', 'NoTimepoint', 'WrongTimepoint', 'UnexpectedTimepoint', 'AlreadyStored', 'WeightTooLow', 'ZeroThreshold', 'MultisigAlreadyExists', 'UnknownMultisigAccount', 'SignatoriesAreNotUniqueOrUnordered', 'AlreadyDispatched'] }, /** - * Lookup606: pallet_utility::pallet::Error + * Lookup608: pallet_utility::pallet::Error **/ PalletUtilityError: { _enum: ['TooManyCalls'] }, /** - * Lookup607: pallet_staking::sora::DurationWrapper + * Lookup609: pallet_staking::sora::DurationWrapper **/ PalletStakingSoraDurationWrapper: { secs: 'u64', nanos: 'u32' }, /** - * Lookup608: pallet_staking::StakingLedger + * Lookup610: pallet_staking::StakingLedger **/ PalletStakingStakingLedger: { stash: 'AccountId32', @@ -4805,14 +4808,14 @@ export default { claimedRewards: 'Vec' }, /** - * Lookup610: pallet_staking::UnlockChunk + * Lookup612: pallet_staking::UnlockChunk **/ PalletStakingUnlockChunk: { value: 'Compact', era: 'Compact' }, /** - * Lookup613: pallet_staking::Nominations + * Lookup615: pallet_staking::Nominations **/ PalletStakingNominations: { targets: 'Vec', @@ -4820,21 +4823,21 @@ export default { suppressed: 'bool' }, /** - * Lookup615: pallet_staking::ActiveEraInfo + * Lookup617: pallet_staking::ActiveEraInfo **/ PalletStakingActiveEraInfo: { index: 'u32', start: 'Option' }, /** - * Lookup617: pallet_staking::EraRewardPoints + * Lookup619: pallet_staking::EraRewardPoints **/ PalletStakingEraRewardPoints: { total: 'u32', individual: 'BTreeMap' }, /** - * Lookup622: pallet_staking::UnappliedSlash + * Lookup624: pallet_staking::UnappliedSlash **/ PalletStakingUnappliedSlash: { validator: 'AccountId32', @@ -4844,7 +4847,7 @@ export default { payout: 'u128' }, /** - * Lookup624: pallet_staking::slashing::SlashingSpans + * Lookup626: pallet_staking::slashing::SlashingSpans **/ PalletStakingSlashingSlashingSpans: { spanIndex: 'u32', @@ -4853,37 +4856,37 @@ export default { prior: 'Vec' }, /** - * Lookup625: pallet_staking::slashing::SpanRecord + * Lookup627: pallet_staking::slashing::SpanRecord **/ PalletStakingSlashingSpanRecord: { slashed: 'u128', paidOut: 'u128' }, /** - * Lookup628: pallet_staking::pallet::pallet::Error + * Lookup630: pallet_staking::pallet::pallet::Error **/ PalletStakingPalletError: { _enum: ['NotController', 'NotStash', 'AlreadyBonded', 'AlreadyPaired', 'EmptyTargets', 'DuplicateIndex', 'InvalidSlashIndex', 'InsufficientBond', 'NoMoreChunks', 'NoUnlockChunk', 'FundedTarget', 'InvalidEraToReward', 'InvalidNumberOfNominations', 'NotSortedAndUnique', 'AlreadyClaimed', 'IncorrectHistoryDepth', 'IncorrectSlashingSpans', 'BadState', 'TooManyTargets', 'BadTarget', 'CannotChillOther', 'TooManyNominators', 'TooManyValidators', 'CommissionTooLow', 'BoundNotMet'] }, /** - * Lookup629: sp_staking::offence::OffenceDetails + * Lookup631: sp_staking::offence::OffenceDetails **/ SpStakingOffenceOffenceDetails: { offender: '(AccountId32,PalletStakingExposure)', reporters: 'Vec' }, /** - * Lookup634: sp_core::crypto::KeyTypeId + * Lookup636: sp_core::crypto::KeyTypeId **/ SpCoreCryptoKeyTypeId: '[u8;4]', /** - * Lookup635: pallet_session::pallet::Error + * Lookup637: pallet_session::pallet::Error **/ PalletSessionError: { _enum: ['InvalidProof', 'NoAssociatedValidatorId', 'DuplicatedKey', 'NoKeys', 'NoAccount'] }, /** - * Lookup636: pallet_grandpa::StoredState + * Lookup638: pallet_grandpa::StoredState **/ PalletGrandpaStoredState: { _enum: { @@ -4900,7 +4903,7 @@ export default { } }, /** - * Lookup637: pallet_grandpa::StoredPendingChange + * Lookup639: pallet_grandpa::StoredPendingChange **/ PalletGrandpaStoredPendingChange: { scheduledAt: 'u32', @@ -4909,33 +4912,33 @@ export default { forced: 'Option' }, /** - * Lookup639: pallet_grandpa::pallet::Error + * Lookup641: pallet_grandpa::pallet::Error **/ PalletGrandpaError: { _enum: ['PauseFailed', 'ResumeFailed', 'ChangePending', 'TooSoon', 'InvalidKeyOwnershipProof', 'InvalidEquivocationProof', 'DuplicateOffenceReport'] }, /** - * Lookup643: pallet_im_online::BoundedOpaqueNetworkState + * Lookup645: pallet_im_online::BoundedOpaqueNetworkState **/ PalletImOnlineBoundedOpaqueNetworkState: { peerId: 'Bytes', externalAddresses: 'Vec' }, /** - * Lookup647: pallet_im_online::pallet::Error + * Lookup649: pallet_im_online::pallet::Error **/ PalletImOnlineError: { _enum: ['InvalidKey', 'DuplicatedHeartbeat'] }, /** - * Lookup650: orml_tokens::BalanceLock + * Lookup652: orml_tokens::BalanceLock **/ OrmlTokensBalanceLock: { id: '[u8;8]', amount: 'u128' }, /** - * Lookup652: orml_tokens::AccountData + * Lookup654: orml_tokens::AccountData **/ OrmlTokensAccountData: { free: 'u128', @@ -4943,32 +4946,32 @@ export default { frozen: 'u128' }, /** - * Lookup654: orml_tokens::ReserveData + * Lookup656: orml_tokens::ReserveData **/ OrmlTokensReserveData: { id: 'Null', amount: 'u128' }, /** - * Lookup656: orml_tokens::module::Error + * Lookup658: orml_tokens::module::Error **/ OrmlTokensModuleError: { _enum: ['BalanceTooLow', 'AmountIntoBalanceFailed', 'LiquidityRestrictions', 'MaxLocksExceeded', 'KeepAlive', 'ExistentialDeposit', 'DeadAccount', 'TooManyReserves'] }, /** - * Lookup657: orml_currencies::module::Error + * Lookup659: orml_currencies::module::Error **/ OrmlCurrenciesModuleError: { _enum: ['AmountIntoBalanceFailed', 'BalanceTooLow', 'DepositFailed'] }, /** - * Lookup660: trading_pair::pallet::Error + * Lookup662: trading_pair::pallet::Error **/ TradingPairError: { _enum: ['TradingPairExists', 'ForbiddenBaseAssetId', 'IdenticalAssetIds', 'TradingPairDoesntExist'] }, /** - * Lookup662: assets::AssetRecord + * Lookup664: assets::AssetRecord **/ AssetsAssetRecord: { _enum: { @@ -4985,7 +4988,7 @@ export default { } }, /** - * Lookup663: assets::AssetRecordArg + * Lookup665: assets::AssetRecordArg **/ AssetsAssetRecordArg: { _enum: { @@ -5001,7 +5004,7 @@ export default { } }, /** - * Lookup665: common::primitives::AssetIdExtraAssetRecordArg + * Lookup667: common::primitives::AssetIdExtraAssetRecordArg **/ CommonPrimitivesAssetIdExtraAssetRecordArg: { _enum: { @@ -5011,13 +5014,13 @@ export default { } }, /** - * Lookup666: assets::pallet::Error + * Lookup668: assets::pallet::Error **/ AssetsError: { _enum: ['AssetIdAlreadyExists', 'AssetIdNotExists', 'InsufficientBalance', 'InvalidAssetSymbol', 'InvalidAssetName', 'InvalidPrecision', 'AssetSupplyIsNotMintable', 'InvalidAssetOwner', 'IncRefError', 'InvalidContentSource', 'InvalidDescription', 'DeadAsset', 'Overflow'] }, /** - * Lookup667: common::primitives::DEXInfo> + * Lookup669: common::primitives::DEXInfo> **/ CommonPrimitivesDexInfo: { baseAssetId: 'CommonPrimitivesAssetId32', @@ -5025,13 +5028,13 @@ export default { isPublic: 'bool' }, /** - * Lookup668: dex_manager::pallet::Error + * Lookup670: dex_manager::pallet::Error **/ DexManagerError: { _enum: ['DEXIdAlreadyExists', 'DEXDoesNotExist', 'InvalidFeeValue', 'InvalidAccountId'] }, /** - * Lookup669: multicollateral_bonding_curve_pool::DistributionAccounts, DEXId>>>> + * Lookup671: multicollateral_bonding_curve_pool::DistributionAccounts, DEXId>>>> **/ MulticollateralBondingCurvePoolDistributionAccounts: { xorAllocation: 'MulticollateralBondingCurvePoolDistributionAccountData', @@ -5041,14 +5044,14 @@ export default { projects: 'MulticollateralBondingCurvePoolDistributionAccountData' }, /** - * Lookup670: multicollateral_bonding_curve_pool::DistributionAccountData, DEXId>>> + * Lookup672: multicollateral_bonding_curve_pool::DistributionAccountData, DEXId>>> **/ MulticollateralBondingCurvePoolDistributionAccountData: { account: 'MulticollateralBondingCurvePoolDistributionAccount', coefficient: 'FixnumFixedPoint' }, /** - * Lookup671: multicollateral_bonding_curve_pool::DistributionAccount, DEXId>> + * Lookup673: multicollateral_bonding_curve_pool::DistributionAccount, DEXId>> **/ MulticollateralBondingCurvePoolDistributionAccount: { _enum: { @@ -5057,31 +5060,31 @@ export default { } }, /** - * Lookup674: multicollateral_bonding_curve_pool::pallet::Error + * Lookup676: multicollateral_bonding_curve_pool::pallet::Error **/ MulticollateralBondingCurvePoolError: { _enum: ['PriceCalculationFailed', 'FailedToCalculatePriceWithoutImpact', 'CannotExchangeWithSelf', 'NotEnoughReserves', 'PoolAlreadyInitializedForPair', 'PoolNotInitialized', 'SlippageLimitExceeded', 'NothingToClaim', 'RewardsSupplyShortage', 'UnsupportedCollateralAssetId', 'FeeCalculationFailed', 'CantExchange', 'IncRefError', 'ArithmeticError', 'FreeReservesAccountNotSet'] }, /** - * Lookup675: technical::pallet::Error + * Lookup677: technical::pallet::Error **/ TechnicalError: { _enum: ['StorageOverflow', 'InsufficientBalance', 'AlreadyExist', 'InvalidProof', 'SourceMismatch', 'AlreadyClaimed', 'ClaimActionMismatch', 'DurationNotPassed', 'OnlyRegularAsset', 'OnlyRegularAccount', 'OnlyRegularBalance', 'OnlyPureTechnicalAccount', 'Overflow', 'TechAccountIdMustBePure', 'UnableToGetReprFromTechAccountId', 'RepresentativeMustBeSupported', 'TechAccountIdIsNotRegistered', 'NotImplemented', 'DecodeAccountIdFailed', 'AssociatedAccountIdNotFound', 'OperationWithAbstractCheckingIsImposible'] }, /** - * Lookup678: pool_xyk::pallet::Error + * Lookup680: pool_xyk::pallet::Error **/ PoolXykError: { _enum: ['UnableToCalculateFee', 'FailedToCalculatePriceWithoutImpact', 'UnableToGetBalance', 'ImpossibleToDecideAssetPairAmounts', 'PoolPairRatioAndPairSwapRatioIsDifferent', 'PairSwapActionFeeIsSmallerThanRecommended', 'SourceBalanceIsNotLargeEnough', 'TargetBalanceIsNotLargeEnough', 'UnableToDeriveFeeAccount', 'FeeAccountIsInvalid', 'SourceAndClientAccountDoNotMatchAsEqual', 'AssetsMustNotBeSame', 'ImpossibleToDecideDepositLiquidityAmounts', 'InvalidDepositLiquidityBasicAssetAmount', 'InvalidDepositLiquidityTargetAssetAmount', 'PairSwapActionMinimumLiquidityIsSmallerThanRecommended', 'DestinationAmountOfLiquidityIsNotLargeEnough', 'SourceBaseAmountIsNotLargeEnough', 'TargetBaseAmountIsNotLargeEnough', 'PoolIsInvalid', 'PoolIsEmpty', 'ZeroValueInAmountParameter', 'AccountBalanceIsInvalid', 'InvalidDepositLiquidityDestinationAmount', 'InitialLiqudityDepositRatioMustBeDefined', 'TechAssetIsNotRepresentable', 'UnableToDecideMarkerAsset', 'UnableToGetAssetRepr', 'ImpossibleToDecideWithdrawLiquidityAmounts', 'InvalidWithdrawLiquidityBasicAssetAmount', 'InvalidWithdrawLiquidityTargetAssetAmount', 'SourceBaseAmountIsTooLarge', 'SourceBalanceOfLiquidityTokensIsNotLargeEnough', 'DestinationBaseBalanceIsNotLargeEnough', 'DestinationTargetBalanceIsNotLargeEnough', 'InvalidAssetForLiquidityMarking', 'AssetDecodingError', 'CalculatedValueIsOutOfDesiredBounds', 'BaseAssetIsNotMatchedWithAnyAssetArguments', 'DestinationAmountMustBeSame', 'SourceAmountMustBeSame', 'PoolInitializationIsInvalid', 'PoolIsAlreadyInitialized', 'InvalidMinimumBoundValueOfBalance', 'ImpossibleToDecideValidPairValuesFromRangeForThisPool', 'RangeValuesIsInvalid', 'CalculatedValueIsNotMeetsRequiredBoundaries', 'GettingFeeFromDestinationIsImpossible', 'FixedWrapperCalculationFailed', 'ThisCaseIsNotSupported', 'PoolBecameInvalidAfterOperation', 'UnableToConvertAssetToTechAssetId', 'UnableToGetXORPartFromMarkerAsset', 'PoolTokenSupplyOverflow', 'IncRefError', 'UnableToDepositXorLessThanMinimum', 'UnsupportedQuotePath', 'NotEnoughUnlockedLiquidity', 'UnableToCreatePoolWithIndivisibleAssets', 'UnableToOperateWithIndivisibleAssets', 'NotEnoughLiquidityOutOfFarming', 'TargetAssetIsRestricted'] }, /** - * Lookup679: liquidity_proxy::pallet::Error + * Lookup681: liquidity_proxy::pallet::Error **/ LiquidityProxyError: { _enum: ['UnavailableExchangePath', 'MaxFeeExceeded', 'InvalidFeeValue', 'InsufficientLiquidity', 'AggregationError', 'CalculationError', 'SlippageNotTolerated', 'ForbiddenFilter', 'FailedToCalculatePriceWithoutImpact', 'UnableToSwapIndivisibleAssets', 'UnableToEnableLiquiditySource', 'LiquiditySourceAlreadyEnabled', 'UnableToDisableLiquiditySource', 'LiquiditySourceAlreadyDisabled', 'InvalidReceiversInfo', 'FailedToTransferAdarCommission', 'InvalidADARCommissionRatio'] }, /** - * Lookup681: pallet_collective::Votes + * Lookup683: pallet_collective::Votes **/ PalletCollectiveVotes: { index: 'u32', @@ -5091,13 +5094,13 @@ export default { end: 'u32' }, /** - * Lookup682: pallet_collective::pallet::Error + * Lookup684: pallet_collective::pallet::Error **/ PalletCollectiveError: { _enum: ['NotMember', 'DuplicateProposal', 'ProposalMissing', 'WrongIndex', 'DuplicateVote', 'AlreadyInitialized', 'TooEarly', 'TooManyProposals', 'WrongProposalWeight', 'WrongProposalLength'] }, /** - * Lookup690: pallet_democracy::types::ReferendumInfo, Balance> + * Lookup692: pallet_democracy::types::ReferendumInfo, Balance> **/ PalletDemocracyReferendumInfo: { _enum: { @@ -5109,7 +5112,7 @@ export default { } }, /** - * Lookup691: pallet_democracy::types::ReferendumStatus, Balance> + * Lookup693: pallet_democracy::types::ReferendumStatus, Balance> **/ PalletDemocracyReferendumStatus: { end: 'u32', @@ -5119,7 +5122,7 @@ export default { tally: 'PalletDemocracyTally' }, /** - * Lookup692: pallet_democracy::types::Tally + * Lookup694: pallet_democracy::types::Tally **/ PalletDemocracyTally: { ayes: 'u128', @@ -5127,7 +5130,7 @@ export default { turnout: 'u128' }, /** - * Lookup693: pallet_democracy::vote::Voting + * Lookup695: pallet_democracy::vote::Voting **/ PalletDemocracyVoteVoting: { _enum: { @@ -5146,24 +5149,24 @@ export default { } }, /** - * Lookup697: pallet_democracy::types::Delegations + * Lookup699: pallet_democracy::types::Delegations **/ PalletDemocracyDelegations: { votes: 'u128', capital: 'u128' }, /** - * Lookup698: pallet_democracy::vote::PriorLock + * Lookup700: pallet_democracy::vote::PriorLock **/ PalletDemocracyVotePriorLock: '(u32,u128)', /** - * Lookup702: pallet_democracy::pallet::Error + * Lookup704: pallet_democracy::pallet::Error **/ PalletDemocracyError: { _enum: ['ValueLow', 'ProposalMissing', 'AlreadyCanceled', 'DuplicateProposal', 'ProposalBlacklisted', 'NotSimpleMajority', 'InvalidHash', 'NoProposal', 'AlreadyVetoed', 'ReferendumInvalid', 'NoneWaiting', 'NotVoter', 'NoPermission', 'AlreadyDelegating', 'InsufficientFunds', 'NotDelegating', 'VotesExist', 'InstantNotAllowed', 'Nonsense', 'WrongUpperBound', 'MaxVotesReached', 'TooMany', 'VotingPeriodLow'] }, /** - * Lookup703: eth_bridge::requests::OffchainRequest + * Lookup705: eth_bridge::requests::OffchainRequest **/ EthBridgeRequestsOffchainRequest: { _enum: { @@ -5173,7 +5176,7 @@ export default { } }, /** - * Lookup704: eth_bridge::requests::RequestStatus + * Lookup706: eth_bridge::requests::RequestStatus **/ EthBridgeRequestsRequestStatus: { _enum: { @@ -5186,7 +5189,7 @@ export default { } }, /** - * Lookup711: eth_bridge::requests::outgoing::EthPeersSync + * Lookup713: eth_bridge::requests::outgoing::EthPeersSync **/ EthBridgeRequestsOutgoingEthPeersSync: { isBridgeReady: 'bool', @@ -5194,25 +5197,25 @@ export default { isValReady: 'bool' }, /** - * Lookup712: eth_bridge::BridgeStatus + * Lookup714: eth_bridge::BridgeStatus **/ EthBridgeBridgeStatus: { _enum: ['Initialized', 'Migrating'] }, /** - * Lookup713: eth_bridge::pallet::Error + * Lookup715: eth_bridge::pallet::Error **/ EthBridgeError: { _enum: ['HttpFetchingError', 'AccountNotFound', 'Forbidden', 'RequestIsAlreadyRegistered', 'FailedToLoadTransaction', 'FailedToLoadPrecision', 'UnknownMethodId', 'InvalidFunctionInput', 'InvalidSignature', 'InvalidUint', 'InvalidAmount', 'InvalidBalance', 'InvalidString', 'InvalidByte', 'InvalidAddress', 'InvalidAssetId', 'InvalidAccountId', 'InvalidBool', 'InvalidH256', 'InvalidArray', 'UnknownEvent', 'UnknownTokenAddress', 'NoLocalAccountForSigning', 'UnsupportedAssetId', 'FailedToSignMessage', 'FailedToSendSignedTransaction', 'TokenIsNotOwnedByTheAuthor', 'TokenIsAlreadyAdded', 'DuplicatedRequest', 'UnsupportedToken', 'UnknownPeerAddress', 'EthAbiEncodingError', 'EthAbiDecodingError', 'EthTransactionIsFailed', 'EthTransactionIsSucceeded', 'EthTransactionIsPending', 'EthLogWasRemoved', 'NoPendingPeer', 'WrongPendingPeer', 'TooManyPendingPeers', 'FailedToGetAssetById', 'CantAddMorePeers', 'CantRemoveMorePeers', 'PeerIsAlreadyAdded', 'UnknownPeerId', 'CantReserveFunds', 'AlreadyClaimed', 'FailedToLoadBlockHeader', 'FailedToLoadFinalizedHead', 'UnknownContractAddress', 'InvalidContractInput', 'RequestIsNotOwnedByTheAuthor', 'FailedToParseTxHashInCall', 'RequestIsNotReady', 'UnknownRequest', 'RequestNotFinalizedOnSidechain', 'UnknownNetwork', 'ContractIsInMigrationStage', 'ContractIsNotInMigrationStage', 'ContractIsAlreadyInMigrationStage', 'Unavailable', 'FailedToUnreserve', 'SidechainAssetIsAlreadyRegistered', 'ExpectedOutgoingRequest', 'ExpectedIncomingRequest', 'UnknownAssetId', 'JsonSerializationError', 'JsonDeserializationError', 'FailedToLoadSidechainNodeParams', 'FailedToLoadCurrentSidechainHeight', 'FailedToLoadIsUsed', 'TransactionMightHaveFailedDueToGasLimit', 'ExpectedXORTransfer', 'UnableToPayFees', 'Cancelled', 'UnsupportedAssetPrecision', 'NonZeroDust', 'IncRefError', 'Other', 'ExpectedPendingRequest', 'ExpectedEthNetwork', 'RemovedAndRefunded', 'AuthorityAccountNotSet', 'NotEnoughPeers', 'ReadStorageError', 'UnsafeMigration'] }, /** - * Lookup716: pswap_distribution::pallet::Error + * Lookup718: pswap_distribution::pallet::Error **/ PswapDistributionError: { _enum: ['CalculationError', 'SubscriptionActive', 'UnknownSubscription', 'InvalidFrequency', 'ZeroClaimableIncentives', 'IncRefError'] }, /** - * Lookup722: pallet_scheduler::Scheduled, BlockNumber, framenode_runtime::OriginCaller, sp_core::crypto::AccountId32> + * Lookup724: pallet_scheduler::Scheduled, BlockNumber, framenode_runtime::OriginCaller, sp_core::crypto::AccountId32> **/ PalletSchedulerScheduled: { maybeId: 'Option<[u8;32]>', @@ -5222,32 +5225,32 @@ export default { origin: 'FramenodeRuntimeOriginCaller' }, /** - * Lookup724: pallet_scheduler::pallet::Error + * Lookup726: pallet_scheduler::pallet::Error **/ PalletSchedulerError: { _enum: ['FailedToSchedule', 'NotFound', 'TargetBlockNumberInPast', 'RescheduleNoChange', 'Named'] }, /** - * Lookup727: iroha_migration::PendingMultisigAccount + * Lookup729: iroha_migration::PendingMultisigAccount **/ IrohaMigrationPendingMultisigAccount: { approvingAccounts: 'Vec', migrateAt: 'Option' }, /** - * Lookup728: iroha_migration::pallet::Error + * Lookup730: iroha_migration::pallet::Error **/ IrohaMigrationError: { _enum: ['PublicKeyParsingFailed', 'SignatureParsingFailed', 'SignatureVerificationFailed', 'AccountNotFound', 'PublicKeyNotFound', 'PublicKeyAlreadyUsed', 'AccountAlreadyMigrated', 'ReferralMigrationFailed', 'MultiSigCreationFailed', 'SignatoryAdditionFailed'] }, /** - * Lookup730: pallet_membership::pallet::Error + * Lookup732: pallet_membership::pallet::Error **/ PalletMembershipError: { _enum: ['AlreadyMember', 'NotMember', 'TooManyMembers'] }, /** - * Lookup732: pallet_elections_phragmen::SeatHolder + * Lookup734: pallet_elections_phragmen::SeatHolder **/ PalletElectionsPhragmenSeatHolder: { who: 'AccountId32', @@ -5255,7 +5258,7 @@ export default { deposit: 'u128' }, /** - * Lookup733: pallet_elections_phragmen::Voter + * Lookup735: pallet_elections_phragmen::Voter **/ PalletElectionsPhragmenVoter: { votes: 'Vec', @@ -5263,13 +5266,13 @@ export default { deposit: 'u128' }, /** - * Lookup734: pallet_elections_phragmen::pallet::Error + * Lookup736: pallet_elections_phragmen::pallet::Error **/ PalletElectionsPhragmenError: { _enum: ['UnableToVote', 'NoVotes', 'TooManyVotes', 'MaximumVotesExceeded', 'LowBalance', 'UnableToPayBond', 'MustBeVoter', 'DuplicatedCandidate', 'TooManyCandidates', 'MemberSubmit', 'RunnerUpSubmit', 'InsufficientCandidateFunds', 'NotMember', 'InvalidWitnessData', 'InvalidVoteCount', 'InvalidRenouncing', 'InvalidReplacement'] }, /** - * Lookup735: vested_rewards::RewardInfo + * Lookup737: vested_rewards::RewardInfo **/ VestedRewardsRewardInfo: { limit: 'u128', @@ -5277,7 +5280,7 @@ export default { rewards: 'BTreeMap' }, /** - * Lookup736: vested_rewards::CrowdloanInfo, BlockNumber, sp_core::crypto::AccountId32> + * Lookup738: vested_rewards::CrowdloanInfo, BlockNumber, sp_core::crypto::AccountId32> **/ VestedRewardsCrowdloanInfo: { totalContribution: 'u128', @@ -5287,20 +5290,20 @@ export default { account: 'AccountId32' }, /** - * Lookup738: vested_rewards::CrowdloanUserInfo> + * Lookup740: vested_rewards::CrowdloanUserInfo> **/ VestedRewardsCrowdloanUserInfo: { contribution: 'u128', rewarded: 'Vec<(CommonPrimitivesAssetId32,u128)>' }, /** - * Lookup739: vested_rewards::pallet::Error + * Lookup741: vested_rewards::pallet::Error **/ VestedRewardsError: { _enum: ['NothingToClaim', 'ClaimLimitExceeded', 'UnhandledRewardType', 'RewardsSupplyShortage', 'IncRefError', 'CantSubtractSnapshot', 'CantCalculateReward', 'NoRewardsForAsset', 'ArithmeticError', 'NumberConversionError', 'UnableToGetBaseAssetPrice', 'CrowdloanAlreadyExists', 'WrongCrowdloanInfo', 'CrowdloanRewardsDistributionNotStarted', 'CrowdloanDoesNotExists', 'NotCrowdloanParticipant'] }, /** - * Lookup740: pallet_identity::types::Registration + * Lookup742: pallet_identity::types::Registration **/ PalletIdentityRegistration: { judgements: 'Vec<(u32,PalletIdentityJudgement)>', @@ -5308,7 +5311,7 @@ export default { info: 'PalletIdentityIdentityInfo' }, /** - * Lookup748: pallet_identity::types::RegistrarInfo + * Lookup750: pallet_identity::types::RegistrarInfo **/ PalletIdentityRegistrarInfo: { account: 'AccountId32', @@ -5316,13 +5319,13 @@ export default { fields: 'PalletIdentityBitFlags' }, /** - * Lookup750: pallet_identity::pallet::Error + * Lookup752: pallet_identity::pallet::Error **/ PalletIdentityError: { _enum: ['TooManySubAccounts', 'NotFound', 'NotNamed', 'EmptyIndex', 'FeeChanged', 'NoIdentity', 'StickyJudgement', 'JudgementGiven', 'InvalidJudgement', 'InvalidIndex', 'InvalidTarget', 'TooManyFields', 'TooManyRegistrars', 'AlreadyClaimed', 'NotSub', 'NotOwned', 'JudgementForDifferentIdentity', 'JudgementPaymentFailed'] }, /** - * Lookup752: farming::PoolFarmer + * Lookup754: farming::PoolFarmer **/ FarmingPoolFarmer: { account: 'AccountId32', @@ -5330,33 +5333,33 @@ export default { weight: 'u128' }, /** - * Lookup753: farming::pallet::Error + * Lookup755: farming::pallet::Error **/ FarmingError: { _enum: ['IncRefError'] }, /** - * Lookup754: xst::SyntheticInfo + * Lookup756: xst::SyntheticInfo **/ XstSyntheticInfo: { referenceSymbol: 'Bytes', feeRatio: 'FixnumFixedPoint' }, /** - * Lookup755: xst::pallet::Error + * Lookup757: xst::pallet::Error **/ XstError: { _enum: ['PriceCalculationFailed', 'SlippageLimitExceeded', 'CantExchange', 'SyntheticDoesNotExist', 'SymbolDoesNotExist', 'SymbolAlreadyReferencedToSynthetic', 'SyntheticIsNotEnabled', 'OracleQuoteError', 'InvalidFeeRatio', 'IndivisibleReferenceAsset', 'CantEnableIndivisibleAsset', 'SyntheticBaseBuySellLimitExceeded'] }, /** - * Lookup756: price_tools::AggregatedPriceInfo + * Lookup758: price_tools::AggregatedPriceInfo **/ PriceToolsAggregatedPriceInfo: { buy: 'PriceToolsPriceInfo', sell: 'PriceToolsPriceInfo' }, /** - * Lookup757: price_tools::PriceInfo + * Lookup759: price_tools::PriceInfo **/ PriceToolsPriceInfo: { priceFailures: 'u32', @@ -5366,32 +5369,32 @@ export default { lastSpotPrice: 'u128' }, /** - * Lookup758: price_tools::pallet::Error + * Lookup760: price_tools::pallet::Error **/ PriceToolsError: { _enum: ['AveragePriceCalculationFailed', 'UpdateAverageWithSpotPriceFailed', 'InsufficientSpotPriceData', 'UnsupportedQuotePath', 'FailedToQuoteAveragePrice', 'AssetAlreadyRegistered', 'CantDuplicateLastPrice'] }, /** - * Lookup759: ceres_staking::StakingInfo + * Lookup761: ceres_staking::StakingInfo **/ CeresStakingStakingInfo: { deposited: 'u128', rewards: 'u128' }, /** - * Lookup760: ceres_staking::pallet::Error + * Lookup762: ceres_staking::pallet::Error **/ CeresStakingError: { _enum: ['StakingPoolIsFull', 'Unauthorized'] }, /** - * Lookup761: ceres_liquidity_locker::StorageVersion + * Lookup763: ceres_liquidity_locker::StorageVersion **/ CeresLiquidityLockerStorageVersion: { _enum: ['V1', 'V2'] }, /** - * Lookup763: ceres_liquidity_locker::LockInfo> + * Lookup765: ceres_liquidity_locker::LockInfo> **/ CeresLiquidityLockerLockInfo: { poolTokens: 'u128', @@ -5400,19 +5403,19 @@ export default { assetB: 'CommonPrimitivesAssetId32' }, /** - * Lookup764: ceres_liquidity_locker::pallet::Error + * Lookup766: ceres_liquidity_locker::pallet::Error **/ CeresLiquidityLockerError: { _enum: ['PoolDoesNotExist', 'InsufficientLiquidityToLock', 'InvalidPercentage', 'Unauthorized', 'InvalidUnlockingTimestamp'] }, /** - * Lookup765: ceres_token_locker::StorageVersion + * Lookup767: ceres_token_locker::StorageVersion **/ CeresTokenLockerStorageVersion: { _enum: ['V1', 'V2'] }, /** - * Lookup767: ceres_token_locker::TokenLockInfo> + * Lookup769: ceres_token_locker::TokenLockInfo> **/ CeresTokenLockerTokenLockInfo: { tokens: 'u128', @@ -5420,13 +5423,13 @@ export default { assetId: 'CommonPrimitivesAssetId32' }, /** - * Lookup768: ceres_token_locker::pallet::Error + * Lookup770: ceres_token_locker::pallet::Error **/ CeresTokenLockerError: { _enum: ['InvalidNumberOfTokens', 'Unauthorized', 'InvalidUnlockingTimestamp', 'NotEnoughFunds', 'NotUnlockedYet', 'LockInfoDoesNotExist'] }, /** - * Lookup770: ceres_governance_platform::VotingInfo + * Lookup772: ceres_governance_platform::VotingInfo **/ CeresGovernancePlatformVotingInfo: { votingOption: 'u32', @@ -5434,7 +5437,7 @@ export default { ceresWithdrawn: 'bool' }, /** - * Lookup771: ceres_governance_platform::PollInfo + * Lookup773: ceres_governance_platform::PollInfo **/ CeresGovernancePlatformPollInfo: { numberOfOptions: 'u32', @@ -5442,19 +5445,19 @@ export default { pollEndTimestamp: 'u64' }, /** - * Lookup772: ceres_governance_platform::StorageVersion + * Lookup774: ceres_governance_platform::StorageVersion **/ CeresGovernancePlatformStorageVersion: { _enum: ['V1', 'V2'] }, /** - * Lookup773: ceres_governance_platform::pallet::Error + * Lookup775: ceres_governance_platform::pallet::Error **/ CeresGovernancePlatformError: { _enum: ['InvalidVotes', 'PollIsFinished', 'PollIsNotStarted', 'NotEnoughFunds', 'InvalidNumberOfOption', 'VoteDenied', 'InvalidStartTimestamp', 'InvalidEndTimestamp', 'PollIsNotFinished', 'InvalidNumberOfVotes', 'FundsAlreadyWithdrawn', 'PollIdAlreadyExists'] }, /** - * Lookup774: ceres_launchpad::ILOInfo> + * Lookup776: ceres_launchpad::ILOInfo> **/ CeresLaunchpadIloInfo: { iloOrganizer: 'AccountId32', @@ -5483,7 +5486,7 @@ export default { baseAsset: 'CommonPrimitivesAssetId32' }, /** - * Lookup775: ceres_launchpad::ContributorsVesting + * Lookup777: ceres_launchpad::ContributorsVesting **/ CeresLaunchpadContributorsVesting: { firstReleasePercent: 'u128', @@ -5491,7 +5494,7 @@ export default { vestingPercent: 'u128' }, /** - * Lookup776: ceres_launchpad::TeamVesting + * Lookup778: ceres_launchpad::TeamVesting **/ CeresLaunchpadTeamVesting: { teamVestingTotalTokens: 'u128', @@ -5500,7 +5503,7 @@ export default { teamVestingPercent: 'u128' }, /** - * Lookup778: ceres_launchpad::ContributionInfo + * Lookup780: ceres_launchpad::ContributionInfo **/ CeresLaunchpadContributionInfo: { fundsContributed: 'u128', @@ -5510,13 +5513,13 @@ export default { numberOfClaims: 'u32' }, /** - * Lookup779: ceres_launchpad::pallet::Error + * Lookup781: ceres_launchpad::pallet::Error **/ CeresLaunchpadError: { _enum: ['ILOAlreadyExists', 'ParameterCantBeZero', 'InvalidSoftCap', 'InvalidMinimumContribution', 'InvalidMaximumContribution', 'InvalidLiquidityPercent', 'InvalidLockupDays', 'InvalidStartTimestamp', 'InvalidEndTimestamp', 'InvalidPrice', 'InvalidNumberOfTokensForLiquidity', 'InvalidNumberOfTokensForILO', 'InvalidFirstReleasePercent', 'InvalidVestingPercent', 'InvalidVestingPeriod', 'NotEnoughCeres', 'NotEnoughTokens', 'ILONotStarted', 'ILOIsFinished', 'CantContributeInILO', 'HardCapIsHit', 'NotEnoughTokensToBuy', 'ContributionIsLowerThenMin', 'ContributionIsBiggerThenMax', 'NotEnoughFunds', 'ILODoesNotExist', 'ILOIsNotFinished', 'PoolDoesNotExist', 'Unauthorized', 'CantClaimLPTokens', 'FundsAlreadyClaimed', 'NothingToClaim', 'ILOIsFailed', 'ILOIsSucceeded', 'CantCreateILOForListedToken', 'AccountIsNotWhitelisted', 'InvalidTeamFirstReleasePercent', 'InvalidTeamVestingPercent', 'InvalidTeamVestingPeriod', 'NotEnoughTeamTokensToLock', 'InvalidFeePercent', 'BaseAssetNotSupported'] }, /** - * Lookup780: demeter_farming_platform::TokenInfo + * Lookup782: demeter_farming_platform::TokenInfo **/ DemeterFarmingPlatformTokenInfo: { farmsTotalMultiplier: 'u32', @@ -5528,7 +5531,7 @@ export default { teamAccount: 'AccountId32' }, /** - * Lookup782: demeter_farming_platform::UserInfo> + * Lookup784: demeter_farming_platform::UserInfo> **/ DemeterFarmingPlatformUserInfo: { baseAsset: 'CommonPrimitivesAssetId32', @@ -5539,7 +5542,7 @@ export default { rewards: 'u128' }, /** - * Lookup784: demeter_farming_platform::PoolData> + * Lookup786: demeter_farming_platform::PoolData> **/ DemeterFarmingPlatformPoolData: { multiplier: 'u32', @@ -5553,19 +5556,19 @@ export default { baseAsset: 'CommonPrimitivesAssetId32' }, /** - * Lookup785: demeter_farming_platform::StorageVersion + * Lookup787: demeter_farming_platform::StorageVersion **/ DemeterFarmingPlatformStorageVersion: { _enum: ['V1', 'V2'] }, /** - * Lookup786: demeter_farming_platform::pallet::Error + * Lookup788: demeter_farming_platform::pallet::Error **/ DemeterFarmingPlatformError: { _enum: ['TokenAlreadyRegistered', 'TokenPerBlockCantBeZero', 'InvalidAllocationParameters', 'InvalidMultiplier', 'InvalidDepositFee', 'RewardTokenIsNotRegistered', 'PoolAlreadyExists', 'InsufficientFunds', 'ZeroRewards', 'PoolDoesNotExist', 'InsufficientLPTokens', 'PoolDoesNotHaveRewards', 'Unauthorized'] }, /** - * Lookup787: pallet_bags_list::list::Node + * Lookup789: pallet_bags_list::list::Node **/ PalletBagsListListNode: { id: 'AccountId32', @@ -5575,14 +5578,14 @@ export default { score: 'u64' }, /** - * Lookup788: pallet_bags_list::list::Bag + * Lookup790: pallet_bags_list::list::Bag **/ PalletBagsListListBag: { head: 'Option', tail: 'Option' }, /** - * Lookup790: pallet_bags_list::pallet::Error + * Lookup792: pallet_bags_list::pallet::Error **/ PalletBagsListError: { _enum: { @@ -5590,13 +5593,13 @@ export default { } }, /** - * Lookup791: pallet_bags_list::list::ListError + * Lookup793: pallet_bags_list::list::ListError **/ PalletBagsListListListError: { _enum: ['Duplicate', 'NotHeavier', 'NotInSameBag', 'NodeNotFound'] }, /** - * Lookup792: pallet_election_provider_multi_phase::ReadySolution + * Lookup794: pallet_election_provider_multi_phase::ReadySolution **/ PalletElectionProviderMultiPhaseReadySolution: { supports: 'Vec<(AccountId32,SpNposElectionsSupport)>', @@ -5604,14 +5607,14 @@ export default { compute: 'PalletElectionProviderMultiPhaseElectionCompute' }, /** - * Lookup794: pallet_election_provider_multi_phase::RoundSnapshot + * Lookup796: pallet_election_provider_multi_phase::RoundSnapshot **/ PalletElectionProviderMultiPhaseRoundSnapshot: { voters: 'Vec<(AccountId32,u64,Vec)>', targets: 'Vec' }, /** - * Lookup800: pallet_election_provider_multi_phase::signed::SignedSubmission + * Lookup802: pallet_election_provider_multi_phase::signed::SignedSubmission **/ PalletElectionProviderMultiPhaseSignedSignedSubmission: { who: 'AccountId32', @@ -5620,13 +5623,13 @@ export default { callFee: 'u128' }, /** - * Lookup801: pallet_election_provider_multi_phase::pallet::Error + * Lookup803: pallet_election_provider_multi_phase::pallet::Error **/ PalletElectionProviderMultiPhaseError: { _enum: ['PreDispatchEarlySubmission', 'PreDispatchWrongWinnerCount', 'PreDispatchWeakSubmission', 'SignedQueueFull', 'SignedCannotPayDeposit', 'SignedInvalidWitness', 'SignedTooMuchWeight', 'OcwCallWrongEra', 'MissingSnapshotMetadata', 'InvalidSubmissionIndex', 'CallNotAllowed', 'FallbackFailed', 'BoundNotMet', 'TooManyWinners'] }, /** - * Lookup803: band::BandRate + * Lookup805: band::BandRate **/ BandBandRate: { value: 'u128', @@ -5635,19 +5638,19 @@ export default { dynamicFee: 'FixnumFixedPoint' }, /** - * Lookup804: band::pallet::Error + * Lookup806: band::pallet::Error **/ BandError: { _enum: ['UnauthorizedRelayer', 'AlreadyATrustedRelayer', 'NoSuchRelayer', 'RateConversionOverflow', 'RateHasInvalidTimestamp', 'RateExpired', 'DynamicFeeCalculationError', 'InvalidDynamicFeeParameters'] }, /** - * Lookup807: oracle_proxy::pallet::Error + * Lookup809: oracle_proxy::pallet::Error **/ OracleProxyError: { _enum: ['OracleAlreadyEnabled', 'OracleAlreadyDisabled'] }, /** - * Lookup809: hermes_governance_platform::HermesVotingInfo + * Lookup811: hermes_governance_platform::HermesVotingInfo **/ HermesGovernancePlatformHermesVotingInfo: { votingOption: 'Bytes', @@ -5655,7 +5658,7 @@ export default { hermesWithdrawn: 'bool' }, /** - * Lookup810: hermes_governance_platform::HermesPollInfo + * Lookup812: hermes_governance_platform::HermesPollInfo **/ HermesGovernancePlatformHermesPollInfo: { creator: 'AccountId32', @@ -5668,19 +5671,19 @@ export default { options: 'Vec' }, /** - * Lookup811: hermes_governance_platform::StorageVersion + * Lookup813: hermes_governance_platform::StorageVersion **/ HermesGovernancePlatformStorageVersion: { _enum: ['V1', 'V2'] }, /** - * Lookup812: hermes_governance_platform::pallet::Error + * Lookup814: hermes_governance_platform::pallet::Error **/ HermesGovernancePlatformError: { _enum: ['PollIsNotStarted', 'PollIsFinished', 'InvalidStartTimestamp', 'InvalidEndTimestamp', 'NotEnoughHermesForCreatingPoll', 'FundsAlreadyWithdrawn', 'PollIsNotFinished', 'YouAreNotCreator', 'Unauthorized', 'PollDoesNotExist', 'NotEnoughHermesForVoting', 'AlreadyVoted', 'InvalidMinimumDurationOfPoll', 'InvalidMaximumDurationOfPoll', 'NotVoted', 'InvalidVotingOptions', 'TooManyVotingOptions', 'InvalidOption', 'DuplicateOptions'] }, /** - * Lookup813: pallet_preimage::RequestStatus + * Lookup815: pallet_preimage::RequestStatus **/ PalletPreimageRequestStatus: { _enum: { @@ -5696,13 +5699,13 @@ export default { } }, /** - * Lookup817: pallet_preimage::pallet::Error + * Lookup819: pallet_preimage::pallet::Error **/ PalletPreimageError: { _enum: ['TooBig', 'AlreadyNoted', 'NotAuthorized', 'NotNoted', 'Requested', 'NotRequested'] }, /** - * Lookup818: order_book::order_book::OrderBook + * Lookup820: order_book::order_book::OrderBook **/ OrderBook: { orderBookId: 'OrderBookOrderBookId', @@ -5714,7 +5717,7 @@ export default { maxLotSize: 'u128' }, /** - * Lookup820: order_book::limit_order::LimitOrder + * Lookup822: order_book::limit_order::LimitOrder **/ OrderBookLimitOrder: { id: 'u128', @@ -5728,13 +5731,13 @@ export default { expiresAt: 'u32' }, /** - * Lookup829: order_book::pallet::Error + * Lookup831: order_book::pallet::Error **/ OrderBookError: { - _enum: ['UnknownOrderBook', 'InvalidOrderBookId', 'OrderBookAlreadyExists', 'UnknownLimitOrder', 'LimitOrderAlreadyExists', 'LimitOrderStorageOverflow', 'UpdateLimitOrderError', 'DeleteLimitOrderError', 'BlockScheduleFull', 'ExpirationNotFound', 'NoDataForPrice', 'NoAggregatedData', 'NotEnoughLiquidityInOrderBook', 'ForbiddenToCreateOrderBookWithSameAssets', 'NotAllowedBaseAsset', 'NotAllowedDEXId', 'UserHasNoNft', 'InvalidLifespan', 'InvalidOrderAmount', 'InvalidLimitOrderPrice', 'LimitOrderPriceIsTooFarFromSpread', 'TradingIsForbidden', 'PlacementOfLimitOrdersIsForbidden', 'CancellationOfLimitOrdersIsForbidden', 'UserHasMaxCountOfOpenedOrders', 'PriceReachedMaxCountOfLimitOrders', 'OrderBookReachedMaxCountOfPricesForSide', 'AmountCalculationFailed', 'PriceCalculationFailed', 'Unauthorized', 'InvalidAsset', 'InvalidTickSize', 'InvalidStepLotSize', 'InvalidMinLotSize', 'InvalidMaxLotSize', 'TickSizeAndStepLotSizeAreTooBig', 'TickSizeAndStepLotSizeAreTooSmall', 'MaxLotSizeIsMoreThanTotalSupply', 'SlippageLimitExceeded', 'NftOrderBooksAreTemporarilyForbidden'] + _enum: ['UnknownOrderBook', 'InvalidOrderBookId', 'OrderBookAlreadyExists', 'UnknownLimitOrder', 'LimitOrderAlreadyExists', 'LimitOrderStorageOverflow', 'UpdateLimitOrderError', 'DeleteLimitOrderError', 'BlockScheduleFull', 'ExpirationNotFound', 'NoDataForPrice', 'NoAggregatedData', 'NotEnoughLiquidityInOrderBook', 'ForbiddenToCreateOrderBookWithSameAssets', 'NotAllowedQuoteAsset', 'NotAllowedDEXId', 'SyntheticAssetIsForbidden', 'UserHasNoNft', 'InvalidLifespan', 'InvalidOrderAmount', 'InvalidLimitOrderPrice', 'LimitOrderPriceIsTooFarFromSpread', 'TradingIsForbidden', 'PlacementOfLimitOrdersIsForbidden', 'CancellationOfLimitOrdersIsForbidden', 'UserHasMaxCountOfOpenedOrders', 'PriceReachedMaxCountOfLimitOrders', 'OrderBookReachedMaxCountOfPricesForSide', 'AmountCalculationFailed', 'PriceCalculationFailed', 'Unauthorized', 'InvalidAsset', 'InvalidTickSize', 'InvalidStepLotSize', 'InvalidMinLotSize', 'InvalidMaxLotSize', 'TickSizeAndStepLotSizeAreTooBig', 'TickSizeAndStepLotSizeAreTooSmall', 'MaxLotSizeIsMoreThanTotalSupply', 'SlippageLimitExceeded', 'NftOrderBooksAreTemporarilyForbidden'] }, /** - * Lookup834: bridge_proxy::BridgeRequest> + * Lookup836: bridge_proxy::BridgeRequest> **/ BridgeProxyBridgeRequest: { source: 'BridgeTypesGenericAccount', @@ -5747,20 +5750,20 @@ export default { direction: 'BridgeTypesMessageDirection' }, /** - * Lookup838: bridge_proxy::pallet::Error + * Lookup840: bridge_proxy::pallet::Error **/ BridgeProxyError: { _enum: ['PathIsNotAvailable', 'WrongAccountKind', 'NotEnoughLockedLiquidity', 'Overflow'] }, /** - * Lookup840: ethereum_light_client::PruningRange + * Lookup842: ethereum_light_client::PruningRange **/ EthereumLightClientPruningRange: { oldestUnprunedBlock: 'u64', oldestBlockToKeep: 'u64' }, /** - * Lookup842: ethereum_light_client::StoredHeader + * Lookup844: ethereum_light_client::StoredHeader **/ EthereumLightClientStoredHeader: { submitter: 'Option', @@ -5769,119 +5772,119 @@ export default { finalized: 'bool' }, /** - * Lookup844: ethereum_light_client::pallet::Error + * Lookup846: ethereum_light_client::pallet::Error **/ EthereumLightClientError: { _enum: ['AncientHeader', 'MissingHeader', 'MissingParentHeader', 'DuplicateHeader', 'HeaderNotFinalized', 'HeaderOnStaleFork', 'InvalidHeader', 'InvalidProof', 'DecodeFailed', 'NetworkNotFound', 'NetworkAlreadyExists', 'DifficultyTooLow', 'NetworkStateInvalid', 'Unknown', 'ConsensusNotSupported', 'InvalidSignature'] }, /** - * Lookup845: bridge_inbound_channel::pallet::Error + * Lookup847: bridge_inbound_channel::pallet::Error **/ BridgeInboundChannelError: { _enum: ['InvalidNetwork', 'InvalidSourceChannel', 'InvalidEnvelope', 'InvalidBatchDispatchedEvent', 'InvalidNonce', 'InvalidRewardFraction', 'ContractExists', 'CallEncodeFailed'] }, /** - * Lookup846: bridge_outbound_channel::pallet::Error + * Lookup848: bridge_outbound_channel::pallet::Error **/ BridgeOutboundChannelError: { _enum: ['PayloadTooLarge', 'QueueSizeLimitReached', 'MaxGasTooBig', 'Overflow', 'ChannelExists'] }, /** - * Lookup848: eth_app::pallet::Error + * Lookup850: eth_app::pallet::Error **/ EthAppError: { _enum: ['InvalidPayload', 'AppIsNotRegistered', 'InvalidAppAddress', 'AppAlreadyExists', 'DestAccountIsNotSet', 'CallEncodeFailed', 'WrongAmount', 'WrongRequest', 'WrongRequestStatus'] }, /** - * Lookup852: erc20_app::pallet::Error + * Lookup854: erc20_app::pallet::Error **/ Erc20AppError: { _enum: ['TokenIsNotRegistered', 'AppIsNotRegistered', 'NotEnoughFunds', 'InvalidNetwork', 'TokenAlreadyRegistered', 'AppAlreadyRegistered', 'CallEncodeFailed', 'WrongAmount', 'WrongRequest', 'WrongRequestStatus'] }, /** - * Lookup853: migration_app::pallet::Error + * Lookup855: migration_app::pallet::Error **/ MigrationAppError: { _enum: ['InvalidPayload', 'AppIsNotRegistered', 'InvalidAppAddress', 'AppAlreadyExists', 'TokenRegisteredWithAnotherAddress', 'CallEncodeFailed'] }, /** - * Lookup854: beefy_light_client::pallet::Error + * Lookup856: beefy_light_client::pallet::Error **/ BeefyLightClientError: { _enum: ['InvalidValidatorSetId', 'InvalidMMRProof', 'PayloadBlocknumberTooOld', 'PayloadBlocknumberTooNew', 'CannotSwitchOldValidatorSet', 'NotEnoughValidatorSignatures', 'InvalidNumberOfSignatures', 'InvalidNumberOfPositions', 'InvalidNumberOfPublicKeys', 'ValidatorNotOnceInbitfield', 'ValidatorSetIncorrectPosition', 'InvalidSignature', 'MerklePositionTooHigh', 'MerkleProofTooShort', 'MerkleProofTooHigh', 'PalletNotInitialized', 'InvalidDigestHash', 'CommitmentNotFoundInDigest', 'MMRPayloadNotFound', 'InvalidNetworkId'] }, /** - * Lookup855: substrate_bridge_channel::inbound::pallet::Error + * Lookup857: substrate_bridge_channel::inbound::pallet::Error **/ SubstrateBridgeChannelInboundPalletError: { _enum: ['InvalidNetwork', 'InvalidSourceChannel', 'InvalidCommitment', 'InvalidNonce', 'InvalidRewardFraction', 'ContractExists', 'CallEncodeFailed'] }, /** - * Lookup856: substrate_bridge_channel::outbound::pallet::Error + * Lookup858: substrate_bridge_channel::outbound::pallet::Error **/ SubstrateBridgeChannelOutboundPalletError: { _enum: ['PayloadTooLarge', 'QueueSizeLimitReached', 'MaxGasTooBig', 'NoFunds', 'Overflow', 'ChannelExists'] }, /** - * Lookup859: substrate_bridge_app::pallet::Error + * Lookup861: substrate_bridge_app::pallet::Error **/ SubstrateBridgeAppError: { _enum: ['TokenIsNotRegistered', 'AppIsNotRegistered', 'NotEnoughFunds', 'InvalidNetwork', 'TokenAlreadyRegistered', 'AppAlreadyRegistered', 'CallEncodeFailed', 'WrongAmount', 'TransferLimitReached', 'UnknownPrecision', 'InvalidDestinationParachain', 'InvalidDestinationParams', 'RelaychainAssetNotRegistered', 'NotRelayTransferableAsset', 'RelaychainAssetRegistered'] }, /** - * Lookup866: bridge_data_signer::pallet::Error + * Lookup868: bridge_data_signer::pallet::Error **/ BridgeDataSignerError: { _enum: ['PalletInitialized', 'PalletNotInitialized', 'PeerExists', 'PeerNotExists', 'TooMuchPeers', 'FailedToVerifySignature', 'PeerNotFound', 'TooMuchApprovals', 'ApprovalsNotFound', 'SignaturesNotFound', 'HasPendingPeerUpdate', 'DontHavePendingPeerUpdates', 'NetworkNotSupported', 'SignatureAlreadyExists'] }, /** - * Lookup867: multisig_verifier::pallet::Error + * Lookup869: multisig_verifier::pallet::Error **/ MultisigVerifierError: { _enum: ['InvalidInitParams', 'TooMuchPeers', 'NetworkNotInitialized', 'InvalidNumberOfSignatures', 'InvalidSignature', 'NotTrustedPeerSignature', 'PeerExists', 'NoSuchPeer', 'InvalidNetworkId', 'CommitmentNotFoundInDigest'] }, /** - * Lookup868: pallet_sudo::pallet::Error + * Lookup870: pallet_sudo::pallet::Error **/ PalletSudoError: { _enum: ['RequireSudo'] }, /** - * Lookup869: faucet::pallet::Error + * Lookup871: faucet::pallet::Error **/ FaucetError: { _enum: ['AssetNotSupported', 'AmountAboveLimit', 'NotEnoughReserves'] }, /** - * Lookup872: frame_system::extensions::check_spec_version::CheckSpecVersion + * Lookup874: frame_system::extensions::check_spec_version::CheckSpecVersion **/ FrameSystemExtensionsCheckSpecVersion: 'Null', /** - * Lookup873: frame_system::extensions::check_tx_version::CheckTxVersion + * Lookup875: frame_system::extensions::check_tx_version::CheckTxVersion **/ FrameSystemExtensionsCheckTxVersion: 'Null', /** - * Lookup874: frame_system::extensions::check_genesis::CheckGenesis + * Lookup876: frame_system::extensions::check_genesis::CheckGenesis **/ FrameSystemExtensionsCheckGenesis: 'Null', /** - * Lookup877: frame_system::extensions::check_nonce::CheckNonce + * Lookup879: frame_system::extensions::check_nonce::CheckNonce **/ FrameSystemExtensionsCheckNonce: 'Compact', /** - * Lookup878: frame_system::extensions::check_weight::CheckWeight + * Lookup880: frame_system::extensions::check_weight::CheckWeight **/ FrameSystemExtensionsCheckWeight: 'Null', /** - * Lookup879: framenode_runtime::extensions::ChargeTransactionPayment + * Lookup881: framenode_runtime::extensions::ChargeTransactionPayment **/ FramenodeRuntimeExtensionsChargeTransactionPayment: 'PalletTransactionPaymentChargeTransactionPayment', /** - * Lookup880: pallet_transaction_payment::ChargeTransactionPayment + * Lookup882: pallet_transaction_payment::ChargeTransactionPayment **/ PalletTransactionPaymentChargeTransactionPayment: 'Compact', /** - * Lookup881: framenode_runtime::Runtime + * Lookup883: framenode_runtime::Runtime **/ FramenodeRuntimeRuntime: 'Null' }; diff --git a/packages/types/src/interfaces/types-lookup.ts b/packages/types/src/interfaces/types-lookup.ts index 2009b1e34..ba13f9419 100644 --- a/packages/types/src/interfaces/types-lookup.ts +++ b/packages/types/src/interfaces/types-lookup.ts @@ -4344,10 +4344,14 @@ declare module '@polkadot/types/lookup' { readonly orderBookId: OrderBookOrderBookId; readonly orderId: u128; } & Struct; - readonly type: 'CreateOrderbook' | 'DeleteOrderbook' | 'UpdateOrderbook' | 'ChangeOrderbookStatus' | 'PlaceLimitOrder' | 'CancelLimitOrder'; + readonly isCancelLimitOrdersBatch: boolean; + readonly asCancelLimitOrdersBatch: { + readonly limitOrdersToCancel: Vec]>>; + } & Struct; + readonly type: 'CreateOrderbook' | 'DeleteOrderbook' | 'UpdateOrderbook' | 'ChangeOrderbookStatus' | 'PlaceLimitOrder' | 'CancelLimitOrder' | 'CancelLimitOrdersBatch'; } - /** @name BridgeProxyCall (537) */ + /** @name BridgeProxyCall (539) */ interface BridgeProxyCall extends Enum { readonly isBurn: boolean; readonly asBurn: { @@ -4359,7 +4363,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Burn'; } - /** @name BridgeTypesGenericAccount (538) */ + /** @name BridgeTypesGenericAccount (540) */ interface BridgeTypesGenericAccount extends Enum { readonly isEvm: boolean; readonly asEvm: H160; @@ -4372,7 +4376,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Evm' | 'Sora' | 'Parachain' | 'Unknown' | 'Root'; } - /** @name EthereumLightClientCall (539) */ + /** @name EthereumLightClientCall (541) */ interface EthereumLightClientCall extends Enum { readonly isRegisterNetwork: boolean; readonly asRegisterNetwork: { @@ -4396,7 +4400,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'RegisterNetwork' | 'UpdateDifficultyConfig' | 'ImportHeader'; } - /** @name BridgeTypesNetworkConfig (540) */ + /** @name BridgeTypesNetworkConfig (542) */ interface BridgeTypesNetworkConfig extends Enum { readonly isMainnet: boolean; readonly isRopsten: boolean; @@ -4413,7 +4417,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Mainnet' | 'Ropsten' | 'Sepolia' | 'Rinkeby' | 'Goerli' | 'Classic' | 'Mordor' | 'Custom'; } - /** @name BridgeTypesNetworkConfigConsensus (541) */ + /** @name BridgeTypesNetworkConfigConsensus (543) */ interface BridgeTypesNetworkConfigConsensus extends Enum { readonly isEthash: boolean; readonly asEthash: { @@ -4431,7 +4435,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Ethash' | 'Etchash' | 'Clique'; } - /** @name BridgeTypesDifficultyForkConfig (542) */ + /** @name BridgeTypesDifficultyForkConfig (544) */ interface BridgeTypesDifficultyForkConfig extends Struct { readonly byzantiumForkBlock: u64; readonly constantinopleForkBlock: u64; @@ -4441,13 +4445,13 @@ declare module '@polkadot/types/lookup' { readonly grayGlacierForkBlock: u64; } - /** @name BridgeTypesDifficultyClassicForkConfig (543) */ + /** @name BridgeTypesDifficultyClassicForkConfig (545) */ interface BridgeTypesDifficultyClassicForkConfig extends Struct { readonly ecip1041Block: u64; readonly ecip1099Block: u64; } - /** @name BridgeTypesHeader (544) */ + /** @name BridgeTypesHeader (546) */ interface BridgeTypesHeader extends Struct { readonly parentHash: H256; readonly timestamp: u64; @@ -4466,19 +4470,19 @@ declare module '@polkadot/types/lookup' { readonly baseFee: Option; } - /** @name EthbloomBloom (545) */ + /** @name EthbloomBloom (547) */ interface EthbloomBloom extends U8aFixed {} - /** @name BridgeTypesEthashproofDoubleNodeWithMerkleProof (549) */ + /** @name BridgeTypesEthashproofDoubleNodeWithMerkleProof (551) */ interface BridgeTypesEthashproofDoubleNodeWithMerkleProof extends Struct { readonly dagNodes: Vec; readonly proof: Vec; } - /** @name BridgeTypesEthashproofMixNonce (553) */ + /** @name BridgeTypesEthashproofMixNonce (555) */ interface BridgeTypesEthashproofMixNonce extends U8aFixed {} - /** @name SpRuntimeMultiSignature (554) */ + /** @name SpRuntimeMultiSignature (556) */ interface SpRuntimeMultiSignature extends Enum { readonly isEd25519: boolean; readonly asEd25519: SpCoreEd25519Signature; @@ -4489,7 +4493,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Ed25519' | 'Sr25519' | 'Ecdsa'; } - /** @name BridgeInboundChannelCall (555) */ + /** @name BridgeInboundChannelCall (557) */ interface BridgeInboundChannelCall extends Enum { readonly isSubmit: boolean; readonly asSubmit: { @@ -4516,21 +4520,21 @@ declare module '@polkadot/types/lookup' { readonly type: 'Submit' | 'BatchDispatched' | 'RegisterChannel' | 'SetRewardFraction'; } - /** @name BridgeTypesLog (556) */ + /** @name BridgeTypesLog (558) */ interface BridgeTypesLog extends Struct { readonly address: H160; readonly topics: Vec; readonly data: Bytes; } - /** @name BridgeTypesEvmProof (557) */ + /** @name BridgeTypesEvmProof (559) */ interface BridgeTypesEvmProof extends Struct { readonly blockHash: H256; readonly txIndex: u32; readonly data: Vec; } - /** @name EthAppCall (558) */ + /** @name EthAppCall (560) */ interface EthAppCall extends Enum { readonly isBurn: boolean; readonly asBurn: { @@ -4562,7 +4566,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Burn' | 'Mint' | 'RegisterNetwork' | 'RegisterNetworkWithExistingAsset'; } - /** @name Erc20AppCall (559) */ + /** @name Erc20AppCall (561) */ interface Erc20AppCall extends Enum { readonly isMint: boolean; readonly asMint: { @@ -4616,7 +4620,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Mint' | 'RegisterAssetInternal' | 'Burn' | 'RegisterErc20Asset' | 'RegisterExistingErc20Asset' | 'RegisterNativeAsset' | 'RegisterNativeApp' | 'RegisterErc20App'; } - /** @name MigrationAppCall (560) */ + /** @name MigrationAppCall (562) */ interface MigrationAppCall extends Enum { readonly isMigrateErc20: boolean; readonly asMigrateErc20: { @@ -4640,7 +4644,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'MigrateErc20' | 'MigrateSidechain' | 'MigrateEth' | 'RegisterNetwork'; } - /** @name BeefyLightClientCall (563) */ + /** @name BeefyLightClientCall (565) */ interface BeefyLightClientCall extends Enum { readonly isInitialize: boolean; readonly asInitialize: { @@ -4660,24 +4664,24 @@ declare module '@polkadot/types/lookup' { readonly type: 'Initialize' | 'SubmitSignatureCommitment'; } - /** @name SpBeefyMmrBeefyAuthoritySet (564) */ + /** @name SpBeefyMmrBeefyAuthoritySet (566) */ interface SpBeefyMmrBeefyAuthoritySet extends Struct { readonly id: u64; readonly len: u32; readonly root: H256; } - /** @name SpBeefyCommitment (565) */ + /** @name SpBeefyCommitment (567) */ interface SpBeefyCommitment extends Struct { readonly payload: SpBeefyPayload; readonly blockNumber: u32; readonly validatorSetId: u64; } - /** @name SpBeefyPayload (566) */ + /** @name SpBeefyPayload (568) */ interface SpBeefyPayload extends Vec> {} - /** @name BridgeCommonBeefyTypesValidatorProof (569) */ + /** @name BridgeCommonBeefyTypesValidatorProof (571) */ interface BridgeCommonBeefyTypesValidatorProof extends Struct { readonly validatorClaimsBitfield: BitVec; readonly signatures: Vec; @@ -4686,10 +4690,10 @@ declare module '@polkadot/types/lookup' { readonly publicKeyMerkleProofs: Vec>; } - /** @name BitvecOrderMsb0 (572) */ + /** @name BitvecOrderMsb0 (574) */ type BitvecOrderMsb0 = Null; - /** @name SpBeefyMmrMmrLeaf (574) */ + /** @name SpBeefyMmrMmrLeaf (576) */ interface SpBeefyMmrMmrLeaf extends Struct { readonly version: u8; readonly parentNumberAndHash: ITuple<[u32, H256]>; @@ -4697,19 +4701,19 @@ declare module '@polkadot/types/lookup' { readonly leafExtra: BridgeTypesLeafExtraData; } - /** @name BridgeTypesLeafExtraData (575) */ + /** @name BridgeTypesLeafExtraData (577) */ interface BridgeTypesLeafExtraData extends Struct { readonly randomSeed: H256; readonly digestHash: H256; } - /** @name BridgeCommonSimplifiedProofProof (578) */ + /** @name BridgeCommonSimplifiedProofProof (580) */ interface BridgeCommonSimplifiedProofProof extends Struct { readonly order: u64; readonly items: Vec; } - /** @name SubstrateBridgeChannelInboundPalletCall (579) */ + /** @name SubstrateBridgeChannelInboundPalletCall (581) */ interface SubstrateBridgeChannelInboundPalletCall extends Enum { readonly isSubmit: boolean; readonly asSubmit: { @@ -4720,7 +4724,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Submit'; } - /** @name BridgeTypesGenericCommitment (580) */ + /** @name BridgeTypesGenericCommitment (582) */ interface BridgeTypesGenericCommitment extends Enum { readonly isSub: boolean; readonly asSub: BridgeTypesSubstrateCommitment; @@ -4729,33 +4733,33 @@ declare module '@polkadot/types/lookup' { readonly type: 'Sub' | 'Evm'; } - /** @name BridgeTypesSubstrateCommitment (581) */ + /** @name BridgeTypesSubstrateCommitment (583) */ interface BridgeTypesSubstrateCommitment extends Struct { readonly messages: Vec; readonly nonce: u64; } - /** @name BridgeTypesSubstrateBridgeMessage (583) */ + /** @name BridgeTypesSubstrateBridgeMessage (585) */ interface BridgeTypesSubstrateBridgeMessage extends Struct { readonly payload: Bytes; readonly timepoint: BridgeTypesGenericTimepoint; } - /** @name BridgeTypesEvmCommitment (586) */ + /** @name BridgeTypesEvmCommitment (588) */ interface BridgeTypesEvmCommitment extends Struct { readonly nonce: u64; readonly totalMaxGas: U256; readonly messages: Vec; } - /** @name BridgeTypesEvmMessage (588) */ + /** @name BridgeTypesEvmMessage (590) */ interface BridgeTypesEvmMessage extends Struct { readonly target: H160; readonly maxGas: U256; readonly payload: Bytes; } - /** @name FramenodeRuntimeMultiProof (590) */ + /** @name FramenodeRuntimeMultiProof (592) */ interface FramenodeRuntimeMultiProof extends Enum { readonly isBeefy: boolean; readonly asBeefy: BeefyLightClientSubstrateBridgeMessageProof; @@ -4764,32 +4768,32 @@ declare module '@polkadot/types/lookup' { readonly type: 'Beefy' | 'Multisig'; } - /** @name BeefyLightClientSubstrateBridgeMessageProof (591) */ + /** @name BeefyLightClientSubstrateBridgeMessageProof (593) */ interface BeefyLightClientSubstrateBridgeMessageProof extends Struct { readonly proof: BridgeCommonSimplifiedProofProof; readonly leaf: SpBeefyMmrMmrLeaf; readonly digest: BridgeTypesAuxiliaryDigest; } - /** @name BridgeTypesAuxiliaryDigest (592) */ + /** @name BridgeTypesAuxiliaryDigest (594) */ interface BridgeTypesAuxiliaryDigest extends Struct { readonly logs: Vec; } - /** @name BridgeTypesAuxiliaryDigestItem (594) */ + /** @name BridgeTypesAuxiliaryDigestItem (596) */ interface BridgeTypesAuxiliaryDigestItem extends Enum { readonly isCommitment: boolean; readonly asCommitment: ITuple<[BridgeTypesGenericNetworkId, H256]>; readonly type: 'Commitment'; } - /** @name MultisigVerifierProof (595) */ + /** @name MultisigVerifierProof (597) */ interface MultisigVerifierProof extends Struct { readonly digest: BridgeTypesAuxiliaryDigest; readonly proof: Vec; } - /** @name SubstrateBridgeAppCall (596) */ + /** @name SubstrateBridgeAppCall (598) */ interface SubstrateBridgeAppCall extends Enum { readonly isMint: boolean; readonly asMint: { @@ -4845,14 +4849,14 @@ declare module '@polkadot/types/lookup' { readonly type: 'Mint' | 'FinalizeAssetRegistration' | 'Burn' | 'RegisterThischainAsset' | 'RegisterSidechainAsset' | 'SetTransferLimit' | 'AddAssetidParaid' | 'RemoveAssetidParaid'; } - /** @name BridgeTypesAssetKind (597) */ + /** @name BridgeTypesAssetKind (599) */ interface BridgeTypesAssetKind extends Enum { readonly isThischain: boolean; readonly isSidechain: boolean; readonly type: 'Thischain' | 'Sidechain'; } - /** @name XcmV3MultiassetAssetId (598) */ + /** @name XcmV3MultiassetAssetId (600) */ interface XcmV3MultiassetAssetId extends Enum { readonly isConcrete: boolean; readonly asConcrete: XcmV3MultiLocation; @@ -4861,7 +4865,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Concrete' | 'Abstract'; } - /** @name BridgeDataSignerCall (600) */ + /** @name BridgeDataSignerCall (602) */ interface BridgeDataSignerCall extends Enum { readonly isRegisterNetwork: boolean; readonly asRegisterNetwork: { @@ -4895,7 +4899,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'RegisterNetwork' | 'Approve' | 'AddPeer' | 'RemovePeer' | 'FinishRemovePeer' | 'FinishAddPeer'; } - /** @name MultisigVerifierCall (601) */ + /** @name MultisigVerifierCall (603) */ interface MultisigVerifierCall extends Enum { readonly isInitialize: boolean; readonly asInitialize: { @@ -4913,7 +4917,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Initialize' | 'AddPeer' | 'RemovePeer'; } - /** @name PalletSudoCall (602) */ + /** @name PalletSudoCall (604) */ interface PalletSudoCall extends Enum { readonly isSudo: boolean; readonly asSudo: { @@ -4936,7 +4940,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Sudo' | 'SudoUncheckedWeight' | 'SetKey' | 'SudoAs'; } - /** @name FaucetCall (603) */ + /** @name FaucetCall (605) */ interface FaucetCall extends Enum { readonly isTransfer: boolean; readonly asTransfer: { @@ -4952,7 +4956,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Transfer' | 'ResetRewards' | 'UpdateLimit'; } - /** @name PalletMultisigError (605) */ + /** @name PalletMultisigError (607) */ interface PalletMultisigError extends Enum { readonly isMinimumThreshold: boolean; readonly isAlreadyApproved: boolean; @@ -4978,19 +4982,19 @@ declare module '@polkadot/types/lookup' { readonly type: 'MinimumThreshold' | 'AlreadyApproved' | 'NoApprovalsNeeded' | 'TooFewSignatories' | 'TooManySignatories' | 'SignatoriesOutOfOrder' | 'SenderNotInSignatories' | 'NotInSignatories' | 'AlreadyInSignatories' | 'NotFound' | 'NotOwner' | 'NoTimepoint' | 'WrongTimepoint' | 'UnexpectedTimepoint' | 'AlreadyStored' | 'WeightTooLow' | 'ZeroThreshold' | 'MultisigAlreadyExists' | 'UnknownMultisigAccount' | 'SignatoriesAreNotUniqueOrUnordered' | 'AlreadyDispatched'; } - /** @name PalletUtilityError (606) */ + /** @name PalletUtilityError (608) */ interface PalletUtilityError extends Enum { readonly isTooManyCalls: boolean; readonly type: 'TooManyCalls'; } - /** @name PalletStakingSoraDurationWrapper (607) */ + /** @name PalletStakingSoraDurationWrapper (609) */ interface PalletStakingSoraDurationWrapper extends Struct { readonly secs: u64; readonly nanos: u32; } - /** @name PalletStakingStakingLedger (608) */ + /** @name PalletStakingStakingLedger (610) */ interface PalletStakingStakingLedger extends Struct { readonly stash: AccountId32; readonly total: Compact; @@ -4999,32 +5003,32 @@ declare module '@polkadot/types/lookup' { readonly claimedRewards: Vec; } - /** @name PalletStakingUnlockChunk (610) */ + /** @name PalletStakingUnlockChunk (612) */ interface PalletStakingUnlockChunk extends Struct { readonly value: Compact; readonly era: Compact; } - /** @name PalletStakingNominations (613) */ + /** @name PalletStakingNominations (615) */ interface PalletStakingNominations extends Struct { readonly targets: Vec; readonly submittedIn: u32; readonly suppressed: bool; } - /** @name PalletStakingActiveEraInfo (615) */ + /** @name PalletStakingActiveEraInfo (617) */ interface PalletStakingActiveEraInfo extends Struct { readonly index: u32; readonly start: Option; } - /** @name PalletStakingEraRewardPoints (617) */ + /** @name PalletStakingEraRewardPoints (619) */ interface PalletStakingEraRewardPoints extends Struct { readonly total: u32; readonly individual: BTreeMap; } - /** @name PalletStakingUnappliedSlash (622) */ + /** @name PalletStakingUnappliedSlash (624) */ interface PalletStakingUnappliedSlash extends Struct { readonly validator: AccountId32; readonly own: u128; @@ -5033,7 +5037,7 @@ declare module '@polkadot/types/lookup' { readonly payout: u128; } - /** @name PalletStakingSlashingSlashingSpans (624) */ + /** @name PalletStakingSlashingSlashingSpans (626) */ interface PalletStakingSlashingSlashingSpans extends Struct { readonly spanIndex: u32; readonly lastStart: u32; @@ -5041,13 +5045,13 @@ declare module '@polkadot/types/lookup' { readonly prior: Vec; } - /** @name PalletStakingSlashingSpanRecord (625) */ + /** @name PalletStakingSlashingSpanRecord (627) */ interface PalletStakingSlashingSpanRecord extends Struct { readonly slashed: u128; readonly paidOut: u128; } - /** @name PalletStakingPalletError (628) */ + /** @name PalletStakingPalletError (630) */ interface PalletStakingPalletError extends Enum { readonly isNotController: boolean; readonly isNotStash: boolean; @@ -5077,16 +5081,16 @@ declare module '@polkadot/types/lookup' { readonly type: 'NotController' | 'NotStash' | 'AlreadyBonded' | 'AlreadyPaired' | 'EmptyTargets' | 'DuplicateIndex' | 'InvalidSlashIndex' | 'InsufficientBond' | 'NoMoreChunks' | 'NoUnlockChunk' | 'FundedTarget' | 'InvalidEraToReward' | 'InvalidNumberOfNominations' | 'NotSortedAndUnique' | 'AlreadyClaimed' | 'IncorrectHistoryDepth' | 'IncorrectSlashingSpans' | 'BadState' | 'TooManyTargets' | 'BadTarget' | 'CannotChillOther' | 'TooManyNominators' | 'TooManyValidators' | 'CommissionTooLow' | 'BoundNotMet'; } - /** @name SpStakingOffenceOffenceDetails (629) */ + /** @name SpStakingOffenceOffenceDetails (631) */ interface SpStakingOffenceOffenceDetails extends Struct { readonly offender: ITuple<[AccountId32, PalletStakingExposure]>; readonly reporters: Vec; } - /** @name SpCoreCryptoKeyTypeId (634) */ + /** @name SpCoreCryptoKeyTypeId (636) */ interface SpCoreCryptoKeyTypeId extends U8aFixed {} - /** @name PalletSessionError (635) */ + /** @name PalletSessionError (637) */ interface PalletSessionError extends Enum { readonly isInvalidProof: boolean; readonly isNoAssociatedValidatorId: boolean; @@ -5096,7 +5100,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'InvalidProof' | 'NoAssociatedValidatorId' | 'DuplicatedKey' | 'NoKeys' | 'NoAccount'; } - /** @name PalletGrandpaStoredState (636) */ + /** @name PalletGrandpaStoredState (638) */ interface PalletGrandpaStoredState extends Enum { readonly isLive: boolean; readonly isPendingPause: boolean; @@ -5113,7 +5117,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Live' | 'PendingPause' | 'Paused' | 'PendingResume'; } - /** @name PalletGrandpaStoredPendingChange (637) */ + /** @name PalletGrandpaStoredPendingChange (639) */ interface PalletGrandpaStoredPendingChange extends Struct { readonly scheduledAt: u32; readonly delay: u32; @@ -5121,7 +5125,7 @@ declare module '@polkadot/types/lookup' { readonly forced: Option; } - /** @name PalletGrandpaError (639) */ + /** @name PalletGrandpaError (641) */ interface PalletGrandpaError extends Enum { readonly isPauseFailed: boolean; readonly isResumeFailed: boolean; @@ -5133,39 +5137,39 @@ declare module '@polkadot/types/lookup' { readonly type: 'PauseFailed' | 'ResumeFailed' | 'ChangePending' | 'TooSoon' | 'InvalidKeyOwnershipProof' | 'InvalidEquivocationProof' | 'DuplicateOffenceReport'; } - /** @name PalletImOnlineBoundedOpaqueNetworkState (643) */ + /** @name PalletImOnlineBoundedOpaqueNetworkState (645) */ interface PalletImOnlineBoundedOpaqueNetworkState extends Struct { readonly peerId: Bytes; readonly externalAddresses: Vec; } - /** @name PalletImOnlineError (647) */ + /** @name PalletImOnlineError (649) */ interface PalletImOnlineError extends Enum { readonly isInvalidKey: boolean; readonly isDuplicatedHeartbeat: boolean; readonly type: 'InvalidKey' | 'DuplicatedHeartbeat'; } - /** @name OrmlTokensBalanceLock (650) */ + /** @name OrmlTokensBalanceLock (652) */ interface OrmlTokensBalanceLock extends Struct { readonly id: U8aFixed; readonly amount: u128; } - /** @name OrmlTokensAccountData (652) */ + /** @name OrmlTokensAccountData (654) */ interface OrmlTokensAccountData extends Struct { readonly free: u128; readonly reserved: u128; readonly frozen: u128; } - /** @name OrmlTokensReserveData (654) */ + /** @name OrmlTokensReserveData (656) */ interface OrmlTokensReserveData extends Struct { readonly id: Null; readonly amount: u128; } - /** @name OrmlTokensModuleError (656) */ + /** @name OrmlTokensModuleError (658) */ interface OrmlTokensModuleError extends Enum { readonly isBalanceTooLow: boolean; readonly isAmountIntoBalanceFailed: boolean; @@ -5178,7 +5182,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'BalanceTooLow' | 'AmountIntoBalanceFailed' | 'LiquidityRestrictions' | 'MaxLocksExceeded' | 'KeepAlive' | 'ExistentialDeposit' | 'DeadAccount' | 'TooManyReserves'; } - /** @name OrmlCurrenciesModuleError (657) */ + /** @name OrmlCurrenciesModuleError (659) */ interface OrmlCurrenciesModuleError extends Enum { readonly isAmountIntoBalanceFailed: boolean; readonly isBalanceTooLow: boolean; @@ -5186,7 +5190,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'AmountIntoBalanceFailed' | 'BalanceTooLow' | 'DepositFailed'; } - /** @name TradingPairError (660) */ + /** @name TradingPairError (662) */ interface TradingPairError extends Enum { readonly isTradingPairExists: boolean; readonly isForbiddenBaseAssetId: boolean; @@ -5195,7 +5199,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'TradingPairExists' | 'ForbiddenBaseAssetId' | 'IdenticalAssetIds' | 'TradingPairDoesntExist'; } - /** @name AssetsAssetRecord (662) */ + /** @name AssetsAssetRecord (664) */ interface AssetsAssetRecord extends Enum { readonly isArity0: boolean; readonly isArity1: boolean; @@ -5219,7 +5223,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Arity0' | 'Arity1' | 'Arity2' | 'Arity3' | 'Arity4' | 'Arity5' | 'Arity6' | 'Arity7' | 'Arity8' | 'Arity9'; } - /** @name AssetsAssetRecordArg (663) */ + /** @name AssetsAssetRecordArg (665) */ interface AssetsAssetRecordArg extends Enum { readonly isGenericI32: boolean; readonly asGenericI32: i32; @@ -5242,7 +5246,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'GenericI32' | 'GenericU64' | 'GenericU128' | 'GenericU8x32' | 'GenericH256' | 'GenericH512' | 'LeafAssetId' | 'AssetRecordAssetId' | 'Extra'; } - /** @name CommonPrimitivesAssetIdExtraAssetRecordArg (665) */ + /** @name CommonPrimitivesAssetIdExtraAssetRecordArg (667) */ interface CommonPrimitivesAssetIdExtraAssetRecordArg extends Enum { readonly isDexId: boolean; readonly asDexId: u32; @@ -5253,7 +5257,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'DexId' | 'LstId' | 'AccountId'; } - /** @name AssetsError (666) */ + /** @name AssetsError (668) */ interface AssetsError extends Enum { readonly isAssetIdAlreadyExists: boolean; readonly isAssetIdNotExists: boolean; @@ -5271,14 +5275,14 @@ declare module '@polkadot/types/lookup' { readonly type: 'AssetIdAlreadyExists' | 'AssetIdNotExists' | 'InsufficientBalance' | 'InvalidAssetSymbol' | 'InvalidAssetName' | 'InvalidPrecision' | 'AssetSupplyIsNotMintable' | 'InvalidAssetOwner' | 'IncRefError' | 'InvalidContentSource' | 'InvalidDescription' | 'DeadAsset' | 'Overflow'; } - /** @name CommonPrimitivesDexInfo (667) */ + /** @name CommonPrimitivesDexInfo (669) */ interface CommonPrimitivesDexInfo extends Struct { readonly baseAssetId: CommonPrimitivesAssetId32; readonly syntheticBaseAssetId: CommonPrimitivesAssetId32; readonly isPublic: bool; } - /** @name DexManagerError (668) */ + /** @name DexManagerError (670) */ interface DexManagerError extends Enum { readonly isDexIdAlreadyExists: boolean; readonly isDexDoesNotExist: boolean; @@ -5287,7 +5291,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'DexIdAlreadyExists' | 'DexDoesNotExist' | 'InvalidFeeValue' | 'InvalidAccountId'; } - /** @name MulticollateralBondingCurvePoolDistributionAccounts (669) */ + /** @name MulticollateralBondingCurvePoolDistributionAccounts (671) */ interface MulticollateralBondingCurvePoolDistributionAccounts extends Struct { readonly xorAllocation: MulticollateralBondingCurvePoolDistributionAccountData; readonly valHolders: MulticollateralBondingCurvePoolDistributionAccountData; @@ -5296,13 +5300,13 @@ declare module '@polkadot/types/lookup' { readonly projects: MulticollateralBondingCurvePoolDistributionAccountData; } - /** @name MulticollateralBondingCurvePoolDistributionAccountData (670) */ + /** @name MulticollateralBondingCurvePoolDistributionAccountData (672) */ interface MulticollateralBondingCurvePoolDistributionAccountData extends Struct { readonly account: MulticollateralBondingCurvePoolDistributionAccount; readonly coefficient: FixnumFixedPoint; } - /** @name MulticollateralBondingCurvePoolDistributionAccount (671) */ + /** @name MulticollateralBondingCurvePoolDistributionAccount (673) */ interface MulticollateralBondingCurvePoolDistributionAccount extends Enum { readonly isAccount: boolean; readonly asAccount: AccountId32; @@ -5311,7 +5315,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Account' | 'TechAccount'; } - /** @name MulticollateralBondingCurvePoolError (674) */ + /** @name MulticollateralBondingCurvePoolError (676) */ interface MulticollateralBondingCurvePoolError extends Enum { readonly isPriceCalculationFailed: boolean; readonly isFailedToCalculatePriceWithoutImpact: boolean; @@ -5331,7 +5335,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'PriceCalculationFailed' | 'FailedToCalculatePriceWithoutImpact' | 'CannotExchangeWithSelf' | 'NotEnoughReserves' | 'PoolAlreadyInitializedForPair' | 'PoolNotInitialized' | 'SlippageLimitExceeded' | 'NothingToClaim' | 'RewardsSupplyShortage' | 'UnsupportedCollateralAssetId' | 'FeeCalculationFailed' | 'CantExchange' | 'IncRefError' | 'ArithmeticError' | 'FreeReservesAccountNotSet'; } - /** @name TechnicalError (675) */ + /** @name TechnicalError (677) */ interface TechnicalError extends Enum { readonly isStorageOverflow: boolean; readonly isInsufficientBalance: boolean; @@ -5357,7 +5361,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'StorageOverflow' | 'InsufficientBalance' | 'AlreadyExist' | 'InvalidProof' | 'SourceMismatch' | 'AlreadyClaimed' | 'ClaimActionMismatch' | 'DurationNotPassed' | 'OnlyRegularAsset' | 'OnlyRegularAccount' | 'OnlyRegularBalance' | 'OnlyPureTechnicalAccount' | 'Overflow' | 'TechAccountIdMustBePure' | 'UnableToGetReprFromTechAccountId' | 'RepresentativeMustBeSupported' | 'TechAccountIdIsNotRegistered' | 'NotImplemented' | 'DecodeAccountIdFailed' | 'AssociatedAccountIdNotFound' | 'OperationWithAbstractCheckingIsImposible'; } - /** @name PoolXykError (678) */ + /** @name PoolXykError (680) */ interface PoolXykError extends Enum { readonly isUnableToCalculateFee: boolean; readonly isFailedToCalculatePriceWithoutImpact: boolean; @@ -5424,7 +5428,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'UnableToCalculateFee' | 'FailedToCalculatePriceWithoutImpact' | 'UnableToGetBalance' | 'ImpossibleToDecideAssetPairAmounts' | 'PoolPairRatioAndPairSwapRatioIsDifferent' | 'PairSwapActionFeeIsSmallerThanRecommended' | 'SourceBalanceIsNotLargeEnough' | 'TargetBalanceIsNotLargeEnough' | 'UnableToDeriveFeeAccount' | 'FeeAccountIsInvalid' | 'SourceAndClientAccountDoNotMatchAsEqual' | 'AssetsMustNotBeSame' | 'ImpossibleToDecideDepositLiquidityAmounts' | 'InvalidDepositLiquidityBasicAssetAmount' | 'InvalidDepositLiquidityTargetAssetAmount' | 'PairSwapActionMinimumLiquidityIsSmallerThanRecommended' | 'DestinationAmountOfLiquidityIsNotLargeEnough' | 'SourceBaseAmountIsNotLargeEnough' | 'TargetBaseAmountIsNotLargeEnough' | 'PoolIsInvalid' | 'PoolIsEmpty' | 'ZeroValueInAmountParameter' | 'AccountBalanceIsInvalid' | 'InvalidDepositLiquidityDestinationAmount' | 'InitialLiqudityDepositRatioMustBeDefined' | 'TechAssetIsNotRepresentable' | 'UnableToDecideMarkerAsset' | 'UnableToGetAssetRepr' | 'ImpossibleToDecideWithdrawLiquidityAmounts' | 'InvalidWithdrawLiquidityBasicAssetAmount' | 'InvalidWithdrawLiquidityTargetAssetAmount' | 'SourceBaseAmountIsTooLarge' | 'SourceBalanceOfLiquidityTokensIsNotLargeEnough' | 'DestinationBaseBalanceIsNotLargeEnough' | 'DestinationTargetBalanceIsNotLargeEnough' | 'InvalidAssetForLiquidityMarking' | 'AssetDecodingError' | 'CalculatedValueIsOutOfDesiredBounds' | 'BaseAssetIsNotMatchedWithAnyAssetArguments' | 'DestinationAmountMustBeSame' | 'SourceAmountMustBeSame' | 'PoolInitializationIsInvalid' | 'PoolIsAlreadyInitialized' | 'InvalidMinimumBoundValueOfBalance' | 'ImpossibleToDecideValidPairValuesFromRangeForThisPool' | 'RangeValuesIsInvalid' | 'CalculatedValueIsNotMeetsRequiredBoundaries' | 'GettingFeeFromDestinationIsImpossible' | 'FixedWrapperCalculationFailed' | 'ThisCaseIsNotSupported' | 'PoolBecameInvalidAfterOperation' | 'UnableToConvertAssetToTechAssetId' | 'UnableToGetXORPartFromMarkerAsset' | 'PoolTokenSupplyOverflow' | 'IncRefError' | 'UnableToDepositXorLessThanMinimum' | 'UnsupportedQuotePath' | 'NotEnoughUnlockedLiquidity' | 'UnableToCreatePoolWithIndivisibleAssets' | 'UnableToOperateWithIndivisibleAssets' | 'NotEnoughLiquidityOutOfFarming' | 'TargetAssetIsRestricted'; } - /** @name LiquidityProxyError (679) */ + /** @name LiquidityProxyError (681) */ interface LiquidityProxyError extends Enum { readonly isUnavailableExchangePath: boolean; readonly isMaxFeeExceeded: boolean; @@ -5446,7 +5450,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'UnavailableExchangePath' | 'MaxFeeExceeded' | 'InvalidFeeValue' | 'InsufficientLiquidity' | 'AggregationError' | 'CalculationError' | 'SlippageNotTolerated' | 'ForbiddenFilter' | 'FailedToCalculatePriceWithoutImpact' | 'UnableToSwapIndivisibleAssets' | 'UnableToEnableLiquiditySource' | 'LiquiditySourceAlreadyEnabled' | 'UnableToDisableLiquiditySource' | 'LiquiditySourceAlreadyDisabled' | 'InvalidReceiversInfo' | 'FailedToTransferAdarCommission' | 'InvalidADARCommissionRatio'; } - /** @name PalletCollectiveVotes (681) */ + /** @name PalletCollectiveVotes (683) */ interface PalletCollectiveVotes extends Struct { readonly index: u32; readonly threshold: u32; @@ -5455,7 +5459,7 @@ declare module '@polkadot/types/lookup' { readonly end: u32; } - /** @name PalletCollectiveError (682) */ + /** @name PalletCollectiveError (684) */ interface PalletCollectiveError extends Enum { readonly isNotMember: boolean; readonly isDuplicateProposal: boolean; @@ -5470,7 +5474,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'NotMember' | 'DuplicateProposal' | 'ProposalMissing' | 'WrongIndex' | 'DuplicateVote' | 'AlreadyInitialized' | 'TooEarly' | 'TooManyProposals' | 'WrongProposalWeight' | 'WrongProposalLength'; } - /** @name PalletDemocracyReferendumInfo (690) */ + /** @name PalletDemocracyReferendumInfo (692) */ interface PalletDemocracyReferendumInfo extends Enum { readonly isOngoing: boolean; readonly asOngoing: PalletDemocracyReferendumStatus; @@ -5482,7 +5486,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Ongoing' | 'Finished'; } - /** @name PalletDemocracyReferendumStatus (691) */ + /** @name PalletDemocracyReferendumStatus (693) */ interface PalletDemocracyReferendumStatus extends Struct { readonly end: u32; readonly proposal: FrameSupportPreimagesBounded; @@ -5491,14 +5495,14 @@ declare module '@polkadot/types/lookup' { readonly tally: PalletDemocracyTally; } - /** @name PalletDemocracyTally (692) */ + /** @name PalletDemocracyTally (694) */ interface PalletDemocracyTally extends Struct { readonly ayes: u128; readonly nays: u128; readonly turnout: u128; } - /** @name PalletDemocracyVoteVoting (693) */ + /** @name PalletDemocracyVoteVoting (695) */ interface PalletDemocracyVoteVoting extends Enum { readonly isDirect: boolean; readonly asDirect: { @@ -5517,16 +5521,16 @@ declare module '@polkadot/types/lookup' { readonly type: 'Direct' | 'Delegating'; } - /** @name PalletDemocracyDelegations (697) */ + /** @name PalletDemocracyDelegations (699) */ interface PalletDemocracyDelegations extends Struct { readonly votes: u128; readonly capital: u128; } - /** @name PalletDemocracyVotePriorLock (698) */ + /** @name PalletDemocracyVotePriorLock (700) */ interface PalletDemocracyVotePriorLock extends ITuple<[u32, u128]> {} - /** @name PalletDemocracyError (702) */ + /** @name PalletDemocracyError (704) */ interface PalletDemocracyError extends Enum { readonly isValueLow: boolean; readonly isProposalMissing: boolean; @@ -5554,7 +5558,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'ValueLow' | 'ProposalMissing' | 'AlreadyCanceled' | 'DuplicateProposal' | 'ProposalBlacklisted' | 'NotSimpleMajority' | 'InvalidHash' | 'NoProposal' | 'AlreadyVetoed' | 'ReferendumInvalid' | 'NoneWaiting' | 'NotVoter' | 'NoPermission' | 'AlreadyDelegating' | 'InsufficientFunds' | 'NotDelegating' | 'VotesExist' | 'InstantNotAllowed' | 'Nonsense' | 'WrongUpperBound' | 'MaxVotesReached' | 'TooMany' | 'VotingPeriodLow'; } - /** @name EthBridgeRequestsOffchainRequest (703) */ + /** @name EthBridgeRequestsOffchainRequest (705) */ interface EthBridgeRequestsOffchainRequest extends Enum { readonly isOutgoing: boolean; readonly asOutgoing: ITuple<[EthBridgeRequestsOutgoingRequest, H256]>; @@ -5565,7 +5569,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Outgoing' | 'LoadIncoming' | 'Incoming'; } - /** @name EthBridgeRequestsRequestStatus (704) */ + /** @name EthBridgeRequestsRequestStatus (706) */ interface EthBridgeRequestsRequestStatus extends Enum { readonly isPending: boolean; readonly isFrozen: boolean; @@ -5578,21 +5582,21 @@ declare module '@polkadot/types/lookup' { readonly type: 'Pending' | 'Frozen' | 'ApprovalsReady' | 'Failed' | 'Done' | 'Broken'; } - /** @name EthBridgeRequestsOutgoingEthPeersSync (711) */ + /** @name EthBridgeRequestsOutgoingEthPeersSync (713) */ interface EthBridgeRequestsOutgoingEthPeersSync extends Struct { readonly isBridgeReady: bool; readonly isXorReady: bool; readonly isValReady: bool; } - /** @name EthBridgeBridgeStatus (712) */ + /** @name EthBridgeBridgeStatus (714) */ interface EthBridgeBridgeStatus extends Enum { readonly isInitialized: boolean; readonly isMigrating: boolean; readonly type: 'Initialized' | 'Migrating'; } - /** @name EthBridgeError (713) */ + /** @name EthBridgeError (715) */ interface EthBridgeError extends Enum { readonly isHttpFetchingError: boolean; readonly isAccountNotFound: boolean; @@ -5683,7 +5687,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'HttpFetchingError' | 'AccountNotFound' | 'Forbidden' | 'RequestIsAlreadyRegistered' | 'FailedToLoadTransaction' | 'FailedToLoadPrecision' | 'UnknownMethodId' | 'InvalidFunctionInput' | 'InvalidSignature' | 'InvalidUint' | 'InvalidAmount' | 'InvalidBalance' | 'InvalidString' | 'InvalidByte' | 'InvalidAddress' | 'InvalidAssetId' | 'InvalidAccountId' | 'InvalidBool' | 'InvalidH256' | 'InvalidArray' | 'UnknownEvent' | 'UnknownTokenAddress' | 'NoLocalAccountForSigning' | 'UnsupportedAssetId' | 'FailedToSignMessage' | 'FailedToSendSignedTransaction' | 'TokenIsNotOwnedByTheAuthor' | 'TokenIsAlreadyAdded' | 'DuplicatedRequest' | 'UnsupportedToken' | 'UnknownPeerAddress' | 'EthAbiEncodingError' | 'EthAbiDecodingError' | 'EthTransactionIsFailed' | 'EthTransactionIsSucceeded' | 'EthTransactionIsPending' | 'EthLogWasRemoved' | 'NoPendingPeer' | 'WrongPendingPeer' | 'TooManyPendingPeers' | 'FailedToGetAssetById' | 'CantAddMorePeers' | 'CantRemoveMorePeers' | 'PeerIsAlreadyAdded' | 'UnknownPeerId' | 'CantReserveFunds' | 'AlreadyClaimed' | 'FailedToLoadBlockHeader' | 'FailedToLoadFinalizedHead' | 'UnknownContractAddress' | 'InvalidContractInput' | 'RequestIsNotOwnedByTheAuthor' | 'FailedToParseTxHashInCall' | 'RequestIsNotReady' | 'UnknownRequest' | 'RequestNotFinalizedOnSidechain' | 'UnknownNetwork' | 'ContractIsInMigrationStage' | 'ContractIsNotInMigrationStage' | 'ContractIsAlreadyInMigrationStage' | 'Unavailable' | 'FailedToUnreserve' | 'SidechainAssetIsAlreadyRegistered' | 'ExpectedOutgoingRequest' | 'ExpectedIncomingRequest' | 'UnknownAssetId' | 'JsonSerializationError' | 'JsonDeserializationError' | 'FailedToLoadSidechainNodeParams' | 'FailedToLoadCurrentSidechainHeight' | 'FailedToLoadIsUsed' | 'TransactionMightHaveFailedDueToGasLimit' | 'ExpectedXORTransfer' | 'UnableToPayFees' | 'Cancelled' | 'UnsupportedAssetPrecision' | 'NonZeroDust' | 'IncRefError' | 'Other' | 'ExpectedPendingRequest' | 'ExpectedEthNetwork' | 'RemovedAndRefunded' | 'AuthorityAccountNotSet' | 'NotEnoughPeers' | 'ReadStorageError' | 'UnsafeMigration'; } - /** @name PswapDistributionError (716) */ + /** @name PswapDistributionError (718) */ interface PswapDistributionError extends Enum { readonly isCalculationError: boolean; readonly isSubscriptionActive: boolean; @@ -5694,7 +5698,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'CalculationError' | 'SubscriptionActive' | 'UnknownSubscription' | 'InvalidFrequency' | 'ZeroClaimableIncentives' | 'IncRefError'; } - /** @name PalletSchedulerScheduled (722) */ + /** @name PalletSchedulerScheduled (724) */ interface PalletSchedulerScheduled extends Struct { readonly maybeId: Option; readonly priority: u8; @@ -5703,7 +5707,7 @@ declare module '@polkadot/types/lookup' { readonly origin: FramenodeRuntimeOriginCaller; } - /** @name PalletSchedulerError (724) */ + /** @name PalletSchedulerError (726) */ interface PalletSchedulerError extends Enum { readonly isFailedToSchedule: boolean; readonly isNotFound: boolean; @@ -5713,13 +5717,13 @@ declare module '@polkadot/types/lookup' { readonly type: 'FailedToSchedule' | 'NotFound' | 'TargetBlockNumberInPast' | 'RescheduleNoChange' | 'Named'; } - /** @name IrohaMigrationPendingMultisigAccount (727) */ + /** @name IrohaMigrationPendingMultisigAccount (729) */ interface IrohaMigrationPendingMultisigAccount extends Struct { readonly approvingAccounts: Vec; readonly migrateAt: Option; } - /** @name IrohaMigrationError (728) */ + /** @name IrohaMigrationError (730) */ interface IrohaMigrationError extends Enum { readonly isPublicKeyParsingFailed: boolean; readonly isSignatureParsingFailed: boolean; @@ -5734,7 +5738,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'PublicKeyParsingFailed' | 'SignatureParsingFailed' | 'SignatureVerificationFailed' | 'AccountNotFound' | 'PublicKeyNotFound' | 'PublicKeyAlreadyUsed' | 'AccountAlreadyMigrated' | 'ReferralMigrationFailed' | 'MultiSigCreationFailed' | 'SignatoryAdditionFailed'; } - /** @name PalletMembershipError (730) */ + /** @name PalletMembershipError (732) */ interface PalletMembershipError extends Enum { readonly isAlreadyMember: boolean; readonly isNotMember: boolean; @@ -5742,21 +5746,21 @@ declare module '@polkadot/types/lookup' { readonly type: 'AlreadyMember' | 'NotMember' | 'TooManyMembers'; } - /** @name PalletElectionsPhragmenSeatHolder (732) */ + /** @name PalletElectionsPhragmenSeatHolder (734) */ interface PalletElectionsPhragmenSeatHolder extends Struct { readonly who: AccountId32; readonly stake: u128; readonly deposit: u128; } - /** @name PalletElectionsPhragmenVoter (733) */ + /** @name PalletElectionsPhragmenVoter (735) */ interface PalletElectionsPhragmenVoter extends Struct { readonly votes: Vec; readonly stake: u128; readonly deposit: u128; } - /** @name PalletElectionsPhragmenError (734) */ + /** @name PalletElectionsPhragmenError (736) */ interface PalletElectionsPhragmenError extends Enum { readonly isUnableToVote: boolean; readonly isNoVotes: boolean; @@ -5778,14 +5782,14 @@ declare module '@polkadot/types/lookup' { readonly type: 'UnableToVote' | 'NoVotes' | 'TooManyVotes' | 'MaximumVotesExceeded' | 'LowBalance' | 'UnableToPayBond' | 'MustBeVoter' | 'DuplicatedCandidate' | 'TooManyCandidates' | 'MemberSubmit' | 'RunnerUpSubmit' | 'InsufficientCandidateFunds' | 'NotMember' | 'InvalidWitnessData' | 'InvalidVoteCount' | 'InvalidRenouncing' | 'InvalidReplacement'; } - /** @name VestedRewardsRewardInfo (735) */ + /** @name VestedRewardsRewardInfo (737) */ interface VestedRewardsRewardInfo extends Struct { readonly limit: u128; readonly totalAvailable: u128; readonly rewards: BTreeMap; } - /** @name VestedRewardsCrowdloanInfo (736) */ + /** @name VestedRewardsCrowdloanInfo (738) */ interface VestedRewardsCrowdloanInfo extends Struct { readonly totalContribution: u128; readonly rewards: Vec>; @@ -5794,13 +5798,13 @@ declare module '@polkadot/types/lookup' { readonly account: AccountId32; } - /** @name VestedRewardsCrowdloanUserInfo (738) */ + /** @name VestedRewardsCrowdloanUserInfo (740) */ interface VestedRewardsCrowdloanUserInfo extends Struct { readonly contribution: u128; readonly rewarded: Vec>; } - /** @name VestedRewardsError (739) */ + /** @name VestedRewardsError (741) */ interface VestedRewardsError extends Enum { readonly isNothingToClaim: boolean; readonly isClaimLimitExceeded: boolean; @@ -5821,21 +5825,21 @@ declare module '@polkadot/types/lookup' { readonly type: 'NothingToClaim' | 'ClaimLimitExceeded' | 'UnhandledRewardType' | 'RewardsSupplyShortage' | 'IncRefError' | 'CantSubtractSnapshot' | 'CantCalculateReward' | 'NoRewardsForAsset' | 'ArithmeticError' | 'NumberConversionError' | 'UnableToGetBaseAssetPrice' | 'CrowdloanAlreadyExists' | 'WrongCrowdloanInfo' | 'CrowdloanRewardsDistributionNotStarted' | 'CrowdloanDoesNotExists' | 'NotCrowdloanParticipant'; } - /** @name PalletIdentityRegistration (740) */ + /** @name PalletIdentityRegistration (742) */ interface PalletIdentityRegistration extends Struct { readonly judgements: Vec>; readonly deposit: u128; readonly info: PalletIdentityIdentityInfo; } - /** @name PalletIdentityRegistrarInfo (748) */ + /** @name PalletIdentityRegistrarInfo (750) */ interface PalletIdentityRegistrarInfo extends Struct { readonly account: AccountId32; readonly fee: u128; readonly fields: PalletIdentityBitFlags; } - /** @name PalletIdentityError (750) */ + /** @name PalletIdentityError (752) */ interface PalletIdentityError extends Enum { readonly isTooManySubAccounts: boolean; readonly isNotFound: boolean; @@ -5858,26 +5862,26 @@ declare module '@polkadot/types/lookup' { readonly type: 'TooManySubAccounts' | 'NotFound' | 'NotNamed' | 'EmptyIndex' | 'FeeChanged' | 'NoIdentity' | 'StickyJudgement' | 'JudgementGiven' | 'InvalidJudgement' | 'InvalidIndex' | 'InvalidTarget' | 'TooManyFields' | 'TooManyRegistrars' | 'AlreadyClaimed' | 'NotSub' | 'NotOwned' | 'JudgementForDifferentIdentity' | 'JudgementPaymentFailed'; } - /** @name FarmingPoolFarmer (752) */ + /** @name FarmingPoolFarmer (754) */ interface FarmingPoolFarmer extends Struct { readonly account: AccountId32; readonly block: u32; readonly weight: u128; } - /** @name FarmingError (753) */ + /** @name FarmingError (755) */ interface FarmingError extends Enum { readonly isIncRefError: boolean; readonly type: 'IncRefError'; } - /** @name XstSyntheticInfo (754) */ + /** @name XstSyntheticInfo (756) */ interface XstSyntheticInfo extends Struct { readonly referenceSymbol: Bytes; readonly feeRatio: FixnumFixedPoint; } - /** @name XstError (755) */ + /** @name XstError (757) */ interface XstError extends Enum { readonly isPriceCalculationFailed: boolean; readonly isSlippageLimitExceeded: boolean; @@ -5894,13 +5898,13 @@ declare module '@polkadot/types/lookup' { readonly type: 'PriceCalculationFailed' | 'SlippageLimitExceeded' | 'CantExchange' | 'SyntheticDoesNotExist' | 'SymbolDoesNotExist' | 'SymbolAlreadyReferencedToSynthetic' | 'SyntheticIsNotEnabled' | 'OracleQuoteError' | 'InvalidFeeRatio' | 'IndivisibleReferenceAsset' | 'CantEnableIndivisibleAsset' | 'SyntheticBaseBuySellLimitExceeded'; } - /** @name PriceToolsAggregatedPriceInfo (756) */ + /** @name PriceToolsAggregatedPriceInfo (758) */ interface PriceToolsAggregatedPriceInfo extends Struct { readonly buy: PriceToolsPriceInfo; readonly sell: PriceToolsPriceInfo; } - /** @name PriceToolsPriceInfo (757) */ + /** @name PriceToolsPriceInfo (759) */ interface PriceToolsPriceInfo extends Struct { readonly priceFailures: u32; readonly spotPrices: Vec; @@ -5909,7 +5913,7 @@ declare module '@polkadot/types/lookup' { readonly lastSpotPrice: u128; } - /** @name PriceToolsError (758) */ + /** @name PriceToolsError (760) */ interface PriceToolsError extends Enum { readonly isAveragePriceCalculationFailed: boolean; readonly isUpdateAverageWithSpotPriceFailed: boolean; @@ -5921,27 +5925,27 @@ declare module '@polkadot/types/lookup' { readonly type: 'AveragePriceCalculationFailed' | 'UpdateAverageWithSpotPriceFailed' | 'InsufficientSpotPriceData' | 'UnsupportedQuotePath' | 'FailedToQuoteAveragePrice' | 'AssetAlreadyRegistered' | 'CantDuplicateLastPrice'; } - /** @name CeresStakingStakingInfo (759) */ + /** @name CeresStakingStakingInfo (761) */ interface CeresStakingStakingInfo extends Struct { readonly deposited: u128; readonly rewards: u128; } - /** @name CeresStakingError (760) */ + /** @name CeresStakingError (762) */ interface CeresStakingError extends Enum { readonly isStakingPoolIsFull: boolean; readonly isUnauthorized: boolean; readonly type: 'StakingPoolIsFull' | 'Unauthorized'; } - /** @name CeresLiquidityLockerStorageVersion (761) */ + /** @name CeresLiquidityLockerStorageVersion (763) */ interface CeresLiquidityLockerStorageVersion extends Enum { readonly isV1: boolean; readonly isV2: boolean; readonly type: 'V1' | 'V2'; } - /** @name CeresLiquidityLockerLockInfo (763) */ + /** @name CeresLiquidityLockerLockInfo (765) */ interface CeresLiquidityLockerLockInfo extends Struct { readonly poolTokens: u128; readonly unlockingTimestamp: u64; @@ -5949,7 +5953,7 @@ declare module '@polkadot/types/lookup' { readonly assetB: CommonPrimitivesAssetId32; } - /** @name CeresLiquidityLockerError (764) */ + /** @name CeresLiquidityLockerError (766) */ interface CeresLiquidityLockerError extends Enum { readonly isPoolDoesNotExist: boolean; readonly isInsufficientLiquidityToLock: boolean; @@ -5959,21 +5963,21 @@ declare module '@polkadot/types/lookup' { readonly type: 'PoolDoesNotExist' | 'InsufficientLiquidityToLock' | 'InvalidPercentage' | 'Unauthorized' | 'InvalidUnlockingTimestamp'; } - /** @name CeresTokenLockerStorageVersion (765) */ + /** @name CeresTokenLockerStorageVersion (767) */ interface CeresTokenLockerStorageVersion extends Enum { readonly isV1: boolean; readonly isV2: boolean; readonly type: 'V1' | 'V2'; } - /** @name CeresTokenLockerTokenLockInfo (767) */ + /** @name CeresTokenLockerTokenLockInfo (769) */ interface CeresTokenLockerTokenLockInfo extends Struct { readonly tokens: u128; readonly unlockingTimestamp: u64; readonly assetId: CommonPrimitivesAssetId32; } - /** @name CeresTokenLockerError (768) */ + /** @name CeresTokenLockerError (770) */ interface CeresTokenLockerError extends Enum { readonly isInvalidNumberOfTokens: boolean; readonly isUnauthorized: boolean; @@ -5984,28 +5988,28 @@ declare module '@polkadot/types/lookup' { readonly type: 'InvalidNumberOfTokens' | 'Unauthorized' | 'InvalidUnlockingTimestamp' | 'NotEnoughFunds' | 'NotUnlockedYet' | 'LockInfoDoesNotExist'; } - /** @name CeresGovernancePlatformVotingInfo (770) */ + /** @name CeresGovernancePlatformVotingInfo (772) */ interface CeresGovernancePlatformVotingInfo extends Struct { readonly votingOption: u32; readonly numberOfVotes: u128; readonly ceresWithdrawn: bool; } - /** @name CeresGovernancePlatformPollInfo (771) */ + /** @name CeresGovernancePlatformPollInfo (773) */ interface CeresGovernancePlatformPollInfo extends Struct { readonly numberOfOptions: u32; readonly pollStartTimestamp: u64; readonly pollEndTimestamp: u64; } - /** @name CeresGovernancePlatformStorageVersion (772) */ + /** @name CeresGovernancePlatformStorageVersion (774) */ interface CeresGovernancePlatformStorageVersion extends Enum { readonly isV1: boolean; readonly isV2: boolean; readonly type: 'V1' | 'V2'; } - /** @name CeresGovernancePlatformError (773) */ + /** @name CeresGovernancePlatformError (775) */ interface CeresGovernancePlatformError extends Enum { readonly isInvalidVotes: boolean; readonly isPollIsFinished: boolean; @@ -6022,7 +6026,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'InvalidVotes' | 'PollIsFinished' | 'PollIsNotStarted' | 'NotEnoughFunds' | 'InvalidNumberOfOption' | 'VoteDenied' | 'InvalidStartTimestamp' | 'InvalidEndTimestamp' | 'PollIsNotFinished' | 'InvalidNumberOfVotes' | 'FundsAlreadyWithdrawn' | 'PollIdAlreadyExists'; } - /** @name CeresLaunchpadIloInfo (774) */ + /** @name CeresLaunchpadIloInfo (776) */ interface CeresLaunchpadIloInfo extends Struct { readonly iloOrganizer: AccountId32; readonly tokensForIlo: u128; @@ -6050,14 +6054,14 @@ declare module '@polkadot/types/lookup' { readonly baseAsset: CommonPrimitivesAssetId32; } - /** @name CeresLaunchpadContributorsVesting (775) */ + /** @name CeresLaunchpadContributorsVesting (777) */ interface CeresLaunchpadContributorsVesting extends Struct { readonly firstReleasePercent: u128; readonly vestingPeriod: u64; readonly vestingPercent: u128; } - /** @name CeresLaunchpadTeamVesting (776) */ + /** @name CeresLaunchpadTeamVesting (778) */ interface CeresLaunchpadTeamVesting extends Struct { readonly teamVestingTotalTokens: u128; readonly teamVestingFirstReleasePercent: u128; @@ -6065,7 +6069,7 @@ declare module '@polkadot/types/lookup' { readonly teamVestingPercent: u128; } - /** @name CeresLaunchpadContributionInfo (778) */ + /** @name CeresLaunchpadContributionInfo (780) */ interface CeresLaunchpadContributionInfo extends Struct { readonly fundsContributed: u128; readonly tokensBought: u128; @@ -6074,7 +6078,7 @@ declare module '@polkadot/types/lookup' { readonly numberOfClaims: u32; } - /** @name CeresLaunchpadError (779) */ + /** @name CeresLaunchpadError (781) */ interface CeresLaunchpadError extends Enum { readonly isIloAlreadyExists: boolean; readonly isParameterCantBeZero: boolean; @@ -6121,7 +6125,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'IloAlreadyExists' | 'ParameterCantBeZero' | 'InvalidSoftCap' | 'InvalidMinimumContribution' | 'InvalidMaximumContribution' | 'InvalidLiquidityPercent' | 'InvalidLockupDays' | 'InvalidStartTimestamp' | 'InvalidEndTimestamp' | 'InvalidPrice' | 'InvalidNumberOfTokensForLiquidity' | 'InvalidNumberOfTokensForILO' | 'InvalidFirstReleasePercent' | 'InvalidVestingPercent' | 'InvalidVestingPeriod' | 'NotEnoughCeres' | 'NotEnoughTokens' | 'IloNotStarted' | 'IloIsFinished' | 'CantContributeInILO' | 'HardCapIsHit' | 'NotEnoughTokensToBuy' | 'ContributionIsLowerThenMin' | 'ContributionIsBiggerThenMax' | 'NotEnoughFunds' | 'IloDoesNotExist' | 'IloIsNotFinished' | 'PoolDoesNotExist' | 'Unauthorized' | 'CantClaimLPTokens' | 'FundsAlreadyClaimed' | 'NothingToClaim' | 'IloIsFailed' | 'IloIsSucceeded' | 'CantCreateILOForListedToken' | 'AccountIsNotWhitelisted' | 'InvalidTeamFirstReleasePercent' | 'InvalidTeamVestingPercent' | 'InvalidTeamVestingPeriod' | 'NotEnoughTeamTokensToLock' | 'InvalidFeePercent' | 'BaseAssetNotSupported'; } - /** @name DemeterFarmingPlatformTokenInfo (780) */ + /** @name DemeterFarmingPlatformTokenInfo (782) */ interface DemeterFarmingPlatformTokenInfo extends Struct { readonly farmsTotalMultiplier: u32; readonly stakingTotalMultiplier: u32; @@ -6132,7 +6136,7 @@ declare module '@polkadot/types/lookup' { readonly teamAccount: AccountId32; } - /** @name DemeterFarmingPlatformUserInfo (782) */ + /** @name DemeterFarmingPlatformUserInfo (784) */ interface DemeterFarmingPlatformUserInfo extends Struct { readonly baseAsset: CommonPrimitivesAssetId32; readonly poolAsset: CommonPrimitivesAssetId32; @@ -6142,7 +6146,7 @@ declare module '@polkadot/types/lookup' { readonly rewards: u128; } - /** @name DemeterFarmingPlatformPoolData (784) */ + /** @name DemeterFarmingPlatformPoolData (786) */ interface DemeterFarmingPlatformPoolData extends Struct { readonly multiplier: u32; readonly depositFee: u128; @@ -6155,14 +6159,14 @@ declare module '@polkadot/types/lookup' { readonly baseAsset: CommonPrimitivesAssetId32; } - /** @name DemeterFarmingPlatformStorageVersion (785) */ + /** @name DemeterFarmingPlatformStorageVersion (787) */ interface DemeterFarmingPlatformStorageVersion extends Enum { readonly isV1: boolean; readonly isV2: boolean; readonly type: 'V1' | 'V2'; } - /** @name DemeterFarmingPlatformError (786) */ + /** @name DemeterFarmingPlatformError (788) */ interface DemeterFarmingPlatformError extends Enum { readonly isTokenAlreadyRegistered: boolean; readonly isTokenPerBlockCantBeZero: boolean; @@ -6180,7 +6184,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'TokenAlreadyRegistered' | 'TokenPerBlockCantBeZero' | 'InvalidAllocationParameters' | 'InvalidMultiplier' | 'InvalidDepositFee' | 'RewardTokenIsNotRegistered' | 'PoolAlreadyExists' | 'InsufficientFunds' | 'ZeroRewards' | 'PoolDoesNotExist' | 'InsufficientLPTokens' | 'PoolDoesNotHaveRewards' | 'Unauthorized'; } - /** @name PalletBagsListListNode (787) */ + /** @name PalletBagsListListNode (789) */ interface PalletBagsListListNode extends Struct { readonly id: AccountId32; readonly prev: Option; @@ -6189,20 +6193,20 @@ declare module '@polkadot/types/lookup' { readonly score: u64; } - /** @name PalletBagsListListBag (788) */ + /** @name PalletBagsListListBag (790) */ interface PalletBagsListListBag extends Struct { readonly head: Option; readonly tail: Option; } - /** @name PalletBagsListError (790) */ + /** @name PalletBagsListError (792) */ interface PalletBagsListError extends Enum { readonly isList: boolean; readonly asList: PalletBagsListListListError; readonly type: 'List'; } - /** @name PalletBagsListListListError (791) */ + /** @name PalletBagsListListListError (793) */ interface PalletBagsListListListError extends Enum { readonly isDuplicate: boolean; readonly isNotHeavier: boolean; @@ -6211,20 +6215,20 @@ declare module '@polkadot/types/lookup' { readonly type: 'Duplicate' | 'NotHeavier' | 'NotInSameBag' | 'NodeNotFound'; } - /** @name PalletElectionProviderMultiPhaseReadySolution (792) */ + /** @name PalletElectionProviderMultiPhaseReadySolution (794) */ interface PalletElectionProviderMultiPhaseReadySolution extends Struct { readonly supports: Vec>; readonly score: SpNposElectionsElectionScore; readonly compute: PalletElectionProviderMultiPhaseElectionCompute; } - /** @name PalletElectionProviderMultiPhaseRoundSnapshot (794) */ + /** @name PalletElectionProviderMultiPhaseRoundSnapshot (796) */ interface PalletElectionProviderMultiPhaseRoundSnapshot extends Struct { readonly voters: Vec]>>; readonly targets: Vec; } - /** @name PalletElectionProviderMultiPhaseSignedSignedSubmission (800) */ + /** @name PalletElectionProviderMultiPhaseSignedSignedSubmission (802) */ interface PalletElectionProviderMultiPhaseSignedSignedSubmission extends Struct { readonly who: AccountId32; readonly deposit: u128; @@ -6232,7 +6236,7 @@ declare module '@polkadot/types/lookup' { readonly callFee: u128; } - /** @name PalletElectionProviderMultiPhaseError (801) */ + /** @name PalletElectionProviderMultiPhaseError (803) */ interface PalletElectionProviderMultiPhaseError extends Enum { readonly isPreDispatchEarlySubmission: boolean; readonly isPreDispatchWrongWinnerCount: boolean; @@ -6251,7 +6255,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'PreDispatchEarlySubmission' | 'PreDispatchWrongWinnerCount' | 'PreDispatchWeakSubmission' | 'SignedQueueFull' | 'SignedCannotPayDeposit' | 'SignedInvalidWitness' | 'SignedTooMuchWeight' | 'OcwCallWrongEra' | 'MissingSnapshotMetadata' | 'InvalidSubmissionIndex' | 'CallNotAllowed' | 'FallbackFailed' | 'BoundNotMet' | 'TooManyWinners'; } - /** @name BandBandRate (803) */ + /** @name BandBandRate (805) */ interface BandBandRate extends Struct { readonly value: u128; readonly lastUpdated: u64; @@ -6259,7 +6263,7 @@ declare module '@polkadot/types/lookup' { readonly dynamicFee: FixnumFixedPoint; } - /** @name BandError (804) */ + /** @name BandError (806) */ interface BandError extends Enum { readonly isUnauthorizedRelayer: boolean; readonly isAlreadyATrustedRelayer: boolean; @@ -6272,21 +6276,21 @@ declare module '@polkadot/types/lookup' { readonly type: 'UnauthorizedRelayer' | 'AlreadyATrustedRelayer' | 'NoSuchRelayer' | 'RateConversionOverflow' | 'RateHasInvalidTimestamp' | 'RateExpired' | 'DynamicFeeCalculationError' | 'InvalidDynamicFeeParameters'; } - /** @name OracleProxyError (807) */ + /** @name OracleProxyError (809) */ interface OracleProxyError extends Enum { readonly isOracleAlreadyEnabled: boolean; readonly isOracleAlreadyDisabled: boolean; readonly type: 'OracleAlreadyEnabled' | 'OracleAlreadyDisabled'; } - /** @name HermesGovernancePlatformHermesVotingInfo (809) */ + /** @name HermesGovernancePlatformHermesVotingInfo (811) */ interface HermesGovernancePlatformHermesVotingInfo extends Struct { readonly votingOption: Bytes; readonly numberOfHermes: u128; readonly hermesWithdrawn: bool; } - /** @name HermesGovernancePlatformHermesPollInfo (810) */ + /** @name HermesGovernancePlatformHermesPollInfo (812) */ interface HermesGovernancePlatformHermesPollInfo extends Struct { readonly creator: AccountId32; readonly hermesLocked: u128; @@ -6298,14 +6302,14 @@ declare module '@polkadot/types/lookup' { readonly options: Vec; } - /** @name HermesGovernancePlatformStorageVersion (811) */ + /** @name HermesGovernancePlatformStorageVersion (813) */ interface HermesGovernancePlatformStorageVersion extends Enum { readonly isV1: boolean; readonly isV2: boolean; readonly type: 'V1' | 'V2'; } - /** @name HermesGovernancePlatformError (812) */ + /** @name HermesGovernancePlatformError (814) */ interface HermesGovernancePlatformError extends Enum { readonly isPollIsNotStarted: boolean; readonly isPollIsFinished: boolean; @@ -6329,7 +6333,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'PollIsNotStarted' | 'PollIsFinished' | 'InvalidStartTimestamp' | 'InvalidEndTimestamp' | 'NotEnoughHermesForCreatingPoll' | 'FundsAlreadyWithdrawn' | 'PollIsNotFinished' | 'YouAreNotCreator' | 'Unauthorized' | 'PollDoesNotExist' | 'NotEnoughHermesForVoting' | 'AlreadyVoted' | 'InvalidMinimumDurationOfPoll' | 'InvalidMaximumDurationOfPoll' | 'NotVoted' | 'InvalidVotingOptions' | 'TooManyVotingOptions' | 'InvalidOption' | 'DuplicateOptions'; } - /** @name PalletPreimageRequestStatus (813) */ + /** @name PalletPreimageRequestStatus (815) */ interface PalletPreimageRequestStatus extends Enum { readonly isUnrequested: boolean; readonly asUnrequested: { @@ -6345,7 +6349,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'Unrequested' | 'Requested'; } - /** @name PalletPreimageError (817) */ + /** @name PalletPreimageError (819) */ interface PalletPreimageError extends Enum { readonly isTooBig: boolean; readonly isAlreadyNoted: boolean; @@ -6356,7 +6360,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'TooBig' | 'AlreadyNoted' | 'NotAuthorized' | 'NotNoted' | 'Requested' | 'NotRequested'; } - /** @name OrderBook (818) */ + /** @name OrderBook (820) */ interface OrderBook extends Struct { readonly orderBookId: OrderBookOrderBookId; readonly status: OrderBookOrderBookStatus; @@ -6367,7 +6371,7 @@ declare module '@polkadot/types/lookup' { readonly maxLotSize: u128; } - /** @name OrderBookLimitOrder (820) */ + /** @name OrderBookLimitOrder (822) */ interface OrderBookLimitOrder extends Struct { readonly id: u128; readonly owner: AccountId32; @@ -6380,7 +6384,7 @@ declare module '@polkadot/types/lookup' { readonly expiresAt: u32; } - /** @name OrderBookError (829) */ + /** @name OrderBookError (831) */ interface OrderBookError extends Enum { readonly isUnknownOrderBook: boolean; readonly isInvalidOrderBookId: boolean; @@ -6396,8 +6400,9 @@ declare module '@polkadot/types/lookup' { readonly isNoAggregatedData: boolean; readonly isNotEnoughLiquidityInOrderBook: boolean; readonly isForbiddenToCreateOrderBookWithSameAssets: boolean; - readonly isNotAllowedBaseAsset: boolean; + readonly isNotAllowedQuoteAsset: boolean; readonly isNotAllowedDEXId: boolean; + readonly isSyntheticAssetIsForbidden: boolean; readonly isUserHasNoNft: boolean; readonly isInvalidLifespan: boolean; readonly isInvalidOrderAmount: boolean; @@ -6422,10 +6427,10 @@ declare module '@polkadot/types/lookup' { readonly isMaxLotSizeIsMoreThanTotalSupply: boolean; readonly isSlippageLimitExceeded: boolean; readonly isNftOrderBooksAreTemporarilyForbidden: boolean; - readonly type: 'UnknownOrderBook' | 'InvalidOrderBookId' | 'OrderBookAlreadyExists' | 'UnknownLimitOrder' | 'LimitOrderAlreadyExists' | 'LimitOrderStorageOverflow' | 'UpdateLimitOrderError' | 'DeleteLimitOrderError' | 'BlockScheduleFull' | 'ExpirationNotFound' | 'NoDataForPrice' | 'NoAggregatedData' | 'NotEnoughLiquidityInOrderBook' | 'ForbiddenToCreateOrderBookWithSameAssets' | 'NotAllowedBaseAsset' | 'NotAllowedDEXId' | 'UserHasNoNft' | 'InvalidLifespan' | 'InvalidOrderAmount' | 'InvalidLimitOrderPrice' | 'LimitOrderPriceIsTooFarFromSpread' | 'TradingIsForbidden' | 'PlacementOfLimitOrdersIsForbidden' | 'CancellationOfLimitOrdersIsForbidden' | 'UserHasMaxCountOfOpenedOrders' | 'PriceReachedMaxCountOfLimitOrders' | 'OrderBookReachedMaxCountOfPricesForSide' | 'AmountCalculationFailed' | 'PriceCalculationFailed' | 'Unauthorized' | 'InvalidAsset' | 'InvalidTickSize' | 'InvalidStepLotSize' | 'InvalidMinLotSize' | 'InvalidMaxLotSize' | 'TickSizeAndStepLotSizeAreTooBig' | 'TickSizeAndStepLotSizeAreTooSmall' | 'MaxLotSizeIsMoreThanTotalSupply' | 'SlippageLimitExceeded' | 'NftOrderBooksAreTemporarilyForbidden'; + readonly type: 'UnknownOrderBook' | 'InvalidOrderBookId' | 'OrderBookAlreadyExists' | 'UnknownLimitOrder' | 'LimitOrderAlreadyExists' | 'LimitOrderStorageOverflow' | 'UpdateLimitOrderError' | 'DeleteLimitOrderError' | 'BlockScheduleFull' | 'ExpirationNotFound' | 'NoDataForPrice' | 'NoAggregatedData' | 'NotEnoughLiquidityInOrderBook' | 'ForbiddenToCreateOrderBookWithSameAssets' | 'NotAllowedQuoteAsset' | 'NotAllowedDEXId' | 'SyntheticAssetIsForbidden' | 'UserHasNoNft' | 'InvalidLifespan' | 'InvalidOrderAmount' | 'InvalidLimitOrderPrice' | 'LimitOrderPriceIsTooFarFromSpread' | 'TradingIsForbidden' | 'PlacementOfLimitOrdersIsForbidden' | 'CancellationOfLimitOrdersIsForbidden' | 'UserHasMaxCountOfOpenedOrders' | 'PriceReachedMaxCountOfLimitOrders' | 'OrderBookReachedMaxCountOfPricesForSide' | 'AmountCalculationFailed' | 'PriceCalculationFailed' | 'Unauthorized' | 'InvalidAsset' | 'InvalidTickSize' | 'InvalidStepLotSize' | 'InvalidMinLotSize' | 'InvalidMaxLotSize' | 'TickSizeAndStepLotSizeAreTooBig' | 'TickSizeAndStepLotSizeAreTooSmall' | 'MaxLotSizeIsMoreThanTotalSupply' | 'SlippageLimitExceeded' | 'NftOrderBooksAreTemporarilyForbidden'; } - /** @name BridgeProxyBridgeRequest (834) */ + /** @name BridgeProxyBridgeRequest (836) */ interface BridgeProxyBridgeRequest extends Struct { readonly source: BridgeTypesGenericAccount; readonly dest: BridgeTypesGenericAccount; @@ -6437,7 +6442,7 @@ declare module '@polkadot/types/lookup' { readonly direction: BridgeTypesMessageDirection; } - /** @name BridgeProxyError (838) */ + /** @name BridgeProxyError (840) */ interface BridgeProxyError extends Enum { readonly isPathIsNotAvailable: boolean; readonly isWrongAccountKind: boolean; @@ -6446,13 +6451,13 @@ declare module '@polkadot/types/lookup' { readonly type: 'PathIsNotAvailable' | 'WrongAccountKind' | 'NotEnoughLockedLiquidity' | 'Overflow'; } - /** @name EthereumLightClientPruningRange (840) */ + /** @name EthereumLightClientPruningRange (842) */ interface EthereumLightClientPruningRange extends Struct { readonly oldestUnprunedBlock: u64; readonly oldestBlockToKeep: u64; } - /** @name EthereumLightClientStoredHeader (842) */ + /** @name EthereumLightClientStoredHeader (844) */ interface EthereumLightClientStoredHeader extends Struct { readonly submitter: Option; readonly header: BridgeTypesHeader; @@ -6460,7 +6465,7 @@ declare module '@polkadot/types/lookup' { readonly finalized: bool; } - /** @name EthereumLightClientError (844) */ + /** @name EthereumLightClientError (846) */ interface EthereumLightClientError extends Enum { readonly isAncientHeader: boolean; readonly isMissingHeader: boolean; @@ -6481,7 +6486,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'AncientHeader' | 'MissingHeader' | 'MissingParentHeader' | 'DuplicateHeader' | 'HeaderNotFinalized' | 'HeaderOnStaleFork' | 'InvalidHeader' | 'InvalidProof' | 'DecodeFailed' | 'NetworkNotFound' | 'NetworkAlreadyExists' | 'DifficultyTooLow' | 'NetworkStateInvalid' | 'Unknown' | 'ConsensusNotSupported' | 'InvalidSignature'; } - /** @name BridgeInboundChannelError (845) */ + /** @name BridgeInboundChannelError (847) */ interface BridgeInboundChannelError extends Enum { readonly isInvalidNetwork: boolean; readonly isInvalidSourceChannel: boolean; @@ -6494,7 +6499,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'InvalidNetwork' | 'InvalidSourceChannel' | 'InvalidEnvelope' | 'InvalidBatchDispatchedEvent' | 'InvalidNonce' | 'InvalidRewardFraction' | 'ContractExists' | 'CallEncodeFailed'; } - /** @name BridgeOutboundChannelError (846) */ + /** @name BridgeOutboundChannelError (848) */ interface BridgeOutboundChannelError extends Enum { readonly isPayloadTooLarge: boolean; readonly isQueueSizeLimitReached: boolean; @@ -6504,7 +6509,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'PayloadTooLarge' | 'QueueSizeLimitReached' | 'MaxGasTooBig' | 'Overflow' | 'ChannelExists'; } - /** @name EthAppError (848) */ + /** @name EthAppError (850) */ interface EthAppError extends Enum { readonly isInvalidPayload: boolean; readonly isAppIsNotRegistered: boolean; @@ -6518,7 +6523,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'InvalidPayload' | 'AppIsNotRegistered' | 'InvalidAppAddress' | 'AppAlreadyExists' | 'DestAccountIsNotSet' | 'CallEncodeFailed' | 'WrongAmount' | 'WrongRequest' | 'WrongRequestStatus'; } - /** @name Erc20AppError (852) */ + /** @name Erc20AppError (854) */ interface Erc20AppError extends Enum { readonly isTokenIsNotRegistered: boolean; readonly isAppIsNotRegistered: boolean; @@ -6533,7 +6538,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'TokenIsNotRegistered' | 'AppIsNotRegistered' | 'NotEnoughFunds' | 'InvalidNetwork' | 'TokenAlreadyRegistered' | 'AppAlreadyRegistered' | 'CallEncodeFailed' | 'WrongAmount' | 'WrongRequest' | 'WrongRequestStatus'; } - /** @name MigrationAppError (853) */ + /** @name MigrationAppError (855) */ interface MigrationAppError extends Enum { readonly isInvalidPayload: boolean; readonly isAppIsNotRegistered: boolean; @@ -6544,7 +6549,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'InvalidPayload' | 'AppIsNotRegistered' | 'InvalidAppAddress' | 'AppAlreadyExists' | 'TokenRegisteredWithAnotherAddress' | 'CallEncodeFailed'; } - /** @name BeefyLightClientError (854) */ + /** @name BeefyLightClientError (856) */ interface BeefyLightClientError extends Enum { readonly isInvalidValidatorSetId: boolean; readonly isInvalidMMRProof: boolean; @@ -6569,7 +6574,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'InvalidValidatorSetId' | 'InvalidMMRProof' | 'PayloadBlocknumberTooOld' | 'PayloadBlocknumberTooNew' | 'CannotSwitchOldValidatorSet' | 'NotEnoughValidatorSignatures' | 'InvalidNumberOfSignatures' | 'InvalidNumberOfPositions' | 'InvalidNumberOfPublicKeys' | 'ValidatorNotOnceInbitfield' | 'ValidatorSetIncorrectPosition' | 'InvalidSignature' | 'MerklePositionTooHigh' | 'MerkleProofTooShort' | 'MerkleProofTooHigh' | 'PalletNotInitialized' | 'InvalidDigestHash' | 'CommitmentNotFoundInDigest' | 'MmrPayloadNotFound' | 'InvalidNetworkId'; } - /** @name SubstrateBridgeChannelInboundPalletError (855) */ + /** @name SubstrateBridgeChannelInboundPalletError (857) */ interface SubstrateBridgeChannelInboundPalletError extends Enum { readonly isInvalidNetwork: boolean; readonly isInvalidSourceChannel: boolean; @@ -6581,7 +6586,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'InvalidNetwork' | 'InvalidSourceChannel' | 'InvalidCommitment' | 'InvalidNonce' | 'InvalidRewardFraction' | 'ContractExists' | 'CallEncodeFailed'; } - /** @name SubstrateBridgeChannelOutboundPalletError (856) */ + /** @name SubstrateBridgeChannelOutboundPalletError (858) */ interface SubstrateBridgeChannelOutboundPalletError extends Enum { readonly isPayloadTooLarge: boolean; readonly isQueueSizeLimitReached: boolean; @@ -6592,7 +6597,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'PayloadTooLarge' | 'QueueSizeLimitReached' | 'MaxGasTooBig' | 'NoFunds' | 'Overflow' | 'ChannelExists'; } - /** @name SubstrateBridgeAppError (859) */ + /** @name SubstrateBridgeAppError (861) */ interface SubstrateBridgeAppError extends Enum { readonly isTokenIsNotRegistered: boolean; readonly isAppIsNotRegistered: boolean; @@ -6612,7 +6617,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'TokenIsNotRegistered' | 'AppIsNotRegistered' | 'NotEnoughFunds' | 'InvalidNetwork' | 'TokenAlreadyRegistered' | 'AppAlreadyRegistered' | 'CallEncodeFailed' | 'WrongAmount' | 'TransferLimitReached' | 'UnknownPrecision' | 'InvalidDestinationParachain' | 'InvalidDestinationParams' | 'RelaychainAssetNotRegistered' | 'NotRelayTransferableAsset' | 'RelaychainAssetRegistered'; } - /** @name BridgeDataSignerError (866) */ + /** @name BridgeDataSignerError (868) */ interface BridgeDataSignerError extends Enum { readonly isPalletInitialized: boolean; readonly isPalletNotInitialized: boolean; @@ -6631,7 +6636,7 @@ declare module '@polkadot/types/lookup' { readonly type: 'PalletInitialized' | 'PalletNotInitialized' | 'PeerExists' | 'PeerNotExists' | 'TooMuchPeers' | 'FailedToVerifySignature' | 'PeerNotFound' | 'TooMuchApprovals' | 'ApprovalsNotFound' | 'SignaturesNotFound' | 'HasPendingPeerUpdate' | 'DontHavePendingPeerUpdates' | 'NetworkNotSupported' | 'SignatureAlreadyExists'; } - /** @name MultisigVerifierError (867) */ + /** @name MultisigVerifierError (869) */ interface MultisigVerifierError extends Enum { readonly isInvalidInitParams: boolean; readonly isTooMuchPeers: boolean; @@ -6646,13 +6651,13 @@ declare module '@polkadot/types/lookup' { readonly type: 'InvalidInitParams' | 'TooMuchPeers' | 'NetworkNotInitialized' | 'InvalidNumberOfSignatures' | 'InvalidSignature' | 'NotTrustedPeerSignature' | 'PeerExists' | 'NoSuchPeer' | 'InvalidNetworkId' | 'CommitmentNotFoundInDigest'; } - /** @name PalletSudoError (868) */ + /** @name PalletSudoError (870) */ interface PalletSudoError extends Enum { readonly isRequireSudo: boolean; readonly type: 'RequireSudo'; } - /** @name FaucetError (869) */ + /** @name FaucetError (871) */ interface FaucetError extends Enum { readonly isAssetNotSupported: boolean; readonly isAmountAboveLimit: boolean; @@ -6660,28 +6665,28 @@ declare module '@polkadot/types/lookup' { readonly type: 'AssetNotSupported' | 'AmountAboveLimit' | 'NotEnoughReserves'; } - /** @name FrameSystemExtensionsCheckSpecVersion (872) */ + /** @name FrameSystemExtensionsCheckSpecVersion (874) */ type FrameSystemExtensionsCheckSpecVersion = Null; - /** @name FrameSystemExtensionsCheckTxVersion (873) */ + /** @name FrameSystemExtensionsCheckTxVersion (875) */ type FrameSystemExtensionsCheckTxVersion = Null; - /** @name FrameSystemExtensionsCheckGenesis (874) */ + /** @name FrameSystemExtensionsCheckGenesis (876) */ type FrameSystemExtensionsCheckGenesis = Null; - /** @name FrameSystemExtensionsCheckNonce (877) */ + /** @name FrameSystemExtensionsCheckNonce (879) */ interface FrameSystemExtensionsCheckNonce extends Compact {} - /** @name FrameSystemExtensionsCheckWeight (878) */ + /** @name FrameSystemExtensionsCheckWeight (880) */ type FrameSystemExtensionsCheckWeight = Null; - /** @name FramenodeRuntimeExtensionsChargeTransactionPayment (879) */ + /** @name FramenodeRuntimeExtensionsChargeTransactionPayment (881) */ interface FramenodeRuntimeExtensionsChargeTransactionPayment extends PalletTransactionPaymentChargeTransactionPayment {} - /** @name PalletTransactionPaymentChargeTransactionPayment (880) */ + /** @name PalletTransactionPaymentChargeTransactionPayment (882) */ interface PalletTransactionPaymentChargeTransactionPayment extends Compact {} - /** @name FramenodeRuntimeRuntime (881) */ + /** @name FramenodeRuntimeRuntime (883) */ type FramenodeRuntimeRuntime = Null; } // declare module diff --git a/packages/util/package.json b/packages/util/package.json index 5d0a3500e..b639a3ee3 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,6 +1,6 @@ { "name": "@sora-substrate/util", - "version": "1.18.3", + "version": "1.18.4", "license": "Apache-2.0", "main": "./build/index.js", "typings": "./build/index.d.ts", @@ -9,11 +9,11 @@ }, "dependencies": { "@polkadot/ui-keyring": "2.12.1", - "@sora-substrate/api": "1.18.3", - "@sora-substrate/connection": "1.18.3", - "@sora-substrate/liquidity-proxy": "1.18.3", - "@sora-substrate/math": "1.18.3", - "@sora-substrate/types": "1.18.3", + "@sora-substrate/api": "1.18.4", + "@sora-substrate/connection": "1.18.4", + "@sora-substrate/liquidity-proxy": "1.18.4", + "@sora-substrate/math": "1.18.4", + "@sora-substrate/types": "1.18.4", "axios": "^0.21.1", "crypto-js": "^4.0.0", "lodash": "^4.17.15" diff --git a/packages/util/src/BaseApi.ts b/packages/util/src/BaseApi.ts index eb5dc2f85..d04416c92 100644 --- a/packages/util/src/BaseApi.ts +++ b/packages/util/src/BaseApi.ts @@ -3,6 +3,7 @@ import first from 'lodash/fp/first'; import omit from 'lodash/fp/omit'; import { Observable, Subscriber } from 'rxjs'; import { decodeAddress, encodeAddress } from '@polkadot/util-crypto'; +import { Keyring } from '@polkadot/api'; import { CodecString, FPNumber } from '@sora-substrate/math'; import { connection } from '@sora-substrate/connection'; import type { ApiPromise, ApiRx } from '@polkadot/api'; @@ -21,6 +22,7 @@ import type { BridgeHistory } from './BridgeApi'; import type { EvmHistory } from './bridgeProxy/evm/types'; import type { SubHistory } from './bridgeProxy/sub/types'; import type { RewardClaimHistory } from './rewards/types'; +import type { StakingHistory } from './staking/types'; import { ReceiverHistoryItem } from './swap/types'; type AccountWithOptions = { @@ -44,7 +46,7 @@ export type NetworkFeesObject = { export type IBridgeTransaction = EvmHistory | SubHistory | BridgeHistory; -export type HistoryItem = History | IBridgeTransaction | RewardClaimHistory; +export type HistoryItem = History | IBridgeTransaction | RewardClaimHistory | StakingHistory; export type FnResult = void | Observable; @@ -771,6 +773,17 @@ export enum Operation { ReferralReserveXor = 'ReferralReserveXor', ReferralUnreserveXor = 'ReferralUnreserveXor', ReferralSetInvitedUser = 'ReferralSetInvitedUser', + /** Staking */ + StakingBond = 'StakingBond', + StakingBondExtra = 'StakingBondExtra', + StakingRebond = 'StakingRebond', + StakingUnbond = 'StakingUnbond', + StakingWithdrawUnbonded = 'StakingWithdrawUnbonded', + StakingNominate = 'StakingNominate', + StakingChill = 'StakingChill', + StakingSetPayee = 'StakingSetPayee', + StakingSetController = 'StakingSetController', + StakingPayout = 'StakingPayout', /** Demeter Farming Platform */ DemeterFarmingDepositLiquidity = 'DemeterFarmingDepositLiquidity', DemeterFarmingWithdrawLiquidity = 'DemeterFarmingWithdrawLiquidity', diff --git a/packages/util/src/api.ts b/packages/util/src/api.ts index de030a05f..1c55a93ce 100644 --- a/packages/util/src/api.ts +++ b/packages/util/src/api.ts @@ -19,6 +19,7 @@ import { ReferralSystemModule } from './referralSystem'; import { AssetsModule } from './assets'; import { MstTransfersModule } from './mstTransfers'; import { SystemModule } from './system'; +import { StakingModule } from './staking'; import { DemeterFarmingModule } from './demeterFarming'; import { DexModule } from './dex'; import { CeresLiquidityLockerModule } from './ceresLiquidityLocker'; @@ -49,6 +50,7 @@ export class Api extends BaseApi { /** This module is used for internal needs */ public readonly mstTransfers = new MstTransfersModule(this); public readonly system = new SystemModule(this); + public readonly staking = new StakingModule(this); public readonly demeterFarming = new DemeterFarmingModule(this); public readonly dex = new DexModule(this); public readonly ceresLiquidityLocker = new CeresLiquidityLockerModule(this); diff --git a/packages/util/src/logger.ts b/packages/util/src/logger.ts index 041e76f17..adeeb91cf 100644 --- a/packages/util/src/logger.ts +++ b/packages/util/src/logger.ts @@ -4,5 +4,6 @@ export const Messages = { pairAlreadyCreated: 'Token pair was already created', pairBaseAssetNotAllowed: 'Base asset not allowed for pair creation', noTransferData: 'There is no data for transfers', + provideAccountPair: 'You should provide account pair to sign transaction', inabilityOfReferrerToPayFee: 'Your referrer do not have an ability to pay network fee', }; diff --git a/packages/util/src/staking/index.ts b/packages/util/src/staking/index.ts new file mode 100644 index 000000000..0ba23f157 --- /dev/null +++ b/packages/util/src/staking/index.ts @@ -0,0 +1,508 @@ +import { assert } from '@polkadot/util'; +import { FPNumber } from '@sora-substrate/math'; +import { map } from 'rxjs'; + +import { Messages } from '../logger'; +import { Operation } from '../BaseApi'; +import { XOR } from '../assets/consts'; +import { StakingRewardsDestination } from './types'; + +import type { Exposure } from '@polkadot/types/interfaces/staking'; + +import type { Observable } from '@polkadot/types/types'; +import type { KeyringPair } from '@polkadot/keyring/types'; +import type { Api } from '../api'; +import type { CodecString, NumberLike } from '@sora-substrate/math'; +import type { + ValidatorInfo, + StashNominatorsInfo, + ActiveEra, + EraElectionStatus, + EraRewardPoints, + ValidatorExposure, + ElectedValidator, + AccountStakingLedger, +} from './types'; + +// UTILS +const formatBalance = (value: any) => new FPNumber(value).toCodecString(); + +const formatValidatorExposure = (codec: Exposure): ValidatorExposure => { + return { + total: formatBalance(codec.total), + own: formatBalance(codec.own), + others: codec.others.map((item) => ({ who: item.who.toString(), value: formatBalance(item.value) })), + }; +}; + +const formatPayee = (payee: StakingRewardsDestination | string): string | { Account: string } => { + return payee in StakingRewardsDestination ? payee : { Account: payee }; +}; + +export class StakingModule { + constructor(private readonly root: Api) {} + + public getSignerPair(signerPair?: KeyringPair) { + const pair = signerPair || this.root.account.pair; + assert(pair, Messages.provideAccountPair); + + return pair; + } + + /** + * Get observable session index + * + * Each era is divided into sessions. + * Session defines an interval during which validators must submit heartbeat if they don’t produce blocks. + * Another usage of sessions is that reward points are calculated per session. + * Reward points are used to calculate reward for validators at the end of each era. + * @returns session index + */ + public getCurrentSessionObservable(): Observable { + return this.root.apiRx.query.session.currentIndex().pipe( + map((data) => { + return data.toNumber(); + }) + ); + } + + /** + * Get observable preferred validator count + * Staking module provides a variable that describes the preferred number of validators needs to be elected per era + * @returns validator count (69) + */ + public getPreferredValidatorCountObservable(): Observable { + return this.root.apiRx.query.staking.validatorCount().pipe( + map((data) => { + return data.toNumber(); + }) + ); + } + + /** + * Get observable active era + * @returns era index & era start timestamp + */ + public getActiveEraObservable(): Observable { + return this.root.apiRx.query.staking.activeEra().pipe( + map((data) => { + if (data.isEmpty) return null; + + const era = data.unwrap(); + const index = era.index.toNumber(); + const start = era.start.unwrap().toNumber(); + + return { index, start }; + }) + ); + } + + /** + * Get observable current era + * @returns current era index + */ + public getCurrentEraObservable(): Observable { + return this.root.apiRx.query.staking.currentEra().pipe( + map((data) => { + const era = data.unwrap(); + return era.toNumber(); + }) + ); + } + + /** + * Election status determines whether validator election is completed. + * This value is very important from the point of view that many calls to the Staking module are only allowed when election is completed. + * @returns election status of current era + */ + // public getEraElectionStatusObservable(): Observable { + // return this.root.apiRx.query.staking.eraElectionStatus().pipe( + // map((electionStatus) => { + // return electionStatus.toJSON() as EraElectionStatus; + // }) + // ); + // } + + /** + * Get observable eras total stake + * @param eraIndex index of era + * @returns total stake balance in XOR (codec string) + */ + public getEraTotalStakeObservable(eraIndex: number): Observable { + return this.root.apiRx.query.staking.erasTotalStake(eraIndex).pipe( + map((data) => { + return new FPNumber(data).toCodecString(); + }) + ); + } + + /** + * Get observable reward points of validators for era + * @param eraIndex index of era + * @returns total points and validator points + */ + public getEraRewardPointsObservable(eraIndex: number): Observable { + return this.root.apiRx.query.staking.erasRewardPoints(eraIndex).pipe( + map((data) => { + const total = data.total.toNumber(); + const individual = {}; + + for (const [account, points] of data.individual.entries()) { + individual[account.toString()] = points.toNumber(); + } + + return { individual, total }; + }) + ); + } + + /** + * **CONTROLLER** + * CONTROLLER - STASH relation + * Get observable information about stash address, locked funds and claimed rewards + * @param controllerAddress address of controller account + */ + public getAccountLedgerObservable(controllerAddress: string): Observable { + return this.root.apiRx.query.staking.ledger(controllerAddress).pipe( + map((codec) => { + if (codec.isEmpty) return null; + + const data = codec.unwrap(); + + return { + stash: data.stash.toString(), + total: formatBalance(data.total), + active: formatBalance(data.active), + unlocking: data.unlocking.map((item) => ({ value: formatBalance(item.value), era: item.era.toNumber() })), + }; + }) + ); + } + + /** + * **STASH** + * STASH - CONTROLLER relation + * Get observable controller account address for stash account + * @param stashAddress address of stash account + */ + public getControllerObservable(stashAddress: string): Observable { + return this.root.apiRx.query.staking.bonded(stashAddress).pipe( + map((data) => { + if (data.isEmpty) return null; + return data.unwrap().toString(); + }) + ); + } + + /** + * **STASH** + * Get observable rewards destination of stash account + * @param stashAddress address of stash account + * @returns rewards destination + */ + public getPayeeObservable(stashAddress: string): Observable { + return this.root.apiRx.query.staking.payee(stashAddress).pipe( + map((data) => { + if (data.isController) return StakingRewardsDestination.Controller; + if (data.isStash) return StakingRewardsDestination.Stash; + if (data.isAccount) return data.value.toString(); + return StakingRewardsDestination.None; + }) + ); + } + + /** + * Get all accounts which want to be a validator + * @returns list of validators infos (address, commission, blocked) + */ + public async getWannabeValidators(): Promise { + const validators = (await this.root.api.query.staking.validators.entries()).map(([key, codec]) => { + const address = key.args[0].toString(); + const { commission, blocked } = codec; + + return { + address, + blocked: blocked.isTrue, + commission: commission.unwrap().toString(), + }; + }); + + return validators; + } + + /** + * Get a set of validators elected for a given era + * @param eraIndex index of era + * @param clipped flag to reduce 'others' list to biggest stakers + * @returns a list of elected validators + */ + public async getElectedValidators(eraIndex: number, clipped = false): Promise { + const storage = clipped ? this.root.api.query.staking.erasStakersClipped : this.root.api.query.staking.erasStakers; + + const validators = (await storage.entries(eraIndex)).map(([key, codec]) => { + const address = key.args[1].toString(); + const data = formatValidatorExposure(codec); + + return { address, ...data }; + }); + + return validators; + } + + /** + * Get validator exposure observable + * @param eraIndex index of era + * @param validatorAddress address of validator + * @param clipped flag to reduce 'others' list to biggest stakers + * @returns validator exposure + */ + public getElectedValidatorObservable( + eraIndex: number, + validatorAddress: string, + clipped = false + ): Observable { + const observable = clipped + ? this.root.apiRx.query.staking.erasStakersClipped + : this.root.apiRx.query.staking.erasStakers; + + return observable(eraIndex, validatorAddress).pipe( + map((codec) => { + return formatValidatorExposure(codec); + }) + ); + } + + /** + * New set of validators for the current era starts working from the second session of the era and until the first session of the next era. + * This request is used to fetch validators when EraStakers returns no validators during transition to the new era. + * @returns list of validator addresses + */ + public async getSessionValidators(): Promise { + const data = await this.root.api.query.session.validators(); + + return data.map((id) => id.toString()); + } + + /** + * **STASH** + * Get observable validators nominated by stash + * @param stashAddress address of stash account + * @returns The structure with the list of validators, eraIndex + */ + public getNominationsObservable(stashAddress: string): Observable { + return this.root.apiRx.query.staking.nominators(stashAddress).pipe( + map((codec) => { + if (codec.isEmpty) return null; + const data = codec.unwrap(); + const targets = data.targets.map((target) => target.toString()); + const suppressed = data.suppressed.isTrue; + const submittedIn = data.submittedIn.toNumber(); + return { targets, suppressed, submittedIn }; + }) + ); + } + + /** + * Calc bond tx params + * @param value amount to bond (XOR) + * @param controller address of controller account + * @param payee destination of rewards (one of payee or specific account address for payments) + * @returns + */ + private calcBondParams( + value: NumberLike, + controller: string, + payee: StakingRewardsDestination | string + ): [string, string, string | { Account: string }] { + const amount = new FPNumber(value, XOR.decimals).toCodecString(); + const destination = formatPayee(payee); + + return [controller, amount, destination]; + } + + /** + * **STASH** + * Lock the stake + * @param args.value amount to bond (XOR) + * @param args.controller address of controller account + * @param args.payee destination of rewards (one of payee or account address for payments) + * @param signerPair account pair for transaction sign (otherwise the connected account will be used) + */ + public async bond( + args: { value: NumberLike; controller: string; payee: StakingRewardsDestination | string }, + signerPair?: KeyringPair + ): Promise { + const pair = this.getSignerPair(signerPair); + const params = this.calcBondParams(args.value, args.controller, args.payee); + + await this.root.submitExtrinsic(this.root.api.tx.staking.bond(...params), pair, { + type: Operation.StakingBond, + symbol: XOR.symbol, + assetAddress: XOR.address, + amount: `${args.value}`, + }); + } + + /** + * **STASH** + * Add more funds to an existing stake + * @param args.value amount add to stake + * @param signerPair account pair for transaction sign (otherwise the connected account will be used) + */ + public async bondExtra(args: { value: NumberLike }, signerPair?: KeyringPair): Promise { + const pair = this.getSignerPair(signerPair); + + await this.root.submitExtrinsic( + this.root.api.tx.staking.bondExtra(new FPNumber(args.value, XOR.decimals).toCodecString()), + pair, + { + type: Operation.StakingBondExtra, + symbol: XOR.symbol, + assetAddress: XOR.address, + amount: `${args.value}`, + } + ); + } + + /** + * **CONTROLLER** + * Lock again part of currently unlocking value + * @param args.value amount to lock in stake + * @param signerPair account pair for transaction sign (otherwise the connected account will be used) + */ + public async rebond(args: { value: NumberLike }, signerPair?: KeyringPair): Promise { + const pair = this.getSignerPair(signerPair); + + await this.root.submitExtrinsic( + this.root.api.tx.staking.rebond(new FPNumber(args.value, XOR.decimals).toCodecString()), + pair, + { + type: Operation.StakingRebond, + symbol: XOR.symbol, + assetAddress: XOR.address, + amount: `${args.value}`, + } + ); + } + + /** + * **CONTROLLER** + * To withdraw part of the staked amount a user must perform unbounding firstly + * @param args.value amount to unbond from stake + * @param signerPair account pair for transaction sign (otherwise the connected account will be used) + */ + public async unbond(args: { value: NumberLike }, signerPair?: KeyringPair): Promise { + const pair = this.getSignerPair(signerPair); + + await this.root.submitExtrinsic( + this.root.api.tx.staking.unbond(new FPNumber(args.value, XOR.decimals).toCodecString()), + pair, + { + type: Operation.StakingUnbond, + symbol: XOR.symbol, + assetAddress: XOR.address, + amount: `${args.value}`, + } + ); + } + + /** + * **CONTROLLER** + * Moves unlocked value to the free balance of the stash account + * @param args.value amount to withdraw - not used in extrinsic call, but can be passed to save this value in history + * @param signerPair account pair for transaction sign (otherwise the connected account will be used) + */ + public async withdrawUndonded(args: { value?: NumberLike }, signerPair?: KeyringPair): Promise { + const pair = this.getSignerPair(signerPair); + /** + * slashingSpans parameter is needed to ensure + * that the user agrees that staking information will be removed when there is no unlocking items pending + * and active value goes below minimum_balance due to slashing. + */ + const slashingSpans = 0; + await this.root.submitExtrinsic(this.root.api.tx.staking.withdrawUnbonded(slashingSpans), pair, { + type: Operation.StakingWithdrawUnbonded, + symbol: XOR.symbol, + assetAddress: XOR.address, + amount: args.value ? `${args.value}` : undefined, + }); + } + + /** + * **CONTROLLER** + * Start nominating a list of validators from the next era + * @param args.validators list of validators addresses to nominate + * @param signerPair account pair for transaction sign (otherwise the connected account will be used) + */ + public async nominate(args: { validators: string[] }, signerPair?: KeyringPair): Promise { + const pair = this.getSignerPair(signerPair); + + await this.root.submitExtrinsic(this.root.api.tx.staking.nominate(args.validators), pair, { + type: Operation.StakingNominate, + validators: args.validators, + }); + } + + /** + * **CONTROLLER** + * Stop nominating or validating from the next era. + * @param signerPair account pair for transaction sign (otherwise the connected account will be used) + */ + public async chill(signerPair?: KeyringPair): Promise { + const pair = this.getSignerPair(signerPair); + + await this.root.submitExtrinsic(this.root.api.tx.staking.chill(), pair, { + type: Operation.StakingChill, + }); + } + + /** + * **CONTROLLER** + * Changes new account to which staking reward is sent starting from the next era + * @param args.payee rewards destination + * @param signerPair account pair for transaction sign (otherwise the connected account will be used) + */ + public async setPayee(args: { payee: StakingRewardsDestination }, signerPair?: KeyringPair): Promise { + const pair = this.getSignerPair(signerPair); + const destination = formatPayee(args.payee); + + await this.root.submitExtrinsic(this.root.api.tx.staking.setPayee(destination), pair, { + type: Operation.StakingSetPayee, + payee: args.payee, + }); + } + + /** + * **STASH** + * Set new controller for the current stash starting from the next era + * @param args.address address of controller account + * @param signerPair account pair for transaction sign (otherwise the connected account will be used) + */ + public async setController(args: { address: string }, signerPair?: KeyringPair): Promise { + const pair = this.getSignerPair(signerPair); + + await this.root.submitExtrinsic(this.root.api.tx.staking.setController(args.address), pair, { + type: Operation.StakingSetPayee, + controller: args.address, + }); + } + + /** + * Distribute payout for staking in a given era for given validators + * @param args.validators array of validators addresses + * @param args.eraIndex era index + * @param signerPair account pair for transaction sign (otherwise the connected account will be used) + */ + public async payout(args: { validators: string[]; eraIndex: number }, signerPair?: KeyringPair): Promise { + const pair = this.getSignerPair(signerPair); + const transactions = args.validators.map((validator) => + this.root.api.tx.staking.payoutStakers(validator, args.eraIndex) + ); + const call = transactions.length > 1 ? this.root.api.tx.utility.batchAll(transactions) : transactions[0]; + + await this.root.submitExtrinsic(call, pair, { + type: Operation.StakingPayout, + validators: args.validators, + }); + } +} diff --git a/packages/util/src/staking/types.ts b/packages/util/src/staking/types.ts new file mode 100644 index 000000000..b43c68a67 --- /dev/null +++ b/packages/util/src/staking/types.ts @@ -0,0 +1,68 @@ +import type { History } from '../BaseApi'; + +export interface StakingHistory extends History { + validators?: string[]; + payee?: string; + controller?: string; +} + +export enum StakingRewardsDestination { + /** not used in sora */ + // Staked = 'Staked', + Stash = 'Stash', + Controller = 'Controller', + Account = 'Account', + None = 'None', +} + +export type ValidatorInfo = { + address: string; + commission: string; + blocked: boolean; +}; + +export interface ValidatorExposure { + total: string; + own: string; + others: { + who: string; + value: string; + }[]; +} + +export interface ElectedValidator extends ValidatorExposure { + address: string; +} + +export type StashNominatorsInfo = { + submittedIn: number; // era in which account submitted the decision to nominate + suppressed: boolean; // not used currently by substrate and designed for future + targets: string[]; // list of accountIds of validators nominated by the account +}; + +export type ActiveEra = { + index: number; // index of era + start: number; // timestamp when era was started +}; + +export type EraElectionStatus = { close: null } | { open: number }; + +export type EraRewardPoints = { + total: number; + individual: { + [key: string]: number; + }; +}; + +// To calculate redeemable and unbounding tokens, an active era must be fetched that determines whether an account is ready to claim tokens and unlock them for transfers +export type AccountStakingLedgerUnlock = { + value: string; + era: number; +}; + +export type AccountStakingLedger = { + stash: string; // address of stash account + total: string; // active + unlocking (XOR) + active: string; // still bonded (XOR) + unlocking: AccountStakingLedgerUnlock[]; // redeemable + unbounding +};