git.delta.rocks / unique-network / refs/commits / cff23478e541

difftreelog

merge develop into test/playground-migration

rkv2022-09-09parents: #16ab55f #4f3f998.patch.diff
in: master

79 files changed

modifiedCargo.lockdiffbeforeafterboth
112source = "registry+https://github.com/rust-lang/crates.io-index"112source = "registry+https://github.com/rust-lang/crates.io-index"
113checksum = "508b352bb5c066aac251f6daf6b36eccd03e8a88e8081cd44959ea277a3af9a8"113checksum = "508b352bb5c066aac251f6daf6b36eccd03e8a88e8081cd44959ea277a3af9a8"
114
115[[package]]
116name = "app-promotion-rpc"
117version = "0.1.0"
118dependencies = [
119 "pallet-common",
120 "pallet-evm",
121 "parity-scale-codec 3.1.5",
122 "sp-api",
123 "sp-core",
124 "sp-runtime",
125 "sp-std",
126 "up-data-structs",
127]
114128
115[[package]]129[[package]]
116name = "approx"130name = "approx"
5127name = "opal-runtime"5141name = "opal-runtime"
5128version = "0.9.27"5142version = "0.9.27"
5129dependencies = [5143dependencies = [
5144 "app-promotion-rpc",
5130 "cumulus-pallet-aura-ext",5145 "cumulus-pallet-aura-ext",
5131 "cumulus-pallet-dmp-queue",5146 "cumulus-pallet-dmp-queue",
5132 "cumulus-pallet-parachain-system",5147 "cumulus-pallet-parachain-system",
5150 "hex-literal",5165 "hex-literal",
5151 "log",5166 "log",
5152 "orml-vesting",5167 "orml-vesting",
5168 "pallet-app-promotion",
5153 "pallet-aura",5169 "pallet-aura",
5154 "pallet-balances",5170 "pallet-balances",
5155 "pallet-base-fee",5171 "pallet-base-fee",
5295 "stable_deref_trait",5311 "stable_deref_trait",
5296]5312]
5313
5314[[package]]
5315name = "pallet-app-promotion"
5316version = "0.1.0"
5317dependencies = [
5318 "frame-benchmarking",
5319 "frame-support",
5320 "frame-system",
5321 "pallet-balances",
5322 "pallet-common",
5323 "pallet-evm",
5324 "pallet-evm-contract-helpers",
5325 "pallet-evm-migration",
5326 "pallet-randomness-collective-flip",
5327 "pallet-timestamp",
5328 "pallet-unique",
5329 "parity-scale-codec 3.1.5",
5330 "scale-info",
5331 "serde",
5332 "sp-core",
5333 "sp-io",
5334 "sp-runtime",
5335 "sp-std",
5336 "up-data-structs",
5337]
52975338
5298[[package]]5339[[package]]
5299name = "pallet-aura"5340name = "pallet-aura"
5694name = "pallet-evm-contract-helpers"5735name = "pallet-evm-contract-helpers"
5695version = "0.2.0"5736version = "0.2.0"
5696dependencies = [5737dependencies = [
5738 "ethereum",
5697 "evm-coder",5739 "evm-coder",
5698 "fp-evm-mapping",5740 "fp-evm-mapping",
5699 "frame-support",5741 "frame-support",
64326474
6433[[package]]6475[[package]]
6434name = "pallet-unique"6476name = "pallet-unique"
6435version = "0.1.3"6477version = "0.1.4"
6436dependencies = [6478dependencies = [
6437 "ethereum",6479 "ethereum",
6438 "evm-coder",6480 "evm-coder",
8332name = "quartz-runtime"8374name = "quartz-runtime"
8333version = "0.9.27"8375version = "0.9.27"
8334dependencies = [8376dependencies = [
8377 "app-promotion-rpc",
8335 "cumulus-pallet-aura-ext",8378 "cumulus-pallet-aura-ext",
8336 "cumulus-pallet-dmp-queue",8379 "cumulus-pallet-dmp-queue",
8337 "cumulus-pallet-parachain-system",8380 "cumulus-pallet-parachain-system",
8355 "hex-literal",8398 "hex-literal",
8356 "log",8399 "log",
8357 "orml-vesting",8400 "orml-vesting",
8401 "pallet-app-promotion",
8358 "pallet-aura",8402 "pallet-aura",
8359 "pallet-balances",8403 "pallet-balances",
8360 "pallet-base-fee",8404 "pallet-base-fee",
1210312147
12104[[package]]12148[[package]]
12105name = "uc-rpc"12149name = "uc-rpc"
12106version = "0.1.3"12150version = "0.1.4"
12107dependencies = [12151dependencies = [
12108 "anyhow",12152 "anyhow",
12153 "app-promotion-rpc",
12109 "jsonrpsee",12154 "jsonrpsee",
12110 "pallet-common",12155 "pallet-common",
12111 "pallet-evm",12156 "pallet-evm",
12184name = "unique-node"12229name = "unique-node"
12185version = "0.9.27"12230version = "0.9.27"
12186dependencies = [12231dependencies = [
12232 "app-promotion-rpc",
12187 "clap",12233 "clap",
12188 "cumulus-client-cli",12234 "cumulus-client-cli",
12189 "cumulus-client-collator",12235 "cumulus-client-collator",
12272name = "unique-rpc"12318name = "unique-rpc"
12273version = "0.1.1"12319version = "0.1.1"
12274dependencies = [12320dependencies = [
12321 "app-promotion-rpc",
12275 "fc-db",12322 "fc-db",
12276 "fc-mapping-sync",12323 "fc-mapping-sync",
12277 "fc-rpc",12324 "fc-rpc",
12321name = "unique-runtime"12368name = "unique-runtime"
12322version = "0.9.27"12369version = "0.9.27"
12323dependencies = [12370dependencies = [
12371 "app-promotion-rpc",
12324 "cumulus-pallet-aura-ext",12372 "cumulus-pallet-aura-ext",
12325 "cumulus-pallet-dmp-queue",12373 "cumulus-pallet-dmp-queue",
12326 "cumulus-pallet-parachain-system",12374 "cumulus-pallet-parachain-system",
12344 "hex-literal",12392 "hex-literal",
12345 "log",12393 "log",
12346 "orml-vesting",12394 "orml-vesting",
12395 "pallet-app-promotion",
12347 "pallet-aura",12396 "pallet-aura",
12348 "pallet-balances",12397 "pallet-balances",
12349 "pallet-base-fee",12398 "pallet-base-fee",
modifiedMakefilediffbeforeafterboth
128bench-rmrk-equip:128bench-rmrk-equip:
129 make _bench PALLET=proxy-rmrk-equip129 make _bench PALLET=proxy-rmrk-equip
130130
131.PHONY: bench-app-promotion
132bench-app-promotion:
133 make _bench PALLET=app-promotion PALLET_DIR=app-promotion
134
131.PHONY: bench135.PHONY: bench
132bench: bench-evm-migration bench-unique bench-structure bench-fungible bench-refungible bench-nonfungible bench-scheduler bench-rmrk-core bench-rmrk-equip136bench: bench-evm-migration bench-unique bench-structure bench-fungible bench-refungible bench-nonfungible bench-scheduler bench-rmrk-core bench-rmrk-equip
133137
modifiedclient/rpc/CHANGELOG.mddiffbeforeafterboth
3All notable changes to this project will be documented in this file.3All notable changes to this project will be documented in this file.
44
5<!-- bureaucrate goes here -->5<!-- bureaucrate goes here -->
6
7## [v0.1.4] 2022-09-08
8
9### Added
10- Support RPC for `AppPromotion` pallet.
11
6## [v0.1.3] 2022-08-1612## [v0.1.3] 2022-08-16
713
8### Other changes14### Other changes
915
10- build: Upgrade polkadot to v0.9.27 2c498572636f2b34d53b1c51b7283a761a7dc90a16- build: Upgrade polkadot to v0.9.27 2c498572636f2b34d53b1c51b7283a761a7dc90a
1117
12- build: Upgrade polkadot to v0.9.26 85515e54c4ca1b82a2630034e55dcc804c643bf818- build: Upgrade polkadot to v0.9.26 85515e54c4ca1b82a2630034e55dcc804c643bf8
1319
14- build: Upgrade polkadot to v0.9.25 cdfb9bdc7b205ff1b5134f034ef9973d769e5e6b20- build: Upgrade polkadot to v0.9.25 cdfb9bdc7b205ff1b5134f034ef9973d769e5e6b
1521
16## [0.1.2] - 2022-08-1222## [0.1.2] - 2022-08-12
1723
modifiedclient/rpc/Cargo.tomldiffbeforeafterboth
1[package]1[package]
2name = "uc-rpc"2name = "uc-rpc"
3version = "0.1.3"3version = "0.1.4"
4license = "GPLv3"4license = "GPLv3"
5edition = "2021"5edition = "2021"
66
7[dependencies]7[dependencies]
8pallet-common = { default-features = false, path = '../../pallets/common' }8pallet-common = { default-features = false, path = '../../pallets/common' }
9up-data-structs = { default-features = false, path = '../../primitives/data-structs' }9up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
10up-rpc = { path = "../../primitives/rpc" }10up-rpc = { path = "../../primitives/rpc" }
11app-promotion-rpc = { path = "../../primitives/app_promotion_rpc"}
11rmrk-rpc = { path = "../../primitives/rmrk-rpc" }12rmrk-rpc = { path = "../../primitives/rmrk-rpc" }
12codec = { package = "parity-scale-codec", version = "3.1.2" }13codec = { package = "parity-scale-codec", version = "3.1.2" }
13jsonrpsee = { version = "0.14.0", features = ["server", "macros"] }14jsonrpsee = { version = "0.14.0", features = ["server", "macros"] }
modifiedclient/rpc/src/lib.rsdiffbeforeafterboth
23 proc_macros::rpc,23 proc_macros::rpc,
24};24};
25use anyhow::anyhow;25use anyhow::anyhow;
26use sp_runtime::traits::{AtLeast32BitUnsigned, Member};
26use up_data_structs::{27use up_data_structs::{
27 RpcCollection, CollectionId, CollectionStats, CollectionLimits, TokenId, Property,28 RpcCollection, CollectionId, CollectionStats, CollectionLimits, TokenId, Property,
28 PropertyKeyPermission, TokenData, TokenChild,29 PropertyKeyPermission, TokenData, TokenChild,
29};30};
30use sp_api::{BlockId, BlockT, ProvideRuntimeApi, ApiExt};31use sp_api::{BlockId, BlockT, ProvideRuntimeApi, ApiExt};
31use sp_blockchain::HeaderBackend;32use sp_blockchain::HeaderBackend;
32use up_rpc::UniqueApi as UniqueRuntimeApi;33use up_rpc::UniqueApi as UniqueRuntimeApi;
34use app_promotion_rpc::AppPromotionApi as AppPromotionRuntimeApi;
3335
34// RMRK36// RMRK
35use rmrk_rpc::RmrkApi as RmrkRuntimeApi;37use rmrk_rpc::RmrkApi as RmrkRuntimeApi;
36use up_data_structs::{38use up_data_structs::{
37 RmrkCollectionId, RmrkNftId, RmrkBaseId, RmrkNftChild, RmrkThemeName, RmrkResourceId,39 RmrkCollectionId, RmrkNftId, RmrkBaseId, RmrkNftChild, RmrkThemeName, RmrkResourceId,
38};40};
3941
42pub use app_promotion_unique_rpc::AppPromotionApiServer;
40pub use rmrk_unique_rpc::RmrkApiServer;43pub use rmrk_unique_rpc::RmrkApiServer;
4144
42#[rpc(server)]45#[rpc(server)]
245 ) -> Result<Option<String>>;248 ) -> Result<Option<String>>;
246}249}
250
251mod app_promotion_unique_rpc {
252 use super::*;
253
254 #[rpc(server)]
255 #[async_trait]
256 pub trait AppPromotionApi<BlockHash, BlockNumber, CrossAccountId, AccountId> {
257 /// Returns the total amount of staked tokens.
258 #[method(name = "appPromotion_totalStaked")]
259 fn total_staked(
260 &self,
261 staker: Option<CrossAccountId>,
262 at: Option<BlockHash>,
263 ) -> Result<String>;
264
265 ///Returns the total amount of staked tokens per block when staked.
266 #[method(name = "appPromotion_totalStakedPerBlock")]
267 fn total_staked_per_block(
268 &self,
269 staker: CrossAccountId,
270 at: Option<BlockHash>,
271 ) -> Result<Vec<(BlockNumber, String)>>;
272
273 /// Returns the total amount of tokens pending withdrawal from staking.
274 #[method(name = "appPromotion_pendingUnstake")]
275 fn pending_unstake(
276 &self,
277 staker: Option<CrossAccountId>,
278 at: Option<BlockHash>,
279 ) -> Result<String>;
280
281 /// Returns the total amount of tokens pending withdrawal from staking per block.
282 #[method(name = "appPromotion_pendingUnstakePerBlock")]
283 fn pending_unstake_per_block(
284 &self,
285 staker: CrossAccountId,
286 at: Option<BlockHash>,
287 ) -> Result<Vec<(BlockNumber, String)>>;
288 }
289}
247290
248mod rmrk_unique_rpc {291mod rmrk_unique_rpc {
249 use super::*;292 use super::*;
367 }410 }
368}411}
369412
370pub struct Unique<C, P> {413macro_rules! define_struct_for_server_api {
371 client: Arc<C>,414 ($name:ident) => {
372 _marker: std::marker::PhantomData<P>,415 pub struct $name<C, P> {
373}416 client: Arc<C>,
417 _marker: std::marker::PhantomData<P>,
418 }
374419
375impl<C, P> Unique<C, P> {420 impl<C, P> $name<C, P> {
376 pub fn new(client: Arc<C>) -> Self {421 pub fn new(client: Arc<C>) -> Self {
377 Self {422 Self {
378 client,423 client,
379 _marker: Default::default(),424 _marker: Default::default(),
380 }425 }
381 }426 }
382}427 }
383428 };
384pub struct Rmrk<C, P> {429}
385 client: Arc<C>,430
386 _marker: std::marker::PhantomData<P>,431define_struct_for_server_api!(Unique);
387}432define_struct_for_server_api!(AppPromotion);
388
389impl<C, P> Rmrk<C, P> {433define_struct_for_server_api!(Rmrk);
390 pub fn new(client: Arc<C>) -> Self {
391 Self {
392 client,
393 _marker: Default::default(),
394 }
395 }
396}
397434
398macro_rules! pass_method {435macro_rules! pass_method {
399 (436 (
440 };477 };
441}478}
479
480macro_rules! app_promotion_api {
481 () => {
482 dyn AppPromotionRuntimeApi<Block, BlockNumber, CrossAccountId, AccountId>
483 };
484}
442485
443macro_rules! rmrk_api {486macro_rules! rmrk_api {
444 () => {487 () => {
522 pass_method!(token_owners(collection: CollectionId, token: TokenId) -> Vec<CrossAccountId>, unique_api);565 pass_method!(token_owners(collection: CollectionId, token: TokenId) -> Vec<CrossAccountId>, unique_api);
523}566}
567
568impl<C, Block, BlockNumber, CrossAccountId, AccountId>
569 app_promotion_unique_rpc::AppPromotionApiServer<
570 <Block as BlockT>::Hash,
571 BlockNumber,
572 CrossAccountId,
573 AccountId,
574 > for AppPromotion<C, Block>
575where
576 Block: BlockT,
577 BlockNumber: Decode + Member + AtLeast32BitUnsigned,
578 AccountId: Decode,
579 C: 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>,
580 C::Api: AppPromotionRuntimeApi<Block, BlockNumber, CrossAccountId, AccountId>,
581 CrossAccountId: pallet_evm::account::CrossAccountId<AccountId>,
582{
583 pass_method!(total_staked(staker: Option<CrossAccountId>) -> String => |v| v.to_string(), app_promotion_api);
584 pass_method!(total_staked_per_block(staker: CrossAccountId) -> Vec<(BlockNumber, String)> =>
585 |v| v
586 .into_iter()
587 .map(|(b, a)| (b, a.to_string()))
588 .collect::<Vec<_>>(), app_promotion_api);
589 pass_method!(pending_unstake(staker: Option<CrossAccountId>) -> String => |v| v.to_string(), app_promotion_api);
590 pass_method!(pending_unstake_per_block(staker: CrossAccountId) -> Vec<(BlockNumber, String)> =>
591 |v| v
592 .into_iter()
593 .map(|(b, a)| (b, a.to_string()))
594 .collect::<Vec<_>>(), app_promotion_api);
595}
524596
525#[allow(deprecated)]597#[allow(deprecated)]
526impl<598impl<
addeddoc/separate_rpc.mddiffbeforeafterboth

no changes

modifiednode/cli/Cargo.tomldiffbeforeafterboth
318pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }318pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }
319319
320unique-rpc = { default-features = false, path = "../rpc" }320unique-rpc = { default-features = false, path = "../rpc" }
321app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false}
321rmrk-rpc = { path = "../../primitives/rmrk-rpc" }322rmrk-rpc = { path = "../../primitives/rmrk-rpc" }
322323
323[features]324[features]
modifiednode/cli/src/service.rsdiffbeforeafterboth
64use fc_mapping_sync::{MappingSyncWorker, SyncStrategy};64use fc_mapping_sync::{MappingSyncWorker, SyncStrategy};
6565
66use up_common::types::opaque::{AuraId, RuntimeInstance, AccountId, Balance, Index, Hash, Block};66use up_common::types::opaque::{
67 AuraId, RuntimeInstance, AccountId, Balance, Index, Hash, Block, BlockNumber,
68};
6769
68// RMRK70// RMRK
362 + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>364 + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
363 + sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>365 + sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>
364 + up_rpc::UniqueApi<Block, Runtime::CrossAccountId, AccountId>366 + up_rpc::UniqueApi<Block, Runtime::CrossAccountId, AccountId>
367 + app_promotion_rpc::AppPromotionApi<Block, BlockNumber, Runtime::CrossAccountId, AccountId>
365 + rmrk_rpc::RmrkApi<368 + rmrk_rpc::RmrkApi<
366 Block,369 Block,
367 AccountId,370 AccountId,
663 + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>666 + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
664 + sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>667 + sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>
665 + up_rpc::UniqueApi<Block, Runtime::CrossAccountId, AccountId>668 + up_rpc::UniqueApi<Block, Runtime::CrossAccountId, AccountId>
669 + app_promotion_rpc::AppPromotionApi<Block, BlockNumber, Runtime::CrossAccountId, AccountId>
666 + rmrk_rpc::RmrkApi<670 + rmrk_rpc::RmrkApi<
667 Block,671 Block,
668 AccountId,672 AccountId,
807 + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>811 + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
808 + sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>812 + sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>
809 + up_rpc::UniqueApi<Block, Runtime::CrossAccountId, AccountId>813 + up_rpc::UniqueApi<Block, Runtime::CrossAccountId, AccountId>
814 + app_promotion_rpc::AppPromotionApi<Block, BlockNumber, Runtime::CrossAccountId, AccountId>
810 + rmrk_rpc::RmrkApi<815 + rmrk_rpc::RmrkApi<
811 Block,816 Block,
812 AccountId,817 AccountId,
modifiednode/rpc/Cargo.tomldiffbeforeafterboth
53pallet-unique = { path = "../../pallets/unique" }53pallet-unique = { path = "../../pallets/unique" }
54uc-rpc = { path = "../../client/rpc" }54uc-rpc = { path = "../../client/rpc" }
55up-rpc = { path = "../../primitives/rpc" }55up-rpc = { path = "../../primitives/rpc" }
56app-promotion-rpc = { path = "../../primitives/app_promotion_rpc"}
56rmrk-rpc = { path = "../../primitives/rmrk-rpc" }57rmrk-rpc = { path = "../../primitives/rmrk-rpc" }
57up-data-structs = { default-features = false, path = "../../primitives/data-structs" }58up-data-structs = { default-features = false, path = "../../primitives/data-structs" }
5859
modifiednode/rpc/src/lib.rsdiffbeforeafterboth
145 C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,145 C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,
146 C::Api: fp_rpc::ConvertTransactionRuntimeApi<Block>,146 C::Api: fp_rpc::ConvertTransactionRuntimeApi<Block>,
147 C::Api: up_rpc::UniqueApi<Block, <R as RuntimeInstance>::CrossAccountId, AccountId>,147 C::Api: up_rpc::UniqueApi<Block, <R as RuntimeInstance>::CrossAccountId, AccountId>,
148 C::Api: app_promotion_rpc::AppPromotionApi<
149 Block,
150 BlockNumber,
151 <R as RuntimeInstance>::CrossAccountId,
152 AccountId,
153 >,
148 C::Api: rmrk_rpc::RmrkApi<154 C::Api: rmrk_rpc::RmrkApi<
149 Block,155 Block,
150 AccountId,156 AccountId,
169 EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer,175 EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer,
170 };176 };
171 use uc_rpc::{UniqueApiServer, Unique};177 use uc_rpc::{UniqueApiServer, Unique};
178 use uc_rpc::{AppPromotionApiServer, AppPromotion};
172179
173 #[cfg(not(feature = "unique-runtime"))]180 #[cfg(not(feature = "unique-runtime"))]
174 use uc_rpc::{RmrkApiServer, Rmrk};181 use uc_rpc::{RmrkApiServer, Rmrk};
227234
228 io.merge(Unique::new(client.clone()).into_rpc())?;235 io.merge(Unique::new(client.clone()).into_rpc())?;
236
237 #[cfg(not(any(feature = "unique-runtime", feature = "quartz-runtime")))]
238 io.merge(AppPromotion::new(client.clone()).into_rpc())?;
229239
230 #[cfg(not(feature = "unique-runtime"))]240 #[cfg(not(feature = "unique-runtime"))]
231 io.merge(Rmrk::new(client.clone()).into_rpc())?;241 io.merge(Rmrk::new(client.clone()).into_rpc())?;
addedpallets/app-promotion/Cargo.tomldiffbeforeafterboth

no changes

addedpallets/app-promotion/src/benchmarking.rsdiffbeforeafterboth

no changes

addedpallets/app-promotion/src/lib.rsdiffbeforeafterboth

no changes

addedpallets/app-promotion/src/types.rsdiffbeforeafterboth

no changes

addedpallets/app-promotion/src/weights.rsdiffbeforeafterboth

no changes

modifiedpallets/common/Cargo.tomldiffbeforeafterboth
40 "up-data-structs/std",40 "up-data-structs/std",
41 "pallet-evm/std",41 "pallet-evm/std",
42]42]
43runtime-benchmarks = ["frame-benchmarking"]43runtime-benchmarks = [
44 "frame-benchmarking/runtime-benchmarks",
45 "up-data-structs/runtime-benchmarks",
46]
4447
modifiedpallets/evm-contract-helpers/Cargo.tomldiffbeforeafterboth
9 "derive",9 "derive",
10] }10] }
11log = { default-features = false, version = "0.4.14" }11log = { default-features = false, version = "0.4.14" }
12ethereum = { version = "0.12.0", default-features = false }
1213
13# Substrate14# Substrate
14frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }15frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
modifiedpallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth
1818
19use core::marker::PhantomData;19use core::marker::PhantomData;
20use evm_coder::{abi::AbiWriter, execution::Result, generate_stubgen, solidity_interface, types::*};20use evm_coder::{
21 abi::AbiWriter, execution::Result, generate_stubgen, solidity_interface, types::*, ToLog,
22};
21use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder, dispatch_to_evm};23use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder, dispatch_to_evm};
22use pallet_evm::{24use pallet_evm::{
33use up_sponsorship::SponsorshipHandler;35use up_sponsorship::SponsorshipHandler;
34use sp_std::vec::Vec;36use sp_std::vec::Vec;
37
38/// Pallet events.
39#[derive(ToLog)]
40pub enum ContractHelpersEvents {
41 /// Contract sponsor was set.
42 ContractSponsorSet {
43 /// Contract address of the affected collection.
44 #[indexed]
45 contract_address: address,
46 /// New sponsor address.
47 sponsor: address,
48 },
49
50 /// New sponsor was confirm.
51 ContractSponsorshipConfirmed {
52 /// Contract address of the affected collection.
53 #[indexed]
54 contract_address: address,
55 /// New sponsor address.
56 sponsor: address,
57 },
58
59 /// Collection sponsor was removed.
60 ContractSponsorRemoved {
61 /// Contract address of the affected collection.
62 #[indexed]
63 contract_address: address,
64 },
65}
3566
36/// See [`ContractHelpersCall`]67/// See [`ContractHelpersCall`]
37pub struct ContractHelpers<T: Config>(SubstrateRecorder<T>);68pub struct ContractHelpers<T: Config>(SubstrateRecorder<T>);
46}77}
4778
48/// @title Magic contract, which allows users to reconfigure other contracts79/// @title Magic contract, which allows users to reconfigure other contracts
49#[solidity_interface(name = ContractHelpers)]80#[solidity_interface(name = ContractHelpers, events(ContractHelpersEvents))]
50impl<T: Config> ContractHelpers<T>81impl<T: Config> ContractHelpers<T>
51where82where
52 T::AccountId: AsRef<[u8; 32]>,83 T::AccountId: AsRef<[u8; 32]>,
91 self.recorder().consume_sload()?;122 self.recorder().consume_sload()?;
92 self.recorder().consume_sstore()?;123 self.recorder().consume_sstore()?;
124
125 let caller = T::CrossAccountId::from_eth(caller);
126
127 Pallet::<T>::ensure_owner(contract_address, *caller.as_eth())
128 .map_err(dispatch_to_evm::<T>)?;
93129
94 Pallet::<T>::self_sponsored_enable(&T::CrossAccountId::from_eth(caller), contract_address)130 Pallet::<T>::force_set_sponsor(
131 contract_address,
132 &T::CrossAccountId::from_eth(contract_address),
133 )
95 .map_err(dispatch_to_evm::<T>)?;134 .map_err(dispatch_to_evm::<T>)?;
96135
modifiedpallets/evm-contract-helpers/src/lib.rsdiffbeforeafterboth
1616
17#![doc = include_str!("../README.md")]17#![doc = include_str!("../README.md")]
18#![cfg_attr(not(feature = "std"), no_std)]18#![cfg_attr(not(feature = "std"), no_std)]
19#![deny(missing_docs)]19#![warn(missing_docs)]
2020
21use codec::{Decode, Encode, MaxEncodedLen};21use codec::{Decode, Encode, MaxEncodedLen};
22pub use pallet::*;22pub use pallet::*;
27#[frame_support::pallet]27#[frame_support::pallet]
28pub mod pallet {28pub mod pallet {
29 pub use super::*;29 pub use super::*;
30 use crate::eth::ContractHelpersEvents;
30 use frame_support::pallet_prelude::*;31 use frame_support::pallet_prelude::*;
31 use pallet_evm_coder_substrate::DispatchResult;32 use pallet_evm_coder_substrate::DispatchResult;
32 use sp_core::H160;33 use sp_core::H160;
33 use pallet_evm::account::CrossAccountId;34 use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};
34 use up_data_structs::SponsorshipState;35 use up_data_structs::SponsorshipState;
36 use evm_coder::ToLog;
3537
36 #[pallet::config]38 #[pallet::config]
37 pub trait Config:39 pub trait Config:
38 frame_system::Config + pallet_evm_coder_substrate::Config + pallet_evm::account::Config40 frame_system::Config + pallet_evm_coder_substrate::Config + pallet_evm::account::Config
39 {41 {
42 /// Overarching event type.
43 type Event: IsType<<Self as frame_system::Config>::Event> + From<Event<Self>>;
44
40 /// Address, under which magic contract will be available45 /// Address, under which magic contract will be available
41 type ContractAddress: Get<H160>;46 type ContractAddress: Get<H160>;
150 QueryKind = ValueQuery,156 QueryKind = ValueQuery,
151 >;157 >;
158
159 #[pallet::event]
160 #[pallet::generate_deposit(pub fn deposit_event)]
161 pub enum Event<T: Config> {
162 /// Contract sponsor was set.
163 ContractSponsorSet(
164 /// Contract address of the affected collection.
165 H160,
166 /// New sponsor address.
167 T::AccountId,
168 ),
169
170 /// New sponsor was confirm.
171 ContractSponsorshipConfirmed(
172 /// Contract address of the affected collection.
173 H160,
174 /// New sponsor address.
175 T::AccountId,
176 ),
177
178 /// Collection sponsor was removed.
179 ContractSponsorRemoved(
180 /// Contract address of the affected collection.
181 H160,
182 ),
183 }
152184
153 impl<T: Config> Pallet<T> {185 impl<T: Config> Pallet<T> {
154 /// Get contract owner.186 /// Get contract owner.
170 SponsorshipState::<T::CrossAccountId>::Unconfirmed(sponsor.clone()),202 SponsorshipState::<T::CrossAccountId>::Unconfirmed(sponsor.clone()),
171 );203 );
204
205 <Pallet<T>>::deposit_event(Event::<T>::ContractSponsorSet(
206 contract,
207 sponsor.as_sub().clone(),
208 ));
209 <PalletEvm<T>>::deposit_log(
210 ContractHelpersEvents::ContractSponsorSet {
211 contract_address: contract,
212 sponsor: *sponsor.as_eth(),
213 }
214 .to_log(contract),
215 );
172 Ok(())216 Ok(())
173 }217 }
174218
175 /// Set `contract` as self sponsored.219 /// TO-DO
176 ///220 ///
177 /// `sender` must be owner of contract.221 ///
178 pub fn self_sponsored_enable(sender: &T::CrossAccountId, contract: H160) -> DispatchResult {222 pub fn force_set_sponsor(
223 contract_address: H160,
224 sponsor: &T::CrossAccountId,
225 ) -> DispatchResult {
179 Pallet::<T>::ensure_owner(contract, *sender.as_eth())?;226 Sponsoring::<T>::insert(
227 contract_address,
228 SponsorshipState::<T::CrossAccountId>::Confirmed(sponsor.clone()),
229 );
230
231 let eth_sponsor = *sponsor.as_eth();
232 let sub_sponsor = sponsor.as_sub().clone();
233
180 Sponsoring::<T>::insert(234 <Pallet<T>>::deposit_event(Event::<T>::ContractSponsorSet(
181 contract,235 contract_address,
182 SponsorshipState::<T::CrossAccountId>::Confirmed(T::CrossAccountId::from_eth(236 sub_sponsor.clone(),
183 contract,
184 )),237 ));
185 );238 <PalletEvm<T>>::deposit_log(
239 ContractHelpersEvents::ContractSponsorSet {
240 contract_address,
241 sponsor: eth_sponsor,
242 }
243 .to_log(contract_address),
244 );
245
246 <Pallet<T>>::deposit_event(Event::<T>::ContractSponsorshipConfirmed(
247 contract_address,
248 sub_sponsor,
249 ));
250 <PalletEvm<T>>::deposit_log(
251 ContractHelpersEvents::ContractSponsorshipConfirmed {
252 contract_address,
253 sponsor: eth_sponsor,
254 }
255 .to_log(contract_address),
256 );
257
186 Ok(())258 Ok(())
187 }259 }
188260
189 /// Remove sponsor for `contract`.261 /// Remove sponsor for `contract`.
190 ///262 ///
191 /// `sender` must be owner of contract.263 /// `sender` must be owner of contract.
192 pub fn remove_sponsor(sender: &T::CrossAccountId, contract: H160) -> DispatchResult {264 pub fn remove_sponsor(
265 sender: &T::CrossAccountId,
266 contract_address: H160,
267 ) -> DispatchResult {
268 Self::ensure_owner(contract_address, *sender.as_eth())?;
269 Self::force_remove_sponsor(contract_address)
270 }
271
272 /// TO-DO
273 ///
274 ///
275 pub fn force_remove_sponsor(contract_address: H160) -> DispatchResult {
193 Pallet::<T>::ensure_owner(contract, *sender.as_eth())?;276 Sponsoring::<T>::remove(contract_address);
277
194 Sponsoring::<T>::remove(contract);278 Self::deposit_event(Event::<T>::ContractSponsorRemoved(contract_address));
279 <PalletEvm<T>>::deposit_log(
280 ContractHelpersEvents::ContractSponsorRemoved { contract_address }
281 .to_log(contract_address),
282 );
283
195 Ok(())284 Ok(())
196 }285 }
197286
198 /// Confirm sponsorship.287 /// Confirm sponsorship.
199 ///288 ///
200 /// `sender` must be same that set via [`set_sponsor`].289 /// `sender` must be same that set via [`set_sponsor`].
201 pub fn confirm_sponsorship(sender: &T::CrossAccountId, contract: H160) -> DispatchResult {290 pub fn confirm_sponsorship(
291 sender: &T::CrossAccountId,
292 contract_address: H160,
293 ) -> DispatchResult {
202 match Sponsoring::<T>::get(contract) {294 match Sponsoring::<T>::get(contract_address) {
203 SponsorshipState::Unconfirmed(sponsor) => {295 SponsorshipState::Unconfirmed(sponsor) => {
204 ensure!(sponsor == *sender, Error::<T>::NoPermission);296 ensure!(sponsor == *sender, Error::<T>::NoPermission);
297 let eth_sponsor = *sponsor.as_eth();
298 let sub_sponsor = sponsor.as_sub().clone();
205 Sponsoring::<T>::insert(299 Sponsoring::<T>::insert(
206 contract,300 contract_address,
207 SponsorshipState::<T::CrossAccountId>::Confirmed(sponsor),301 SponsorshipState::<T::CrossAccountId>::Confirmed(sponsor),
208 );302 );
303
304 <Pallet<T>>::deposit_event(Event::<T>::ContractSponsorshipConfirmed(
305 contract_address,
306 sub_sponsor,
307 ));
308 <PalletEvm<T>>::deposit_log(
309 ContractHelpersEvents::ContractSponsorshipConfirmed {
310 contract_address,
311 sponsor: eth_sponsor,
312 }
313 .to_log(contract_address),
314 );
315
209 Ok(())316 Ok(())
210 }317 }
modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.soldiffbeforeafterboth
21 }21 }
22}22}
23
24/// @dev inlined interface
25contract ContractHelpersEvents {
26 event ContractSponsorSet(address indexed contractAddress, address sponsor);
27 event ContractSponsorshipConfirmed(
28 address indexed contractAddress,
29 address sponsor
30 );
31 event ContractSponsorRemoved(address indexed contractAddress);
32}
2333
24/// @title Magic contract, which allows users to reconfigure other contracts34/// @title Magic contract, which allows users to reconfigure other contracts
25/// @dev the ERC-165 identifier for this interface is 0xd77fab7035/// @dev the ERC-165 identifier for this interface is 0xd77fab70
26contract ContractHelpers is Dummy, ERC165 {36contract ContractHelpers is Dummy, ERC165, ContractHelpersEvents {
27 /// Get user, which deployed specified contract37 /// Get user, which deployed specified contract
28 /// @dev May return zero address in case if contract is deployed38 /// @dev May return zero address in case if contract is deployed
29 /// using uniquenetwork evm-migration pallet, or using other terms not39 /// using uniquenetwork evm-migration pallet, or using other terms not
modifiedpallets/unique/CHANGELOG.mddiffbeforeafterboth
3All notable changes to this project will be documented in this file.3All notable changes to this project will be documented in this file.
44
5<!-- bureaucrate goes here -->5<!-- bureaucrate goes here -->
6
7## [v0.1.4] 2022-09-5
8
9### Added
10
11- Methods `force_set_sponsor` , `force_remove_collection_sponsor` to be able to administer sponsorships with other pallets. Added to implement `AppPromotion` pallet logic.
12
6## [v0.1.3] 2022-08-1613## [v0.1.3] 2022-08-16
714
8### Other changes15### Other changes
916
10- build: Upgrade polkadot to v0.9.27 2c498572636f2b34d53b1c51b7283a761a7dc90a17- build: Upgrade polkadot to v0.9.27 2c498572636f2b34d53b1c51b7283a761a7dc90a
1118
12- build: Upgrade polkadot to v0.9.26 85515e54c4ca1b82a2630034e55dcc804c643bf819- build: Upgrade polkadot to v0.9.26 85515e54c4ca1b82a2630034e55dcc804c643bf8
1320
14- refactor: Remove `#[transactional]` from extrinsics 7fd36cea2f6e00c02c67ccc1de9649ae404efd3121- refactor: Remove `#[transactional]` from extrinsics 7fd36cea2f6e00c02c67ccc1de9649ae404efd31
1522
16Every extrinsic now runs in transaction implicitly, and23Every extrinsic now runs in transaction implicitly, and
17`#[transactional]` on pallet dispatchable is now meaningless24`#[transactional]` on pallet dispatchable is now meaningless
1825
19Upstream-Change: https://github.com/paritytech/substrate/issues/1080626Upstream-Change: https://github.com/paritytech/substrate/issues/10806
2027
21- refactor: Switch to new prefix removal methods 26734e9567589d75cdd99e404eabf11d5a97d97528- refactor: Switch to new prefix removal methods 26734e9567589d75cdd99e404eabf11d5a97d975
2229
23New methods allows to call `remove_prefix` with limit multiple times30New methods allows to call `remove_prefix` with limit multiple times
24in the same block31in the same block
2734
28Upstream-Change: https://github.com/paritytech/substrate/pull/1149035Upstream-Change: https://github.com/paritytech/substrate/pull/11490
2936
30- build: Upgrade polkadot to v0.9.25 cdfb9bdc7b205ff1b5134f034ef9973d769e5e6b37- build: Upgrade polkadot to v0.9.25 cdfb9bdc7b205ff1b5134f034ef9973d769e5e6b
3138
32## [v0.1.1] - 2022-07-2539## [v0.1.1] - 2022-07-25
40
33### Added41### Added
42
34- Method for creating `ERC721Metadata` compatible NFT collection.43- Method for creating `ERC721Metadata` compatible NFT collection.
35- Method for creating `ERC721Metadata` compatible ReFungible collection.44- Method for creating `ERC721Metadata` compatible ReFungible collection.
36- Method for creating ReFungible collection.45- Method for creating ReFungible collection.
3746
modifiedpallets/unique/Cargo.tomldiffbeforeafterboth
9license = 'GPLv3'9license = 'GPLv3'
10name = 'pallet-unique'10name = 'pallet-unique'
11repository = 'https://github.com/UniqueNetwork/unique-chain'11repository = 'https://github.com/UniqueNetwork/unique-chain'
12version = "0.1.3"12version = "0.1.4"
1313
14[package.metadata.docs.rs]14[package.metadata.docs.rs]
15targets = ['x86_64-unknown-linux-gnu']15targets = ['x86_64-unknown-linux-gnu']
modifiedpallets/unique/src/benchmarking.rsdiffbeforeafterboth
46 )?;46 )?;
47 Ok(<pallet_common::CreatedCollectionCount<T>>::get())47 Ok(<pallet_common::CreatedCollectionCount<T>>::get())
48}48}
49fn create_nft_collection<T: Config>(owner: T::AccountId) -> Result<CollectionId, DispatchError> {49pub fn create_nft_collection<T: Config>(
50 owner: T::AccountId,
51) -> Result<CollectionId, DispatchError> {
50 create_collection_helper::<T>(owner, CollectionMode::NFT)52 create_collection_helper::<T>(owner, CollectionMode::NFT)
modifiedpallets/unique/src/lib.rsdiffbeforeafterboth
98pub mod eth;98pub mod eth;
9999
100#[cfg(feature = "runtime-benchmarks")]100#[cfg(feature = "runtime-benchmarks")]
101mod benchmarking;101pub mod benchmarking;
102pub mod weights;102pub mod weights;
103use weights::WeightInfo;103use weights::WeightInfo;
104104
277 {277 {
278 type Error = Error<T>;278 type Error = Error<T>;
279279
280 fn deposit_event() = default;280 pub fn deposit_event() = default;
281281
282 fn on_initialize(_now: T::BlockNumber) -> Weight {282 fn on_initialize(_now: T::BlockNumber) -> Weight {
283 0283 0
1104 }1104 }
1105}1105}
1106
1107impl<T: Config> Pallet<T> {
1108 pub fn force_set_sponsor(sponsor: T::AccountId, collection_id: CollectionId) -> DispatchResult {
1109 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
1110 target_collection.check_is_internal()?;
1111 target_collection.set_sponsor(sponsor.clone())?;
1112
1113 Self::deposit_event(Event::<T>::CollectionSponsorSet(
1114 collection_id,
1115 sponsor.clone(),
1116 ));
1117
1118 ensure!(
1119 target_collection.confirm_sponsorship(&sponsor)?,
1120 Error::<T>::ConfirmUnsetSponsorFail
1121 );
1122
1123 Self::deposit_event(Event::<T>::SponsorshipConfirmed(collection_id, sponsor));
1124
1125 target_collection.save()
1126 }
1127
1128 pub fn force_remove_collection_sponsor(collection_id: CollectionId) -> DispatchResult {
1129 let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
1130 target_collection.check_is_internal()?;
1131 target_collection.sponsorship = SponsorshipState::Disabled;
1132
1133 Self::deposit_event(Event::<T>::CollectionSponsorRemoved(collection_id));
1134
1135 target_collection.save()
1136 }
1137}
11061138
addedprimitives/app_promotion_rpc/CHANGELOG.mddiffbeforeafterboth

no changes

addedprimitives/app_promotion_rpc/Cargo.tomldiffbeforeafterboth

no changes

addedprimitives/app_promotion_rpc/src/lib.rsdiffbeforeafterboth

no changes

modifiedprimitives/common/src/constants.rsdiffbeforeafterboth
22use crate::types::{BlockNumber, Balance};22use crate::types::{BlockNumber, Balance};
2323
24pub const MILLISECS_PER_BLOCK: u64 = 12000;24pub const MILLISECS_PER_BLOCK: u64 = 12000;
25pub const MILLISECS_PER_RELAY_BLOCK: u64 = 6000;
2526
26pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;27pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;
2728
30pub const HOURS: BlockNumber = MINUTES * 60;31pub const HOURS: BlockNumber = MINUTES * 60;
31pub const DAYS: BlockNumber = HOURS * 24;32pub const DAYS: BlockNumber = HOURS * 24;
33
34// These time units are defined in number of relay blocks.
35pub const RELAY_MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_RELAY_BLOCK as BlockNumber);
36pub const RELAY_HOURS: BlockNumber = RELAY_MINUTES * 60;
37pub const RELAY_DAYS: BlockNumber = RELAY_HOURS * 24;
3238
33pub const MICROUNIQUE: Balance = 1_000_000_000_000;39pub const MICROUNIQUE: Balance = 1_000_000_000_000;
34pub const MILLIUNIQUE: Balance = 1_000 * MICROUNIQUE;40pub const MILLIUNIQUE: Balance = 1_000 * MICROUNIQUE;
modifiedprimitives/rpc/src/lib.rsdiffbeforeafterboth
23
23use sp_std::vec::Vec;24use sp_std::vec::Vec;
24use codec::Decode;25use codec::Decode;
25use sp_runtime::DispatchError;26use sp_runtime::{
27 DispatchError,
28 traits::{AtLeast32BitUnsigned, Member},
29};
2630
27type Result<T> = core::result::Result<T, DispatchError>;31type Result<T> = core::result::Result<T, DispatchError>;
2832
modifiedruntime/common/config/ethereum.rsdiffbeforeafterboth
112}112}
113113
114impl pallet_evm_contract_helpers::Config for Runtime {114impl pallet_evm_contract_helpers::Config for Runtime {
115 type Event = Event;
115 type ContractAddress = HelpersContractAddress;116 type ContractAddress = HelpersContractAddress;
116 type DefaultSponsoringRateLimit = DefaultSponsoringRateLimit;117 type DefaultSponsoringRateLimit = DefaultSponsoringRateLimit;
117}118}
addedruntime/common/config/pallets/app_promotion.rsdiffbeforeafterboth

no changes

modifiedruntime/common/config/pallets/mod.rsdiffbeforeafterboth
40#[cfg(feature = "scheduler")]40#[cfg(feature = "scheduler")]
41pub mod scheduler;41pub mod scheduler;
42
43#[cfg(feature = "app-promotion")]
44pub mod app_promotion;
4245
43parameter_types! {46parameter_types! {
44 pub TreasuryAccountId: AccountId = TreasuryModuleId::get().into_account_truncating();47 pub TreasuryAccountId: AccountId = TreasuryModuleId::get().into_account_truncating();
modifiedruntime/common/construct_runtime/mod.rsdiffbeforeafterboth
77 #[runtimes(opal)]77 #[runtimes(opal)]
78 RmrkEquip: pallet_proxy_rmrk_equip::{Pallet, Call, Storage, Event<T>} = 72,78 RmrkEquip: pallet_proxy_rmrk_equip::{Pallet, Call, Storage, Event<T>} = 72,
79
80 #[runtimes(opal)]
81 AppPromotion: pallet_app_promotion::{Pallet, Call, Storage, Event<T>} = 73,
7982
80 // Frontier83 // Frontier
81 EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>} = 100,84 EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>} = 100,
82 Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 101,85 Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 101,
8386
84 EvmCoderSubstrate: pallet_evm_coder_substrate::{Pallet, Storage} = 150,87 EvmCoderSubstrate: pallet_evm_coder_substrate::{Pallet, Storage} = 150,
85 EvmContractHelpers: pallet_evm_contract_helpers::{Pallet, Storage} = 151,88 EvmContractHelpers: pallet_evm_contract_helpers::{Pallet, Storage, Event<T>} = 151,
86 EvmTransactionPayment: pallet_evm_transaction_payment::{Pallet} = 152,89 EvmTransactionPayment: pallet_evm_transaction_payment::{Pallet} = 152,
87 EvmMigration: pallet_evm_migration::{Pallet, Call, Storage} = 153,90 EvmMigration: pallet_evm_migration::{Pallet, Call, Storage} = 153,
88 }91 }
modifiedruntime/common/runtime_apis.rsdiffbeforeafterboth
189 }189 }
190 }190 }
191
192 impl app_promotion_rpc::AppPromotionApi<Block, BlockNumber, CrossAccountId, AccountId> for Runtime {
193 fn total_staked(staker: Option<CrossAccountId>) -> Result<u128, DispatchError> {
194 #[cfg(not(feature = "app-promotion"))]
195 return unsupported!();
196
197 #[cfg(feature = "app-promotion")]
198 return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_total_staked(staker).unwrap_or_default());
199 }
200
201 fn total_staked_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>, DispatchError> {
202 #[cfg(not(feature = "app-promotion"))]
203 return unsupported!();
204
205 #[cfg(feature = "app-promotion")]
206 return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_total_staked_per_block(staker));
207 }
208
209 fn pending_unstake(staker: Option<CrossAccountId>) -> Result<u128, DispatchError> {
210 #[cfg(not(feature = "app-promotion"))]
211 return unsupported!();
212
213 #[cfg(feature = "app-promotion")]
214 return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_pending_unstake(staker));
215 }
216
217 fn pending_unstake_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>, DispatchError> {
218 #[cfg(not(feature = "app-promotion"))]
219 return unsupported!();
220
221 #[cfg(feature = "app-promotion")]
222 return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_pending_unstake_per_block(staker))
223 }
224 }
191225
192 impl rmrk_rpc::RmrkApi<226 impl rmrk_rpc::RmrkApi<
193 Block,227 Block,
638 list_benchmark!(list, extra, pallet_unique, Unique);672 list_benchmark!(list, extra, pallet_unique, Unique);
639 list_benchmark!(list, extra, pallet_structure, Structure);673 list_benchmark!(list, extra, pallet_structure, Structure);
640 list_benchmark!(list, extra, pallet_inflation, Inflation);674 list_benchmark!(list, extra, pallet_inflation, Inflation);
675 list_benchmark!(list, extra, pallet_app_promotion, AppPromotion);
641 list_benchmark!(list, extra, pallet_fungible, Fungible);676 list_benchmark!(list, extra, pallet_fungible, Fungible);
642 list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);677 list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);
643678
693 add_benchmark!(params, batches, pallet_unique, Unique);728 add_benchmark!(params, batches, pallet_unique, Unique);
694 add_benchmark!(params, batches, pallet_structure, Structure);729 add_benchmark!(params, batches, pallet_structure, Structure);
695 add_benchmark!(params, batches, pallet_inflation, Inflation);730 add_benchmark!(params, batches, pallet_inflation, Inflation);
731 add_benchmark!(params, batches, pallet_app_promotion, AppPromotion);
696 add_benchmark!(params, batches, pallet_fungible, Fungible);732 add_benchmark!(params, batches, pallet_fungible, Fungible);
697 add_benchmark!(params, batches, pallet_nonfungible, Nonfungible);733 add_benchmark!(params, batches, pallet_nonfungible, Nonfungible);
698734
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
37 'pallet-proxy-rmrk-equip/runtime-benchmarks',37 'pallet-proxy-rmrk-equip/runtime-benchmarks',
38 'pallet-unique/runtime-benchmarks',38 'pallet-unique/runtime-benchmarks',
39 'pallet-inflation/runtime-benchmarks',39 'pallet-inflation/runtime-benchmarks',
40 'pallet-app-promotion/runtime-benchmarks',
40 'pallet-unique-scheduler/runtime-benchmarks',41 'pallet-unique-scheduler/runtime-benchmarks',
41 'pallet-xcm/runtime-benchmarks',42 'pallet-xcm/runtime-benchmarks',
42 'sp-runtime/runtime-benchmarks',43 'sp-runtime/runtime-benchmarks',
82 'pallet-base-fee/std',83 'pallet-base-fee/std',
83 'fp-rpc/std',84 'fp-rpc/std',
84 'up-rpc/std',85 'up-rpc/std',
86 'app-promotion-rpc/std',
85 'fp-evm-mapping/std',87 'fp-evm-mapping/std',
86 'fp-self-contained/std',88 'fp-self-contained/std',
87 'parachain-info/std',89 'parachain-info/std',
88 'serde',90 'serde',
89 'pallet-inflation/std',91 'pallet-inflation/std',
90 'pallet-configuration/std',92 'pallet-configuration/std',
93 'pallet-app-promotion/std',
91 'pallet-common/std',94 'pallet-common/std',
92 'pallet-structure/std',95 'pallet-structure/std',
93 'pallet-fungible/std',96 'pallet-fungible/std',
122 "orml-vesting/std",125 "orml-vesting/std",
123]126]
124limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']127limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
125opal-runtime = ['refungible', 'scheduler', 'rmrk']128opal-runtime = ['refungible', 'scheduler', 'rmrk', 'app-promotion']
126129
127refungible = []130refungible = []
128scheduler = []131scheduler = []
129rmrk = []132rmrk = []
133app-promotion = []
130134
131################################################################################135################################################################################
132# Substrate Dependencies136# Substrate Dependencies
411derivative = "2.2.0"415derivative = "2.2.0"
412pallet-unique = { path = '../../pallets/unique', default-features = false }416pallet-unique = { path = '../../pallets/unique', default-features = false }
413up-rpc = { path = "../../primitives/rpc", default-features = false }417up-rpc = { path = "../../primitives/rpc", default-features = false }
418app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false}
414rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }419rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }
415fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }420fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }
416pallet-inflation = { path = '../../pallets/inflation', default-features = false }421pallet-inflation = { path = '../../pallets/inflation', default-features = false }
422pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }
417up-data-structs = { path = '../../primitives/data-structs', default-features = false }423up-data-structs = { path = '../../primitives/data-structs', default-features = false }
418pallet-configuration = { default-features = false, path = "../../pallets/configuration" }424pallet-configuration = { default-features = false, path = "../../pallets/configuration" }
419pallet-common = { default-features = false, path = "../../pallets/common" }425pallet-common = { default-features = false, path = "../../pallets/common" }
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
82 'pallet-base-fee/std',82 'pallet-base-fee/std',
83 'fp-rpc/std',83 'fp-rpc/std',
84 'up-rpc/std',84 'up-rpc/std',
85 'app-promotion-rpc/std',
85 'fp-evm-mapping/std',86 'fp-evm-mapping/std',
86 'fp-self-contained/std',87 'fp-self-contained/std',
87 'parachain-info/std',88 'parachain-info/std',
416derivative = "2.2.0"417derivative = "2.2.0"
417pallet-unique = { path = '../../pallets/unique', default-features = false }418pallet-unique = { path = '../../pallets/unique', default-features = false }
418up-rpc = { path = "../../primitives/rpc", default-features = false }419up-rpc = { path = "../../primitives/rpc", default-features = false }
420app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false}
419fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }421fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }
420pallet-inflation = { path = '../../pallets/inflation', default-features = false }422pallet-inflation = { path = '../../pallets/inflation', default-features = false }
423pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }
421up-data-structs = { path = '../../primitives/data-structs', default-features = false }424up-data-structs = { path = '../../primitives/data-structs', default-features = false }
422pallet-configuration = { default-features = false, path = "../../pallets/configuration" }425pallet-configuration = { default-features = false, path = "../../pallets/configuration" }
423pallet-common = { default-features = false, path = "../../pallets/common" }426pallet-common = { default-features = false, path = "../../pallets/common" }
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
83 'pallet-base-fee/std',83 'pallet-base-fee/std',
84 'fp-rpc/std',84 'fp-rpc/std',
85 'up-rpc/std',85 'up-rpc/std',
86 'app-promotion-rpc/std',
86 'fp-evm-mapping/std',87 'fp-evm-mapping/std',
87 'fp-self-contained/std',88 'fp-self-contained/std',
88 'parachain-info/std',89 'parachain-info/std',
409derivative = "2.2.0"410derivative = "2.2.0"
410pallet-unique = { path = '../../pallets/unique', default-features = false }411pallet-unique = { path = '../../pallets/unique', default-features = false }
411up-rpc = { path = "../../primitives/rpc", default-features = false }412up-rpc = { path = "../../primitives/rpc", default-features = false }
413app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false}
412rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }414rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }
413pallet-inflation = { path = '../../pallets/inflation', default-features = false }415pallet-inflation = { path = '../../pallets/inflation', default-features = false }
416pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }
414up-data-structs = { path = '../../primitives/data-structs', default-features = false }417up-data-structs = { path = '../../primitives/data-structs', default-features = false }
415pallet-configuration = { default-features = false, path = "../../pallets/configuration" }418pallet-configuration = { default-features = false, path = "../../pallets/configuration" }
416pallet-common = { default-features = false, path = "../../pallets/common" }419pallet-common = { default-features = false, path = "../../pallets/common" }
modifiedtests/package.jsondiffbeforeafterboth
30 "testEth": "mocha --timeout 9999999 -r ts-node/register './**/eth/**/*.test.ts'",30 "testEth": "mocha --timeout 9999999 -r ts-node/register './**/eth/**/*.test.ts'",
31 "testEthMarketplace": "mocha --timeout 9999999 -r ts-node/register './**/eth/marketplace/**/*.test.ts'",31 "testEthMarketplace": "mocha --timeout 9999999 -r ts-node/register './**/eth/marketplace/**/*.test.ts'",
32 "testEthNesting": "mocha --timeout 9999999 -r ts-node/register './**/eth/nesting/**/*.test.ts'",32 "testEthNesting": "mocha --timeout 9999999 -r ts-node/register './**/eth/nesting/**/*.test.ts'",
33 "testEthPayable": "mocha --timeout 9999999 -r ts-node/register './**/eth/payable.test.ts'",
33 "load": "mocha --timeout 9999999 -r ts-node/register './**/*.load.ts'",34 "load": "mocha --timeout 9999999 -r ts-node/register './**/*.load.ts'",
34 "loadTransfer": "ts-node src/transfer.nload.ts",35 "loadTransfer": "ts-node src/transfer.nload.ts",
35 "testCollision": "mocha --timeout 9999999 -r ts-node/register ./src/collision-tests/*.test.ts",36 "testCollision": "mocha --timeout 9999999 -r ts-node/register ./src/collision-tests/*.test.ts",
64 "testBurnItem": "mocha --timeout 9999999 -r ts-node/register ./**/burnItem.test.ts",65 "testBurnItem": "mocha --timeout 9999999 -r ts-node/register ./**/burnItem.test.ts",
65 "testAdminTransferAndBurn": "mocha --timeout 9999999 -r ts-node/register ./**/adminTransferAndBurn.test.ts",66 "testAdminTransferAndBurn": "mocha --timeout 9999999 -r ts-node/register ./**/adminTransferAndBurn.test.ts",
66 "testSetMintPermission": "mocha --timeout 9999999 -r ts-node/register ./**/setMintPermission.test.ts",67 "testSetMintPermission": "mocha --timeout 9999999 -r ts-node/register ./**/setMintPermission.test.ts",
68 "testSetPublicAccessMode": "mocha --timeout 9999999 -r ts-node/register ./**/setPublicAccessMode.test.ts",
67 "testCreditFeesToTreasury": "mocha --timeout 9999999 -r ts-node/register ./**/creditFeesToTreasury.test.ts",69 "testCreditFeesToTreasury": "mocha --timeout 9999999 -r ts-node/register ./**/creditFeesToTreasury.test.ts",
68 "testContractSponsoring": "mocha --timeout 9999999 -r ts-node/register ./**/contractSponsoring.test.ts",70 "testContractSponsoring": "mocha --timeout 9999999 -r ts-node/register ./**/contractSponsoring.test.ts",
69 "testEnableContractSponsoring": "mocha --timeout 9999999 -r ts-node/register ./**/enableContractSponsoring.test.ts",71 "testEnableContractSponsoring": "mocha --timeout 9999999 -r ts-node/register ./**/enableContractSponsoring.test.ts",
70 "testRemoveFromContractAllowList": "mocha --timeout 9999999 -r ts-node/register ./**/removeFromContractAllowList.test.ts",72 "testRemoveFromContractAllowList": "mocha --timeout 9999999 -r ts-node/register ./**/removeFromContractAllowList.test.ts",
71 "testSetContractSponsoringRateLimit": "mocha --timeout 9999999 -r ts-node/register ./**/setContractSponsoringRateLimit.test.ts",73 "testSetContractSponsoringRateLimit": "mocha --timeout 9999999 -r ts-node/register ./**/setContractSponsoringRateLimit.test.ts",
72 "testSetOffchainSchema": "mocha --timeout 9999999 -r ts-node/register ./**/setOffchainSchema.test.ts",74 "testSetOffchainSchema": "mocha --timeout 9999999 -r ts-node/register ./**/setOffchainSchema.test.ts",
73 "testOverflow": "mocha --timeout 9999999 -r ts-node/register ./**/overflow.test.ts",75 "testOverflow": "mocha --timeout 9999999 -r ts-node/register ./**/overflow.test.ts",
74 "testSetVariableMetadataSponsoringRateLimit": "mocha --timeout 9999999 -r ts-node/register ./**/setVariableMetadataSponsoringRateLimit.test.ts",
75 "testInflation": "mocha --timeout 9999999 -r ts-node/register ./**/inflation.test.ts",76 "testInflation": "mocha --timeout 9999999 -r ts-node/register ./**/inflation.test.ts",
76 "testScheduler": "mocha --timeout 9999999 -r ts-node/register ./**/scheduler.test.ts",77 "testScheduler": "mocha --timeout 9999999 -r ts-node/register ./**/scheduler.test.ts",
77 "testSchedulingEVM": "mocha --timeout 9999999 -r ts-node/register ./**/eth/scheduling.test.ts",78 "testSchedulingEVM": "mocha --timeout 9999999 -r ts-node/register ./**/eth/scheduling.test.ts",
80 "testBlockProduction": "mocha --timeout 9999999 -r ts-node/register ./**/block-production.test.ts",81 "testBlockProduction": "mocha --timeout 9999999 -r ts-node/register ./**/block-production.test.ts",
81 "testEnableDisableTransfers": "mocha --timeout 9999999 -r ts-node/register ./**/enableDisableTransfer.test.ts",82 "testEnableDisableTransfers": "mocha --timeout 9999999 -r ts-node/register ./**/enableDisableTransfer.test.ts",
82 "testLimits": "mocha --timeout 9999999 -r ts-node/register ./**/limits.test.ts",83 "testLimits": "mocha --timeout 9999999 -r ts-node/register ./**/limits.test.ts",
83 "testEthCreateCollection": "mocha --timeout 9999999 -r ts-node/register ./**/eth/createCollection.test.ts",84 "testEthCreateNFTCollection": "mocha --timeout 9999999 -r ts-node/register ./**/eth/createNFTCollection.test.ts",
85 "testEthCreateRFTCollection": "mocha --timeout 9999999 -r ts-node/register ./**/eth/createRFTCollection.test.ts",
84 "testRFT": "mocha --timeout 9999999 -r ts-node/register ./**/refungible.test.ts",86 "testRFT": "mocha --timeout 9999999 -r ts-node/register ./**/refungible.test.ts",
85 "testFT": "mocha --timeout 9999999 -r ts-node/register ./**/fungible.test.ts",87 "testFT": "mocha --timeout 9999999 -r ts-node/register ./**/fungible.test.ts",
86 "testRPC": "mocha --timeout 9999999 -r ts-node/register ./**/rpc.test.ts",88 "testRPC": "mocha --timeout 9999999 -r ts-node/register ./**/rpc.test.ts",
89 "testPromotion": "mocha --timeout 9999999 -r ts-node/register ./**/app-promotion.test.ts",
87 "polkadot-types-fetch-metadata": "curl -H 'Content-Type: application/json' -d '{\"id\":\"1\", \"jsonrpc\":\"2.0\", \"method\": \"state_getMetadata\", \"params\":[]}' http://localhost:9933 > src/interfaces/metadata.json",90 "polkadot-types-fetch-metadata": "curl -H 'Content-Type: application/json' -d '{\"id\":\"1\", \"jsonrpc\":\"2.0\", \"method\": \"state_getMetadata\", \"params\":[]}' http://localhost:9933 > src/interfaces/metadata.json",
88 "polkadot-types-from-defs": "ts-node ./node_modules/.bin/polkadot-types-from-defs --endpoint src/interfaces/metadata.json --input src/interfaces/ --package .",91 "polkadot-types-from-defs": "ts-node ./node_modules/.bin/polkadot-types-from-defs --endpoint src/interfaces/metadata.json --input src/interfaces/ --package .",
89 "polkadot-types-from-chain": "ts-node ./node_modules/.bin/polkadot-types-from-chain --endpoint src/interfaces/metadata.json --output src/interfaces/ --package .",92 "polkadot-types-from-chain": "ts-node ./node_modules/.bin/polkadot-types-from-chain --endpoint src/interfaces/metadata.json --output src/interfaces/ --package .",
addedtests/src/app-promotion.test.tsdiffbeforeafterboth

no changes

modifiedtests/src/approve.test.tsdiffbeforeafterboth
7979
80 it('[nft] Remove approval by using 0 amount', async () => {80 it('[nft] Remove approval by using 0 amount', async () => {
81 await usingPlaygrounds(async (helper) => {81 await usingPlaygrounds(async (helper) => {
82 const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});82 const collection = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
83 const collectionId = collection.collectionId;
83 const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: alice.address});84 const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: alice.address});
84 await helper.nft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address});85 await helper.nft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address});
85 expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.true;86 expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.true;
86 await helper.nft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, undefined, 0n);87 await helper.api?.tx.unique.approve({Substrate: bob.address}, collectionId, tokenId, 0).signAndSend(alice);
87 expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.false;88 expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.false;
88 });89 });
89 });90 });
97 const amountBefore = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});98 const amountBefore = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
98 expect(amountBefore).to.be.equal(BigInt(1));99 expect(amountBefore).to.be.equal(BigInt(1));
99100
100 await helper.ft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, undefined, 0n);101 await helper.ft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, 0n);
101 const amountAfter = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});102 const amountAfter = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
102 expect(amountAfter).to.be.equal(BigInt(0));103 expect(amountAfter).to.be.equal(BigInt(0));
103 });104 });
111 const amountBefore = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});112 const amountBefore = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
112 expect(amountBefore).to.be.equal(BigInt(100));113 expect(amountBefore).to.be.equal(BigInt(100));
113114
114 await helper.rft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, undefined, 0n);115 await helper.rft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, 0n);
115 const amountAfter = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});116 const amountAfter = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
116 expect(amountAfter).to.be.equal(BigInt(0));117 expect(amountAfter).to.be.equal(BigInt(0));
117 });118 });
289 const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);290 const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
290 await helper.ft.mintTokens(alice, collectionId, alice.address, 10n);291 await helper.ft.mintTokens(alice, collectionId, alice.address, 10n);
291 const tokenId = await helper.ft.getLastTokenId(collectionId);292 const tokenId = await helper.ft.getLastTokenId(collectionId);
292 await helper.ft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, undefined, 10n);293 await helper.ft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, 10n);
293294
294 const charlieBefore = await helper.ft.getBalance(collectionId, {Substrate: charlie.address});295 const charlieBefore = await helper.ft.getBalance(collectionId, {Substrate: charlie.address});
295 await helper.ft.transferTokenFrom(bob, collectionId, tokenId, {Substrate: alice.address}, {Substrate: charlie.address}, 2n);296 await helper.ft.transferTokenFrom(bob, collectionId, tokenId, {Substrate: alice.address}, {Substrate: charlie.address}, 2n);
321 const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: alice.address});322 const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: alice.address});
322 await helper.nft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address});323 await helper.nft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address});
323 expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.true;324 expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.true;
324 await helper.nft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, undefined, 0n);325 await helper.api?.tx.unique.approve({Substrate: bob.address}, collectionId, tokenId, 0).signAndSend(alice);
325 expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.false;326 expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: bob.address})).to.be.false;
326 const transferTokenFromTx = async () => helper.nft.transferTokenFrom(bob, collectionId, tokenId, {Substrate: bob.address}, {Substrate: bob.address});327 const transferTokenFromTx = async () => helper.nft.transferTokenFrom(bob, collectionId, tokenId, {Substrate: bob.address}, {Substrate: bob.address});
327 await expect(transferTokenFromTx()).to.be.rejected;328 await expect(transferTokenFromTx()).to.be.rejected;
337 const amountBefore = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});338 const amountBefore = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
338 expect(amountBefore).to.be.equal(BigInt(1));339 expect(amountBefore).to.be.equal(BigInt(1));
339340
340 await helper.ft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, undefined, 0n);341 await helper.ft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, 0n);
341 const amountAfter = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});342 const amountAfter = await helper.ft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
342 expect(amountAfter).to.be.equal(BigInt(0));343 expect(amountAfter).to.be.equal(BigInt(0));
343344
354 const amountBefore = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});355 const amountBefore = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
355 expect(amountBefore).to.be.equal(BigInt(100));356 expect(amountBefore).to.be.equal(BigInt(100));
356357
357 await helper.rft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, undefined, 0n);358 await helper.rft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, 0n);
358 const amountAfter = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});359 const amountAfter = await helper.rft.getTokenApprovedPieces(collectionId, tokenId, {Substrate: bob.address}, {Substrate: alice.address});
359 expect(amountAfter).to.be.equal(BigInt(0));360 expect(amountAfter).to.be.equal(BigInt(0));
360361
379 await usingPlaygrounds(async (helper) => {380 await usingPlaygrounds(async (helper) => {
380 const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});381 const {collectionId} = await helper.nft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
381 const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: bob.address});382 const {tokenId} = await helper.nft.mintToken(alice, {collectionId: collectionId, owner: bob.address});
382 const approveTx = async () => helper.nft.approveToken(bob, collectionId, tokenId, {Substrate: charlie.address}, undefined, 2n);383 await helper.api?.tx.unique.approve({Substrate: charlie.address}, collectionId, tokenId, 2).signAndSend(bob);
383 await expect(approveTx()).to.be.rejected;
384 expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: charlie.address})).to.be.false;384 expect(await helper.nft.isTokenApproved(collectionId, tokenId, {Substrate: charlie.address})).to.be.false;
385 });385 });
386 });386 });
390 const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);390 const {collectionId} = await helper.ft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'}, 0);
391 await helper.ft.mintTokens(alice, collectionId, alice.address, 10n);391 await helper.ft.mintTokens(alice, collectionId, alice.address, 10n);
392 const tokenId = await helper.ft.getLastTokenId(collectionId);392 const tokenId = await helper.ft.getLastTokenId(collectionId);
393 const approveTx = async () => helper.ft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, undefined, 11n);393 const approveTx = async () => helper.ft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, 11n);
394 await expect(approveTx()).to.be.rejected;394 await expect(approveTx()).to.be.rejected;
395 });395 });
396 });396 });
399 await usingPlaygrounds(async (helper) => {399 await usingPlaygrounds(async (helper) => {
400 const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});400 const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
401 const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: alice.address, pieces: 100n});401 const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: alice.address, pieces: 100n});
402 const approveTx = async () => helper.rft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, undefined, 101n);402 const approveTx = async () => helper.rft.approveToken(alice, collectionId, tokenId, {Substrate: bob.address}, 101n);
403 await expect(approveTx()).to.be.rejected;403 await expect(approveTx()).to.be.rejected;
404 });404 });
405 });405 });
658 const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});658 const {collectionId} = await helper.rft.mintCollection(alice, {name: 'col', description: 'descr', tokenPrefix: 'COL'});
659 const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: alice.address, pieces: 100n});659 const {tokenId} = await helper.rft.mintToken(alice, {collectionId: collectionId, owner: alice.address, pieces: 100n});
660 await helper.rft.transferToken(alice, collectionId, tokenId, {Substrate: bob.address}, 100n);660 await helper.rft.transferToken(alice, collectionId, tokenId, {Substrate: bob.address}, 100n);
661 await helper.rft.approveToken(bob, collectionId, tokenId, {Substrate: alice.address}, undefined, 100n);661 await helper.rft.approveToken(bob, collectionId, tokenId, {Substrate: alice.address}, 100n);
662662
663 const approveTx = async () => helper.rft.approveToken(bob, collectionId, tokenId, {Substrate: alice.address}, undefined, 101n);663 const approveTx = async () => helper.rft.approveToken(bob, collectionId, tokenId, {Substrate: alice.address}, 101n);
664 await expect(approveTx()).to.be.rejected;664 await expect(approveTx()).to.be.rejected;
665 });665 });
666 });666 });
672 const tokenId = await helper.ft.getLastTokenId(collectionId);672 const tokenId = await helper.ft.getLastTokenId(collectionId);
673673
674 await helper.ft.transferToken(alice, collectionId, tokenId, {Substrate: bob.address}, 10n);674 await helper.ft.transferToken(alice, collectionId, tokenId, {Substrate: bob.address}, 10n);
675 await helper.ft.approveToken(bob, collectionId, tokenId, {Substrate: alice.address}, undefined, 10n);675 await helper.ft.approveToken(bob, collectionId, tokenId, {Substrate: alice.address}, 10n);
676 const approveTx = async () => helper.ft.approveToken(bob, collectionId, tokenId, {Substrate: alice.address}, undefined, 11n);676 const approveTx = async () => helper.ft.approveToken(bob, collectionId, tokenId, {Substrate: alice.address}, 11n);
677 await expect(approveTx()).to.be.rejected;677 await expect(approveTx()).to.be.rejected;
678 });678 });
679 });679 });
modifiedtests/src/eth/api/ContractHelpers.soldiffbeforeafterboth
12 function supportsInterface(bytes4 interfaceID) external view returns (bool);12 function supportsInterface(bytes4 interfaceID) external view returns (bool);
13}13}
14
15/// @dev inlined interface
16interface ContractHelpersEvents {
17 event ContractSponsorSet(address indexed contractAddress, address sponsor);
18 event ContractSponsorshipConfirmed(
19 address indexed contractAddress,
20 address sponsor
21 );
22 event ContractSponsorRemoved(address indexed contractAddress);
23}
1424
15/// @title Magic contract, which allows users to reconfigure other contracts25/// @title Magic contract, which allows users to reconfigure other contracts
16/// @dev the ERC-165 identifier for this interface is 0xd77fab7026/// @dev the ERC-165 identifier for this interface is 0xd77fab70
17interface ContractHelpers is Dummy, ERC165 {27interface ContractHelpers is Dummy, ERC165, ContractHelpersEvents {
18 /// Get user, which deployed specified contract28 /// Get user, which deployed specified contract
19 /// @dev May return zero address in case if contract is deployed29 /// @dev May return zero address in case if contract is deployed
20 /// using uniquenetwork evm-migration pallet, or using other terms not30 /// using uniquenetwork evm-migration pallet, or using other terms not
modifiedtests/src/eth/collectionAdmin.test.tsdiffbeforeafterboth
24 getCollectionAddressFromResult, 24 getCollectionAddressFromResult,
25 itWeb3,25 itWeb3,
26 recordEthFee,26 recordEthFee,
27 subToEth,
28} from './util/helpers';27} from './util/helpers';
2928
30describe('Add collection admins', () => {29describe('Add collection admins', () => {
37 .send();36 .send();
38 const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);37 const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
3938
40 const newAdmin = await createEthAccount(web3);39 const newAdmin = createEthAccount(web3);
41 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);40 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
42 await collectionEvm.methods.addCollectionAdmin(newAdmin).send();41 await collectionEvm.methods.addCollectionAdmin(newAdmin).send();
43 const adminList = await api.rpc.unique.adminlist(collectionId);42 const adminList = await api.rpc.unique.adminlist(collectionId);
92 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);91 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
93 await collectionEvm.methods.addCollectionAdmin(admin).send();92 await collectionEvm.methods.addCollectionAdmin(admin).send();
94 93
95 const user = await createEthAccount(web3);94 const user = createEthAccount(web3);
96 await expect(collectionEvm.methods.addCollectionAdmin(user).call({from: admin}))95 await expect(collectionEvm.methods.addCollectionAdmin(user).call({from: admin}))
97 .to.be.rejectedWith('NoPermission');96 .to.be.rejectedWith('NoPermission');
9897
114 const notAdmin = await createEthAccountWithBalance(api, web3, privateKeyWrapper);113 const notAdmin = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
115 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);114 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
116 115
117 const user = await createEthAccount(web3);116 const user = createEthAccount(web3);
118 await expect(collectionEvm.methods.addCollectionAdmin(user).call({from: notAdmin}))117 await expect(collectionEvm.methods.addCollectionAdmin(user).call({from: notAdmin}))
119 .to.be.rejectedWith('NoPermission');118 .to.be.rejectedWith('NoPermission');
120119
175 .send();174 .send();
176 const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);175 const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
177176
178 const newAdmin = await createEthAccount(web3);177 const newAdmin = createEthAccount(web3);
179 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);178 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
180 await collectionEvm.methods.addCollectionAdmin(newAdmin).send();179 await collectionEvm.methods.addCollectionAdmin(newAdmin).send();
181 {180 {
226225
227 const admin0 = await createEthAccountWithBalance(api, web3, privateKeyWrapper);226 const admin0 = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
228 await collectionEvm.methods.addCollectionAdmin(admin0).send();227 await collectionEvm.methods.addCollectionAdmin(admin0).send();
229 const admin1 = await createEthAccount(web3);228 const admin1 = createEthAccount(web3);
230 await collectionEvm.methods.addCollectionAdmin(admin1).send();229 await collectionEvm.methods.addCollectionAdmin(admin1).send();
231230
232 await expect(collectionEvm.methods.removeCollectionAdmin(admin1).call({from: admin0}))231 await expect(collectionEvm.methods.removeCollectionAdmin(admin1).call({from: admin0}))
253252
254 const admin = await createEthAccountWithBalance(api, web3, privateKeyWrapper);253 const admin = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
255 await collectionEvm.methods.addCollectionAdmin(admin).send();254 await collectionEvm.methods.addCollectionAdmin(admin).send();
256 const notAdmin = await createEthAccount(web3);255 const notAdmin = createEthAccount(web3);
257256
258 await expect(collectionEvm.methods.removeCollectionAdmin(admin).call({from: notAdmin}))257 await expect(collectionEvm.methods.removeCollectionAdmin(admin).call({from: notAdmin}))
259 .to.be.rejectedWith('NoPermission');258 .to.be.rejectedWith('NoPermission');
modifiedtests/src/eth/collectionSponsoring.test.tsdiffbeforeafterboth
1import {addToAllowListExpectSuccess, bigIntToSub, confirmSponsorshipExpectSuccess, createCollectionExpectSuccess, enablePublicMintingExpectSuccess, getDetailedCollectionInfo, setCollectionSponsorExpectSuccess} from '../util/helpers';1import {addToAllowListExpectSuccess, bigIntToSub, confirmSponsorshipExpectSuccess, createCollectionExpectSuccess, enablePublicMintingExpectSuccess, getDetailedCollectionInfo, setCollectionSponsorExpectSuccess} from '../util/helpers';
2import {itWeb3, createEthAccount, collectionIdToAddress, GAS_ARGS, normalizeEvents, createEthAccountWithBalance, evmCollectionHelpers, getCollectionAddressFromResult, evmCollection, ethBalanceViaSub, subToEth} from './util/helpers';2import {itWeb3, createEthAccount, collectionIdToAddress, GAS_ARGS, normalizeEvents, createEthAccountWithBalance, evmCollectionHelpers, getCollectionAddressFromResult, evmCollection, ethBalanceViaSub} from './util/helpers';
3import nonFungibleAbi from './nonFungibleAbi.json';3import nonFungibleAbi from './nonFungibleAbi.json';
4import {expect} from 'chai';4import {expect} from 'chai';
5import {evmToAddress} from '@polkadot/util-crypto';5import {evmToAddress} from '@polkadot/util-crypto';
modifiedtests/src/eth/contractSponsoring.test.tsdiffbeforeafterboth
15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
1616
17import {expect} from 'chai';17import {expect} from 'chai';
18import { expectSubstrateEventsAtBlock } from '../util/helpers';
18import {19import {
19 contractHelpers,20 contractHelpers,
20 createEthAccountWithBalance,21 createEthAccountWithBalance,
24 SponsoringMode,25 SponsoringMode,
25 createEthAccount,26 createEthAccount,
26 ethBalanceViaSub,27 ethBalanceViaSub,
28 normalizeEvents,
27} from './util/helpers';29} from './util/helpers';
2830
29describe('Sponsoring EVM contracts', () => {31describe('Sponsoring EVM contracts', () => {
36 expect(await helpers.methods.hasSponsor(flipper.options.address).call()).to.be.true;38 expect(await helpers.methods.hasSponsor(flipper.options.address).call()).to.be.true;
37 });39 });
40
41 itWeb3('Set self sponsored events', async ({api, web3, privateKeyWrapper}) => {
42 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
43 const flipper = await deployFlipper(web3, owner);
44 const helpers = contractHelpers(web3, owner);
45
46 const result = await helpers.methods.selfSponsoredEnable(flipper.options.address).send();
47 // console.log(result);
48 const ethEvents = normalizeEvents(result.events);
49 expect(ethEvents).to.be.deep.equal([
50 {
51 address: flipper.options.address,
52 event: 'ContractSponsorSet',
53 args: {
54 contractAddress: flipper.options.address,
55 sponsor: flipper.options.address,
56 },
57 },
58 {
59 address: flipper.options.address,
60 event: 'ContractSponsorshipConfirmed',
61 args: {
62 contractAddress: flipper.options.address,
63 sponsor: flipper.options.address,
64 },
65 },
66 ]);
67
68 await expectSubstrateEventsAtBlock(
69 api,
70 result.blockNumber,
71 'evmContractHelpers',
72 ['ContractSponsorSet','ContractSponsorshipConfirmed'],
73 );
74 });
3875
39 itWeb3('Self sponsored can not be set by the address that did not deployed the contract', async ({api, web3, privateKeyWrapper}) => {76 itWeb3('Self sponsored can not be set by the address that did not deployed the contract', async ({api, web3, privateKeyWrapper}) => {
40 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);77 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
75 expect(await helpers.methods.hasPendingSponsor(flipper.options.address).call()).to.be.true;112 expect(await helpers.methods.hasPendingSponsor(flipper.options.address).call()).to.be.true;
76 });113 });
77 114
115 itWeb3('Set sponsor event', async ({api, web3, privateKeyWrapper}) => {
116 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
117 const sponsor = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
118 const flipper = await deployFlipper(web3, owner);
119 const helpers = contractHelpers(web3, owner);
120
121 const result = await helpers.methods.setSponsor(flipper.options.address, sponsor).send();
122 const events = normalizeEvents(result.events);
123 expect(events).to.be.deep.equal([
124 {
125 address: flipper.options.address,
126 event: 'ContractSponsorSet',
127 args: {
128 contractAddress: flipper.options.address,
129 sponsor: sponsor,
130 },
131 },
132 ]);
133
134 await expectSubstrateEventsAtBlock(
135 api,
136 result.blockNumber,
137 'evmContractHelpers',
138 ['ContractSponsorSet'],
139 );
140 });
141
78 itWeb3('Sponsor can not be set by the address that did not deployed the contract', async ({api, web3, privateKeyWrapper}) => {142 itWeb3('Sponsor can not be set by the address that did not deployed the contract', async ({api, web3, privateKeyWrapper}) => {
79 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);143 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
97 expect(await helpers.methods.hasSponsor(flipper.options.address).call()).to.be.true;161 expect(await helpers.methods.hasSponsor(flipper.options.address).call()).to.be.true;
98 });162 });
163
164 itWeb3('Confirm sponsorship event', async ({api, web3, privateKeyWrapper}) => {
165 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
166 const sponsor = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
167 const flipper = await deployFlipper(web3, owner);
168 const helpers = contractHelpers(web3, owner);
169 await expect(helpers.methods.setSponsor(flipper.options.address, sponsor).send()).to.be.not.rejected;
170 const result = await helpers.methods.confirmSponsorship(flipper.options.address).send({from: sponsor});
171 const events = normalizeEvents(result.events);
172 expect(events).to.be.deep.equal([
173 {
174 address: flipper.options.address,
175 event: 'ContractSponsorshipConfirmed',
176 args: {
177 contractAddress: flipper.options.address,
178 sponsor: sponsor,
179 },
180 },
181 ]);
182
183 await expectSubstrateEventsAtBlock(
184 api,
185 result.blockNumber,
186 'evmContractHelpers',
187 ['ContractSponsorshipConfirmed'],
188 );
189 });
99190
100 itWeb3('Sponsorship can not be confirmed by the address that not pending as sponsor', async ({api, web3, privateKeyWrapper}) => {191 itWeb3('Sponsorship can not be confirmed by the address that not pending as sponsor', async ({api, web3, privateKeyWrapper}) => {
101 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);192 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
160 expect(await helpers.methods.hasSponsor(flipper.options.address).call()).to.be.false;251 expect(await helpers.methods.hasSponsor(flipper.options.address).call()).to.be.false;
161 });252 });
253
254 itWeb3('Remove sponsor event', async ({api, web3, privateKeyWrapper}) => {
255 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
256 const sponsor = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
257 const flipper = await deployFlipper(web3, owner);
258 const helpers = contractHelpers(web3, owner);
259
260 await helpers.methods.setSponsor(flipper.options.address, sponsor).send();
261 await helpers.methods.confirmSponsorship(flipper.options.address).send({from: sponsor});
262
263 const result = await helpers.methods.removeSponsor(flipper.options.address).send();
264 const events = normalizeEvents(result.events);
265 expect(events).to.be.deep.equal([
266 {
267 address: flipper.options.address,
268 event: 'ContractSponsorRemoved',
269 args: {
270 contractAddress: flipper.options.address,
271 },
272 },
273 ]);
274
275 await expectSubstrateEventsAtBlock(
276 api,
277 result.blockNumber,
278 'evmContractHelpers',
279 ['ContractSponsorRemoved'],
280 );
281 });
162282
163 itWeb3('Sponsor can not be removed by the address that did not deployed the contract', async ({api, web3, privateKeyWrapper}) => {283 itWeb3('Sponsor can not be removed by the address that did not deployed the contract', async ({api, web3, privateKeyWrapper}) => {
164 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);284 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
modifiedtests/src/eth/createNFTCollection.test.tsdiffbeforeafterboth
181 });181 });
182 182
183 itWeb3('(!negative test!) Create collection (no funds)', async ({web3}) => {183 itWeb3('(!negative test!) Create collection (no funds)', async ({web3}) => {
184 const owner = await createEthAccount(web3);184 const owner = createEthAccount(web3);
185 const helper = evmCollectionHelpers(web3, owner);185 const helper = evmCollectionHelpers(web3, owner);
186 const collectionName = 'A';186 const collectionName = 'A';
187 const description = 'A';187 const description = 'A';
194194
195 itWeb3('(!negative test!) Check owner', async ({api, web3, privateKeyWrapper}) => {195 itWeb3('(!negative test!) Check owner', async ({api, web3, privateKeyWrapper}) => {
196 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);196 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
197 const notOwner = await createEthAccount(web3);197 const notOwner = createEthAccount(web3);
198 const collectionHelpers = evmCollectionHelpers(web3, owner);198 const collectionHelpers = evmCollectionHelpers(web3, owner);
199 const result = await collectionHelpers.methods.createNonfungibleCollection('A', 'A', 'A').send();199 const result = await collectionHelpers.methods.createNonfungibleCollection('A', 'A', 'A').send();
200 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);200 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
modifiedtests/src/eth/createRFTCollection.test.tsdiffbeforeafterboth
189 });189 });
190 190
191 itWeb3('(!negative test!) Create collection (no funds)', async ({web3}) => {191 itWeb3('(!negative test!) Create collection (no funds)', async ({web3}) => {
192 const owner = await createEthAccount(web3);192 const owner = createEthAccount(web3);
193 const helper = evmCollectionHelpers(web3, owner);193 const helper = evmCollectionHelpers(web3, owner);
194 const collectionName = 'A';194 const collectionName = 'A';
195 const description = 'A';195 const description = 'A';
202202
203 itWeb3('(!negative test!) Check owner', async ({api, web3, privateKeyWrapper}) => {203 itWeb3('(!negative test!) Check owner', async ({api, web3, privateKeyWrapper}) => {
204 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);204 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
205 const notOwner = await createEthAccount(web3);205 const notOwner = createEthAccount(web3);
206 const collectionHelpers = evmCollectionHelpers(web3, owner);206 const collectionHelpers = evmCollectionHelpers(web3, owner);
207 const result = await collectionHelpers.methods.createRefungibleCollection('A', 'A', 'A').send();207 const result = await collectionHelpers.methods.createRefungibleCollection('A', 'A', 'A').send();
208 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);208 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);
modifiedtests/src/eth/nesting/nest.test.tsdiffbeforeafterboth
1import {ApiPromise} from '@polkadot/api';1import {IKeyringPair} from '@polkadot/types/types';
2import {Contract} from 'web3-eth-contract';2import {Contract} from 'web3-eth-contract';
3import {expect} from 'chai';3
4import Web3 from 'web3';
5import {createEthAccountWithBalance, evmCollectionHelpers, GAS_ARGS, getCollectionAddressFromResult, itWeb3, tokenIdToAddress} from '../../eth/util/helpers';4import {itEth, EthUniqueHelper, usingEthPlaygrounds, expect} from '../util/playgrounds';
6import nonFungibleAbi from '../nonFungibleAbi.json';
75
8const createNestingCollection = async (6const createNestingCollection = async (
9 api: ApiPromise,7 helper: EthUniqueHelper,
10 web3: Web3,
11 owner: string,8 owner: string,
12): Promise<{ collectionId: number, collectionAddress: string, contract: Contract }> => {9): Promise<{ collectionId: number, collectionAddress: string, contract: Contract }> => {
13 const collectionHelper = evmCollectionHelpers(web3, owner);
14
15 const result = await collectionHelper.methods10 const {collectionAddress, collectionId} = await helper.eth.createNonfungibleCollection(owner, 'A', 'B', 'C');
16 .createNonfungibleCollection('A', 'B', 'C')
17 .send();
18 const {collectionIdAddress: collectionAddress, collectionId} = await getCollectionAddressFromResult(api, result);
1911
20 const contract = new web3.eth.Contract(nonFungibleAbi as any, collectionAddress, {from: owner, ...GAS_ARGS});12 const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', owner);
21 await contract.methods.setCollectionNesting(true).send({from: owner});13 await contract.methods.setCollectionNesting(true).send({from: owner});
2214
23 return {collectionId, collectionAddress, contract};15 return {collectionId, collectionAddress, contract};
24};16};
2517
26describe('Integration Test: EVM Nesting', () => {
27 itWeb3('NFT: allows an Owner to nest/unnest their token', async ({api, web3, privateKeyWrapper}) => {
28 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
29 const {collectionId, contract} = await createNestingCollection(api, web3, owner);
30
31 // Create a token to be nested
32 const targetNFTTokenId = await contract.methods.nextTokenId().call();
33 await contract.methods.mint(
34 owner,
35 targetNFTTokenId,
36 ).send({from: owner});
37
38 const targetNftTokenAddress = tokenIdToAddress(collectionId, targetNFTTokenId);
39
40 // Create a nested token
41 const firstTokenId = await contract.methods.nextTokenId().call();
42 await contract.methods.mint(
43 targetNftTokenAddress,
44 firstTokenId,
45 ).send({from: owner});
46
47 expect(await contract.methods.ownerOf(firstTokenId).call()).to.be.equal(targetNftTokenAddress);
48
49 // Create a token to be nested and nest
50 const secondTokenId = await contract.methods.nextTokenId().call();
51 await contract.methods.mint(
52 owner,
53 secondTokenId,
54 ).send({from: owner});
55
56 await contract.methods.transfer(targetNftTokenAddress, secondTokenId).send({from: owner});
57
58 expect(await contract.methods.ownerOf(secondTokenId).call()).to.be.equal(targetNftTokenAddress);
59
60 // Unnest token back
61 await contract.methods.transferFrom(targetNftTokenAddress, owner, secondTokenId).send({from: owner});
62 expect(await contract.methods.ownerOf(secondTokenId).call()).to.be.equal(owner);
63 });
64
65 itWeb3('NFT: allows an Owner to nest/unnest their token (Restricted nesting)', async ({api, web3, privateKeyWrapper}) => {
66 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
67
68 const {collectionId: collectionIdA, collectionAddress: collectionAddressA, contract: contractA} = await createNestingCollection(api, web3, owner);
69 const {collectionAddress: collectionAddressB, contract: contractB} = await createNestingCollection(api, web3, owner);
70 await contractA.methods.setCollectionNesting(true, [collectionAddressA, collectionAddressB]).send({from: owner});
71
72 // Create a token to nest into
73 const targetNftTokenId = await contractA.methods.nextTokenId().call();
74 await contractA.methods.mint(
75 owner,
76 targetNftTokenId,
77 ).send({from: owner});
78 const nftTokenAddressA1 = tokenIdToAddress(collectionIdA, targetNftTokenId);
79
80 // Create a token for nesting in the same collection as the target
81 const nftTokenIdA = await contractA.methods.nextTokenId().call();
82 await contractA.methods.mint(
83 owner,
84 nftTokenIdA,
85 ).send({from: owner});
86
87 // Create a token for nesting in a different collection
88 const nftTokenIdB = await contractB.methods.nextTokenId().call();
89 await contractB.methods.mint(
90 owner,
91 nftTokenIdB,
92 ).send({from: owner});
93
94 // Nest
95 await contractA.methods.transfer(nftTokenAddressA1, nftTokenIdA).send({from: owner});
96 expect(await contractA.methods.ownerOf(nftTokenIdA).call()).to.be.equal(nftTokenAddressA1);
97
98 await contractB.methods.transfer(nftTokenAddressA1, nftTokenIdB).send({from: owner});
99 expect(await contractB.methods.ownerOf(nftTokenIdB).call()).to.be.equal(nftTokenAddressA1);
100 });
101});
10218
103describe('Negative Test: EVM Nesting', async() => {19describe('EVM nesting tests group', () => {
20 let donor: IKeyringPair;
21
22 before(async function() {
23 await usingEthPlaygrounds(async (helper, privateKey) => {
24 donor = privateKey('//Alice');
25 });
26 });
27
28 describe('Integration Test: EVM Nesting', () => {
29 itEth('NFT: allows an Owner to nest/unnest their token', async ({helper}) => {
30 const owner = await helper.eth.createAccountWithBalance(donor);
31 const {collectionId, contract} = await createNestingCollection(helper, owner);
32
33 // Create a token to be nested
34 const targetNFTTokenId = await contract.methods.nextTokenId().call();
35 await contract.methods.mint(
36 owner,
37 targetNFTTokenId,
38 ).send({from: owner});
39
40 const targetNftTokenAddress = helper.ethAddress.fromTokenId(collectionId, targetNFTTokenId);
41
42 // Create a nested token
43 const firstTokenId = await contract.methods.nextTokenId().call();
44 await contract.methods.mint(
45 targetNftTokenAddress,
46 firstTokenId,
47 ).send({from: owner});
48
49 expect(await contract.methods.ownerOf(firstTokenId).call()).to.be.equal(targetNftTokenAddress);
50
51 // Create a token to be nested and nest
52 const secondTokenId = await contract.methods.nextTokenId().call();
53 await contract.methods.mint(
54 owner,
55 secondTokenId,
56 ).send({from: owner});
57
58 await contract.methods.transfer(targetNftTokenAddress, secondTokenId).send({from: owner});
59
60 expect(await contract.methods.ownerOf(secondTokenId).call()).to.be.equal(targetNftTokenAddress);
61
62 // Unnest token back
63 await contract.methods.transferFrom(targetNftTokenAddress, owner, secondTokenId).send({from: owner});
64 expect(await contract.methods.ownerOf(secondTokenId).call()).to.be.equal(owner);
65 });
66
67 itEth('NFT: allows an Owner to nest/unnest their token (Restricted nesting)', async ({helper}) => {
68 const owner = await helper.eth.createAccountWithBalance(donor);
69
70 const {collectionId: collectionIdA, collectionAddress: collectionAddressA, contract: contractA} = await createNestingCollection(helper, owner);
71 const {collectionAddress: collectionAddressB, contract: contractB} = await createNestingCollection(helper, owner);
72 await contractA.methods.setCollectionNesting(true, [collectionAddressA, collectionAddressB]).send({from: owner});
73
74 // Create a token to nest into
75 const targetNftTokenId = await contractA.methods.nextTokenId().call();
76 await contractA.methods.mint(
77 owner,
78 targetNftTokenId,
79 ).send({from: owner});
80 const nftTokenAddressA1 = helper.ethAddress.fromTokenId(collectionIdA, targetNftTokenId);
81
82 // Create a token for nesting in the same collection as the target
83 const nftTokenIdA = await contractA.methods.nextTokenId().call();
84 await contractA.methods.mint(
85 owner,
86 nftTokenIdA,
87 ).send({from: owner});
88
89 // Create a token for nesting in a different collection
90 const nftTokenIdB = await contractB.methods.nextTokenId().call();
91 await contractB.methods.mint(
92 owner,
93 nftTokenIdB,
94 ).send({from: owner});
95
96 // Nest
97 await contractA.methods.transfer(nftTokenAddressA1, nftTokenIdA).send({from: owner});
98 expect(await contractA.methods.ownerOf(nftTokenIdA).call()).to.be.equal(nftTokenAddressA1);
99
100 await contractB.methods.transfer(nftTokenAddressA1, nftTokenIdB).send({from: owner});
101 expect(await contractB.methods.ownerOf(nftTokenIdB).call()).to.be.equal(nftTokenAddressA1);
102 });
103 });
104
105 describe('Negative Test: EVM Nesting', async() => {
104 itWeb3('NFT: disallows to nest token if nesting is disabled', async ({api, web3, privateKeyWrapper}) => {106 itEth('NFT: disallows to nest token if nesting is disabled', async ({helper}) => {
105 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);107 const owner = await helper.eth.createAccountWithBalance(donor);
106108
107 const {collectionId, contract} = await createNestingCollection(api, web3, owner);109 const {collectionId, contract} = await createNestingCollection(helper, owner);
108 await contract.methods.setCollectionNesting(false).send({from: owner});110 await contract.methods.setCollectionNesting(false).send({from: owner});
109111
110 // Create a token to nest into112 // Create a token to nest into
114 targetNftTokenId,116 targetNftTokenId,
115 ).send({from: owner});117 ).send({from: owner});
116118
117 const targetNftTokenAddress = tokenIdToAddress(collectionId, targetNftTokenId);119 const targetNftTokenAddress = helper.ethAddress.fromTokenId(collectionId, targetNftTokenId);
118120
119 // Create a token to nest121 // Create a token to nest
120 const nftTokenId = await contract.methods.nextTokenId().call();122 const nftTokenId = await contract.methods.nextTokenId().call();
129 .call({from: owner})).to.be.rejectedWith('UserIsNotAllowedToNest');131 .call({from: owner})).to.be.rejectedWith('UserIsNotAllowedToNest');
130 });132 });
131133
132 itWeb3('NFT: disallows a non-Owner to nest someone else\'s token', async ({api, web3, privateKeyWrapper}) => {134 itEth('NFT: disallows a non-Owner to nest someone else\'s token', async ({helper}) => {
133 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);135 const owner = await helper.eth.createAccountWithBalance(donor);
134 const malignant = await createEthAccountWithBalance(api, web3, privateKeyWrapper);136 const malignant = await helper.eth.createAccountWithBalance(donor);
135137
136 const {collectionId, contract} = await createNestingCollection(api, web3, owner);138 const {collectionId, contract} = await createNestingCollection(helper, owner);
137139
138 // Mint a token140 // Mint a token
139 const targetTokenId = await contract.methods.nextTokenId().call();141 const targetTokenId = await contract.methods.nextTokenId().call();
140 await contract.methods.mint(142 await contract.methods.mint(
141 owner,143 owner,
142 targetTokenId,144 targetTokenId,
143 ).send({from: owner});145 ).send({from: owner});
144 const targetTokenAddress = tokenIdToAddress(collectionId, targetTokenId);146 const targetTokenAddress = helper.ethAddress.fromTokenId(collectionId, targetTokenId);
145147
146 // Mint a token belonging to a different account148 // Mint a token belonging to a different account
147 const tokenId = await contract.methods.nextTokenId().call();149 const tokenId = await contract.methods.nextTokenId().call();
156 .call({from: malignant})).to.be.rejectedWith('UserIsNotAllowedToNest');158 .call({from: malignant})).to.be.rejectedWith('UserIsNotAllowedToNest');
157 });159 });
158160
159 itWeb3('NFT: disallows a non-Owner to nest someone else\'s token (Restricted nesting)', async ({api, web3, privateKeyWrapper}) => {161 itEth('NFT: disallows a non-Owner to nest someone else\'s token (Restricted nesting)', async ({helper}) => {
160 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);162 const owner = await helper.eth.createAccountWithBalance(donor);
161 const malignant = await createEthAccountWithBalance(api, web3, privateKeyWrapper);163 const malignant = await helper.eth.createAccountWithBalance(donor);
162164
163 const {collectionId: collectionIdA, collectionAddress: collectionAddressA, contract: contractA} = await createNestingCollection(api, web3, owner);165 const {collectionId: collectionIdA, collectionAddress: collectionAddressA, contract: contractA} = await createNestingCollection(helper, owner);
164 const {collectionAddress: collectionAddressB, contract: contractB} = await createNestingCollection(api, web3, owner);166 const {collectionAddress: collectionAddressB, contract: contractB} = await createNestingCollection(helper, owner);
165167
166 await contractA.methods.setCollectionNesting(true, [collectionAddressA, collectionAddressB]).send({from: owner});168 await contractA.methods.setCollectionNesting(true, [collectionAddressA, collectionAddressB]).send({from: owner});
167169
171 owner,173 owner,
172 nftTokenIdA,174 nftTokenIdA,
173 ).send({from: owner});175 ).send({from: owner});
174 const nftTokenAddressA = tokenIdToAddress(collectionIdA, nftTokenIdA);176 const nftTokenAddressA = helper.ethAddress.fromTokenId(collectionIdA, nftTokenIdA);
175177
176 // Create a token in another collection belonging to someone else178 // Create a token in another collection belonging to someone else
177 const nftTokenIdB = await contractB.methods.nextTokenId().call();179 const nftTokenIdB = await contractB.methods.nextTokenId().call();
186 .call({from: malignant})).to.be.rejectedWith('UserIsNotAllowedToNest');188 .call({from: malignant})).to.be.rejectedWith('UserIsNotAllowedToNest');
187 });189 });
188190
189 itWeb3('NFT: disallows to nest token in an unlisted collection', async ({api, web3, privateKeyWrapper}) => {191 itEth('NFT: disallows to nest token in an unlisted collection', async ({helper}) => {
190 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);192 const owner = await helper.eth.createAccountWithBalance(donor);
191193
192 const {collectionId: collectionIdA, collectionAddress: collectionAddressA, contract: contractA} = await createNestingCollection(api, web3, owner);194 const {collectionId: collectionIdA, collectionAddress: collectionAddressA, contract: contractA} = await createNestingCollection(helper, owner);
193 const {contract: contractB} = await createNestingCollection(api, web3, owner);195 const {contract: contractB} = await createNestingCollection(helper, owner);
194196
195 await contractA.methods.setCollectionNesting(true, [collectionAddressA]).send({from: owner});197 await contractA.methods.setCollectionNesting(true, [collectionAddressA]).send({from: owner});
196198
200 owner,202 owner,
201 nftTokenIdA,203 nftTokenIdA,
202 ).send({from: owner});204 ).send({from: owner});
203 const nftTokenAddressA = tokenIdToAddress(collectionIdA, nftTokenIdA);205 const nftTokenAddressA = helper.ethAddress.fromTokenId(collectionIdA, nftTokenIdA);
204206
205 // Create a token in another collection207 // Create a token in another collection
206 const nftTokenIdB = await contractB.methods.nextTokenId().call();208 const nftTokenIdB = await contractB.methods.nextTokenId().call();
214 .transfer(nftTokenAddressA, nftTokenIdB)216 .transfer(nftTokenAddressA, nftTokenIdB)
215 .call()).to.be.rejectedWith('SourceCollectionIsNotAllowedToNest');217 .call()).to.be.rejectedWith('SourceCollectionIsNotAllowedToNest');
216 });218 });
217});219 });
220});
218221
modifiedtests/src/eth/payable.test.tsdiffbeforeafterboth
14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License
15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
1616
17import {expect} from 'chai';
18import {submitTransactionAsync} from '../substrate/substrate-api';17import {IKeyringPair} from '@polkadot/types/types';
18
19import {createEthAccountWithBalance, deployCollector, GAS_ARGS, itWeb3, subToEth, transferBalanceToEth} from './util/helpers';19import {itEth, expect, usingEthPlaygrounds} from './util/playgrounds';
20import {evmToAddress} from '@polkadot/util-crypto';
21import {getGenericResult, UNIQUE} from '../util/helpers';
22import {getBalanceSingle, transferBalanceExpectSuccess} from '../substrate/get-balance';
2320
24describe('EVM payable contracts', () => {21describe('EVM payable contracts', () => {
22 let donor: IKeyringPair;
23
24 before(async function() {
25 await usingEthPlaygrounds(async (helper, privateKey) => {
26 donor = privateKey('//Alice');
27 });
28 });
29
25 itWeb3('Evm contract can receive wei from eth account', async ({api, web3, privateKeyWrapper}) => {30 itEth('Evm contract can receive wei from eth account', async ({helper}) => {
26 const deployer = await createEthAccountWithBalance(api, web3, privateKeyWrapper);31 const deployer = await helper.eth.createAccountWithBalance(donor);
27 const contract = await deployCollector(web3, deployer);32 const contract = await helper.eth.deployCollectorContract(deployer);
33
34 const web3 = helper.getWeb3();
2835
29 await web3.eth.sendTransaction({from: deployer, to: contract.options.address, value: '10000', ...GAS_ARGS});36 await web3.eth.sendTransaction({from: deployer, to: contract.options.address, value: '10000', gas: helper.eth.DEFAULT_GAS});
3037
31 expect(await contract.methods.getCollected().call()).to.be.equal('10000');38 expect(await contract.methods.getCollected().call()).to.be.equal('10000');
32 });39 });
3340
34 itWeb3('Evm contract can receive wei from substrate account', async ({api, web3, privateKeyWrapper}) => {41 itEth('Evm contract can receive wei from substrate account', async ({helper}) => {
35 const deployer = await createEthAccountWithBalance(api, web3, privateKeyWrapper);42 const deployer = await helper.eth.createAccountWithBalance(donor);
36 const contract = await deployCollector(web3, deployer);43 const contract = await helper.eth.deployCollectorContract(deployer);
37 const alice = privateKeyWrapper('//Alice');44 const [alice] = await helper.arrange.createAccounts([10n], donor);
45
46 const weiCount = '10000';
3847
39 // Transaction fee/value will be payed from subToEth(sender) evm balance,48 // Transaction fee/value will be payed from subToEth(sender) evm balance,
40 // which is backed by evmToAddress(subToEth(sender)) substrate balance49 // which is backed by evmToAddress(subToEth(sender)) substrate balance
41 await transferBalanceToEth(api, alice, subToEth(alice.address));50 await helper.eth.transferBalanceFromSubstrate(alice, helper.address.substrateToEth(alice.address), 5n);
4251
43 {52
44 const tx = api.tx.evm.call(53 await helper.eth.callEVM(alice, contract.options.address, contract.methods.giveMoney().encodeABI(), weiCount);
45 subToEth(alice.address),
46 contract.options.address,
47 contract.methods.giveMoney().encodeABI(),
52 null,
53 [],
54 );
55 const events = await submitTransactionAsync(alice, tx);
56 const result = getGenericResult(events);
57 expect(result.success).to.be.true;
58 }
5954
60 expect(await contract.methods.getCollected().call()).to.be.equal('10000');55 expect(await contract.methods.getCollected().call()).to.be.equal(weiCount);
61 });56 });
6257
63 // We can't handle sending balance to backing storage of evm balance, because evmToAddress operation is irreversible58 // We can't handle sending balance to backing storage of evm balance, because evmToAddress operation is irreversible
64 itWeb3('Wei sent directly to backing storage of evm contract balance is unaccounted', async({api, web3, privateKeyWrapper}) => {59 itEth('Wei sent directly to backing storage of evm contract balance is unaccounted', async({helper}) => {
65 const deployer = await createEthAccountWithBalance(api, web3, privateKeyWrapper);60 const deployer = await helper.eth.createAccountWithBalance(donor);
66 const contract = await deployCollector(web3, deployer);61 const contract = await helper.eth.deployCollectorContract(deployer);
67 const alice = privateKeyWrapper('//Alice');62 const [alice] = await helper.arrange.createAccounts([10n], donor);
63
64 const weiCount = 10_000n;
6865
69 await transferBalanceExpectSuccess(api, alice, evmToAddress(contract.options.address), '10000');66 await helper.eth.transferBalanceFromSubstrate(alice, contract.options.address, weiCount, false);
7067
71 expect(await contract.methods.getUnaccounted().call()).to.be.equal('10000');68 expect(await contract.methods.getUnaccounted().call()).to.be.equal(weiCount.toString());
72 });69 });
7370
74 itWeb3('Balance can be retrieved from evm contract', async({api, web3, privateKeyWrapper}) => {71 itEth('Balance can be retrieved from evm contract', async({helper, privateKey}) => {
75 const FEE_BALANCE = 1000n * UNIQUE;72 const FEE_BALANCE = 10n * helper.balance.getOneTokenNominal();
76 const CONTRACT_BALANCE = 1n * UNIQUE;73 const CONTRACT_BALANCE = 1n * helper.balance.getOneTokenNominal();
7774
78 const deployer = await createEthAccountWithBalance(api, web3, privateKeyWrapper);75 const deployer = await helper.eth.createAccountWithBalance(donor);
79 const contract = await deployCollector(web3, deployer);76 const contract = await helper.eth.deployCollectorContract(deployer);
80 const alice = privateKeyWrapper('//Alice');77 const [alice] = await helper.arrange.createAccounts([20n], donor);
78
79 const web3 = helper.getWeb3();
8180
82 await web3.eth.sendTransaction({from: deployer, to: contract.options.address, value: CONTRACT_BALANCE.toString(), ...GAS_ARGS});81 await web3.eth.sendTransaction({from: deployer, to: contract.options.address, value: CONTRACT_BALANCE.toString(), gas: helper.eth.DEFAULT_GAS});
8382
84 const receiver = privateKeyWrapper(`//Receiver${Date.now()}`);83 const receiver = privateKey(`//Receiver${Date.now()}`);
8584
86 // First receive balance on eth balance of bob85 // First receive balance on eth balance of bob
87 {86 {
88 const ethReceiver = subToEth(receiver.address);87 const ethReceiver = helper.address.substrateToEth(receiver.address);
89 expect(await web3.eth.getBalance(ethReceiver)).to.be.equal('0');88 expect(await web3.eth.getBalance(ethReceiver)).to.be.equal('0');
90 await contract.methods.withdraw(ethReceiver).send({from: deployer});89 await contract.methods.withdraw(ethReceiver).send({from: deployer});
91 expect(await web3.eth.getBalance(ethReceiver)).to.be.equal(CONTRACT_BALANCE.toString());90 expect(await web3.eth.getBalance(ethReceiver)).to.be.equal(CONTRACT_BALANCE.toString());
92 }91 }
9392
94 // Some balance is required to pay fee for evm.withdraw call93 // Some balance is required to pay fee for evm.withdraw call
95 await transferBalanceExpectSuccess(api, alice, receiver.address, FEE_BALANCE.toString());94 await helper.balance.transferToSubstrate(alice, receiver.address, FEE_BALANCE);
95 // await transferBalanceExpectSuccess(api, alice, receiver.address, FEE_BALANCE.toString());
9696
97 // Withdraw balance from eth to substrate97 // Withdraw balance from eth to substrate
98 {98 {
99 const initialReceiverBalance = await getBalanceSingle(api, receiver.address);99 const initialReceiverBalance = await helper.balance.getSubstrate(receiver.address);
100 const tx = api.tx.evm.withdraw(100 await helper.executeExtrinsic(receiver, 'api.tx.evm.withdraw', [helper.address.substrateToEth(receiver.address), CONTRACT_BALANCE.toString()], true);
101 subToEth(receiver.address),
102 CONTRACT_BALANCE.toString(),
103 );
104 const events = await submitTransactionAsync(receiver, tx);
105 const result = getGenericResult(events);
106 expect(result.success).to.be.true;
107 const finalReceiverBalance = await getBalanceSingle(api, receiver.address);101 const finalReceiverBalance = await helper.balance.getSubstrate(receiver.address);
108102
109 expect(finalReceiverBalance > initialReceiverBalance).to.be.true;103 expect(finalReceiverBalance > initialReceiverBalance).to.be.true;
110 }104 }
modifiedtests/src/eth/reFungibleToken.test.tsdiffbeforeafterboth
15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
1616
17import {approve, createCollection, createRefungibleToken, transfer, transferFrom, UNIQUE, requirePallets, Pallets} from '../util/helpers';17import {approve, createCollection, createRefungibleToken, transfer, transferFrom, UNIQUE, requirePallets, Pallets} from '../util/helpers';
18import {collectionIdFromAddress, collectionIdToAddress, createEthAccount, createEthAccountWithBalance, createNonfungibleCollection, createRefungibleCollection, evmCollection, evmCollectionHelpers, getCollectionAddressFromResult, itWeb3, normalizeEvents, recordEthFee, recordEvents, subToEth, tokenIdToAddress, transferBalanceToEth, uniqueNFT, uniqueRefungible, uniqueRefungibleToken} from './util/helpers';18import {collectionIdToAddress, createEthAccount, createEthAccountWithBalance, createRefungibleCollection, evmCollection, evmCollectionHelpers, getCollectionAddressFromResult, itWeb3, normalizeEvents, recordEthFee, recordEvents, subToEth, tokenIdToAddress, transferBalanceToEth, uniqueRefungible, uniqueRefungibleToken} from './util/helpers';
1919
20import chai from 'chai';20import chai from 'chai';
21import chaiAsPromised from 'chai-as-promised';21import chaiAsPromised from 'chai-as-promised';
modifiedtests/src/eth/util/contractHelpersAbi.jsondiffbeforeafterboth
1[1[
2 {
3 "anonymous": false,
4 "inputs": [
5 {
6 "indexed": true,
7 "internalType": "address",
8 "name": "contractAddress",
9 "type": "address"
10 }
11 ],
12 "name": "ContractSponsorRemoved",
13 "type": "event"
14 },
15 {
16 "anonymous": false,
17 "inputs": [
18 {
19 "indexed": true,
20 "internalType": "address",
21 "name": "contractAddress",
22 "type": "address"
23 },
24 {
25 "indexed": false,
26 "internalType": "address",
27 "name": "sponsor",
28 "type": "address"
29 }
30 ],
31 "name": "ContractSponsorSet",
32 "type": "event"
33 },
34 {
35 "anonymous": false,
36 "inputs": [
37 {
38 "indexed": true,
39 "internalType": "address",
40 "name": "contractAddress",
41 "type": "address"
42 },
43 {
44 "indexed": false,
45 "internalType": "address",
46 "name": "sponsor",
47 "type": "address"
48 }
49 ],
50 "name": "ContractSponsorshipConfirmed",
51 "type": "event"
52 },
2 {53 {
3 "inputs": [54 "inputs": [
4 {55 {
addedtests/src/eth/util/playgrounds/index.tsdiffbeforeafterboth

no changes

addedtests/src/eth/util/playgrounds/types.tsdiffbeforeafterboth

no changes

addedtests/src/eth/util/playgrounds/unique.dev.tsdiffbeforeafterboth

no changes

addedtests/src/interfaces/appPromotion/definitions.tsdiffbeforeafterboth

no changes

addedtests/src/interfaces/appPromotion/index.tsdiffbeforeafterboth

no changes

addedtests/src/interfaces/appPromotion/types.tsdiffbeforeafterboth

no changes

modifiedtests/src/interfaces/augment-api-consts.tsdiffbeforeafterboth
8import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';8import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
9import type { Option, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';9import type { Option, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
10import type { Codec } from '@polkadot/types-codec/types';10import type { Codec } from '@polkadot/types-codec/types';
11import type { Permill } from '@polkadot/types/interfaces/runtime';11import type { Perbill, Permill } from '@polkadot/types/interfaces/runtime';
12import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';12import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
1313
14export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;14export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
1515
16declare module '@polkadot/api-base/types/consts' {16declare module '@polkadot/api-base/types/consts' {
17 interface AugmentedConsts<ApiType extends ApiTypes> {17 interface AugmentedConsts<ApiType extends ApiTypes> {
18 appPromotion: {
19 /**
20 * Rate of return for interval in blocks defined in `RecalculationInterval`.
21 **/
22 intervalIncome: Perbill & AugmentedConst<ApiType>;
23 /**
24 * Decimals for the `Currency`.
25 **/
26 nominal: u128 & AugmentedConst<ApiType>;
27 /**
28 * The app's pallet id, used for deriving its sovereign account ID.
29 **/
30 palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
31 /**
32 * In parachain blocks.
33 **/
34 pendingInterval: u32 & AugmentedConst<ApiType>;
35 /**
36 * In relay blocks.
37 **/
38 recalculationInterval: u32 & AugmentedConst<ApiType>;
39 /**
40 * Generic const
41 **/
42 [key: string]: Codec;
43 };
18 balances: {44 balances: {
19 /**45 /**
20 * The minimum amount required to keep an account open.46 * The minimum amount required to keep an account open.
modifiedtests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth
1111
12declare module '@polkadot/api-base/types/errors' {12declare module '@polkadot/api-base/types/errors' {
13 interface AugmentedErrors<ApiType extends ApiTypes> {13 interface AugmentedErrors<ApiType extends ApiTypes> {
14 appPromotion: {
15 /**
16 * Error due to action requiring admin to be set.
17 **/
18 AdminNotSet: AugmentedError<ApiType>;
19 /**
20 * Errors caused by incorrect actions with a locked balance.
21 **/
22 IncorrectLockedBalanceOperation: AugmentedError<ApiType>;
23 /**
24 * No permission to perform an action.
25 **/
26 NoPermission: AugmentedError<ApiType>;
27 /**
28 * Insufficient funds to perform an action.
29 **/
30 NotSufficientFunds: AugmentedError<ApiType>;
31 /**
32 * Occurs when a pending unstake cannot be added in this block. PENDING_LIMIT_PER_BLOCK` limits exceeded.
33 **/
34 PendingForBlockOverflow: AugmentedError<ApiType>;
35 /**
36 * The error is due to the fact that the collection/contract must already be sponsored in order to perform the action.
37 **/
38 SponsorNotSet: AugmentedError<ApiType>;
39 /**
40 * Generic error
41 **/
42 [key: string]: AugmentedError<ApiType>;
43 };
14 balances: {44 balances: {
15 /**45 /**
16 * Beneficiary account must pre-exist46 * Beneficiary account must pre-exist
264 [key: string]: AugmentedError<ApiType>;294 [key: string]: AugmentedError<ApiType>;
265 };295 };
266 evmContractHelpers: {296 evmContractHelpers: {
297 /**
298 * No pending sponsor for contract.
299 **/
300 NoPendingSponsor: AugmentedError<ApiType>;
267 /**301 /**
268 * This method is only executable by owner302 * This method is only executable by contract owner
269 **/303 **/
270 NoPermission: AugmentedError<ApiType>;304 NoPermission: AugmentedError<ApiType>;
271 /**305 /**
272 * Generic error306 * Generic error
273 **/307 **/
274 [key: string]: AugmentedError<ApiType>;308 [key: string]: AugmentedError<ApiType>;
275 };309 };
276 evmMigration: {310 evmMigration: {
311 /**
312 * Migration of this account is not yet started, or already finished.
313 **/
277 AccountIsNotMigrating: AugmentedError<ApiType>;314 AccountIsNotMigrating: AugmentedError<ApiType>;
315 /**
316 * Can only migrate to empty address.
317 **/
278 AccountNotEmpty: AugmentedError<ApiType>;318 AccountNotEmpty: AugmentedError<ApiType>;
279 /**319 /**
280 * Generic error320 * Generic error
modifiedtests/src/interfaces/augment-api-events.tsdiffbeforeafterboth
1515
16declare module '@polkadot/api-base/types/events' {16declare module '@polkadot/api-base/types/events' {
17 interface AugmentedEvents<ApiType extends ApiTypes> {17 interface AugmentedEvents<ApiType extends ApiTypes> {
18 appPromotion: {
19 /**
20 * The admin was set
21 *
22 * # Arguments
23 * * AccountId: ID of the admin
24 **/
25 SetAdmin: AugmentedEvent<ApiType, [AccountId32]>;
26 /**
27 * Staking was performed
28 *
29 * # Arguments
30 * * AccountId: ID of the staker
31 * * Balance : staking amount
32 **/
33 Stake: AugmentedEvent<ApiType, [AccountId32, u128]>;
34 /**
35 * Staking recalculation was performed
36 *
37 * # Arguments
38 * * AccountId: ID of the staker.
39 * * Balance : recalculation base
40 * * Balance : total income
41 **/
42 StakingRecalculation: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;
43 /**
44 * Unstaking was performed
45 *
46 * # Arguments
47 * * AccountId: ID of the staker
48 * * Balance : unstaking amount
49 **/
50 Unstake: AugmentedEvent<ApiType, [AccountId32, u128]>;
51 /**
52 * Generic event
53 **/
54 [key: string]: AugmentedEvent<ApiType>;
55 };
18 balances: {56 balances: {
19 /**57 /**
20 * A balance was set by root.58 * A balance was set by root.
208 **/246 **/
209 [key: string]: AugmentedEvent<ApiType>;247 [key: string]: AugmentedEvent<ApiType>;
210 };248 };
249 evmContractHelpers: {
250 /**
251 * Collection sponsor was removed.
252 **/
253 ContractSponsorRemoved: AugmentedEvent<ApiType, [H160]>;
254 /**
255 * Contract sponsor was set.
256 **/
257 ContractSponsorSet: AugmentedEvent<ApiType, [H160, AccountId32]>;
258 /**
259 * New sponsor was confirm.
260 **/
261 ContractSponsorshipConfirmed: AugmentedEvent<ApiType, [H160, AccountId32]>;
262 /**
263 * Generic event
264 **/
265 [key: string]: AugmentedEvent<ApiType>;
266 };
211 parachainSystem: {267 parachainSystem: {
212 /**268 /**
213 * Downward messages were processed using the given weight.269 * Downward messages were processed using the given weight.
modifiedtests/src/interfaces/augment-api-query.tsdiffbeforeafterboth
6import '@polkadot/api-base/types/storage';6import '@polkadot/api-base/types/storage';
77
8import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';8import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
9import type { BTreeMap, Bytes, Option, U256, U8aFixed, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';9import type { BTreeMap, Bytes, Option, U256, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
10import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';10import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
11import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';11import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';
12import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumLog, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletUniqueSchedulerScheduledV3, PhantomTypeUpDataStructs, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, SpRuntimeDigest, SpTrieStorageProof, UpDataStructsCollection, UpDataStructsCollectionStats, UpDataStructsProperties, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsTokenChild } from '@polkadot/types/lookup';12import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumLog, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletUniqueSchedulerScheduledV3, PhantomTypeUpDataStructs, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, SpRuntimeDigest, SpTrieStorageProof, UpDataStructsCollection, UpDataStructsCollectionStats, UpDataStructsProperties, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsSponsorshipStateBasicCrossAccountIdRepr, UpDataStructsTokenChild } from '@polkadot/types/lookup';
13import type { Observable } from '@polkadot/types/types';13import type { Observable } from '@polkadot/types/types';
1414
15export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;15export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
16export type __QueryableStorageEntry<ApiType extends ApiTypes> = QueryableStorageEntry<ApiType>;16export type __QueryableStorageEntry<ApiType extends ApiTypes> = QueryableStorageEntry<ApiType>;
1717
18declare module '@polkadot/api-base/types/storage' {18declare module '@polkadot/api-base/types/storage' {
19 interface AugmentedQueries<ApiType extends ApiTypes> {19 interface AugmentedQueries<ApiType extends ApiTypes> {
20 appPromotion: {
21 admin: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
22 /**
23 * Stores a key for record for which the next revenue recalculation would be performed.
24 * If `None`, then recalculation has not yet been performed or calculations have been completed for all stakers.
25 **/
26 nextCalculatedRecord: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[AccountId32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
27 pendingUnstake: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[AccountId32, u128]>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
28 /**
29 * Amount of tokens staked by account in the blocknumber.
30 **/
31 staked: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<ITuple<[u128, u32]>>, [AccountId32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32]>;
32 /**
33 * Amount of stakes for an Account
34 **/
35 stakesPerAccount: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<u8>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
36 totalStaked: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
37 /**
38 * Generic query
39 **/
40 [key: string]: QueryableStorageEntry<ApiType>;
41 };
20 balances: {42 balances: {
21 /**43 /**
22 * The Balances pallet example of storing the balance of an account.44 * The Balances pallet example of storing the balance of an account.
194 [key: string]: QueryableStorageEntry<ApiType>;216 [key: string]: QueryableStorageEntry<ApiType>;
195 };217 };
196 evmContractHelpers: {218 evmContractHelpers: {
219 /**
220 * Storage for users that allowed for sponsorship.
221 *
222 * ### Usage
223 * Prefer to delete record from storage if user no more allowed for sponsorship.
224 *
225 * * **Key1** - contract address.
226 * * **Key2** - user that allowed for sponsorship.
227 * * **Value** - allowance for sponsorship.
228 **/
197 allowlist: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H160 | string | Uint8Array) => Observable<bool>, [H160, H160]> & QueryableStorageEntry<ApiType, [H160, H160]>;229 allowlist: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H160 | string | Uint8Array) => Observable<bool>, [H160, H160]> & QueryableStorageEntry<ApiType, [H160, H160]>;
230 /**
231 * Storege for contracts with [`Allowlisted`](SponsoringModeT::Allowlisted) sponsoring mode.
232 *
233 * ### Usage
234 * Prefer to delete collection from storage if mode chaged to non `Allowlisted`, than set **Value** to **false**.
235 *
236 * * **Key** - contract address.
237 * * **Value** - is contract in [`Allowlisted`](SponsoringModeT::Allowlisted) mode.
238 **/
198 allowlistEnabled: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;239 allowlistEnabled: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;
240 /**
241 * Store owner for contract.
242 *
243 * * **Key** - contract address.
244 * * **Value** - owner for contract.
245 **/
199 owner: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<H160>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;246 owner: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<H160>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;
200 selfSponsoring: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;247 selfSponsoring: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<bool>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;
248 /**
249 * Storage for last sponsored block.
250 *
251 * * **Key1** - contract address.
252 * * **Key2** - sponsored user address.
253 * * **Value** - last sponsored block number.
254 **/
201 sponsorBasket: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H160 | string | Uint8Array) => Observable<Option<u32>>, [H160, H160]> & QueryableStorageEntry<ApiType, [H160, H160]>;255 sponsorBasket: AugmentedQuery<ApiType, (arg1: H160 | string | Uint8Array, arg2: H160 | string | Uint8Array) => Observable<Option<u32>>, [H160, H160]> & QueryableStorageEntry<ApiType, [H160, H160]>;
256 /**
257 * Store for contract sponsorship state.
258 *
259 * * **Key** - contract address.
260 * * **Value** - sponsorship state.
261 **/
262 sponsoring: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<UpDataStructsSponsorshipStateBasicCrossAccountIdRepr>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;
263 /**
264 * Store for sponsoring mode.
265 *
266 * ### Usage
267 * Prefer to delete collection from storage if mode chaged to [`Disabled`](SponsoringModeT::Disabled).
268 *
269 * * **Key** - contract address.
270 * * **Value** - [`sponsoring mode`](SponsoringModeT).
271 **/
202 sponsoringMode: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<Option<PalletEvmContractHelpersSponsoringModeT>>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;272 sponsoringMode: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<Option<PalletEvmContractHelpersSponsoringModeT>>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;
273 /**
274 * Storage for sponsoring rate limit in blocks.
275 *
276 * * **Key** - contract address.
277 * * **Value** - amount of sponsored blocks.
278 **/
203 sponsoringRateLimit: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<u32>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;279 sponsoringRateLimit: AugmentedQuery<ApiType, (arg: H160 | string | Uint8Array) => Observable<u32>, [H160]> & QueryableStorageEntry<ApiType, [H160]>;
204 /**280 /**
205 * Generic query281 * Generic query
281 * 357 *
282 * Currently used to store RMRK data.358 * Currently used to store RMRK data.
283 **/359 **/
284 tokenAuxProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: UpDataStructsPropertyScope | 'None' | 'Rmrk' | 'Eth' | number | Uint8Array, arg4: Bytes | string | Uint8Array) => Observable<Option<Bytes>>, [u32, u32, UpDataStructsPropertyScope, Bytes]> & QueryableStorageEntry<ApiType, [u32, u32, UpDataStructsPropertyScope, Bytes]>;360 tokenAuxProperties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: UpDataStructsPropertyScope | 'None' | 'Rmrk' | number | Uint8Array, arg4: Bytes | string | Uint8Array) => Observable<Option<Bytes>>, [u32, u32, UpDataStructsPropertyScope, Bytes]> & QueryableStorageEntry<ApiType, [u32, u32, UpDataStructsPropertyScope, Bytes]>;
285 /**361 /**
286 * Used to enumerate token's children.362 * Used to enumerate token's children.
287 **/363 **/
modifiedtests/src/interfaces/augment-api-rpc.tsdiffbeforeafterboth
9import type { AugmentedRpc } from '@polkadot/rpc-core/types';9import type { AugmentedRpc } from '@polkadot/rpc-core/types';
10import type { Metadata, StorageKey } from '@polkadot/types';10import type { Metadata, StorageKey } from '@polkadot/types';
11import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, f64, u128, u32, u64 } from '@polkadot/types-codec';11import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, f64, u128, u32, u64 } from '@polkadot/types-codec';
12import type { AnyNumber, Codec } from '@polkadot/types-codec/types';12import type { AnyNumber, Codec, ITuple } from '@polkadot/types-codec/types';
13import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';13import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
14import type { EpochAuthorship } from '@polkadot/types/interfaces/babe';14import type { EpochAuthorship } from '@polkadot/types/interfaces/babe';
15import type { BeefySignedCommitment } from '@polkadot/types/interfaces/beefy';15import type { BeefySignedCommitment } from '@polkadot/types/interfaces/beefy';
3535
36declare module '@polkadot/rpc-core/types/jsonrpc' {36declare module '@polkadot/rpc-core/types/jsonrpc' {
37 interface RpcInterface {37 interface RpcInterface {
38 appPromotion: {
39 /**
40 * Returns the total amount of unstaked tokens
41 **/
42 pendingUnstake: AugmentedRpc<(staker?: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;
43 /**
44 * Returns the total amount of unstaked tokens per block
45 **/
46 pendingUnstakePerBlock: AugmentedRpc<(staker: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<ITuple<[u32, u128]>>>>;
47 /**
48 * Returns the total amount of staked tokens
49 **/
50 totalStaked: AugmentedRpc<(staker?: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;
51 /**
52 * Returns the total amount of staked tokens per block when staked
53 **/
54 totalStakedPerBlock: AugmentedRpc<(staker: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<ITuple<[u32, u128]>>>>;
55 };
38 author: {56 author: {
39 /**57 /**
40 * Returns true if the keystore has private keys for the given public key and key type.58 * Returns true if the keystore has private keys for the given public key and key type.
modifiedtests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth
1717
18declare module '@polkadot/api-base/types/submittable' {18declare module '@polkadot/api-base/types/submittable' {
19 interface AugmentedSubmittables<ApiType extends ApiTypes> {19 interface AugmentedSubmittables<ApiType extends ApiTypes> {
20 appPromotion: {
21 payoutStakers: AugmentedSubmittable<(stakersNumber: Option<u8> | null | Uint8Array | u8 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u8>]>;
22 setAdminAddress: AugmentedSubmittable<(admin: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletEvmAccountBasicCrossAccountIdRepr]>;
23 sponsorCollection: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
24 sponsorContract: AugmentedSubmittable<(contractId: H160 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160]>;
25 stake: AugmentedSubmittable<(amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128]>;
26 stopSponsoringCollection: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
27 stopSponsoringContract: AugmentedSubmittable<(contractId: H160 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160]>;
28 unstake: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
29 /**
30 * Generic tx
31 **/
32 [key: string]: SubmittableExtrinsicFunction<ApiType>;
33 };
20 balances: {34 balances: {
21 /**35 /**
22 * Exactly as `transfer`, except the origin must be root and the source account may be36 * Exactly as `transfer`, except the origin must be root and the source account may be
181 [key: string]: SubmittableExtrinsicFunction<ApiType>;195 [key: string]: SubmittableExtrinsicFunction<ApiType>;
182 };196 };
183 evmMigration: {197 evmMigration: {
198 /**
199 * Start contract migration, inserts contract stub at target address,
200 * and marks account as pending, allowing to insert storage
201 **/
184 begin: AugmentedSubmittable<(address: H160 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160]>;202 begin: AugmentedSubmittable<(address: H160 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160]>;
203 /**
204 * Finish contract migration, allows it to be called.
205 * It is not possible to alter contract storage via [`Self::set_data`]
206 * after this call.
207 **/
185 finish: AugmentedSubmittable<(address: H160 | string | Uint8Array, code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160, Bytes]>;208 finish: AugmentedSubmittable<(address: H160 | string | Uint8Array, code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160, Bytes]>;
209 /**
210 * Insert items into contract storage, this method can be called
211 * multiple times
212 **/
186 setData: AugmentedSubmittable<(address: H160 | string | Uint8Array, data: Vec<ITuple<[H256, H256]>> | ([H256 | string | Uint8Array, H256 | string | Uint8Array])[]) => SubmittableExtrinsic<ApiType>, [H160, Vec<ITuple<[H256, H256]>>]>;213 setData: AugmentedSubmittable<(address: H160 | string | Uint8Array, data: Vec<ITuple<[H256, H256]>> | ([H256 | string | Uint8Array, H256 | string | Uint8Array])[]) => SubmittableExtrinsic<ApiType>, [H160, Vec<ITuple<[H256, H256]>>]>;
187 /**214 /**
188 * Generic tx215 * Generic tx
modifiedtests/src/interfaces/augment-types.tsdiffbeforeafterboth
5// this is required to allow for ambient/previous definitions5// this is required to allow for ambient/previous definitions
6import '@polkadot/types/types/registry';6import '@polkadot/types/types/registry';
77
8import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmOrigin, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportDispatchRawOrigin, FrameSupportPalletId, FrameSupportScheduleLookupError, FrameSupportScheduleMaybeHashed, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeOriginCaller, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletConfigurationCall, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEthereumRawOrigin, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletRmrkCoreCall, PalletRmrkCoreError, PalletRmrkCoreEvent, PalletRmrkEquipCall, PalletRmrkEquipError, PalletRmrkEquipEvent, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentEvent, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletUniqueSchedulerCall, PalletUniqueSchedulerError, PalletUniqueSchedulerEvent, PalletUniqueSchedulerScheduledV3, PalletXcmCall, PalletXcmError, PalletXcmEvent, PalletXcmOrigin, PhantomTypeUpDataStructs, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsNftRoyaltyInfo, RmrkTraitsPartEquippableList, RmrkTraitsPartFixedPart, RmrkTraitsPartPartType, RmrkTraitsPartSlotPart, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceInfo, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, RmrkTraitsThemeThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpCoreVoid, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExMultipleOwners, UpDataStructsCreateRefungibleExSingleOwner, UpDataStructsNestingPermissions, UpDataStructsOwnerRestrictedSet, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsRpcCollection, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, UpDataStructsTokenChild, UpDataStructsTokenData, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './default';8import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmOrigin, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportDispatchRawOrigin, FrameSupportPalletId, FrameSupportScheduleLookupError, FrameSupportScheduleMaybeHashed, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeOriginCaller, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletAppPromotionCall, PalletAppPromotionError, PalletAppPromotionEvent, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletConfigurationCall, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEthereumRawOrigin, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersEvent, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletRmrkCoreCall, PalletRmrkCoreError, PalletRmrkCoreEvent, PalletRmrkEquipCall, PalletRmrkEquipError, PalletRmrkEquipEvent, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentEvent, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletUniqueSchedulerCall, PalletUniqueSchedulerError, PalletUniqueSchedulerEvent, PalletUniqueSchedulerScheduledV3, PalletXcmCall, PalletXcmError, PalletXcmEvent, PalletXcmOrigin, PhantomTypeUpDataStructs, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsNftRoyaltyInfo, RmrkTraitsPartEquippableList, RmrkTraitsPartFixedPart, RmrkTraitsPartPartType, RmrkTraitsPartSlotPart, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceInfo, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, RmrkTraitsThemeThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpCoreVoid, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExMultipleOwners, UpDataStructsCreateRefungibleExSingleOwner, UpDataStructsNestingPermissions, UpDataStructsOwnerRestrictedSet, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsRpcCollection, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipStateAccountId32, UpDataStructsSponsorshipStateBasicCrossAccountIdRepr, UpDataStructsTokenChild, UpDataStructsTokenData, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './default';
9import type { Data, StorageKey } from '@polkadot/types';9import type { Data, StorageKey } from '@polkadot/types';
10import type { BitVec, Bool, Bytes, F32, F64, I128, I16, I256, I32, I64, I8, Json, Null, OptionBool, Raw, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, f32, f64, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types-codec';10import type { BitVec, Bool, Bytes, F32, F64, I128, I16, I256, I32, I64, I8, Json, Null, OptionBool, Raw, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, f32, f64, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types-codec';
11import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';11import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';
804 Owner: Owner;804 Owner: Owner;
805 PageCounter: PageCounter;805 PageCounter: PageCounter;
806 PageIndexData: PageIndexData;806 PageIndexData: PageIndexData;
807 PalletAppPromotionCall: PalletAppPromotionCall;
808 PalletAppPromotionError: PalletAppPromotionError;
809 PalletAppPromotionEvent: PalletAppPromotionEvent;
807 PalletBalancesAccountData: PalletBalancesAccountData;810 PalletBalancesAccountData: PalletBalancesAccountData;
808 PalletBalancesBalanceLock: PalletBalancesBalanceLock;811 PalletBalancesBalanceLock: PalletBalancesBalanceLock;
809 PalletBalancesCall: PalletBalancesCall;812 PalletBalancesCall: PalletBalancesCall;
832 PalletEvmCall: PalletEvmCall;835 PalletEvmCall: PalletEvmCall;
833 PalletEvmCoderSubstrateError: PalletEvmCoderSubstrateError;836 PalletEvmCoderSubstrateError: PalletEvmCoderSubstrateError;
834 PalletEvmContractHelpersError: PalletEvmContractHelpersError;837 PalletEvmContractHelpersError: PalletEvmContractHelpersError;
838 PalletEvmContractHelpersEvent: PalletEvmContractHelpersEvent;
835 PalletEvmContractHelpersSponsoringModeT: PalletEvmContractHelpersSponsoringModeT;839 PalletEvmContractHelpersSponsoringModeT: PalletEvmContractHelpersSponsoringModeT;
836 PalletEvmError: PalletEvmError;840 PalletEvmError: PalletEvmError;
837 PalletEvmEvent: PalletEvmEvent;841 PalletEvmEvent: PalletEvmEvent;
1295 UpDataStructsPropertyScope: UpDataStructsPropertyScope;1299 UpDataStructsPropertyScope: UpDataStructsPropertyScope;
1296 UpDataStructsRpcCollection: UpDataStructsRpcCollection;1300 UpDataStructsRpcCollection: UpDataStructsRpcCollection;
1297 UpDataStructsSponsoringRateLimit: UpDataStructsSponsoringRateLimit;1301 UpDataStructsSponsoringRateLimit: UpDataStructsSponsoringRateLimit;
1298 UpDataStructsSponsorshipState: UpDataStructsSponsorshipState;1302 UpDataStructsSponsorshipStateAccountId32: UpDataStructsSponsorshipStateAccountId32;
1303 UpDataStructsSponsorshipStateBasicCrossAccountIdRepr: UpDataStructsSponsorshipStateBasicCrossAccountIdRepr;
1299 UpDataStructsTokenChild: UpDataStructsTokenChild;1304 UpDataStructsTokenChild: UpDataStructsTokenChild;
1300 UpDataStructsTokenData: UpDataStructsTokenData;1305 UpDataStructsTokenData: UpDataStructsTokenData;
1301 UpgradeGoAhead: UpgradeGoAhead;1306 UpgradeGoAhead: UpgradeGoAhead;
modifiedtests/src/interfaces/default/types.tsdiffbeforeafterboth
806 readonly perPeriod: Compact<u128>;806 readonly perPeriod: Compact<u128>;
807}807}
808
809/** @name PalletAppPromotionCall */
810export interface PalletAppPromotionCall extends Enum {
811 readonly isSetAdminAddress: boolean;
812 readonly asSetAdminAddress: {
813 readonly admin: PalletEvmAccountBasicCrossAccountIdRepr;
814 } & Struct;
815 readonly isStake: boolean;
816 readonly asStake: {
817 readonly amount: u128;
818 } & Struct;
819 readonly isUnstake: boolean;
820 readonly isSponsorCollection: boolean;
821 readonly asSponsorCollection: {
822 readonly collectionId: u32;
823 } & Struct;
824 readonly isStopSponsoringCollection: boolean;
825 readonly asStopSponsoringCollection: {
826 readonly collectionId: u32;
827 } & Struct;
828 readonly isSponsorContract: boolean;
829 readonly asSponsorContract: {
830 readonly contractId: H160;
831 } & Struct;
832 readonly isStopSponsoringContract: boolean;
833 readonly asStopSponsoringContract: {
834 readonly contractId: H160;
835 } & Struct;
836 readonly isPayoutStakers: boolean;
837 readonly asPayoutStakers: {
838 readonly stakersNumber: Option<u8>;
839 } & Struct;
840 readonly type: 'SetAdminAddress' | 'Stake' | 'Unstake' | 'SponsorCollection' | 'StopSponsoringCollection' | 'SponsorContract' | 'StopSponsoringContract' | 'PayoutStakers';
841}
842
843/** @name PalletAppPromotionError */
844export interface PalletAppPromotionError extends Enum {
845 readonly isAdminNotSet: boolean;
846 readonly isNoPermission: boolean;
847 readonly isNotSufficientFunds: boolean;
848 readonly isPendingForBlockOverflow: boolean;
849 readonly isSponsorNotSet: boolean;
850 readonly isIncorrectLockedBalanceOperation: boolean;
851 readonly type: 'AdminNotSet' | 'NoPermission' | 'NotSufficientFunds' | 'PendingForBlockOverflow' | 'SponsorNotSet' | 'IncorrectLockedBalanceOperation';
852}
853
854/** @name PalletAppPromotionEvent */
855export interface PalletAppPromotionEvent extends Enum {
856 readonly isStakingRecalculation: boolean;
857 readonly asStakingRecalculation: ITuple<[AccountId32, u128, u128]>;
858 readonly isStake: boolean;
859 readonly asStake: ITuple<[AccountId32, u128]>;
860 readonly isUnstake: boolean;
861 readonly asUnstake: ITuple<[AccountId32, u128]>;
862 readonly isSetAdmin: boolean;
863 readonly asSetAdmin: AccountId32;
864 readonly type: 'StakingRecalculation' | 'Stake' | 'Unstake' | 'SetAdmin';
865}
808866
809/** @name PalletBalancesAccountData */867/** @name PalletBalancesAccountData */
810export interface PalletBalancesAccountData extends Struct {868export interface PalletBalancesAccountData extends Struct {
1127/** @name PalletEvmContractHelpersError */1185/** @name PalletEvmContractHelpersError */
1128export interface PalletEvmContractHelpersError extends Enum {1186export interface PalletEvmContractHelpersError extends Enum {
1129 readonly isNoPermission: boolean;1187 readonly isNoPermission: boolean;
1188 readonly isNoPendingSponsor: boolean;
1130 readonly type: 'NoPermission';1189 readonly type: 'NoPermission' | 'NoPendingSponsor';
1131}1190}
1191
1192/** @name PalletEvmContractHelpersEvent */
1193export interface PalletEvmContractHelpersEvent extends Enum {
1194 readonly isContractSponsorSet: boolean;
1195 readonly asContractSponsorSet: ITuple<[H160, AccountId32]>;
1196 readonly isContractSponsorshipConfirmed: boolean;
1197 readonly asContractSponsorshipConfirmed: ITuple<[H160, AccountId32]>;
1198 readonly isContractSponsorRemoved: boolean;
1199 readonly asContractSponsorRemoved: H160;
1200 readonly type: 'ContractSponsorSet' | 'ContractSponsorshipConfirmed' | 'ContractSponsorRemoved';
1201}
11321202
1133/** @name PalletEvmContractHelpersSponsoringModeT */1203/** @name PalletEvmContractHelpersSponsoringModeT */
1134export interface PalletEvmContractHelpersSponsoringModeT extends Enum {1204export interface PalletEvmContractHelpersSponsoringModeT extends Enum {
2419 readonly name: Vec<u16>;2489 readonly name: Vec<u16>;
2420 readonly description: Vec<u16>;2490 readonly description: Vec<u16>;
2421 readonly tokenPrefix: Bytes;2491 readonly tokenPrefix: Bytes;
2422 readonly sponsorship: UpDataStructsSponsorshipState;2492 readonly sponsorship: UpDataStructsSponsorshipStateAccountId32;
2423 readonly limits: UpDataStructsCollectionLimits;2493 readonly limits: UpDataStructsCollectionLimits;
2424 readonly permissions: UpDataStructsCollectionPermissions;2494 readonly permissions: UpDataStructsCollectionPermissions;
2425 readonly externalCollection: bool;2495 readonly externalCollection: bool;
2580export interface UpDataStructsPropertyScope extends Enum {2650export interface UpDataStructsPropertyScope extends Enum {
2581 readonly isNone: boolean;2651 readonly isNone: boolean;
2582 readonly isRmrk: boolean;2652 readonly isRmrk: boolean;
2583 readonly isEth: boolean;
2584 readonly type: 'None' | 'Rmrk' | 'Eth';2653 readonly type: 'None' | 'Rmrk';
2585}2654}
25862655
2587/** @name UpDataStructsRpcCollection */2656/** @name UpDataStructsRpcCollection */
2591 readonly name: Vec<u16>;2660 readonly name: Vec<u16>;
2592 readonly description: Vec<u16>;2661 readonly description: Vec<u16>;
2593 readonly tokenPrefix: Bytes;2662 readonly tokenPrefix: Bytes;
2594 readonly sponsorship: UpDataStructsSponsorshipState;2663 readonly sponsorship: UpDataStructsSponsorshipStateAccountId32;
2595 readonly limits: UpDataStructsCollectionLimits;2664 readonly limits: UpDataStructsCollectionLimits;
2596 readonly permissions: UpDataStructsCollectionPermissions;2665 readonly permissions: UpDataStructsCollectionPermissions;
2597 readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;2666 readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;
2607 readonly type: 'SponsoringDisabled' | 'Blocks';2676 readonly type: 'SponsoringDisabled' | 'Blocks';
2608}2677}
26092678
2610/** @name UpDataStructsSponsorshipState */2679/** @name UpDataStructsSponsorshipStateAccountId32 */
2611export interface UpDataStructsSponsorshipState extends Enum {2680export interface UpDataStructsSponsorshipStateAccountId32 extends Enum {
2612 readonly isDisabled: boolean;2681 readonly isDisabled: boolean;
2613 readonly isUnconfirmed: boolean;2682 readonly isUnconfirmed: boolean;
2614 readonly asUnconfirmed: AccountId32;2683 readonly asUnconfirmed: AccountId32;
2617 readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';2686 readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';
2618}2687}
2688
2689/** @name UpDataStructsSponsorshipStateBasicCrossAccountIdRepr */
2690export interface UpDataStructsSponsorshipStateBasicCrossAccountIdRepr extends Enum {
2691 readonly isDisabled: boolean;
2692 readonly isUnconfirmed: boolean;
2693 readonly asUnconfirmed: PalletEvmAccountBasicCrossAccountIdRepr;
2694 readonly isConfirmed: boolean;
2695 readonly asConfirmed: PalletEvmAccountBasicCrossAccountIdRepr;
2696 readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';
2697}
26192698
2620/** @name UpDataStructsTokenChild */2699/** @name UpDataStructsTokenChild */
2621export interface UpDataStructsTokenChild extends Struct {2700export interface UpDataStructsTokenChild extends Struct {
modifiedtests/src/interfaces/definitions.tsdiffbeforeafterboth
15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
1616
17export {default as unique} from './unique/definitions';17export {default as unique} from './unique/definitions';
18export {default as appPromotion} from './appPromotion/definitions';
18export {default as rmrk} from './rmrk/definitions';19export {default as rmrk} from './rmrk/definitions';
19export {default as default} from './default/definitions';20export {default as default} from './default/definitions';
modifiedtests/src/interfaces/lookup.tsdiffbeforeafterboth
1056 }1056 }
1057 }1057 }
1058 },1058 },
1059 /**
1060 * Lookup103: pallet_app_promotion::pallet::Event<T>
1061 **/
1062 PalletAppPromotionEvent: {
1063 _enum: {
1064 StakingRecalculation: '(AccountId32,u128,u128)',
1065 Stake: '(AccountId32,u128)',
1066 Unstake: '(AccountId32,u128)',
1067 SetAdmin: 'AccountId32'
1068 }
1069 },
1059 /**1070 /**
1060 * Lookup103: pallet_evm::pallet::Event<T>1071 * Lookup104: pallet_evm::pallet::Event<T>
1061 **/1072 **/
1062 PalletEvmEvent: {1073 PalletEvmEvent: {
1063 _enum: {1074 _enum: {
1064 Log: 'EthereumLog',1075 Log: 'EthereumLog',
1070 BalanceWithdraw: '(AccountId32,H160,U256)'1081 BalanceWithdraw: '(AccountId32,H160,U256)'
1071 }1082 }
1072 },1083 },
1073 /**1084 /**
1074 * Lookup104: ethereum::log::Log1085 * Lookup105: ethereum::log::Log
1075 **/1086 **/
1076 EthereumLog: {1087 EthereumLog: {
1077 address: 'H160',1088 address: 'H160',
1078 topics: 'Vec<H256>',1089 topics: 'Vec<H256>',
1079 data: 'Bytes'1090 data: 'Bytes'
1080 },1091 },
1081 /**1092 /**
1082 * Lookup108: pallet_ethereum::pallet::Event1093 * Lookup109: pallet_ethereum::pallet::Event
1083 **/1094 **/
1084 PalletEthereumEvent: {1095 PalletEthereumEvent: {
1085 _enum: {1096 _enum: {
1086 Executed: '(H160,H160,H256,EvmCoreErrorExitReason)'1097 Executed: '(H160,H160,H256,EvmCoreErrorExitReason)'
1087 }1098 }
1088 },1099 },
1089 /**1100 /**
1090 * Lookup109: evm_core::error::ExitReason1101 * Lookup110: evm_core::error::ExitReason
1091 **/1102 **/
1092 EvmCoreErrorExitReason: {1103 EvmCoreErrorExitReason: {
1093 _enum: {1104 _enum: {
1094 Succeed: 'EvmCoreErrorExitSucceed',1105 Succeed: 'EvmCoreErrorExitSucceed',
1097 Fatal: 'EvmCoreErrorExitFatal'1108 Fatal: 'EvmCoreErrorExitFatal'
1098 }1109 }
1099 },1110 },
1100 /**1111 /**
1101 * Lookup110: evm_core::error::ExitSucceed1112 * Lookup111: evm_core::error::ExitSucceed
1102 **/1113 **/
1103 EvmCoreErrorExitSucceed: {1114 EvmCoreErrorExitSucceed: {
1104 _enum: ['Stopped', 'Returned', 'Suicided']1115 _enum: ['Stopped', 'Returned', 'Suicided']
1105 },1116 },
1106 /**1117 /**
1107 * Lookup111: evm_core::error::ExitError1118 * Lookup112: evm_core::error::ExitError
1108 **/1119 **/
1109 EvmCoreErrorExitError: {1120 EvmCoreErrorExitError: {
1110 _enum: {1121 _enum: {
1111 StackUnderflow: 'Null',1122 StackUnderflow: 'Null',
1125 InvalidCode: 'Null'1136 InvalidCode: 'Null'
1126 }1137 }
1127 },1138 },
1128 /**1139 /**
1129 * Lookup114: evm_core::error::ExitRevert1140 * Lookup115: evm_core::error::ExitRevert
1130 **/1141 **/
1131 EvmCoreErrorExitRevert: {1142 EvmCoreErrorExitRevert: {
1132 _enum: ['Reverted']1143 _enum: ['Reverted']
1133 },1144 },
1134 /**1145 /**
1135 * Lookup115: evm_core::error::ExitFatal1146 * Lookup116: evm_core::error::ExitFatal
1136 **/1147 **/
1137 EvmCoreErrorExitFatal: {1148 EvmCoreErrorExitFatal: {
1138 _enum: {1149 _enum: {
1139 NotSupported: 'Null',1150 NotSupported: 'Null',
1142 Other: 'Text'1153 Other: 'Text'
1143 }1154 }
1144 },1155 },
1156 /**
1157 * Lookup117: pallet_evm_contract_helpers::pallet::Event<T>
1158 **/
1159 PalletEvmContractHelpersEvent: {
1160 _enum: {
1161 ContractSponsorSet: '(H160,AccountId32)',
1162 ContractSponsorshipConfirmed: '(H160,AccountId32)',
1163 ContractSponsorRemoved: 'H160'
1164 }
1165 },
1145 /**1166 /**
1146 * Lookup116: frame_system::Phase1167 * Lookup118: frame_system::Phase
1147 **/1168 **/
1148 FrameSystemPhase: {1169 FrameSystemPhase: {
1149 _enum: {1170 _enum: {
1150 ApplyExtrinsic: 'u32',1171 ApplyExtrinsic: 'u32',
1151 Finalization: 'Null',1172 Finalization: 'Null',
1152 Initialization: 'Null'1173 Initialization: 'Null'
1153 }1174 }
1154 },1175 },
1155 /**1176 /**
1156 * Lookup118: frame_system::LastRuntimeUpgradeInfo1177 * Lookup120: frame_system::LastRuntimeUpgradeInfo
1157 **/1178 **/
1158 FrameSystemLastRuntimeUpgradeInfo: {1179 FrameSystemLastRuntimeUpgradeInfo: {
1159 specVersion: 'Compact<u32>',1180 specVersion: 'Compact<u32>',
1160 specName: 'Text'1181 specName: 'Text'
1161 },1182 },
1162 /**1183 /**
1163 * Lookup119: frame_system::pallet::Call<T>1184 * Lookup121: frame_system::pallet::Call<T>
1164 **/1185 **/
1165 FrameSystemCall: {1186 FrameSystemCall: {
1166 _enum: {1187 _enum: {
1167 fill_block: {1188 fill_block: {
1197 }1218 }
1198 }1219 }
1199 },1220 },
1200 /**1221 /**
1201 * Lookup124: frame_system::limits::BlockWeights1222 * Lookup126: frame_system::limits::BlockWeights
1202 **/1223 **/
1203 FrameSystemLimitsBlockWeights: {1224 FrameSystemLimitsBlockWeights: {
1204 baseBlock: 'u64',1225 baseBlock: 'u64',
1205 maxBlock: 'u64',1226 maxBlock: 'u64',
1206 perClass: 'FrameSupportWeightsPerDispatchClassWeightsPerClass'1227 perClass: 'FrameSupportWeightsPerDispatchClassWeightsPerClass'
1207 },1228 },
1208 /**1229 /**
1209 * Lookup125: frame_support::weights::PerDispatchClass<frame_system::limits::WeightsPerClass>1230 * Lookup127: frame_support::weights::PerDispatchClass<frame_system::limits::WeightsPerClass>
1210 **/1231 **/
1211 FrameSupportWeightsPerDispatchClassWeightsPerClass: {1232 FrameSupportWeightsPerDispatchClassWeightsPerClass: {
1212 normal: 'FrameSystemLimitsWeightsPerClass',1233 normal: 'FrameSystemLimitsWeightsPerClass',
1213 operational: 'FrameSystemLimitsWeightsPerClass',1234 operational: 'FrameSystemLimitsWeightsPerClass',
1214 mandatory: 'FrameSystemLimitsWeightsPerClass'1235 mandatory: 'FrameSystemLimitsWeightsPerClass'
1215 },1236 },
1216 /**1237 /**
1217 * Lookup126: frame_system::limits::WeightsPerClass1238 * Lookup128: frame_system::limits::WeightsPerClass
1218 **/1239 **/
1219 FrameSystemLimitsWeightsPerClass: {1240 FrameSystemLimitsWeightsPerClass: {
1220 baseExtrinsic: 'u64',1241 baseExtrinsic: 'u64',
1221 maxExtrinsic: 'Option<u64>',1242 maxExtrinsic: 'Option<u64>',
1222 maxTotal: 'Option<u64>',1243 maxTotal: 'Option<u64>',
1223 reserved: 'Option<u64>'1244 reserved: 'Option<u64>'
1224 },1245 },
1225 /**1246 /**
1226 * Lookup128: frame_system::limits::BlockLength1247 * Lookup130: frame_system::limits::BlockLength
1227 **/1248 **/
1228 FrameSystemLimitsBlockLength: {1249 FrameSystemLimitsBlockLength: {
1229 max: 'FrameSupportWeightsPerDispatchClassU32'1250 max: 'FrameSupportWeightsPerDispatchClassU32'
1230 },1251 },
1231 /**1252 /**
1232 * Lookup129: frame_support::weights::PerDispatchClass<T>1253 * Lookup131: frame_support::weights::PerDispatchClass<T>
1233 **/1254 **/
1234 FrameSupportWeightsPerDispatchClassU32: {1255 FrameSupportWeightsPerDispatchClassU32: {
1235 normal: 'u32',1256 normal: 'u32',
1236 operational: 'u32',1257 operational: 'u32',
1237 mandatory: 'u32'1258 mandatory: 'u32'
1238 },1259 },
1239 /**1260 /**
1240 * Lookup130: frame_support::weights::RuntimeDbWeight1261 * Lookup132: frame_support::weights::RuntimeDbWeight
1241 **/1262 **/
1242 FrameSupportWeightsRuntimeDbWeight: {1263 FrameSupportWeightsRuntimeDbWeight: {
1243 read: 'u64',1264 read: 'u64',
1244 write: 'u64'1265 write: 'u64'
1245 },1266 },
1246 /**1267 /**
1247 * Lookup131: sp_version::RuntimeVersion1268 * Lookup133: sp_version::RuntimeVersion
1248 **/1269 **/
1249 SpVersionRuntimeVersion: {1270 SpVersionRuntimeVersion: {
1250 specName: 'Text',1271 specName: 'Text',
1251 implName: 'Text',1272 implName: 'Text',
1256 transactionVersion: 'u32',1277 transactionVersion: 'u32',
1257 stateVersion: 'u8'1278 stateVersion: 'u8'
1258 },1279 },
1259 /**1280 /**
1260 * Lookup136: frame_system::pallet::Error<T>1281 * Lookup138: frame_system::pallet::Error<T>
1261 **/1282 **/
1262 FrameSystemError: {1283 FrameSystemError: {
1263 _enum: ['InvalidSpecName', 'SpecVersionNeedsToIncrease', 'FailedToExtractRuntimeVersion', 'NonDefaultComposite', 'NonZeroRefCount', 'CallFiltered']1284 _enum: ['InvalidSpecName', 'SpecVersionNeedsToIncrease', 'FailedToExtractRuntimeVersion', 'NonDefaultComposite', 'NonZeroRefCount', 'CallFiltered']
1264 },1285 },
1265 /**1286 /**
1266 * Lookup137: polkadot_primitives::v2::PersistedValidationData<primitive_types::H256, N>1287 * Lookup139: polkadot_primitives::v2::PersistedValidationData<primitive_types::H256, N>
1267 **/1288 **/
1268 PolkadotPrimitivesV2PersistedValidationData: {1289 PolkadotPrimitivesV2PersistedValidationData: {
1269 parentHead: 'Bytes',1290 parentHead: 'Bytes',
1270 relayParentNumber: 'u32',1291 relayParentNumber: 'u32',
1271 relayParentStorageRoot: 'H256',1292 relayParentStorageRoot: 'H256',
1272 maxPovSize: 'u32'1293 maxPovSize: 'u32'
1273 },1294 },
1274 /**1295 /**
1275 * Lookup140: polkadot_primitives::v2::UpgradeRestriction1296 * Lookup142: polkadot_primitives::v2::UpgradeRestriction
1276 **/1297 **/
1277 PolkadotPrimitivesV2UpgradeRestriction: {1298 PolkadotPrimitivesV2UpgradeRestriction: {
1278 _enum: ['Present']1299 _enum: ['Present']
1279 },1300 },
1280 /**1301 /**
1281 * Lookup141: sp_trie::storage_proof::StorageProof1302 * Lookup143: sp_trie::storage_proof::StorageProof
1282 **/1303 **/
1283 SpTrieStorageProof: {1304 SpTrieStorageProof: {
1284 trieNodes: 'BTreeSet<Bytes>'1305 trieNodes: 'BTreeSet<Bytes>'
1285 },1306 },
1286 /**1307 /**
1287 * Lookup143: cumulus_pallet_parachain_system::relay_state_snapshot::MessagingStateSnapshot1308 * Lookup145: cumulus_pallet_parachain_system::relay_state_snapshot::MessagingStateSnapshot
1288 **/1309 **/
1289 CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot: {1310 CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot: {
1290 dmqMqcHead: 'H256',1311 dmqMqcHead: 'H256',
1291 relayDispatchQueueSize: '(u32,u32)',1312 relayDispatchQueueSize: '(u32,u32)',
1292 ingressChannels: 'Vec<(u32,PolkadotPrimitivesV2AbridgedHrmpChannel)>',1313 ingressChannels: 'Vec<(u32,PolkadotPrimitivesV2AbridgedHrmpChannel)>',
1293 egressChannels: 'Vec<(u32,PolkadotPrimitivesV2AbridgedHrmpChannel)>'1314 egressChannels: 'Vec<(u32,PolkadotPrimitivesV2AbridgedHrmpChannel)>'
1294 },1315 },
1295 /**1316 /**
1296 * Lookup146: polkadot_primitives::v2::AbridgedHrmpChannel1317 * Lookup148: polkadot_primitives::v2::AbridgedHrmpChannel
1297 **/1318 **/
1298 PolkadotPrimitivesV2AbridgedHrmpChannel: {1319 PolkadotPrimitivesV2AbridgedHrmpChannel: {
1299 maxCapacity: 'u32',1320 maxCapacity: 'u32',
1300 maxTotalSize: 'u32',1321 maxTotalSize: 'u32',
1303 totalSize: 'u32',1324 totalSize: 'u32',
1304 mqcHead: 'Option<H256>'1325 mqcHead: 'Option<H256>'
1305 },1326 },
1306 /**1327 /**
1307 * Lookup147: polkadot_primitives::v2::AbridgedHostConfiguration1328 * Lookup149: polkadot_primitives::v2::AbridgedHostConfiguration
1308 **/1329 **/
1309 PolkadotPrimitivesV2AbridgedHostConfiguration: {1330 PolkadotPrimitivesV2AbridgedHostConfiguration: {
1310 maxCodeSize: 'u32',1331 maxCodeSize: 'u32',
1311 maxHeadDataSize: 'u32',1332 maxHeadDataSize: 'u32',
1317 validationUpgradeCooldown: 'u32',1338 validationUpgradeCooldown: 'u32',
1318 validationUpgradeDelay: 'u32'1339 validationUpgradeDelay: 'u32'
1319 },1340 },
1320 /**1341 /**
1321 * Lookup153: polkadot_core_primitives::OutboundHrmpMessage<polkadot_parachain::primitives::Id>1342 * Lookup155: polkadot_core_primitives::OutboundHrmpMessage<polkadot_parachain::primitives::Id>
1322 **/1343 **/
1323 PolkadotCorePrimitivesOutboundHrmpMessage: {1344 PolkadotCorePrimitivesOutboundHrmpMessage: {
1324 recipient: 'u32',1345 recipient: 'u32',
1325 data: 'Bytes'1346 data: 'Bytes'
1326 },1347 },
1327 /**1348 /**
1328 * Lookup154: cumulus_pallet_parachain_system::pallet::Call<T>1349 * Lookup156: cumulus_pallet_parachain_system::pallet::Call<T>
1329 **/1350 **/
1330 CumulusPalletParachainSystemCall: {1351 CumulusPalletParachainSystemCall: {
1331 _enum: {1352 _enum: {
1332 set_validation_data: {1353 set_validation_data: {
1343 }1364 }
1344 }1365 }
1345 },1366 },
1346 /**1367 /**
1347 * Lookup155: cumulus_primitives_parachain_inherent::ParachainInherentData1368 * Lookup157: cumulus_primitives_parachain_inherent::ParachainInherentData
1348 **/1369 **/
1349 CumulusPrimitivesParachainInherentParachainInherentData: {1370 CumulusPrimitivesParachainInherentParachainInherentData: {
1350 validationData: 'PolkadotPrimitivesV2PersistedValidationData',1371 validationData: 'PolkadotPrimitivesV2PersistedValidationData',
1351 relayChainState: 'SpTrieStorageProof',1372 relayChainState: 'SpTrieStorageProof',
1352 downwardMessages: 'Vec<PolkadotCorePrimitivesInboundDownwardMessage>',1373 downwardMessages: 'Vec<PolkadotCorePrimitivesInboundDownwardMessage>',
1353 horizontalMessages: 'BTreeMap<u32, Vec<PolkadotCorePrimitivesInboundHrmpMessage>>'1374 horizontalMessages: 'BTreeMap<u32, Vec<PolkadotCorePrimitivesInboundHrmpMessage>>'
1354 },1375 },
1355 /**1376 /**
1356 * Lookup157: polkadot_core_primitives::InboundDownwardMessage<BlockNumber>1377 * Lookup159: polkadot_core_primitives::InboundDownwardMessage<BlockNumber>
1357 **/1378 **/
1358 PolkadotCorePrimitivesInboundDownwardMessage: {1379 PolkadotCorePrimitivesInboundDownwardMessage: {
1359 sentAt: 'u32',1380 sentAt: 'u32',
1360 msg: 'Bytes'1381 msg: 'Bytes'
1361 },1382 },
1362 /**1383 /**
1363 * Lookup160: polkadot_core_primitives::InboundHrmpMessage<BlockNumber>1384 * Lookup162: polkadot_core_primitives::InboundHrmpMessage<BlockNumber>
1364 **/1385 **/
1365 PolkadotCorePrimitivesInboundHrmpMessage: {1386 PolkadotCorePrimitivesInboundHrmpMessage: {
1366 sentAt: 'u32',1387 sentAt: 'u32',
1367 data: 'Bytes'1388 data: 'Bytes'
1368 },1389 },
1369 /**1390 /**
1370 * Lookup163: cumulus_pallet_parachain_system::pallet::Error<T>1391 * Lookup165: cumulus_pallet_parachain_system::pallet::Error<T>
1371 **/1392 **/
1372 CumulusPalletParachainSystemError: {1393 CumulusPalletParachainSystemError: {
1373 _enum: ['OverlappingUpgrades', 'ProhibitedByPolkadot', 'TooBig', 'ValidationDataNotAvailable', 'HostConfigurationNotAvailable', 'NotScheduled', 'NothingAuthorized', 'Unauthorized']1394 _enum: ['OverlappingUpgrades', 'ProhibitedByPolkadot', 'TooBig', 'ValidationDataNotAvailable', 'HostConfigurationNotAvailable', 'NotScheduled', 'NothingAuthorized', 'Unauthorized']
1374 },1395 },
1375 /**1396 /**
1376 * Lookup165: pallet_balances::BalanceLock<Balance>1397 * Lookup167: pallet_balances::BalanceLock<Balance>
1377 **/1398 **/
1378 PalletBalancesBalanceLock: {1399 PalletBalancesBalanceLock: {
1379 id: '[u8;8]',1400 id: '[u8;8]',
1380 amount: 'u128',1401 amount: 'u128',
1381 reasons: 'PalletBalancesReasons'1402 reasons: 'PalletBalancesReasons'
1382 },1403 },
1383 /**1404 /**
1384 * Lookup166: pallet_balances::Reasons1405 * Lookup168: pallet_balances::Reasons
1385 **/1406 **/
1386 PalletBalancesReasons: {1407 PalletBalancesReasons: {
1387 _enum: ['Fee', 'Misc', 'All']1408 _enum: ['Fee', 'Misc', 'All']
1388 },1409 },
1389 /**1410 /**
1390 * Lookup169: pallet_balances::ReserveData<ReserveIdentifier, Balance>1411 * Lookup171: pallet_balances::ReserveData<ReserveIdentifier, Balance>
1391 **/1412 **/
1392 PalletBalancesReserveData: {1413 PalletBalancesReserveData: {
1393 id: '[u8;16]',1414 id: '[u8;16]',
1394 amount: 'u128'1415 amount: 'u128'
1395 },1416 },
1396 /**1417 /**
1397 * Lookup171: pallet_balances::Releases1418 * Lookup173: pallet_balances::Releases
1398 **/1419 **/
1399 PalletBalancesReleases: {1420 PalletBalancesReleases: {
1400 _enum: ['V1_0_0', 'V2_0_0']1421 _enum: ['V1_0_0', 'V2_0_0']
1401 },1422 },
1402 /**1423 /**
1403 * Lookup172: pallet_balances::pallet::Call<T, I>1424 * Lookup174: pallet_balances::pallet::Call<T, I>
1404 **/1425 **/
1405 PalletBalancesCall: {1426 PalletBalancesCall: {
1406 _enum: {1427 _enum: {
1407 transfer: {1428 transfer: {
1432 }1453 }
1433 }1454 }
1434 },1455 },
1435 /**1456 /**
1436 * Lookup175: pallet_balances::pallet::Error<T, I>1457 * Lookup177: pallet_balances::pallet::Error<T, I>
1437 **/1458 **/
1438 PalletBalancesError: {1459 PalletBalancesError: {
1439 _enum: ['VestingBalance', 'LiquidityRestrictions', 'InsufficientBalance', 'ExistentialDeposit', 'KeepAlive', 'ExistingVestingSchedule', 'DeadAccount', 'TooManyReserves']1460 _enum: ['VestingBalance', 'LiquidityRestrictions', 'InsufficientBalance', 'ExistentialDeposit', 'KeepAlive', 'ExistingVestingSchedule', 'DeadAccount', 'TooManyReserves']
1440 },1461 },
1441 /**1462 /**
1442 * Lookup177: pallet_timestamp::pallet::Call<T>1463 * Lookup179: pallet_timestamp::pallet::Call<T>
1443 **/1464 **/
1444 PalletTimestampCall: {1465 PalletTimestampCall: {
1445 _enum: {1466 _enum: {
1446 set: {1467 set: {
1447 now: 'Compact<u64>'1468 now: 'Compact<u64>'
1448 }1469 }
1449 }1470 }
1450 },1471 },
1451 /**1472 /**
1452 * Lookup179: pallet_transaction_payment::Releases1473 * Lookup181: pallet_transaction_payment::Releases
1453 **/1474 **/
1454 PalletTransactionPaymentReleases: {1475 PalletTransactionPaymentReleases: {
1455 _enum: ['V1Ancient', 'V2']1476 _enum: ['V1Ancient', 'V2']
1456 },1477 },
1457 /**1478 /**
1458 * Lookup180: pallet_treasury::Proposal<sp_core::crypto::AccountId32, Balance>1479 * Lookup182: pallet_treasury::Proposal<sp_core::crypto::AccountId32, Balance>
1459 **/1480 **/
1460 PalletTreasuryProposal: {1481 PalletTreasuryProposal: {
1461 proposer: 'AccountId32',1482 proposer: 'AccountId32',
1462 value: 'u128',1483 value: 'u128',
1463 beneficiary: 'AccountId32',1484 beneficiary: 'AccountId32',
1464 bond: 'u128'1485 bond: 'u128'
1465 },1486 },
1466 /**1487 /**
1467 * Lookup183: pallet_treasury::pallet::Call<T, I>1488 * Lookup185: pallet_treasury::pallet::Call<T, I>
1468 **/1489 **/
1469 PalletTreasuryCall: {1490 PalletTreasuryCall: {
1470 _enum: {1491 _enum: {
1471 propose_spend: {1492 propose_spend: {
1487 }1508 }
1488 }1509 }
1489 },1510 },
1490 /**1511 /**
1491 * Lookup186: frame_support::PalletId1512 * Lookup188: frame_support::PalletId
1492 **/1513 **/
1493 FrameSupportPalletId: '[u8;8]',1514 FrameSupportPalletId: '[u8;8]',
1494 /**1515 /**
1495 * Lookup187: pallet_treasury::pallet::Error<T, I>1516 * Lookup189: pallet_treasury::pallet::Error<T, I>
1496 **/1517 **/
1497 PalletTreasuryError: {1518 PalletTreasuryError: {
1498 _enum: ['InsufficientProposersBalance', 'InvalidIndex', 'TooManyApprovals', 'InsufficientPermission', 'ProposalNotApproved']1519 _enum: ['InsufficientProposersBalance', 'InvalidIndex', 'TooManyApprovals', 'InsufficientPermission', 'ProposalNotApproved']
1499 },1520 },
1500 /**1521 /**
1501 * Lookup188: pallet_sudo::pallet::Call<T>1522 * Lookup190: pallet_sudo::pallet::Call<T>
1502 **/1523 **/
1503 PalletSudoCall: {1524 PalletSudoCall: {
1504 _enum: {1525 _enum: {
1505 sudo: {1526 sudo: {
1521 }1542 }
1522 }1543 }
1523 },1544 },
1524 /**1545 /**
1525 * Lookup190: orml_vesting::module::Call<T>1546 * Lookup192: orml_vesting::module::Call<T>
1526 **/1547 **/
1527 OrmlVestingModuleCall: {1548 OrmlVestingModuleCall: {
1528 _enum: {1549 _enum: {
1529 claim: 'Null',1550 claim: 'Null',
1540 }1561 }
1541 }1562 }
1542 },1563 },
1543 /**1564 /**
1544 * Lookup192: cumulus_pallet_xcmp_queue::pallet::Call<T>1565 * Lookup194: cumulus_pallet_xcmp_queue::pallet::Call<T>
1545 **/1566 **/
1546 CumulusPalletXcmpQueueCall: {1567 CumulusPalletXcmpQueueCall: {
1547 _enum: {1568 _enum: {
1548 service_overweight: {1569 service_overweight: {
1589 }1610 }
1590 }1611 }
1591 },1612 },
1592 /**1613 /**
1593 * Lookup193: pallet_xcm::pallet::Call<T>1614 * Lookup195: pallet_xcm::pallet::Call<T>
1594 **/1615 **/
1595 PalletXcmCall: {1616 PalletXcmCall: {
1596 _enum: {1617 _enum: {
1597 send: {1618 send: {
1643 }1664 }
1644 }1665 }
1645 },1666 },
1646 /**1667 /**
1647 * Lookup194: xcm::VersionedXcm<Call>1668 * Lookup196: xcm::VersionedXcm<Call>
1648 **/1669 **/
1649 XcmVersionedXcm: {1670 XcmVersionedXcm: {
1650 _enum: {1671 _enum: {
1651 V0: 'XcmV0Xcm',1672 V0: 'XcmV0Xcm',
1652 V1: 'XcmV1Xcm',1673 V1: 'XcmV1Xcm',
1653 V2: 'XcmV2Xcm'1674 V2: 'XcmV2Xcm'
1654 }1675 }
1655 },1676 },
1656 /**1677 /**
1657 * Lookup195: xcm::v0::Xcm<Call>1678 * Lookup197: xcm::v0::Xcm<Call>
1658 **/1679 **/
1659 XcmV0Xcm: {1680 XcmV0Xcm: {
1660 _enum: {1681 _enum: {
1661 WithdrawAsset: {1682 WithdrawAsset: {
1707 }1728 }
1708 }1729 }
1709 },1730 },
1710 /**1731 /**
1711 * Lookup197: xcm::v0::order::Order<Call>1732 * Lookup199: xcm::v0::order::Order<Call>
1712 **/1733 **/
1713 XcmV0Order: {1734 XcmV0Order: {
1714 _enum: {1735 _enum: {
1715 Null: 'Null',1736 Null: 'Null',
1750 }1771 }
1751 }1772 }
1752 },1773 },
1753 /**1774 /**
1754 * Lookup199: xcm::v0::Response1775 * Lookup201: xcm::v0::Response
1755 **/1776 **/
1756 XcmV0Response: {1777 XcmV0Response: {
1757 _enum: {1778 _enum: {
1758 Assets: 'Vec<XcmV0MultiAsset>'1779 Assets: 'Vec<XcmV0MultiAsset>'
1759 }1780 }
1760 },1781 },
1761 /**1782 /**
1762 * Lookup200: xcm::v1::Xcm<Call>1783 * Lookup202: xcm::v1::Xcm<Call>
1763 **/1784 **/
1764 XcmV1Xcm: {1785 XcmV1Xcm: {
1765 _enum: {1786 _enum: {
1766 WithdrawAsset: {1787 WithdrawAsset: {
1817 UnsubscribeVersion: 'Null'1838 UnsubscribeVersion: 'Null'
1818 }1839 }
1819 },1840 },
1820 /**1841 /**
1821 * Lookup202: xcm::v1::order::Order<Call>1842 * Lookup204: xcm::v1::order::Order<Call>
1822 **/1843 **/
1823 XcmV1Order: {1844 XcmV1Order: {
1824 _enum: {1845 _enum: {
1825 Noop: 'Null',1846 Noop: 'Null',
1862 }1883 }
1863 }1884 }
1864 },1885 },
1865 /**1886 /**
1866 * Lookup204: xcm::v1::Response1887 * Lookup206: xcm::v1::Response
1867 **/1888 **/
1868 XcmV1Response: {1889 XcmV1Response: {
1869 _enum: {1890 _enum: {
1870 Assets: 'XcmV1MultiassetMultiAssets',1891 Assets: 'XcmV1MultiassetMultiAssets',
1871 Version: 'u32'1892 Version: 'u32'
1872 }1893 }
1873 },1894 },
1874 /**1895 /**
1875 * Lookup218: cumulus_pallet_xcm::pallet::Call<T>1896 * Lookup220: cumulus_pallet_xcm::pallet::Call<T>
1876 **/1897 **/
1877 CumulusPalletXcmCall: 'Null',1898 CumulusPalletXcmCall: 'Null',
1878 /**1899 /**
1879 * Lookup219: cumulus_pallet_dmp_queue::pallet::Call<T>1900 * Lookup221: cumulus_pallet_dmp_queue::pallet::Call<T>
1880 **/1901 **/
1881 CumulusPalletDmpQueueCall: {1902 CumulusPalletDmpQueueCall: {
1882 _enum: {1903 _enum: {
1883 service_overweight: {1904 service_overweight: {
1886 }1907 }
1887 }1908 }
1888 },1909 },
1889 /**1910 /**
1890 * Lookup220: pallet_inflation::pallet::Call<T>1911 * Lookup222: pallet_inflation::pallet::Call<T>
1891 **/1912 **/
1892 PalletInflationCall: {1913 PalletInflationCall: {
1893 _enum: {1914 _enum: {
1894 start_inflation: {1915 start_inflation: {
1895 inflationStartRelayBlock: 'u32'1916 inflationStartRelayBlock: 'u32'
1896 }1917 }
1897 }1918 }
1898 },1919 },
1899 /**1920 /**
1900 * Lookup221: pallet_unique::Call<T>1921 * Lookup223: pallet_unique::Call<T>
1901 **/1922 **/
1902 PalletUniqueCall: {1923 PalletUniqueCall: {
1903 _enum: {1924 _enum: {
1904 create_collection: {1925 create_collection: {
2028 }2049 }
2029 }2050 }
2030 },2051 },
2031 /**2052 /**
2032 * Lookup226: up_data_structs::CollectionMode2053 * Lookup228: up_data_structs::CollectionMode
2033 **/2054 **/
2034 UpDataStructsCollectionMode: {2055 UpDataStructsCollectionMode: {
2035 _enum: {2056 _enum: {
2036 NFT: 'Null',2057 NFT: 'Null',
2037 Fungible: 'u8',2058 Fungible: 'u8',
2038 ReFungible: 'Null'2059 ReFungible: 'Null'
2039 }2060 }
2040 },2061 },
2041 /**2062 /**
2042 * Lookup227: up_data_structs::CreateCollectionData<sp_core::crypto::AccountId32>2063 * Lookup229: up_data_structs::CreateCollectionData<sp_core::crypto::AccountId32>
2043 **/2064 **/
2044 UpDataStructsCreateCollectionData: {2065 UpDataStructsCreateCollectionData: {
2045 mode: 'UpDataStructsCollectionMode',2066 mode: 'UpDataStructsCollectionMode',
2046 access: 'Option<UpDataStructsAccessMode>',2067 access: 'Option<UpDataStructsAccessMode>',
2053 tokenPropertyPermissions: 'Vec<UpDataStructsPropertyKeyPermission>',2074 tokenPropertyPermissions: 'Vec<UpDataStructsPropertyKeyPermission>',
2054 properties: 'Vec<UpDataStructsProperty>'2075 properties: 'Vec<UpDataStructsProperty>'
2055 },2076 },
2056 /**2077 /**
2057 * Lookup229: up_data_structs::AccessMode2078 * Lookup231: up_data_structs::AccessMode
2058 **/2079 **/
2059 UpDataStructsAccessMode: {2080 UpDataStructsAccessMode: {
2060 _enum: ['Normal', 'AllowList']2081 _enum: ['Normal', 'AllowList']
2061 },2082 },
2062 /**2083 /**
2063 * Lookup231: up_data_structs::CollectionLimits2084 * Lookup233: up_data_structs::CollectionLimits
2064 **/2085 **/
2065 UpDataStructsCollectionLimits: {2086 UpDataStructsCollectionLimits: {
2066 accountTokenOwnershipLimit: 'Option<u32>',2087 accountTokenOwnershipLimit: 'Option<u32>',
2067 sponsoredDataSize: 'Option<u32>',2088 sponsoredDataSize: 'Option<u32>',
2073 ownerCanDestroy: 'Option<bool>',2094 ownerCanDestroy: 'Option<bool>',
2074 transfersEnabled: 'Option<bool>'2095 transfersEnabled: 'Option<bool>'
2075 },2096 },
2076 /**2097 /**
2077 * Lookup233: up_data_structs::SponsoringRateLimit2098 * Lookup235: up_data_structs::SponsoringRateLimit
2078 **/2099 **/
2079 UpDataStructsSponsoringRateLimit: {2100 UpDataStructsSponsoringRateLimit: {
2080 _enum: {2101 _enum: {
2081 SponsoringDisabled: 'Null',2102 SponsoringDisabled: 'Null',
2082 Blocks: 'u32'2103 Blocks: 'u32'
2083 }2104 }
2084 },2105 },
2085 /**2106 /**
2086 * Lookup236: up_data_structs::CollectionPermissions2107 * Lookup238: up_data_structs::CollectionPermissions
2087 **/2108 **/
2088 UpDataStructsCollectionPermissions: {2109 UpDataStructsCollectionPermissions: {
2089 access: 'Option<UpDataStructsAccessMode>',2110 access: 'Option<UpDataStructsAccessMode>',
2090 mintMode: 'Option<bool>',2111 mintMode: 'Option<bool>',
2091 nesting: 'Option<UpDataStructsNestingPermissions>'2112 nesting: 'Option<UpDataStructsNestingPermissions>'
2092 },2113 },
2093 /**2114 /**
2094 * Lookup238: up_data_structs::NestingPermissions2115 * Lookup240: up_data_structs::NestingPermissions
2095 **/2116 **/
2096 UpDataStructsNestingPermissions: {2117 UpDataStructsNestingPermissions: {
2097 tokenOwner: 'bool',2118 tokenOwner: 'bool',
2098 collectionAdmin: 'bool',2119 collectionAdmin: 'bool',
2099 restricted: 'Option<UpDataStructsOwnerRestrictedSet>'2120 restricted: 'Option<UpDataStructsOwnerRestrictedSet>'
2100 },2121 },
2101 /**2122 /**
2102 * Lookup240: up_data_structs::OwnerRestrictedSet2123 * Lookup242: up_data_structs::OwnerRestrictedSet
2103 **/2124 **/
2104 UpDataStructsOwnerRestrictedSet: 'BTreeSet<u32>',2125 UpDataStructsOwnerRestrictedSet: 'BTreeSet<u32>',
2105 /**2126 /**
2106 * Lookup245: up_data_structs::PropertyKeyPermission2127 * Lookup247: up_data_structs::PropertyKeyPermission
2107 **/2128 **/
2108 UpDataStructsPropertyKeyPermission: {2129 UpDataStructsPropertyKeyPermission: {
2109 key: 'Bytes',2130 key: 'Bytes',
2110 permission: 'UpDataStructsPropertyPermission'2131 permission: 'UpDataStructsPropertyPermission'
2111 },2132 },
2112 /**2133 /**
2113 * Lookup246: up_data_structs::PropertyPermission2134 * Lookup248: up_data_structs::PropertyPermission
2114 **/2135 **/
2115 UpDataStructsPropertyPermission: {2136 UpDataStructsPropertyPermission: {
2116 mutable: 'bool',2137 mutable: 'bool',
2117 collectionAdmin: 'bool',2138 collectionAdmin: 'bool',
2118 tokenOwner: 'bool'2139 tokenOwner: 'bool'
2119 },2140 },
2120 /**2141 /**
2121 * Lookup249: up_data_structs::Property2142 * Lookup251: up_data_structs::Property
2122 **/2143 **/
2123 UpDataStructsProperty: {2144 UpDataStructsProperty: {
2124 key: 'Bytes',2145 key: 'Bytes',
2125 value: 'Bytes'2146 value: 'Bytes'
2126 },2147 },
2127 /**2148 /**
2128 * Lookup252: up_data_structs::CreateItemData2149 * Lookup254: up_data_structs::CreateItemData
2129 **/2150 **/
2130 UpDataStructsCreateItemData: {2151 UpDataStructsCreateItemData: {
2131 _enum: {2152 _enum: {
2132 NFT: 'UpDataStructsCreateNftData',2153 NFT: 'UpDataStructsCreateNftData',
2133 Fungible: 'UpDataStructsCreateFungibleData',2154 Fungible: 'UpDataStructsCreateFungibleData',
2134 ReFungible: 'UpDataStructsCreateReFungibleData'2155 ReFungible: 'UpDataStructsCreateReFungibleData'
2135 }2156 }
2136 },2157 },
2137 /**2158 /**
2138 * Lookup253: up_data_structs::CreateNftData2159 * Lookup255: up_data_structs::CreateNftData
2139 **/2160 **/
2140 UpDataStructsCreateNftData: {2161 UpDataStructsCreateNftData: {
2141 properties: 'Vec<UpDataStructsProperty>'2162 properties: 'Vec<UpDataStructsProperty>'
2142 },2163 },
2143 /**2164 /**
2144 * Lookup254: up_data_structs::CreateFungibleData2165 * Lookup256: up_data_structs::CreateFungibleData
2145 **/2166 **/
2146 UpDataStructsCreateFungibleData: {2167 UpDataStructsCreateFungibleData: {
2147 value: 'u128'2168 value: 'u128'
2148 },2169 },
2149 /**2170 /**
2150 * Lookup255: up_data_structs::CreateReFungibleData2171 * Lookup257: up_data_structs::CreateReFungibleData
2151 **/2172 **/
2152 UpDataStructsCreateReFungibleData: {2173 UpDataStructsCreateReFungibleData: {
2153 pieces: 'u128',2174 pieces: 'u128',
2154 properties: 'Vec<UpDataStructsProperty>'2175 properties: 'Vec<UpDataStructsProperty>'
2155 },2176 },
2156 /**2177 /**
2157 * Lookup258: up_data_structs::CreateItemExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>2178 * Lookup260: up_data_structs::CreateItemExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
2158 **/2179 **/
2159 UpDataStructsCreateItemExData: {2180 UpDataStructsCreateItemExData: {
2160 _enum: {2181 _enum: {
2161 NFT: 'Vec<UpDataStructsCreateNftExData>',2182 NFT: 'Vec<UpDataStructsCreateNftExData>',
2164 RefungibleMultipleOwners: 'UpDataStructsCreateRefungibleExMultipleOwners'2185 RefungibleMultipleOwners: 'UpDataStructsCreateRefungibleExMultipleOwners'
2165 }2186 }
2166 },2187 },
2167 /**2188 /**
2168 * Lookup260: up_data_structs::CreateNftExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>2189 * Lookup262: up_data_structs::CreateNftExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
2169 **/2190 **/
2170 UpDataStructsCreateNftExData: {2191 UpDataStructsCreateNftExData: {
2171 properties: 'Vec<UpDataStructsProperty>',2192 properties: 'Vec<UpDataStructsProperty>',
2172 owner: 'PalletEvmAccountBasicCrossAccountIdRepr'2193 owner: 'PalletEvmAccountBasicCrossAccountIdRepr'
2173 },2194 },
2174 /**2195 /**
2175 * Lookup267: up_data_structs::CreateRefungibleExSingleOwner<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>2196 * Lookup269: up_data_structs::CreateRefungibleExSingleOwner<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
2176 **/2197 **/
2177 UpDataStructsCreateRefungibleExSingleOwner: {2198 UpDataStructsCreateRefungibleExSingleOwner: {
2178 user: 'PalletEvmAccountBasicCrossAccountIdRepr',2199 user: 'PalletEvmAccountBasicCrossAccountIdRepr',
2179 pieces: 'u128',2200 pieces: 'u128',
2180 properties: 'Vec<UpDataStructsProperty>'2201 properties: 'Vec<UpDataStructsProperty>'
2181 },2202 },
2182 /**2203 /**
2183 * Lookup269: up_data_structs::CreateRefungibleExMultipleOwners<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>2204 * Lookup271: up_data_structs::CreateRefungibleExMultipleOwners<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
2184 **/2205 **/
2185 UpDataStructsCreateRefungibleExMultipleOwners: {2206 UpDataStructsCreateRefungibleExMultipleOwners: {
2186 users: 'BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>',2207 users: 'BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>',
2187 properties: 'Vec<UpDataStructsProperty>'2208 properties: 'Vec<UpDataStructsProperty>'
2188 },2209 },
2189 /**2210 /**
2190 * Lookup270: pallet_unique_scheduler::pallet::Call<T>2211 * Lookup272: pallet_unique_scheduler::pallet::Call<T>
2191 **/2212 **/
2192 PalletUniqueSchedulerCall: {2213 PalletUniqueSchedulerCall: {
2193 _enum: {2214 _enum: {
2194 schedule_named: {2215 schedule_named: {
2210 }2231 }
2211 }2232 }
2212 },2233 },
2213 /**2234 /**
2214 * Lookup272: frame_support::traits::schedule::MaybeHashed<opal_runtime::Call, primitive_types::H256>2235 * Lookup274: frame_support::traits::schedule::MaybeHashed<opal_runtime::Call, primitive_types::H256>
2215 **/2236 **/
2216 FrameSupportScheduleMaybeHashed: {2237 FrameSupportScheduleMaybeHashed: {
2217 _enum: {2238 _enum: {
2218 Value: 'Call',2239 Value: 'Call',
2219 Hash: 'H256'2240 Hash: 'H256'
2220 }2241 }
2221 },2242 },
2222 /**2243 /**
2223 * Lookup273: pallet_configuration::pallet::Call<T>2244 * Lookup275: pallet_configuration::pallet::Call<T>
2224 **/2245 **/
2225 PalletConfigurationCall: {2246 PalletConfigurationCall: {
2226 _enum: {2247 _enum: {
2227 set_weight_to_fee_coefficient_override: {2248 set_weight_to_fee_coefficient_override: {
2232 }2253 }
2233 }2254 }
2234 },2255 },
2235 /**2256 /**
2236 * Lookup274: pallet_template_transaction_payment::Call<T>2257 * Lookup276: pallet_template_transaction_payment::Call<T>
2237 **/2258 **/
2238 PalletTemplateTransactionPaymentCall: 'Null',2259 PalletTemplateTransactionPaymentCall: 'Null',
2239 /**2260 /**
2240 * Lookup275: pallet_structure::pallet::Call<T>2261 * Lookup277: pallet_structure::pallet::Call<T>
2241 **/2262 **/
2242 PalletStructureCall: 'Null',2263 PalletStructureCall: 'Null',
2243 /**2264 /**
2244 * Lookup276: pallet_rmrk_core::pallet::Call<T>2265 * Lookup278: pallet_rmrk_core::pallet::Call<T>
2245 **/2266 **/
2246 PalletRmrkCoreCall: {2267 PalletRmrkCoreCall: {
2247 _enum: {2268 _enum: {
2248 create_collection: {2269 create_collection: {
2331 }2352 }
2332 }2353 }
2333 },2354 },
2334 /**2355 /**
2335 * Lookup282: rmrk_traits::resource::ResourceTypes<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>2356 * Lookup284: rmrk_traits::resource::ResourceTypes<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
2336 **/2357 **/
2337 RmrkTraitsResourceResourceTypes: {2358 RmrkTraitsResourceResourceTypes: {
2338 _enum: {2359 _enum: {
2339 Basic: 'RmrkTraitsResourceBasicResource',2360 Basic: 'RmrkTraitsResourceBasicResource',
2340 Composable: 'RmrkTraitsResourceComposableResource',2361 Composable: 'RmrkTraitsResourceComposableResource',
2341 Slot: 'RmrkTraitsResourceSlotResource'2362 Slot: 'RmrkTraitsResourceSlotResource'
2342 }2363 }
2343 },2364 },
2344 /**2365 /**
2345 * Lookup284: rmrk_traits::resource::BasicResource<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>2366 * Lookup286: rmrk_traits::resource::BasicResource<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
2346 **/2367 **/
2347 RmrkTraitsResourceBasicResource: {2368 RmrkTraitsResourceBasicResource: {
2348 src: 'Option<Bytes>',2369 src: 'Option<Bytes>',
2349 metadata: 'Option<Bytes>',2370 metadata: 'Option<Bytes>',
2350 license: 'Option<Bytes>',2371 license: 'Option<Bytes>',
2351 thumb: 'Option<Bytes>'2372 thumb: 'Option<Bytes>'
2352 },2373 },
2353 /**2374 /**
2354 * Lookup286: rmrk_traits::resource::ComposableResource<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>2375 * Lookup288: rmrk_traits::resource::ComposableResource<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
2355 **/2376 **/
2356 RmrkTraitsResourceComposableResource: {2377 RmrkTraitsResourceComposableResource: {
2357 parts: 'Vec<u32>',2378 parts: 'Vec<u32>',
2358 base: 'u32',2379 base: 'u32',
2361 license: 'Option<Bytes>',2382 license: 'Option<Bytes>',
2362 thumb: 'Option<Bytes>'2383 thumb: 'Option<Bytes>'
2363 },2384 },
2364 /**2385 /**
2365 * Lookup287: rmrk_traits::resource::SlotResource<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>2386 * Lookup289: rmrk_traits::resource::SlotResource<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
2366 **/2387 **/
2367 RmrkTraitsResourceSlotResource: {2388 RmrkTraitsResourceSlotResource: {
2368 base: 'u32',2389 base: 'u32',
2369 src: 'Option<Bytes>',2390 src: 'Option<Bytes>',
2372 license: 'Option<Bytes>',2393 license: 'Option<Bytes>',
2373 thumb: 'Option<Bytes>'2394 thumb: 'Option<Bytes>'
2374 },2395 },
2375 /**2396 /**
2376 * Lookup290: pallet_rmrk_equip::pallet::Call<T>2397 * Lookup292: pallet_rmrk_equip::pallet::Call<T>
2377 **/2398 **/
2378 PalletRmrkEquipCall: {2399 PalletRmrkEquipCall: {
2379 _enum: {2400 _enum: {
2380 create_base: {2401 create_base: {
2393 }2414 }
2394 }2415 }
2395 },2416 },
2396 /**2417 /**
2397 * Lookup293: rmrk_traits::part::PartType<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>2418 * Lookup295: rmrk_traits::part::PartType<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
2398 **/2419 **/
2399 RmrkTraitsPartPartType: {2420 RmrkTraitsPartPartType: {
2400 _enum: {2421 _enum: {
2401 FixedPart: 'RmrkTraitsPartFixedPart',2422 FixedPart: 'RmrkTraitsPartFixedPart',
2402 SlotPart: 'RmrkTraitsPartSlotPart'2423 SlotPart: 'RmrkTraitsPartSlotPart'
2403 }2424 }
2404 },2425 },
2405 /**2426 /**
2406 * Lookup295: rmrk_traits::part::FixedPart<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>2427 * Lookup297: rmrk_traits::part::FixedPart<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
2407 **/2428 **/
2408 RmrkTraitsPartFixedPart: {2429 RmrkTraitsPartFixedPart: {
2409 id: 'u32',2430 id: 'u32',
2410 z: 'u32',2431 z: 'u32',
2411 src: 'Bytes'2432 src: 'Bytes'
2412 },2433 },
2413 /**2434 /**
2414 * Lookup296: rmrk_traits::part::SlotPart<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>2435 * Lookup298: rmrk_traits::part::SlotPart<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
2415 **/2436 **/
2416 RmrkTraitsPartSlotPart: {2437 RmrkTraitsPartSlotPart: {
2417 id: 'u32',2438 id: 'u32',
2418 equippable: 'RmrkTraitsPartEquippableList',2439 equippable: 'RmrkTraitsPartEquippableList',
2419 src: 'Bytes',2440 src: 'Bytes',
2420 z: 'u32'2441 z: 'u32'
2421 },2442 },
2422 /**2443 /**
2423 * Lookup297: rmrk_traits::part::EquippableList<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>2444 * Lookup299: rmrk_traits::part::EquippableList<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
2424 **/2445 **/
2425 RmrkTraitsPartEquippableList: {2446 RmrkTraitsPartEquippableList: {
2426 _enum: {2447 _enum: {
2427 All: 'Null',2448 All: 'Null',
2428 Empty: 'Null',2449 Empty: 'Null',
2429 Custom: 'Vec<u32>'2450 Custom: 'Vec<u32>'
2430 }2451 }
2431 },2452 },
2432 /**2453 /**
2433 * Lookup299: rmrk_traits::theme::Theme<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<rmrk_traits::theme::ThemeProperty<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>, S>>2454 * Lookup301: rmrk_traits::theme::Theme<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<rmrk_traits::theme::ThemeProperty<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>, S>>
2434 **/2455 **/
2435 RmrkTraitsTheme: {2456 RmrkTraitsTheme: {
2436 name: 'Bytes',2457 name: 'Bytes',
2437 properties: 'Vec<RmrkTraitsThemeThemeProperty>',2458 properties: 'Vec<RmrkTraitsThemeThemeProperty>',
2438 inherit: 'bool'2459 inherit: 'bool'
2439 },2460 },
2440 /**2461 /**
2441 * Lookup301: rmrk_traits::theme::ThemeProperty<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>2462 * Lookup303: rmrk_traits::theme::ThemeProperty<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
2442 **/2463 **/
2443 RmrkTraitsThemeThemeProperty: {2464 RmrkTraitsThemeThemeProperty: {
2444 key: 'Bytes',2465 key: 'Bytes',
2445 value: 'Bytes'2466 value: 'Bytes'
2446 },2467 },
2468 /**
2469 * Lookup305: pallet_app_promotion::pallet::Call<T>
2470 **/
2471 PalletAppPromotionCall: {
2472 _enum: {
2473 set_admin_address: {
2474 admin: 'PalletEvmAccountBasicCrossAccountIdRepr',
2475 },
2476 stake: {
2477 amount: 'u128',
2478 },
2479 unstake: 'Null',
2480 sponsor_collection: {
2481 collectionId: 'u32',
2482 },
2483 stop_sponsoring_collection: {
2484 collectionId: 'u32',
2485 },
2486 sponsor_contract: {
2487 contractId: 'H160',
2488 },
2489 stop_sponsoring_contract: {
2490 contractId: 'H160',
2491 },
2492 payout_stakers: {
2493 stakersNumber: 'Option<u8>'
2494 }
2495 }
2496 },
2447 /**2497 /**
2448 * Lookup303: pallet_evm::pallet::Call<T>2498 * Lookup307: pallet_evm::pallet::Call<T>
2449 **/2499 **/
2450 PalletEvmCall: {2500 PalletEvmCall: {
2451 _enum: {2501 _enum: {
2452 withdraw: {2502 withdraw: {
2487 }2537 }
2488 }2538 }
2489 },2539 },
2490 /**2540 /**
2491 * Lookup307: pallet_ethereum::pallet::Call<T>2541 * Lookup311: pallet_ethereum::pallet::Call<T>
2492 **/2542 **/
2493 PalletEthereumCall: {2543 PalletEthereumCall: {
2494 _enum: {2544 _enum: {
2495 transact: {2545 transact: {
2496 transaction: 'EthereumTransactionTransactionV2'2546 transaction: 'EthereumTransactionTransactionV2'
2497 }2547 }
2498 }2548 }
2499 },2549 },
2500 /**2550 /**
2501 * Lookup308: ethereum::transaction::TransactionV22551 * Lookup312: ethereum::transaction::TransactionV2
2502 **/2552 **/
2503 EthereumTransactionTransactionV2: {2553 EthereumTransactionTransactionV2: {
2504 _enum: {2554 _enum: {
2505 Legacy: 'EthereumTransactionLegacyTransaction',2555 Legacy: 'EthereumTransactionLegacyTransaction',
2506 EIP2930: 'EthereumTransactionEip2930Transaction',2556 EIP2930: 'EthereumTransactionEip2930Transaction',
2507 EIP1559: 'EthereumTransactionEip1559Transaction'2557 EIP1559: 'EthereumTransactionEip1559Transaction'
2508 }2558 }
2509 },2559 },
2510 /**2560 /**
2511 * Lookup309: ethereum::transaction::LegacyTransaction2561 * Lookup313: ethereum::transaction::LegacyTransaction
2512 **/2562 **/
2513 EthereumTransactionLegacyTransaction: {2563 EthereumTransactionLegacyTransaction: {
2514 nonce: 'U256',2564 nonce: 'U256',
2515 gasPrice: 'U256',2565 gasPrice: 'U256',
2519 input: 'Bytes',2569 input: 'Bytes',
2520 signature: 'EthereumTransactionTransactionSignature'2570 signature: 'EthereumTransactionTransactionSignature'
2521 },2571 },
2522 /**2572 /**
2523 * Lookup310: ethereum::transaction::TransactionAction2573 * Lookup314: ethereum::transaction::TransactionAction
2524 **/2574 **/
2525 EthereumTransactionTransactionAction: {2575 EthereumTransactionTransactionAction: {
2526 _enum: {2576 _enum: {
2527 Call: 'H160',2577 Call: 'H160',
2528 Create: 'Null'2578 Create: 'Null'
2529 }2579 }
2530 },2580 },
2531 /**2581 /**
2532 * Lookup311: ethereum::transaction::TransactionSignature2582 * Lookup315: ethereum::transaction::TransactionSignature
2533 **/2583 **/
2534 EthereumTransactionTransactionSignature: {2584 EthereumTransactionTransactionSignature: {
2535 v: 'u64',2585 v: 'u64',
2536 r: 'H256',2586 r: 'H256',
2537 s: 'H256'2587 s: 'H256'
2538 },2588 },
2539 /**2589 /**
2540 * Lookup313: ethereum::transaction::EIP2930Transaction2590 * Lookup317: ethereum::transaction::EIP2930Transaction
2541 **/2591 **/
2542 EthereumTransactionEip2930Transaction: {2592 EthereumTransactionEip2930Transaction: {
2543 chainId: 'u64',2593 chainId: 'u64',
2544 nonce: 'U256',2594 nonce: 'U256',
2552 r: 'H256',2602 r: 'H256',
2553 s: 'H256'2603 s: 'H256'
2554 },2604 },
2555 /**2605 /**
2556 * Lookup315: ethereum::transaction::AccessListItem2606 * Lookup319: ethereum::transaction::AccessListItem
2557 **/2607 **/
2558 EthereumTransactionAccessListItem: {2608 EthereumTransactionAccessListItem: {
2559 address: 'H160',2609 address: 'H160',
2560 storageKeys: 'Vec<H256>'2610 storageKeys: 'Vec<H256>'
2561 },2611 },
2562 /**2612 /**
2563 * Lookup316: ethereum::transaction::EIP1559Transaction2613 * Lookup320: ethereum::transaction::EIP1559Transaction
2564 **/2614 **/
2565 EthereumTransactionEip1559Transaction: {2615 EthereumTransactionEip1559Transaction: {
2566 chainId: 'u64',2616 chainId: 'u64',
2567 nonce: 'U256',2617 nonce: 'U256',
2576 r: 'H256',2626 r: 'H256',
2577 s: 'H256'2627 s: 'H256'
2578 },2628 },
2579 /**2629 /**
2580 * Lookup317: pallet_evm_migration::pallet::Call<T>2630 * Lookup321: pallet_evm_migration::pallet::Call<T>
2581 **/2631 **/
2582 PalletEvmMigrationCall: {2632 PalletEvmMigrationCall: {
2583 _enum: {2633 _enum: {
2584 begin: {2634 begin: {
2594 }2644 }
2595 }2645 }
2596 },2646 },
2597 /**2647 /**
2598 * Lookup320: pallet_sudo::pallet::Error<T>2648 * Lookup324: pallet_sudo::pallet::Error<T>
2599 **/2649 **/
2600 PalletSudoError: {2650 PalletSudoError: {
2601 _enum: ['RequireSudo']2651 _enum: ['RequireSudo']
2602 },2652 },
2603 /**2653 /**
2604 * Lookup322: orml_vesting::module::Error<T>2654 * Lookup326: orml_vesting::module::Error<T>
2605 **/2655 **/
2606 OrmlVestingModuleError: {2656 OrmlVestingModuleError: {
2607 _enum: ['ZeroVestingPeriod', 'ZeroVestingPeriodCount', 'InsufficientBalanceToLock', 'TooManyVestingSchedules', 'AmountLow', 'MaxVestingSchedulesExceeded']2657 _enum: ['ZeroVestingPeriod', 'ZeroVestingPeriodCount', 'InsufficientBalanceToLock', 'TooManyVestingSchedules', 'AmountLow', 'MaxVestingSchedulesExceeded']
2608 },2658 },
2609 /**2659 /**
2610 * Lookup324: cumulus_pallet_xcmp_queue::InboundChannelDetails2660 * Lookup328: cumulus_pallet_xcmp_queue::InboundChannelDetails
2611 **/2661 **/
2612 CumulusPalletXcmpQueueInboundChannelDetails: {2662 CumulusPalletXcmpQueueInboundChannelDetails: {
2613 sender: 'u32',2663 sender: 'u32',
2614 state: 'CumulusPalletXcmpQueueInboundState',2664 state: 'CumulusPalletXcmpQueueInboundState',
2615 messageMetadata: 'Vec<(u32,PolkadotParachainPrimitivesXcmpMessageFormat)>'2665 messageMetadata: 'Vec<(u32,PolkadotParachainPrimitivesXcmpMessageFormat)>'
2616 },2666 },
2617 /**2667 /**
2618 * Lookup325: cumulus_pallet_xcmp_queue::InboundState2668 * Lookup329: cumulus_pallet_xcmp_queue::InboundState
2619 **/2669 **/
2620 CumulusPalletXcmpQueueInboundState: {2670 CumulusPalletXcmpQueueInboundState: {
2621 _enum: ['Ok', 'Suspended']2671 _enum: ['Ok', 'Suspended']
2622 },2672 },
2623 /**2673 /**
2624 * Lookup328: polkadot_parachain::primitives::XcmpMessageFormat2674 * Lookup332: polkadot_parachain::primitives::XcmpMessageFormat
2625 **/2675 **/
2626 PolkadotParachainPrimitivesXcmpMessageFormat: {2676 PolkadotParachainPrimitivesXcmpMessageFormat: {
2627 _enum: ['ConcatenatedVersionedXcm', 'ConcatenatedEncodedBlob', 'Signals']2677 _enum: ['ConcatenatedVersionedXcm', 'ConcatenatedEncodedBlob', 'Signals']
2628 },2678 },
2629 /**2679 /**
2630 * Lookup331: cumulus_pallet_xcmp_queue::OutboundChannelDetails2680 * Lookup335: cumulus_pallet_xcmp_queue::OutboundChannelDetails
2631 **/2681 **/
2632 CumulusPalletXcmpQueueOutboundChannelDetails: {2682 CumulusPalletXcmpQueueOutboundChannelDetails: {
2633 recipient: 'u32',2683 recipient: 'u32',
2634 state: 'CumulusPalletXcmpQueueOutboundState',2684 state: 'CumulusPalletXcmpQueueOutboundState',
2635 signalsExist: 'bool',2685 signalsExist: 'bool',
2636 firstIndex: 'u16',2686 firstIndex: 'u16',
2637 lastIndex: 'u16'2687 lastIndex: 'u16'
2638 },2688 },
2639 /**2689 /**
2640 * Lookup332: cumulus_pallet_xcmp_queue::OutboundState2690 * Lookup336: cumulus_pallet_xcmp_queue::OutboundState
2641 **/2691 **/
2642 CumulusPalletXcmpQueueOutboundState: {2692 CumulusPalletXcmpQueueOutboundState: {
2643 _enum: ['Ok', 'Suspended']2693 _enum: ['Ok', 'Suspended']
2644 },2694 },
2645 /**2695 /**
2646 * Lookup334: cumulus_pallet_xcmp_queue::QueueConfigData2696 * Lookup338: cumulus_pallet_xcmp_queue::QueueConfigData
2647 **/2697 **/
2648 CumulusPalletXcmpQueueQueueConfigData: {2698 CumulusPalletXcmpQueueQueueConfigData: {
2649 suspendThreshold: 'u32',2699 suspendThreshold: 'u32',
2650 dropThreshold: 'u32',2700 dropThreshold: 'u32',
2653 weightRestrictDecay: 'u64',2703 weightRestrictDecay: 'u64',
2654 xcmpMaxIndividualWeight: 'u64'2704 xcmpMaxIndividualWeight: 'u64'
2655 },2705 },
2656 /**2706 /**
2657 * Lookup336: cumulus_pallet_xcmp_queue::pallet::Error<T>2707 * Lookup340: cumulus_pallet_xcmp_queue::pallet::Error<T>
2658 **/2708 **/
2659 CumulusPalletXcmpQueueError: {2709 CumulusPalletXcmpQueueError: {
2660 _enum: ['FailedToSend', 'BadXcmOrigin', 'BadXcm', 'BadOverweightIndex', 'WeightOverLimit']2710 _enum: ['FailedToSend', 'BadXcmOrigin', 'BadXcm', 'BadOverweightIndex', 'WeightOverLimit']
2661 },2711 },
2662 /**2712 /**
2663 * Lookup337: pallet_xcm::pallet::Error<T>2713 * Lookup341: pallet_xcm::pallet::Error<T>
2664 **/2714 **/
2665 PalletXcmError: {2715 PalletXcmError: {
2666 _enum: ['Unreachable', 'SendFailure', 'Filtered', 'UnweighableMessage', 'DestinationNotInvertible', 'Empty', 'CannotReanchor', 'TooManyAssets', 'InvalidOrigin', 'BadVersion', 'BadLocation', 'NoSubscription', 'AlreadySubscribed']2716 _enum: ['Unreachable', 'SendFailure', 'Filtered', 'UnweighableMessage', 'DestinationNotInvertible', 'Empty', 'CannotReanchor', 'TooManyAssets', 'InvalidOrigin', 'BadVersion', 'BadLocation', 'NoSubscription', 'AlreadySubscribed']
2667 },2717 },
2668 /**2718 /**
2669 * Lookup338: cumulus_pallet_xcm::pallet::Error<T>2719 * Lookup342: cumulus_pallet_xcm::pallet::Error<T>
2670 **/2720 **/
2671 CumulusPalletXcmError: 'Null',2721 CumulusPalletXcmError: 'Null',
2672 /**2722 /**
2673 * Lookup339: cumulus_pallet_dmp_queue::ConfigData2723 * Lookup343: cumulus_pallet_dmp_queue::ConfigData
2674 **/2724 **/
2675 CumulusPalletDmpQueueConfigData: {2725 CumulusPalletDmpQueueConfigData: {
2676 maxIndividual: 'u64'2726 maxIndividual: 'u64'
2677 },2727 },
2678 /**2728 /**
2679 * Lookup340: cumulus_pallet_dmp_queue::PageIndexData2729 * Lookup344: cumulus_pallet_dmp_queue::PageIndexData
2680 **/2730 **/
2681 CumulusPalletDmpQueuePageIndexData: {2731 CumulusPalletDmpQueuePageIndexData: {
2682 beginUsed: 'u32',2732 beginUsed: 'u32',
2683 endUsed: 'u32',2733 endUsed: 'u32',
2684 overweightCount: 'u64'2734 overweightCount: 'u64'
2685 },2735 },
2686 /**2736 /**
2687 * Lookup343: cumulus_pallet_dmp_queue::pallet::Error<T>2737 * Lookup347: cumulus_pallet_dmp_queue::pallet::Error<T>
2688 **/2738 **/
2689 CumulusPalletDmpQueueError: {2739 CumulusPalletDmpQueueError: {
2690 _enum: ['Unknown', 'OverLimit']2740 _enum: ['Unknown', 'OverLimit']
2691 },2741 },
2692 /**2742 /**
2693 * Lookup347: pallet_unique::Error<T>2743 * Lookup351: pallet_unique::Error<T>
2694 **/2744 **/
2695 PalletUniqueError: {2745 PalletUniqueError: {
2696 _enum: ['CollectionDecimalPointLimitExceeded', 'ConfirmUnsetSponsorFail', 'EmptyArgument', 'RepartitionCalledOnNonRefungibleCollection']2746 _enum: ['CollectionDecimalPointLimitExceeded', 'ConfirmUnsetSponsorFail', 'EmptyArgument', 'RepartitionCalledOnNonRefungibleCollection']
2697 },2747 },
2698 /**2748 /**
2699 * Lookup350: pallet_unique_scheduler::ScheduledV3<frame_support::traits::schedule::MaybeHashed<opal_runtime::Call, primitive_types::H256>, BlockNumber, opal_runtime::OriginCaller, sp_core::crypto::AccountId32>2749 * Lookup354: pallet_unique_scheduler::ScheduledV3<frame_support::traits::schedule::MaybeHashed<opal_runtime::Call, primitive_types::H256>, BlockNumber, opal_runtime::OriginCaller, sp_core::crypto::AccountId32>
2700 **/2750 **/
2701 PalletUniqueSchedulerScheduledV3: {2751 PalletUniqueSchedulerScheduledV3: {
2702 maybeId: 'Option<[u8;16]>',2752 maybeId: 'Option<[u8;16]>',
2703 priority: 'u8',2753 priority: 'u8',
2704 call: 'FrameSupportScheduleMaybeHashed',2754 call: 'FrameSupportScheduleMaybeHashed',
2705 maybePeriodic: 'Option<(u32,u32)>',2755 maybePeriodic: 'Option<(u32,u32)>',
2706 origin: 'OpalRuntimeOriginCaller'2756 origin: 'OpalRuntimeOriginCaller'
2707 },2757 },
2708 /**2758 /**
2709 * Lookup351: opal_runtime::OriginCaller2759 * Lookup355: opal_runtime::OriginCaller
2710 **/2760 **/
2711 OpalRuntimeOriginCaller: {2761 OpalRuntimeOriginCaller: {
2712 _enum: {2762 _enum: {
2713 system: 'FrameSupportDispatchRawOrigin',2763 system: 'FrameSupportDispatchRawOrigin',
2814 Ethereum: 'PalletEthereumRawOrigin'2864 Ethereum: 'PalletEthereumRawOrigin'
2815 }2865 }
2816 },2866 },
2817 /**2867 /**
2818 * Lookup352: frame_support::dispatch::RawOrigin<sp_core::crypto::AccountId32>2868 * Lookup356: frame_support::dispatch::RawOrigin<sp_core::crypto::AccountId32>
2819 **/2869 **/
2820 FrameSupportDispatchRawOrigin: {2870 FrameSupportDispatchRawOrigin: {
2821 _enum: {2871 _enum: {
2822 Root: 'Null',2872 Root: 'Null',
2823 Signed: 'AccountId32',2873 Signed: 'AccountId32',
2824 None: 'Null'2874 None: 'Null'
2825 }2875 }
2826 },2876 },
2827 /**2877 /**
2828 * Lookup353: pallet_xcm::pallet::Origin2878 * Lookup357: pallet_xcm::pallet::Origin
2829 **/2879 **/
2830 PalletXcmOrigin: {2880 PalletXcmOrigin: {
2831 _enum: {2881 _enum: {
2832 Xcm: 'XcmV1MultiLocation',2882 Xcm: 'XcmV1MultiLocation',
2833 Response: 'XcmV1MultiLocation'2883 Response: 'XcmV1MultiLocation'
2834 }2884 }
2835 },2885 },
2836 /**2886 /**
2837 * Lookup354: cumulus_pallet_xcm::pallet::Origin2887 * Lookup358: cumulus_pallet_xcm::pallet::Origin
2838 **/2888 **/
2839 CumulusPalletXcmOrigin: {2889 CumulusPalletXcmOrigin: {
2840 _enum: {2890 _enum: {
2841 Relay: 'Null',2891 Relay: 'Null',
2842 SiblingParachain: 'u32'2892 SiblingParachain: 'u32'
2843 }2893 }
2844 },2894 },
2845 /**2895 /**
2846 * Lookup355: pallet_ethereum::RawOrigin2896 * Lookup359: pallet_ethereum::RawOrigin
2847 **/2897 **/
2848 PalletEthereumRawOrigin: {2898 PalletEthereumRawOrigin: {
2849 _enum: {2899 _enum: {
2850 EthereumTransaction: 'H160'2900 EthereumTransaction: 'H160'
2851 }2901 }
2852 },2902 },
2853 /**2903 /**
2854 * Lookup356: sp_core::Void2904 * Lookup360: sp_core::Void
2855 **/2905 **/
2856 SpCoreVoid: 'Null',2906 SpCoreVoid: 'Null',
2857 /**2907 /**
2858 * Lookup357: pallet_unique_scheduler::pallet::Error<T>2908 * Lookup361: pallet_unique_scheduler::pallet::Error<T>
2859 **/2909 **/
2860 PalletUniqueSchedulerError: {2910 PalletUniqueSchedulerError: {
2861 _enum: ['FailedToSchedule', 'NotFound', 'TargetBlockNumberInPast', 'RescheduleNoChange']2911 _enum: ['FailedToSchedule', 'NotFound', 'TargetBlockNumberInPast', 'RescheduleNoChange']
2862 },2912 },
2863 /**2913 /**
2864 * Lookup358: up_data_structs::Collection<sp_core::crypto::AccountId32>2914 * Lookup362: up_data_structs::Collection<sp_core::crypto::AccountId32>
2865 **/2915 **/
2866 UpDataStructsCollection: {2916 UpDataStructsCollection: {
2867 owner: 'AccountId32',2917 owner: 'AccountId32',
2868 mode: 'UpDataStructsCollectionMode',2918 mode: 'UpDataStructsCollectionMode',
2869 name: 'Vec<u16>',2919 name: 'Vec<u16>',
2870 description: 'Vec<u16>',2920 description: 'Vec<u16>',
2871 tokenPrefix: 'Bytes',2921 tokenPrefix: 'Bytes',
2872 sponsorship: 'UpDataStructsSponsorshipState',2922 sponsorship: 'UpDataStructsSponsorshipStateAccountId32',
2873 limits: 'UpDataStructsCollectionLimits',2923 limits: 'UpDataStructsCollectionLimits',
2874 permissions: 'UpDataStructsCollectionPermissions',2924 permissions: 'UpDataStructsCollectionPermissions',
2875 externalCollection: 'bool'2925 externalCollection: 'bool'
2876 },2926 },
2877 /**2927 /**
2878 * Lookup359: up_data_structs::SponsorshipState<sp_core::crypto::AccountId32>2928 * Lookup363: up_data_structs::SponsorshipState<sp_core::crypto::AccountId32>
2879 **/2929 **/
2880 UpDataStructsSponsorshipState: {2930 UpDataStructsSponsorshipStateAccountId32: {
2881 _enum: {2931 _enum: {
2882 Disabled: 'Null',2932 Disabled: 'Null',
2883 Unconfirmed: 'AccountId32',2933 Unconfirmed: 'AccountId32',
2884 Confirmed: 'AccountId32'2934 Confirmed: 'AccountId32'
2885 }2935 }
2886 },2936 },
2887 /**2937 /**
2888 * Lookup360: up_data_structs::Properties2938 * Lookup364: up_data_structs::Properties
2889 **/2939 **/
2890 UpDataStructsProperties: {2940 UpDataStructsProperties: {
2891 map: 'UpDataStructsPropertiesMapBoundedVec',2941 map: 'UpDataStructsPropertiesMapBoundedVec',
2892 consumedSpace: 'u32',2942 consumedSpace: 'u32',
2893 spaceLimit: 'u32'2943 spaceLimit: 'u32'
2894 },2944 },
2895 /**2945 /**
2896 * Lookup361: up_data_structs::PropertiesMap<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>2946 * Lookup365: up_data_structs::PropertiesMap<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
2897 **/2947 **/
2898 UpDataStructsPropertiesMapBoundedVec: 'BTreeMap<Bytes, Bytes>',2948 UpDataStructsPropertiesMapBoundedVec: 'BTreeMap<Bytes, Bytes>',
2899 /**2949 /**
2900 * Lookup366: up_data_structs::PropertiesMap<up_data_structs::PropertyPermission>2950 * Lookup370: up_data_structs::PropertiesMap<up_data_structs::PropertyPermission>
2901 **/2951 **/
2902 UpDataStructsPropertiesMapPropertyPermission: 'BTreeMap<Bytes, UpDataStructsPropertyPermission>',2952 UpDataStructsPropertiesMapPropertyPermission: 'BTreeMap<Bytes, UpDataStructsPropertyPermission>',
2903 /**2953 /**
2904 * Lookup373: up_data_structs::CollectionStats2954 * Lookup377: up_data_structs::CollectionStats
2905 **/2955 **/
2906 UpDataStructsCollectionStats: {2956 UpDataStructsCollectionStats: {
2907 created: 'u32',2957 created: 'u32',
2908 destroyed: 'u32',2958 destroyed: 'u32',
2909 alive: 'u32'2959 alive: 'u32'
2910 },2960 },
2911 /**2961 /**
2912 * Lookup374: up_data_structs::TokenChild2962 * Lookup378: up_data_structs::TokenChild
2913 **/2963 **/
2914 UpDataStructsTokenChild: {2964 UpDataStructsTokenChild: {
2915 token: 'u32',2965 token: 'u32',
2916 collection: 'u32'2966 collection: 'u32'
2917 },2967 },
2918 /**2968 /**
2919 * Lookup375: PhantomType::up_data_structs<T>2969 * Lookup379: PhantomType::up_data_structs<T>
2920 **/2970 **/
2921 PhantomTypeUpDataStructs: '[(UpDataStructsTokenData,UpDataStructsRpcCollection,RmrkTraitsCollectionCollectionInfo,RmrkTraitsNftNftInfo,RmrkTraitsResourceResourceInfo,RmrkTraitsPropertyPropertyInfo,RmrkTraitsBaseBaseInfo,RmrkTraitsPartPartType,RmrkTraitsTheme,RmrkTraitsNftNftChild);0]',2971 PhantomTypeUpDataStructs: '[(UpDataStructsTokenData,UpDataStructsRpcCollection,RmrkTraitsCollectionCollectionInfo,RmrkTraitsNftNftInfo,RmrkTraitsResourceResourceInfo,RmrkTraitsPropertyPropertyInfo,RmrkTraitsBaseBaseInfo,RmrkTraitsPartPartType,RmrkTraitsTheme,RmrkTraitsNftNftChild);0]',
2922 /**2972 /**
2923 * Lookup377: up_data_structs::TokenData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>2973 * Lookup381: up_data_structs::TokenData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
2924 **/2974 **/
2925 UpDataStructsTokenData: {2975 UpDataStructsTokenData: {
2926 properties: 'Vec<UpDataStructsProperty>',2976 properties: 'Vec<UpDataStructsProperty>',
2927 owner: 'Option<PalletEvmAccountBasicCrossAccountIdRepr>',2977 owner: 'Option<PalletEvmAccountBasicCrossAccountIdRepr>',
2928 pieces: 'u128'2978 pieces: 'u128'
2929 },2979 },
2930 /**2980 /**
2931 * Lookup379: up_data_structs::RpcCollection<sp_core::crypto::AccountId32>2981 * Lookup383: up_data_structs::RpcCollection<sp_core::crypto::AccountId32>
2932 **/2982 **/
2933 UpDataStructsRpcCollection: {2983 UpDataStructsRpcCollection: {
2934 owner: 'AccountId32',2984 owner: 'AccountId32',
2935 mode: 'UpDataStructsCollectionMode',2985 mode: 'UpDataStructsCollectionMode',
2936 name: 'Vec<u16>',2986 name: 'Vec<u16>',
2937 description: 'Vec<u16>',2987 description: 'Vec<u16>',
2938 tokenPrefix: 'Bytes',2988 tokenPrefix: 'Bytes',
2939 sponsorship: 'UpDataStructsSponsorshipState',2989 sponsorship: 'UpDataStructsSponsorshipStateAccountId32',
2940 limits: 'UpDataStructsCollectionLimits',2990 limits: 'UpDataStructsCollectionLimits',
2941 permissions: 'UpDataStructsCollectionPermissions',2991 permissions: 'UpDataStructsCollectionPermissions',
2942 tokenPropertyPermissions: 'Vec<UpDataStructsPropertyKeyPermission>',2992 tokenPropertyPermissions: 'Vec<UpDataStructsPropertyKeyPermission>',
2943 properties: 'Vec<UpDataStructsProperty>',2993 properties: 'Vec<UpDataStructsProperty>',
2944 readOnly: 'bool'2994 readOnly: 'bool'
2945 },2995 },
2946 /**2996 /**
2947 * Lookup380: rmrk_traits::collection::CollectionInfo<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_core::crypto::AccountId32>2997 * Lookup384: rmrk_traits::collection::CollectionInfo<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_core::crypto::AccountId32>
2948 **/2998 **/
2949 RmrkTraitsCollectionCollectionInfo: {2999 RmrkTraitsCollectionCollectionInfo: {
2950 issuer: 'AccountId32',3000 issuer: 'AccountId32',
2951 metadata: 'Bytes',3001 metadata: 'Bytes',
2952 max: 'Option<u32>',3002 max: 'Option<u32>',
2953 symbol: 'Bytes',3003 symbol: 'Bytes',
2954 nftsCount: 'u32'3004 nftsCount: 'u32'
2955 },3005 },
2956 /**3006 /**
2957 * Lookup381: rmrk_traits::nft::NftInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>3007 * Lookup385: rmrk_traits::nft::NftInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
2958 **/3008 **/
2959 RmrkTraitsNftNftInfo: {3009 RmrkTraitsNftNftInfo: {
2960 owner: 'RmrkTraitsNftAccountIdOrCollectionNftTuple',3010 owner: 'RmrkTraitsNftAccountIdOrCollectionNftTuple',
2961 royalty: 'Option<RmrkTraitsNftRoyaltyInfo>',3011 royalty: 'Option<RmrkTraitsNftRoyaltyInfo>',
2962 metadata: 'Bytes',3012 metadata: 'Bytes',
2963 equipped: 'bool',3013 equipped: 'bool',
2964 pending: 'bool'3014 pending: 'bool'
2965 },3015 },
2966 /**3016 /**
2967 * Lookup383: rmrk_traits::nft::RoyaltyInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill>3017 * Lookup387: rmrk_traits::nft::RoyaltyInfo<sp_core::crypto::AccountId32, sp_arithmetic::per_things::Permill>
2968 **/3018 **/
2969 RmrkTraitsNftRoyaltyInfo: {3019 RmrkTraitsNftRoyaltyInfo: {
2970 recipient: 'AccountId32',3020 recipient: 'AccountId32',
2971 amount: 'Permill'3021 amount: 'Permill'
2972 },3022 },
2973 /**3023 /**
2974 * Lookup384: rmrk_traits::resource::ResourceInfo<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>3024 * Lookup388: rmrk_traits::resource::ResourceInfo<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
2975 **/3025 **/
2976 RmrkTraitsResourceResourceInfo: {3026 RmrkTraitsResourceResourceInfo: {
2977 id: 'u32',3027 id: 'u32',
2978 resource: 'RmrkTraitsResourceResourceTypes',3028 resource: 'RmrkTraitsResourceResourceTypes',
2979 pending: 'bool',3029 pending: 'bool',
2980 pendingRemoval: 'bool'3030 pendingRemoval: 'bool'
2981 },3031 },
2982 /**3032 /**
2983 * Lookup385: rmrk_traits::property::PropertyInfo<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>3033 * Lookup389: rmrk_traits::property::PropertyInfo<sp_runtime::bounded::bounded_vec::BoundedVec<T, S>, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
2984 **/3034 **/
2985 RmrkTraitsPropertyPropertyInfo: {3035 RmrkTraitsPropertyPropertyInfo: {
2986 key: 'Bytes',3036 key: 'Bytes',
2987 value: 'Bytes'3037 value: 'Bytes'
2988 },3038 },
2989 /**3039 /**
2990 * Lookup386: rmrk_traits::base::BaseInfo<sp_core::crypto::AccountId32, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>3040 * Lookup390: rmrk_traits::base::BaseInfo<sp_core::crypto::AccountId32, sp_runtime::bounded::bounded_vec::BoundedVec<T, S>>
2991 **/3041 **/
2992 RmrkTraitsBaseBaseInfo: {3042 RmrkTraitsBaseBaseInfo: {
2993 issuer: 'AccountId32',3043 issuer: 'AccountId32',
2994 baseType: 'Bytes',3044 baseType: 'Bytes',
2995 symbol: 'Bytes'3045 symbol: 'Bytes'
2996 },3046 },
2997 /**3047 /**
2998 * Lookup387: rmrk_traits::nft::NftChild3048 * Lookup391: rmrk_traits::nft::NftChild
2999 **/3049 **/
3000 RmrkTraitsNftNftChild: {3050 RmrkTraitsNftNftChild: {
3001 collectionId: 'u32',3051 collectionId: 'u32',
3002 nftId: 'u32'3052 nftId: 'u32'
3003 },3053 },
3004 /**3054 /**
3005 * Lookup389: pallet_common::pallet::Error<T>3055 * Lookup393: pallet_common::pallet::Error<T>
3006 **/3056 **/
3007 PalletCommonError: {3057 PalletCommonError: {
3008 _enum: ['CollectionNotFound', 'MustBeTokenOwner', 'NoPermission', 'CantDestroyNotEmptyCollection', 'PublicMintingNotAllowed', 'AddressNotInAllowlist', 'CollectionNameLimitExceeded', 'CollectionDescriptionLimitExceeded', 'CollectionTokenPrefixLimitExceeded', 'TotalCollectionsLimitExceeded', 'CollectionAdminCountExceeded', 'CollectionLimitBoundsExceeded', 'OwnerPermissionsCantBeReverted', 'TransferNotAllowed', 'AccountTokenLimitExceeded', 'CollectionTokenLimitExceeded', 'MetadataFlagFrozen', 'TokenNotFound', 'TokenValueTooLow', 'ApprovedValueTooLow', 'CantApproveMoreThanOwned', 'AddressIsZero', 'UnsupportedOperation', 'NotSufficientFounds', 'UserIsNotAllowedToNest', 'SourceCollectionIsNotAllowedToNest', 'CollectionFieldSizeExceeded', 'NoSpaceForProperty', 'PropertyLimitReached', 'PropertyKeyIsTooLong', 'InvalidCharacterInPropertyKey', 'EmptyPropertyKey', 'CollectionIsExternal', 'CollectionIsInternal']3058 _enum: ['CollectionNotFound', 'MustBeTokenOwner', 'NoPermission', 'CantDestroyNotEmptyCollection', 'PublicMintingNotAllowed', 'AddressNotInAllowlist', 'CollectionNameLimitExceeded', 'CollectionDescriptionLimitExceeded', 'CollectionTokenPrefixLimitExceeded', 'TotalCollectionsLimitExceeded', 'CollectionAdminCountExceeded', 'CollectionLimitBoundsExceeded', 'OwnerPermissionsCantBeReverted', 'TransferNotAllowed', 'AccountTokenLimitExceeded', 'CollectionTokenLimitExceeded', 'MetadataFlagFrozen', 'TokenNotFound', 'TokenValueTooLow', 'ApprovedValueTooLow', 'CantApproveMoreThanOwned', 'AddressIsZero', 'UnsupportedOperation', 'NotSufficientFounds', 'UserIsNotAllowedToNest', 'SourceCollectionIsNotAllowedToNest', 'CollectionFieldSizeExceeded', 'NoSpaceForProperty', 'PropertyLimitReached', 'PropertyKeyIsTooLong', 'InvalidCharacterInPropertyKey', 'EmptyPropertyKey', 'CollectionIsExternal', 'CollectionIsInternal']
3009 },3059 },
3010 /**3060 /**
3011 * Lookup391: pallet_fungible::pallet::Error<T>3061 * Lookup395: pallet_fungible::pallet::Error<T>
3012 **/3062 **/
3013 PalletFungibleError: {3063 PalletFungibleError: {
3014 _enum: ['NotFungibleDataUsedToMintFungibleCollectionToken', 'FungibleItemsHaveNoId', 'FungibleItemsDontHaveData', 'FungibleDisallowsNesting', 'SettingPropertiesNotAllowed']3064 _enum: ['NotFungibleDataUsedToMintFungibleCollectionToken', 'FungibleItemsHaveNoId', 'FungibleItemsDontHaveData', 'FungibleDisallowsNesting', 'SettingPropertiesNotAllowed']
3015 },3065 },
3016 /**3066 /**
3017 * Lookup392: pallet_refungible::ItemData3067 * Lookup396: pallet_refungible::ItemData
3018 **/3068 **/
3019 PalletRefungibleItemData: {3069 PalletRefungibleItemData: {
3020 constData: 'Bytes'3070 constData: 'Bytes'
3021 },3071 },
3022 /**3072 /**
3023 * Lookup397: pallet_refungible::pallet::Error<T>3073 * Lookup401: pallet_refungible::pallet::Error<T>
3024 **/3074 **/
3025 PalletRefungibleError: {3075 PalletRefungibleError: {
3026 _enum: ['NotRefungibleDataUsedToMintFungibleCollectionToken', 'WrongRefungiblePieces', 'RepartitionWhileNotOwningAllPieces', 'RefungibleDisallowsNesting', 'SettingPropertiesNotAllowed']3076 _enum: ['NotRefungibleDataUsedToMintFungibleCollectionToken', 'WrongRefungiblePieces', 'RepartitionWhileNotOwningAllPieces', 'RefungibleDisallowsNesting', 'SettingPropertiesNotAllowed']
3027 },3077 },
3028 /**3078 /**
3029 * Lookup398: pallet_nonfungible::ItemData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>3079 * Lookup402: pallet_nonfungible::ItemData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
3030 **/3080 **/
3031 PalletNonfungibleItemData: {3081 PalletNonfungibleItemData: {
3032 owner: 'PalletEvmAccountBasicCrossAccountIdRepr'3082 owner: 'PalletEvmAccountBasicCrossAccountIdRepr'
3033 },3083 },
3034 /**3084 /**
3035 * Lookup400: up_data_structs::PropertyScope3085 * Lookup404: up_data_structs::PropertyScope
3036 **/3086 **/
3037 UpDataStructsPropertyScope: {3087 UpDataStructsPropertyScope: {
3038 _enum: ['None', 'Rmrk', 'Eth']3088 _enum: ['None', 'Rmrk']
3039 },3089 },
3040 /**3090 /**
3041 * Lookup402: pallet_nonfungible::pallet::Error<T>3091 * Lookup406: pallet_nonfungible::pallet::Error<T>
3042 **/3092 **/
3043 PalletNonfungibleError: {3093 PalletNonfungibleError: {
3044 _enum: ['NotNonfungibleDataUsedToMintFungibleCollectionToken', 'NonfungibleItemsHaveNoAmount', 'CantBurnNftWithChildren']3094 _enum: ['NotNonfungibleDataUsedToMintFungibleCollectionToken', 'NonfungibleItemsHaveNoAmount', 'CantBurnNftWithChildren']
3045 },3095 },
3046 /**3096 /**
3047 * Lookup403: pallet_structure::pallet::Error<T>3097 * Lookup407: pallet_structure::pallet::Error<T>
3048 **/3098 **/
3049 PalletStructureError: {3099 PalletStructureError: {
3050 _enum: ['OuroborosDetected', 'DepthLimit', 'BreadthLimit', 'TokenNotFound']3100 _enum: ['OuroborosDetected', 'DepthLimit', 'BreadthLimit', 'TokenNotFound']
3051 },3101 },
3052 /**3102 /**
3053 * Lookup404: pallet_rmrk_core::pallet::Error<T>3103 * Lookup408: pallet_rmrk_core::pallet::Error<T>
3054 **/3104 **/
3055 PalletRmrkCoreError: {3105 PalletRmrkCoreError: {
3056 _enum: ['CorruptedCollectionType', 'RmrkPropertyKeyIsTooLong', 'RmrkPropertyValueIsTooLong', 'RmrkPropertyIsNotFound', 'UnableToDecodeRmrkData', 'CollectionNotEmpty', 'NoAvailableCollectionId', 'NoAvailableNftId', 'CollectionUnknown', 'NoPermission', 'NonTransferable', 'CollectionFullOrLocked', 'ResourceDoesntExist', 'CannotSendToDescendentOrSelf', 'CannotAcceptNonOwnedNft', 'CannotRejectNonOwnedNft', 'CannotRejectNonPendingNft', 'ResourceNotPending', 'NoAvailableResourceId']3106 _enum: ['CorruptedCollectionType', 'RmrkPropertyKeyIsTooLong', 'RmrkPropertyValueIsTooLong', 'RmrkPropertyIsNotFound', 'UnableToDecodeRmrkData', 'CollectionNotEmpty', 'NoAvailableCollectionId', 'NoAvailableNftId', 'CollectionUnknown', 'NoPermission', 'NonTransferable', 'CollectionFullOrLocked', 'ResourceDoesntExist', 'CannotSendToDescendentOrSelf', 'CannotAcceptNonOwnedNft', 'CannotRejectNonOwnedNft', 'CannotRejectNonPendingNft', 'ResourceNotPending', 'NoAvailableResourceId']
3057 },3107 },
3058 /**3108 /**
3059 * Lookup406: pallet_rmrk_equip::pallet::Error<T>3109 * Lookup410: pallet_rmrk_equip::pallet::Error<T>
3060 **/3110 **/
3061 PalletRmrkEquipError: {3111 PalletRmrkEquipError: {
3062 _enum: ['PermissionError', 'NoAvailableBaseId', 'NoAvailablePartId', 'BaseDoesntExist', 'NeedsDefaultThemeFirst', 'PartDoesntExist', 'NoEquippableOnFixedPart']3112 _enum: ['PermissionError', 'NoAvailableBaseId', 'NoAvailablePartId', 'BaseDoesntExist', 'NeedsDefaultThemeFirst', 'PartDoesntExist', 'NoEquippableOnFixedPart']
3063 },3113 },
3114 /**
3115 * Lookup416: pallet_app_promotion::pallet::Error<T>
3116 **/
3117 PalletAppPromotionError: {
3118 _enum: ['AdminNotSet', 'NoPermission', 'NotSufficientFunds', 'PendingForBlockOverflow', 'SponsorNotSet', 'IncorrectLockedBalanceOperation']
3119 },
3064 /**3120 /**
3065 * Lookup409: pallet_evm::pallet::Error<T>3121 * Lookup419: pallet_evm::pallet::Error<T>
3066 **/3122 **/
3067 PalletEvmError: {3123 PalletEvmError: {
3068 _enum: ['BalanceLow', 'FeeOverflow', 'PaymentOverflow', 'WithdrawFailed', 'GasPriceTooLow', 'InvalidNonce']3124 _enum: ['BalanceLow', 'FeeOverflow', 'PaymentOverflow', 'WithdrawFailed', 'GasPriceTooLow', 'InvalidNonce']
3069 },3125 },
3070 /**3126 /**
3071 * Lookup412: fp_rpc::TransactionStatus3127 * Lookup422: fp_rpc::TransactionStatus
3072 **/3128 **/
3073 FpRpcTransactionStatus: {3129 FpRpcTransactionStatus: {
3074 transactionHash: 'H256',3130 transactionHash: 'H256',
3075 transactionIndex: 'u32',3131 transactionIndex: 'u32',
3079 logs: 'Vec<EthereumLog>',3135 logs: 'Vec<EthereumLog>',
3080 logsBloom: 'EthbloomBloom'3136 logsBloom: 'EthbloomBloom'
3081 },3137 },
3082 /**3138 /**
3083 * Lookup414: ethbloom::Bloom3139 * Lookup424: ethbloom::Bloom
3084 **/3140 **/
3085 EthbloomBloom: '[u8;256]',3141 EthbloomBloom: '[u8;256]',
3086 /**3142 /**
3087 * Lookup416: ethereum::receipt::ReceiptV33143 * Lookup426: ethereum::receipt::ReceiptV3
3088 **/3144 **/
3089 EthereumReceiptReceiptV3: {3145 EthereumReceiptReceiptV3: {
3090 _enum: {3146 _enum: {
3091 Legacy: 'EthereumReceiptEip658ReceiptData',3147 Legacy: 'EthereumReceiptEip658ReceiptData',
3092 EIP2930: 'EthereumReceiptEip658ReceiptData',3148 EIP2930: 'EthereumReceiptEip658ReceiptData',
3093 EIP1559: 'EthereumReceiptEip658ReceiptData'3149 EIP1559: 'EthereumReceiptEip658ReceiptData'
3094 }3150 }
3095 },3151 },
3096 /**3152 /**
3097 * Lookup417: ethereum::receipt::EIP658ReceiptData3153 * Lookup427: ethereum::receipt::EIP658ReceiptData
3098 **/3154 **/
3099 EthereumReceiptEip658ReceiptData: {3155 EthereumReceiptEip658ReceiptData: {
3100 statusCode: 'u8',3156 statusCode: 'u8',
3101 usedGas: 'U256',3157 usedGas: 'U256',
3102 logsBloom: 'EthbloomBloom',3158 logsBloom: 'EthbloomBloom',
3103 logs: 'Vec<EthereumLog>'3159 logs: 'Vec<EthereumLog>'
3104 },3160 },
3105 /**3161 /**
3106 * Lookup418: ethereum::block::Block<ethereum::transaction::TransactionV2>3162 * Lookup428: ethereum::block::Block<ethereum::transaction::TransactionV2>
3107 **/3163 **/
3108 EthereumBlock: {3164 EthereumBlock: {
3109 header: 'EthereumHeader',3165 header: 'EthereumHeader',
3110 transactions: 'Vec<EthereumTransactionTransactionV2>',3166 transactions: 'Vec<EthereumTransactionTransactionV2>',
3111 ommers: 'Vec<EthereumHeader>'3167 ommers: 'Vec<EthereumHeader>'
3112 },3168 },
3113 /**3169 /**
3114 * Lookup419: ethereum::header::Header3170 * Lookup429: ethereum::header::Header
3115 **/3171 **/
3116 EthereumHeader: {3172 EthereumHeader: {
3117 parentHash: 'H256',3173 parentHash: 'H256',
3118 ommersHash: 'H256',3174 ommersHash: 'H256',
3130 mixHash: 'H256',3186 mixHash: 'H256',
3131 nonce: 'EthereumTypesHashH64'3187 nonce: 'EthereumTypesHashH64'
3132 },3188 },
3133 /**3189 /**
3134 * Lookup420: ethereum_types::hash::H643190 * Lookup430: ethereum_types::hash::H64
3135 **/3191 **/
3136 EthereumTypesHashH64: '[u8;8]',3192 EthereumTypesHashH64: '[u8;8]',
3137 /**3193 /**
3138 * Lookup425: pallet_ethereum::pallet::Error<T>3194 * Lookup435: pallet_ethereum::pallet::Error<T>
3139 **/3195 **/
3140 PalletEthereumError: {3196 PalletEthereumError: {
3141 _enum: ['InvalidSignature', 'PreLogExists']3197 _enum: ['InvalidSignature', 'PreLogExists']
3142 },3198 },
3143 /**3199 /**
3144 * Lookup426: pallet_evm_coder_substrate::pallet::Error<T>3200 * Lookup436: pallet_evm_coder_substrate::pallet::Error<T>
3145 **/3201 **/
3146 PalletEvmCoderSubstrateError: {3202 PalletEvmCoderSubstrateError: {
3147 _enum: ['OutOfGas', 'OutOfFund']3203 _enum: ['OutOfGas', 'OutOfFund']
3148 },3204 },
3205 /**
3206 * Lookup437: up_data_structs::SponsorshipState<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
3207 **/
3208 UpDataStructsSponsorshipStateBasicCrossAccountIdRepr: {
3209 _enum: {
3210 Disabled: 'Null',
3211 Unconfirmed: 'PalletEvmAccountBasicCrossAccountIdRepr',
3212 Confirmed: 'PalletEvmAccountBasicCrossAccountIdRepr'
3213 }
3214 },
3149 /**3215 /**
3150 * Lookup427: pallet_evm_contract_helpers::SponsoringModeT3216 * Lookup438: pallet_evm_contract_helpers::SponsoringModeT
3151 **/3217 **/
3152 PalletEvmContractHelpersSponsoringModeT: {3218 PalletEvmContractHelpersSponsoringModeT: {
3153 _enum: ['Disabled', 'Allowlisted', 'Generous']3219 _enum: ['Disabled', 'Allowlisted', 'Generous']
3154 },3220 },
3155 /**3221 /**
3156 * Lookup429: pallet_evm_contract_helpers::pallet::Error<T>3222 * Lookup440: pallet_evm_contract_helpers::pallet::Error<T>
3157 **/3223 **/
3158 PalletEvmContractHelpersError: {3224 PalletEvmContractHelpersError: {
3159 _enum: ['NoPermission']3225 _enum: ['NoPermission', 'NoPendingSponsor']
3160 },3226 },
3161 /**3227 /**
3162 * Lookup430: pallet_evm_migration::pallet::Error<T>3228 * Lookup441: pallet_evm_migration::pallet::Error<T>
3163 **/3229 **/
3164 PalletEvmMigrationError: {3230 PalletEvmMigrationError: {
3165 _enum: ['AccountNotEmpty', 'AccountIsNotMigrating']3231 _enum: ['AccountNotEmpty', 'AccountIsNotMigrating']
3166 },3232 },
3167 /**3233 /**
3168 * Lookup432: sp_runtime::MultiSignature3234 * Lookup443: sp_runtime::MultiSignature
3169 **/3235 **/
3170 SpRuntimeMultiSignature: {3236 SpRuntimeMultiSignature: {
3171 _enum: {3237 _enum: {
3172 Ed25519: 'SpCoreEd25519Signature',3238 Ed25519: 'SpCoreEd25519Signature',
3173 Sr25519: 'SpCoreSr25519Signature',3239 Sr25519: 'SpCoreSr25519Signature',
3174 Ecdsa: 'SpCoreEcdsaSignature'3240 Ecdsa: 'SpCoreEcdsaSignature'
3175 }3241 }
3176 },3242 },
3177 /**3243 /**
3178 * Lookup433: sp_core::ed25519::Signature3244 * Lookup444: sp_core::ed25519::Signature
3179 **/3245 **/
3180 SpCoreEd25519Signature: '[u8;64]',3246 SpCoreEd25519Signature: '[u8;64]',
3181 /**3247 /**
3182 * Lookup435: sp_core::sr25519::Signature3248 * Lookup446: sp_core::sr25519::Signature
3183 **/3249 **/
3184 SpCoreSr25519Signature: '[u8;64]',3250 SpCoreSr25519Signature: '[u8;64]',
3185 /**3251 /**
3186 * Lookup436: sp_core::ecdsa::Signature3252 * Lookup447: sp_core::ecdsa::Signature
3187 **/3253 **/
3188 SpCoreEcdsaSignature: '[u8;65]',3254 SpCoreEcdsaSignature: '[u8;65]',
3189 /**3255 /**
3190 * Lookup439: frame_system::extensions::check_spec_version::CheckSpecVersion<T>3256 * Lookup450: frame_system::extensions::check_spec_version::CheckSpecVersion<T>
3191 **/3257 **/
3192 FrameSystemExtensionsCheckSpecVersion: 'Null',3258 FrameSystemExtensionsCheckSpecVersion: 'Null',
3193 /**3259 /**
3194 * Lookup440: frame_system::extensions::check_genesis::CheckGenesis<T>3260 * Lookup451: frame_system::extensions::check_genesis::CheckGenesis<T>
3195 **/3261 **/
3196 FrameSystemExtensionsCheckGenesis: 'Null',3262 FrameSystemExtensionsCheckGenesis: 'Null',
3197 /**3263 /**
3198 * Lookup443: frame_system::extensions::check_nonce::CheckNonce<T>3264 * Lookup454: frame_system::extensions::check_nonce::CheckNonce<T>
3199 **/3265 **/
3200 FrameSystemExtensionsCheckNonce: 'Compact<u32>',3266 FrameSystemExtensionsCheckNonce: 'Compact<u32>',
3201 /**3267 /**
3202 * Lookup444: frame_system::extensions::check_weight::CheckWeight<T>3268 * Lookup455: frame_system::extensions::check_weight::CheckWeight<T>
3203 **/3269 **/
3204 FrameSystemExtensionsCheckWeight: 'Null',3270 FrameSystemExtensionsCheckWeight: 'Null',
3205 /**3271 /**
3206 * Lookup445: pallet_template_transaction_payment::ChargeTransactionPayment<opal_runtime::Runtime>3272 * Lookup456: pallet_template_transaction_payment::ChargeTransactionPayment<opal_runtime::Runtime>
3207 **/3273 **/
3208 PalletTemplateTransactionPaymentChargeTransactionPayment: 'Compact<u128>',3274 PalletTemplateTransactionPaymentChargeTransactionPayment: 'Compact<u128>',
3209 /**3275 /**
3210 * Lookup446: opal_runtime::Runtime3276 * Lookup457: opal_runtime::Runtime
3211 **/3277 **/
3212 OpalRuntimeRuntime: 'Null',3278 OpalRuntimeRuntime: 'Null',
3213 /**3279 /**
3214 * Lookup447: pallet_ethereum::FakeTransactionFinalizer<opal_runtime::Runtime>3280 * Lookup458: pallet_ethereum::FakeTransactionFinalizer<opal_runtime::Runtime>
3215 **/3281 **/
3216 PalletEthereumFakeTransactionFinalizer: 'Null'3282 PalletEthereumFakeTransactionFinalizer: 'Null'
3217};3283};
32183284
modifiedtests/src/interfaces/registry.tsdiffbeforeafterboth
5// this is required to allow for ambient/previous definitions5// this is required to allow for ambient/previous definitions
6import '@polkadot/types/types/registry';6import '@polkadot/types/types/registry';
77
8import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmOrigin, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportDispatchRawOrigin, FrameSupportPalletId, FrameSupportScheduleLookupError, FrameSupportScheduleMaybeHashed, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeOriginCaller, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletConfigurationCall, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEthereumRawOrigin, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletRmrkCoreCall, PalletRmrkCoreError, PalletRmrkCoreEvent, PalletRmrkEquipCall, PalletRmrkEquipError, PalletRmrkEquipEvent, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentEvent, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletUniqueSchedulerCall, PalletUniqueSchedulerError, PalletUniqueSchedulerEvent, PalletUniqueSchedulerScheduledV3, PalletXcmCall, PalletXcmError, PalletXcmEvent, PalletXcmOrigin, PhantomTypeUpDataStructs, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsNftRoyaltyInfo, RmrkTraitsPartEquippableList, RmrkTraitsPartFixedPart, RmrkTraitsPartPartType, RmrkTraitsPartSlotPart, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceInfo, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, RmrkTraitsThemeThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpCoreVoid, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExMultipleOwners, UpDataStructsCreateRefungibleExSingleOwner, UpDataStructsNestingPermissions, UpDataStructsOwnerRestrictedSet, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsRpcCollection, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, UpDataStructsTokenChild, UpDataStructsTokenData, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';8import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmOrigin, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportDispatchRawOrigin, FrameSupportPalletId, FrameSupportScheduleLookupError, FrameSupportScheduleMaybeHashed, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeOriginCaller, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletAppPromotionCall, PalletAppPromotionError, PalletAppPromotionEvent, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletConfigurationCall, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEthereumFakeTransactionFinalizer, PalletEthereumRawOrigin, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersEvent, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletRmrkCoreCall, PalletRmrkCoreError, PalletRmrkCoreEvent, PalletRmrkEquipCall, PalletRmrkEquipError, PalletRmrkEquipEvent, PalletStructureCall, PalletStructureError, PalletStructureEvent, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentEvent, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletUniqueSchedulerCall, PalletUniqueSchedulerError, PalletUniqueSchedulerEvent, PalletUniqueSchedulerScheduledV3, PalletXcmCall, PalletXcmError, PalletXcmEvent, PalletXcmOrigin, PhantomTypeUpDataStructs, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2AbridgedHrmpChannel, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftAccountIdOrCollectionNftTuple, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsNftRoyaltyInfo, RmrkTraitsPartEquippableList, RmrkTraitsPartFixedPart, RmrkTraitsPartPartType, RmrkTraitsPartSlotPart, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceBasicResource, RmrkTraitsResourceComposableResource, RmrkTraitsResourceResourceInfo, RmrkTraitsResourceResourceTypes, RmrkTraitsResourceSlotResource, RmrkTraitsTheme, RmrkTraitsThemeThemeProperty, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpCoreVoid, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionPermissions, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExMultipleOwners, UpDataStructsCreateRefungibleExSingleOwner, UpDataStructsNestingPermissions, UpDataStructsOwnerRestrictedSet, UpDataStructsProperties, UpDataStructsPropertiesMapBoundedVec, UpDataStructsPropertiesMapPropertyPermission, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsPropertyPermission, UpDataStructsPropertyScope, UpDataStructsRpcCollection, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipStateAccountId32, UpDataStructsSponsorshipStateBasicCrossAccountIdRepr, UpDataStructsTokenChild, UpDataStructsTokenData, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
99
10declare module '@polkadot/types/types/registry' {10declare module '@polkadot/types/types/registry' {
11 interface InterfaceTypes {11 interface InterfaceTypes {
83 OrmlVestingModuleError: OrmlVestingModuleError;83 OrmlVestingModuleError: OrmlVestingModuleError;
84 OrmlVestingModuleEvent: OrmlVestingModuleEvent;84 OrmlVestingModuleEvent: OrmlVestingModuleEvent;
85 OrmlVestingVestingSchedule: OrmlVestingVestingSchedule;85 OrmlVestingVestingSchedule: OrmlVestingVestingSchedule;
86 PalletAppPromotionCall: PalletAppPromotionCall;
87 PalletAppPromotionError: PalletAppPromotionError;
88 PalletAppPromotionEvent: PalletAppPromotionEvent;
86 PalletBalancesAccountData: PalletBalancesAccountData;89 PalletBalancesAccountData: PalletBalancesAccountData;
87 PalletBalancesBalanceLock: PalletBalancesBalanceLock;90 PalletBalancesBalanceLock: PalletBalancesBalanceLock;
88 PalletBalancesCall: PalletBalancesCall;91 PalletBalancesCall: PalletBalancesCall;
103 PalletEvmCall: PalletEvmCall;106 PalletEvmCall: PalletEvmCall;
104 PalletEvmCoderSubstrateError: PalletEvmCoderSubstrateError;107 PalletEvmCoderSubstrateError: PalletEvmCoderSubstrateError;
105 PalletEvmContractHelpersError: PalletEvmContractHelpersError;108 PalletEvmContractHelpersError: PalletEvmContractHelpersError;
109 PalletEvmContractHelpersEvent: PalletEvmContractHelpersEvent;
106 PalletEvmContractHelpersSponsoringModeT: PalletEvmContractHelpersSponsoringModeT;110 PalletEvmContractHelpersSponsoringModeT: PalletEvmContractHelpersSponsoringModeT;
107 PalletEvmError: PalletEvmError;111 PalletEvmError: PalletEvmError;
108 PalletEvmEvent: PalletEvmEvent;112 PalletEvmEvent: PalletEvmEvent;
213 UpDataStructsPropertyScope: UpDataStructsPropertyScope;217 UpDataStructsPropertyScope: UpDataStructsPropertyScope;
214 UpDataStructsRpcCollection: UpDataStructsRpcCollection;218 UpDataStructsRpcCollection: UpDataStructsRpcCollection;
215 UpDataStructsSponsoringRateLimit: UpDataStructsSponsoringRateLimit;219 UpDataStructsSponsoringRateLimit: UpDataStructsSponsoringRateLimit;
216 UpDataStructsSponsorshipState: UpDataStructsSponsorshipState;220 UpDataStructsSponsorshipStateAccountId32: UpDataStructsSponsorshipStateAccountId32;
221 UpDataStructsSponsorshipStateBasicCrossAccountIdRepr: UpDataStructsSponsorshipStateBasicCrossAccountIdRepr;
217 UpDataStructsTokenChild: UpDataStructsTokenChild;222 UpDataStructsTokenChild: UpDataStructsTokenChild;
218 UpDataStructsTokenData: UpDataStructsTokenData;223 UpDataStructsTokenData: UpDataStructsTokenData;
219 XcmDoubleEncoded: XcmDoubleEncoded;224 XcmDoubleEncoded: XcmDoubleEncoded;
modifiedtests/src/interfaces/types-lookup.tsdiffbeforeafterboth
1198 readonly type: 'BaseCreated' | 'EquippablesUpdated';1198 readonly type: 'BaseCreated' | 'EquippablesUpdated';
1199 }1199 }
1200
1201 /** @name PalletAppPromotionEvent (103) */
1202 interface PalletAppPromotionEvent extends Enum {
1203 readonly isStakingRecalculation: boolean;
1204 readonly asStakingRecalculation: ITuple<[AccountId32, u128, u128]>;
1205 readonly isStake: boolean;
1206 readonly asStake: ITuple<[AccountId32, u128]>;
1207 readonly isUnstake: boolean;
1208 readonly asUnstake: ITuple<[AccountId32, u128]>;
1209 readonly isSetAdmin: boolean;
1210 readonly asSetAdmin: AccountId32;
1211 readonly type: 'StakingRecalculation' | 'Stake' | 'Unstake' | 'SetAdmin';
1212 }
12001213
1201 /** @name PalletEvmEvent (103) */1214 /** @name PalletEvmEvent (104) */
1202 interface PalletEvmEvent extends Enum {1215 interface PalletEvmEvent extends Enum {
1203 readonly isLog: boolean;1216 readonly isLog: boolean;
1204 readonly asLog: EthereumLog;1217 readonly asLog: EthereumLog;
1217 readonly type: 'Log' | 'Created' | 'CreatedFailed' | 'Executed' | 'ExecutedFailed' | 'BalanceDeposit' | 'BalanceWithdraw';1230 readonly type: 'Log' | 'Created' | 'CreatedFailed' | 'Executed' | 'ExecutedFailed' | 'BalanceDeposit' | 'BalanceWithdraw';
1218 }1231 }
12191232
1220 /** @name EthereumLog (104) */1233 /** @name EthereumLog (105) */
1221 interface EthereumLog extends Struct {1234 interface EthereumLog extends Struct {
1222 readonly address: H160;1235 readonly address: H160;
1223 readonly topics: Vec<H256>;1236 readonly topics: Vec<H256>;
1224 readonly data: Bytes;1237 readonly data: Bytes;
1225 }1238 }
12261239
1227 /** @name PalletEthereumEvent (108) */1240 /** @name PalletEthereumEvent (109) */
1228 interface PalletEthereumEvent extends Enum {1241 interface PalletEthereumEvent extends Enum {
1229 readonly isExecuted: boolean;1242 readonly isExecuted: boolean;
1230 readonly asExecuted: ITuple<[H160, H160, H256, EvmCoreErrorExitReason]>;1243 readonly asExecuted: ITuple<[H160, H160, H256, EvmCoreErrorExitReason]>;
1231 readonly type: 'Executed';1244 readonly type: 'Executed';
1232 }1245 }
12331246
1234 /** @name EvmCoreErrorExitReason (109) */1247 /** @name EvmCoreErrorExitReason (110) */
1235 interface EvmCoreErrorExitReason extends Enum {1248 interface EvmCoreErrorExitReason extends Enum {
1236 readonly isSucceed: boolean;1249 readonly isSucceed: boolean;
1237 readonly asSucceed: EvmCoreErrorExitSucceed;1250 readonly asSucceed: EvmCoreErrorExitSucceed;
1244 readonly type: 'Succeed' | 'Error' | 'Revert' | 'Fatal';1257 readonly type: 'Succeed' | 'Error' | 'Revert' | 'Fatal';
1245 }1258 }
12461259
1247 /** @name EvmCoreErrorExitSucceed (110) */1260 /** @name EvmCoreErrorExitSucceed (111) */
1248 interface EvmCoreErrorExitSucceed extends Enum {1261 interface EvmCoreErrorExitSucceed extends Enum {
1249 readonly isStopped: boolean;1262 readonly isStopped: boolean;
1250 readonly isReturned: boolean;1263 readonly isReturned: boolean;
1251 readonly isSuicided: boolean;1264 readonly isSuicided: boolean;
1252 readonly type: 'Stopped' | 'Returned' | 'Suicided';1265 readonly type: 'Stopped' | 'Returned' | 'Suicided';
1253 }1266 }
12541267
1255 /** @name EvmCoreErrorExitError (111) */1268 /** @name EvmCoreErrorExitError (112) */
1256 interface EvmCoreErrorExitError extends Enum {1269 interface EvmCoreErrorExitError extends Enum {
1257 readonly isStackUnderflow: boolean;1270 readonly isStackUnderflow: boolean;
1258 readonly isStackOverflow: boolean;1271 readonly isStackOverflow: boolean;
1273 readonly type: 'StackUnderflow' | 'StackOverflow' | 'InvalidJump' | 'InvalidRange' | 'DesignatedInvalid' | 'CallTooDeep' | 'CreateCollision' | 'CreateContractLimit' | 'OutOfOffset' | 'OutOfGas' | 'OutOfFund' | 'PcUnderflow' | 'CreateEmpty' | 'Other' | 'InvalidCode';1286 readonly type: 'StackUnderflow' | 'StackOverflow' | 'InvalidJump' | 'InvalidRange' | 'DesignatedInvalid' | 'CallTooDeep' | 'CreateCollision' | 'CreateContractLimit' | 'OutOfOffset' | 'OutOfGas' | 'OutOfFund' | 'PcUnderflow' | 'CreateEmpty' | 'Other' | 'InvalidCode';
1274 }1287 }
12751288
1276 /** @name EvmCoreErrorExitRevert (114) */1289 /** @name EvmCoreErrorExitRevert (115) */
1277 interface EvmCoreErrorExitRevert extends Enum {1290 interface EvmCoreErrorExitRevert extends Enum {
1278 readonly isReverted: boolean;1291 readonly isReverted: boolean;
1279 readonly type: 'Reverted';1292 readonly type: 'Reverted';
1280 }1293 }
12811294
1282 /** @name EvmCoreErrorExitFatal (115) */1295 /** @name EvmCoreErrorExitFatal (116) */
1283 interface EvmCoreErrorExitFatal extends Enum {1296 interface EvmCoreErrorExitFatal extends Enum {
1284 readonly isNotSupported: boolean;1297 readonly isNotSupported: boolean;
1285 readonly isUnhandledInterrupt: boolean;1298 readonly isUnhandledInterrupt: boolean;
1290 readonly type: 'NotSupported' | 'UnhandledInterrupt' | 'CallErrorAsFatal' | 'Other';1303 readonly type: 'NotSupported' | 'UnhandledInterrupt' | 'CallErrorAsFatal' | 'Other';
1291 }1304 }
1305
1306 /** @name PalletEvmContractHelpersEvent (117) */
1307 interface PalletEvmContractHelpersEvent extends Enum {
1308 readonly isContractSponsorSet: boolean;
1309 readonly asContractSponsorSet: ITuple<[H160, AccountId32]>;
1310 readonly isContractSponsorshipConfirmed: boolean;
1311 readonly asContractSponsorshipConfirmed: ITuple<[H160, AccountId32]>;
1312 readonly isContractSponsorRemoved: boolean;
1313 readonly asContractSponsorRemoved: H160;
1314 readonly type: 'ContractSponsorSet' | 'ContractSponsorshipConfirmed' | 'ContractSponsorRemoved';
1315 }
12921316
1293 /** @name FrameSystemPhase (116) */1317 /** @name FrameSystemPhase (118) */
1294 interface FrameSystemPhase extends Enum {1318 interface FrameSystemPhase extends Enum {
1295 readonly isApplyExtrinsic: boolean;1319 readonly isApplyExtrinsic: boolean;
1296 readonly asApplyExtrinsic: u32;1320 readonly asApplyExtrinsic: u32;
1299 readonly type: 'ApplyExtrinsic' | 'Finalization' | 'Initialization';1323 readonly type: 'ApplyExtrinsic' | 'Finalization' | 'Initialization';
1300 }1324 }
13011325
1302 /** @name FrameSystemLastRuntimeUpgradeInfo (118) */1326 /** @name FrameSystemLastRuntimeUpgradeInfo (120) */
1303 interface FrameSystemLastRuntimeUpgradeInfo extends Struct {1327 interface FrameSystemLastRuntimeUpgradeInfo extends Struct {
1304 readonly specVersion: Compact<u32>;1328 readonly specVersion: Compact<u32>;
1305 readonly specName: Text;1329 readonly specName: Text;
1306 }1330 }
13071331
1308 /** @name FrameSystemCall (119) */1332 /** @name FrameSystemCall (121) */
1309 interface FrameSystemCall extends Enum {1333 interface FrameSystemCall extends Enum {
1310 readonly isFillBlock: boolean;1334 readonly isFillBlock: boolean;
1311 readonly asFillBlock: {1335 readonly asFillBlock: {
1347 readonly type: 'FillBlock' | 'Remark' | 'SetHeapPages' | 'SetCode' | 'SetCodeWithoutChecks' | 'SetStorage' | 'KillStorage' | 'KillPrefix' | 'RemarkWithEvent';1371 readonly type: 'FillBlock' | 'Remark' | 'SetHeapPages' | 'SetCode' | 'SetCodeWithoutChecks' | 'SetStorage' | 'KillStorage' | 'KillPrefix' | 'RemarkWithEvent';
1348 }1372 }
13491373
1350 /** @name FrameSystemLimitsBlockWeights (124) */1374 /** @name FrameSystemLimitsBlockWeights (126) */
1351 interface FrameSystemLimitsBlockWeights extends Struct {1375 interface FrameSystemLimitsBlockWeights extends Struct {
1352 readonly baseBlock: u64;1376 readonly baseBlock: u64;
1353 readonly maxBlock: u64;1377 readonly maxBlock: u64;
1354 readonly perClass: FrameSupportWeightsPerDispatchClassWeightsPerClass;1378 readonly perClass: FrameSupportWeightsPerDispatchClassWeightsPerClass;
1355 }1379 }
13561380
1357 /** @name FrameSupportWeightsPerDispatchClassWeightsPerClass (125) */1381 /** @name FrameSupportWeightsPerDispatchClassWeightsPerClass (127) */
1358 interface FrameSupportWeightsPerDispatchClassWeightsPerClass extends Struct {1382 interface FrameSupportWeightsPerDispatchClassWeightsPerClass extends Struct {
1359 readonly normal: FrameSystemLimitsWeightsPerClass;1383 readonly normal: FrameSystemLimitsWeightsPerClass;
1360 readonly operational: FrameSystemLimitsWeightsPerClass;1384 readonly operational: FrameSystemLimitsWeightsPerClass;
1361 readonly mandatory: FrameSystemLimitsWeightsPerClass;1385 readonly mandatory: FrameSystemLimitsWeightsPerClass;
1362 }1386 }
13631387
1364 /** @name FrameSystemLimitsWeightsPerClass (126) */1388 /** @name FrameSystemLimitsWeightsPerClass (128) */
1365 interface FrameSystemLimitsWeightsPerClass extends Struct {1389 interface FrameSystemLimitsWeightsPerClass extends Struct {
1366 readonly baseExtrinsic: u64;1390 readonly baseExtrinsic: u64;
1367 readonly maxExtrinsic: Option<u64>;1391 readonly maxExtrinsic: Option<u64>;
1368 readonly maxTotal: Option<u64>;1392 readonly maxTotal: Option<u64>;
1369 readonly reserved: Option<u64>;1393 readonly reserved: Option<u64>;
1370 }1394 }
13711395
1372 /** @name FrameSystemLimitsBlockLength (128) */1396 /** @name FrameSystemLimitsBlockLength (130) */
1373 interface FrameSystemLimitsBlockLength extends Struct {1397 interface FrameSystemLimitsBlockLength extends Struct {
1374 readonly max: FrameSupportWeightsPerDispatchClassU32;1398 readonly max: FrameSupportWeightsPerDispatchClassU32;
1375 }1399 }
13761400
1377 /** @name FrameSupportWeightsPerDispatchClassU32 (129) */1401 /** @name FrameSupportWeightsPerDispatchClassU32 (131) */
1378 interface FrameSupportWeightsPerDispatchClassU32 extends Struct {1402 interface FrameSupportWeightsPerDispatchClassU32 extends Struct {
1379 readonly normal: u32;1403 readonly normal: u32;
1380 readonly operational: u32;1404 readonly operational: u32;
1381 readonly mandatory: u32;1405 readonly mandatory: u32;
1382 }1406 }
13831407
1384 /** @name FrameSupportWeightsRuntimeDbWeight (130) */1408 /** @name FrameSupportWeightsRuntimeDbWeight (132) */
1385 interface FrameSupportWeightsRuntimeDbWeight extends Struct {1409 interface FrameSupportWeightsRuntimeDbWeight extends Struct {
1386 readonly read: u64;1410 readonly read: u64;
1387 readonly write: u64;1411 readonly write: u64;
1388 }1412 }
13891413
1390 /** @name SpVersionRuntimeVersion (131) */1414 /** @name SpVersionRuntimeVersion (133) */
1391 interface SpVersionRuntimeVersion extends Struct {1415 interface SpVersionRuntimeVersion extends Struct {
1392 readonly specName: Text;1416 readonly specName: Text;
1393 readonly implName: Text;1417 readonly implName: Text;
1399 readonly stateVersion: u8;1423 readonly stateVersion: u8;
1400 }1424 }
14011425
1402 /** @name FrameSystemError (136) */1426 /** @name FrameSystemError (138) */
1403 interface FrameSystemError extends Enum {1427 interface FrameSystemError extends Enum {
1404 readonly isInvalidSpecName: boolean;1428 readonly isInvalidSpecName: boolean;
1405 readonly isSpecVersionNeedsToIncrease: boolean;1429 readonly isSpecVersionNeedsToIncrease: boolean;
1410 readonly type: 'InvalidSpecName' | 'SpecVersionNeedsToIncrease' | 'FailedToExtractRuntimeVersion' | 'NonDefaultComposite' | 'NonZeroRefCount' | 'CallFiltered';1434 readonly type: 'InvalidSpecName' | 'SpecVersionNeedsToIncrease' | 'FailedToExtractRuntimeVersion' | 'NonDefaultComposite' | 'NonZeroRefCount' | 'CallFiltered';
1411 }1435 }
14121436
1413 /** @name PolkadotPrimitivesV2PersistedValidationData (137) */1437 /** @name PolkadotPrimitivesV2PersistedValidationData (139) */
1414 interface PolkadotPrimitivesV2PersistedValidationData extends Struct {1438 interface PolkadotPrimitivesV2PersistedValidationData extends Struct {
1415 readonly parentHead: Bytes;1439 readonly parentHead: Bytes;
1416 readonly relayParentNumber: u32;1440 readonly relayParentNumber: u32;
1417 readonly relayParentStorageRoot: H256;1441 readonly relayParentStorageRoot: H256;
1418 readonly maxPovSize: u32;1442 readonly maxPovSize: u32;
1419 }1443 }
14201444
1421 /** @name PolkadotPrimitivesV2UpgradeRestriction (140) */1445 /** @name PolkadotPrimitivesV2UpgradeRestriction (142) */
1422 interface PolkadotPrimitivesV2UpgradeRestriction extends Enum {1446 interface PolkadotPrimitivesV2UpgradeRestriction extends Enum {
1423 readonly isPresent: boolean;1447 readonly isPresent: boolean;
1424 readonly type: 'Present';1448 readonly type: 'Present';
1425 }1449 }
14261450
1427 /** @name SpTrieStorageProof (141) */1451 /** @name SpTrieStorageProof (143) */
1428 interface SpTrieStorageProof extends Struct {1452 interface SpTrieStorageProof extends Struct {
1429 readonly trieNodes: BTreeSet<Bytes>;1453 readonly trieNodes: BTreeSet<Bytes>;
1430 }1454 }
14311455
1432 /** @name CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot (143) */1456 /** @name CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot (145) */
1433 interface CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot extends Struct {1457 interface CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot extends Struct {
1434 readonly dmqMqcHead: H256;1458 readonly dmqMqcHead: H256;
1435 readonly relayDispatchQueueSize: ITuple<[u32, u32]>;1459 readonly relayDispatchQueueSize: ITuple<[u32, u32]>;
1436 readonly ingressChannels: Vec<ITuple<[u32, PolkadotPrimitivesV2AbridgedHrmpChannel]>>;1460 readonly ingressChannels: Vec<ITuple<[u32, PolkadotPrimitivesV2AbridgedHrmpChannel]>>;
1437 readonly egressChannels: Vec<ITuple<[u32, PolkadotPrimitivesV2AbridgedHrmpChannel]>>;1461 readonly egressChannels: Vec<ITuple<[u32, PolkadotPrimitivesV2AbridgedHrmpChannel]>>;
1438 }1462 }
14391463
1440 /** @name PolkadotPrimitivesV2AbridgedHrmpChannel (146) */1464 /** @name PolkadotPrimitivesV2AbridgedHrmpChannel (148) */
1441 interface PolkadotPrimitivesV2AbridgedHrmpChannel extends Struct {1465 interface PolkadotPrimitivesV2AbridgedHrmpChannel extends Struct {
1442 readonly maxCapacity: u32;1466 readonly maxCapacity: u32;
1443 readonly maxTotalSize: u32;1467 readonly maxTotalSize: u32;
1447 readonly mqcHead: Option<H256>;1471 readonly mqcHead: Option<H256>;
1448 }1472 }
14491473
1450 /** @name PolkadotPrimitivesV2AbridgedHostConfiguration (147) */1474 /** @name PolkadotPrimitivesV2AbridgedHostConfiguration (149) */
1451 interface PolkadotPrimitivesV2AbridgedHostConfiguration extends Struct {1475 interface PolkadotPrimitivesV2AbridgedHostConfiguration extends Struct {
1452 readonly maxCodeSize: u32;1476 readonly maxCodeSize: u32;
1453 readonly maxHeadDataSize: u32;1477 readonly maxHeadDataSize: u32;
1460 readonly validationUpgradeDelay: u32;1484 readonly validationUpgradeDelay: u32;
1461 }1485 }
14621486
1463 /** @name PolkadotCorePrimitivesOutboundHrmpMessage (153) */1487 /** @name PolkadotCorePrimitivesOutboundHrmpMessage (155) */
1464 interface PolkadotCorePrimitivesOutboundHrmpMessage extends Struct {1488 interface PolkadotCorePrimitivesOutboundHrmpMessage extends Struct {
1465 readonly recipient: u32;1489 readonly recipient: u32;
1466 readonly data: Bytes;1490 readonly data: Bytes;
1467 }1491 }
14681492
1469 /** @name CumulusPalletParachainSystemCall (154) */1493 /** @name CumulusPalletParachainSystemCall (156) */
1470 interface CumulusPalletParachainSystemCall extends Enum {1494 interface CumulusPalletParachainSystemCall extends Enum {
1471 readonly isSetValidationData: boolean;1495 readonly isSetValidationData: boolean;
1472 readonly asSetValidationData: {1496 readonly asSetValidationData: {
1487 readonly type: 'SetValidationData' | 'SudoSendUpwardMessage' | 'AuthorizeUpgrade' | 'EnactAuthorizedUpgrade';1511 readonly type: 'SetValidationData' | 'SudoSendUpwardMessage' | 'AuthorizeUpgrade' | 'EnactAuthorizedUpgrade';
1488 }1512 }
14891513
1490 /** @name CumulusPrimitivesParachainInherentParachainInherentData (155) */1514 /** @name CumulusPrimitivesParachainInherentParachainInherentData (157) */
1491 interface CumulusPrimitivesParachainInherentParachainInherentData extends Struct {1515 interface CumulusPrimitivesParachainInherentParachainInherentData extends Struct {
1492 readonly validationData: PolkadotPrimitivesV2PersistedValidationData;1516 readonly validationData: PolkadotPrimitivesV2PersistedValidationData;
1493 readonly relayChainState: SpTrieStorageProof;1517 readonly relayChainState: SpTrieStorageProof;
1494 readonly downwardMessages: Vec<PolkadotCorePrimitivesInboundDownwardMessage>;1518 readonly downwardMessages: Vec<PolkadotCorePrimitivesInboundDownwardMessage>;
1495 readonly horizontalMessages: BTreeMap<u32, Vec<PolkadotCorePrimitivesInboundHrmpMessage>>;1519 readonly horizontalMessages: BTreeMap<u32, Vec<PolkadotCorePrimitivesInboundHrmpMessage>>;
1496 }1520 }
14971521
1498 /** @name PolkadotCorePrimitivesInboundDownwardMessage (157) */1522 /** @name PolkadotCorePrimitivesInboundDownwardMessage (159) */
1499 interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct {1523 interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct {
1500 readonly sentAt: u32;1524 readonly sentAt: u32;
1501 readonly msg: Bytes;1525 readonly msg: Bytes;
1502 }1526 }
15031527
1504 /** @name PolkadotCorePrimitivesInboundHrmpMessage (160) */1528 /** @name PolkadotCorePrimitivesInboundHrmpMessage (162) */
1505 interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct {1529 interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct {
1506 readonly sentAt: u32;1530 readonly sentAt: u32;
1507 readonly data: Bytes;1531 readonly data: Bytes;
1508 }1532 }
15091533
1510 /** @name CumulusPalletParachainSystemError (163) */1534 /** @name CumulusPalletParachainSystemError (165) */
1511 interface CumulusPalletParachainSystemError extends Enum {1535 interface CumulusPalletParachainSystemError extends Enum {
1512 readonly isOverlappingUpgrades: boolean;1536 readonly isOverlappingUpgrades: boolean;
1513 readonly isProhibitedByPolkadot: boolean;1537 readonly isProhibitedByPolkadot: boolean;
1520 readonly type: 'OverlappingUpgrades' | 'ProhibitedByPolkadot' | 'TooBig' | 'ValidationDataNotAvailable' | 'HostConfigurationNotAvailable' | 'NotScheduled' | 'NothingAuthorized' | 'Unauthorized';1544 readonly type: 'OverlappingUpgrades' | 'ProhibitedByPolkadot' | 'TooBig' | 'ValidationDataNotAvailable' | 'HostConfigurationNotAvailable' | 'NotScheduled' | 'NothingAuthorized' | 'Unauthorized';
1521 }1545 }
15221546
1523 /** @name PalletBalancesBalanceLock (165) */1547 /** @name PalletBalancesBalanceLock (167) */
1524 interface PalletBalancesBalanceLock extends Struct {1548 interface PalletBalancesBalanceLock extends Struct {
1525 readonly id: U8aFixed;1549 readonly id: U8aFixed;
1526 readonly amount: u128;1550 readonly amount: u128;
1527 readonly reasons: PalletBalancesReasons;1551 readonly reasons: PalletBalancesReasons;
1528 }1552 }
15291553
1530 /** @name PalletBalancesReasons (166) */1554 /** @name PalletBalancesReasons (168) */
1531 interface PalletBalancesReasons extends Enum {1555 interface PalletBalancesReasons extends Enum {
1532 readonly isFee: boolean;1556 readonly isFee: boolean;
1533 readonly isMisc: boolean;1557 readonly isMisc: boolean;
1534 readonly isAll: boolean;1558 readonly isAll: boolean;
1535 readonly type: 'Fee' | 'Misc' | 'All';1559 readonly type: 'Fee' | 'Misc' | 'All';
1536 }1560 }
15371561
1538 /** @name PalletBalancesReserveData (169) */1562 /** @name PalletBalancesReserveData (171) */
1539 interface PalletBalancesReserveData extends Struct {1563 interface PalletBalancesReserveData extends Struct {
1540 readonly id: U8aFixed;1564 readonly id: U8aFixed;
1541 readonly amount: u128;1565 readonly amount: u128;
1542 }1566 }
15431567
1544 /** @name PalletBalancesReleases (171) */1568 /** @name PalletBalancesReleases (173) */
1545 interface PalletBalancesReleases extends Enum {1569 interface PalletBalancesReleases extends Enum {
1546 readonly isV100: boolean;1570 readonly isV100: boolean;
1547 readonly isV200: boolean;1571 readonly isV200: boolean;
1548 readonly type: 'V100' | 'V200';1572 readonly type: 'V100' | 'V200';
1549 }1573 }
15501574
1551 /** @name PalletBalancesCall (172) */1575 /** @name PalletBalancesCall (174) */
1552 interface PalletBalancesCall extends Enum {1576 interface PalletBalancesCall extends Enum {
1553 readonly isTransfer: boolean;1577 readonly isTransfer: boolean;
1554 readonly asTransfer: {1578 readonly asTransfer: {
1585 readonly type: 'Transfer' | 'SetBalance' | 'ForceTransfer' | 'TransferKeepAlive' | 'TransferAll' | 'ForceUnreserve';1609 readonly type: 'Transfer' | 'SetBalance' | 'ForceTransfer' | 'TransferKeepAlive' | 'TransferAll' | 'ForceUnreserve';
1586 }1610 }
15871611
1588 /** @name PalletBalancesError (175) */1612 /** @name PalletBalancesError (177) */
1589 interface PalletBalancesError extends Enum {1613 interface PalletBalancesError extends Enum {
1590 readonly isVestingBalance: boolean;1614 readonly isVestingBalance: boolean;
1591 readonly isLiquidityRestrictions: boolean;1615 readonly isLiquidityRestrictions: boolean;
1598 readonly type: 'VestingBalance' | 'LiquidityRestrictions' | 'InsufficientBalance' | 'ExistentialDeposit' | 'KeepAlive' | 'ExistingVestingSchedule' | 'DeadAccount' | 'TooManyReserves';1622 readonly type: 'VestingBalance' | 'LiquidityRestrictions' | 'InsufficientBalance' | 'ExistentialDeposit' | 'KeepAlive' | 'ExistingVestingSchedule' | 'DeadAccount' | 'TooManyReserves';
1599 }1623 }
16001624
1601 /** @name PalletTimestampCall (177) */1625 /** @name PalletTimestampCall (179) */
1602 interface PalletTimestampCall extends Enum {1626 interface PalletTimestampCall extends Enum {
1603 readonly isSet: boolean;1627 readonly isSet: boolean;
1604 readonly asSet: {1628 readonly asSet: {
1607 readonly type: 'Set';1631 readonly type: 'Set';
1608 }1632 }
16091633
1610 /** @name PalletTransactionPaymentReleases (179) */1634 /** @name PalletTransactionPaymentReleases (181) */
1611 interface PalletTransactionPaymentReleases extends Enum {1635 interface PalletTransactionPaymentReleases extends Enum {
1612 readonly isV1Ancient: boolean;1636 readonly isV1Ancient: boolean;
1613 readonly isV2: boolean;1637 readonly isV2: boolean;
1614 readonly type: 'V1Ancient' | 'V2';1638 readonly type: 'V1Ancient' | 'V2';
1615 }1639 }
16161640
1617 /** @name PalletTreasuryProposal (180) */1641 /** @name PalletTreasuryProposal (182) */
1618 interface PalletTreasuryProposal extends Struct {1642 interface PalletTreasuryProposal extends Struct {
1619 readonly proposer: AccountId32;1643 readonly proposer: AccountId32;
1620 readonly value: u128;1644 readonly value: u128;
1621 readonly beneficiary: AccountId32;1645 readonly beneficiary: AccountId32;
1622 readonly bond: u128;1646 readonly bond: u128;
1623 }1647 }
16241648
1625 /** @name PalletTreasuryCall (183) */1649 /** @name PalletTreasuryCall (185) */
1626 interface PalletTreasuryCall extends Enum {1650 interface PalletTreasuryCall extends Enum {
1627 readonly isProposeSpend: boolean;1651 readonly isProposeSpend: boolean;
1628 readonly asProposeSpend: {1652 readonly asProposeSpend: {
1649 readonly type: 'ProposeSpend' | 'RejectProposal' | 'ApproveProposal' | 'Spend' | 'RemoveApproval';1673 readonly type: 'ProposeSpend' | 'RejectProposal' | 'ApproveProposal' | 'Spend' | 'RemoveApproval';
1650 }1674 }
16511675
1652 /** @name FrameSupportPalletId (186) */1676 /** @name FrameSupportPalletId (188) */
1653 interface FrameSupportPalletId extends U8aFixed {}1677 interface FrameSupportPalletId extends U8aFixed {}
16541678
1655 /** @name PalletTreasuryError (187) */1679 /** @name PalletTreasuryError (189) */
1656 interface PalletTreasuryError extends Enum {1680 interface PalletTreasuryError extends Enum {
1657 readonly isInsufficientProposersBalance: boolean;1681 readonly isInsufficientProposersBalance: boolean;
1658 readonly isInvalidIndex: boolean;1682 readonly isInvalidIndex: boolean;
1662 readonly type: 'InsufficientProposersBalance' | 'InvalidIndex' | 'TooManyApprovals' | 'InsufficientPermission' | 'ProposalNotApproved';1686 readonly type: 'InsufficientProposersBalance' | 'InvalidIndex' | 'TooManyApprovals' | 'InsufficientPermission' | 'ProposalNotApproved';
1663 }1687 }
16641688
1665 /** @name PalletSudoCall (188) */1689 /** @name PalletSudoCall (190) */
1666 interface PalletSudoCall extends Enum {1690 interface PalletSudoCall extends Enum {
1667 readonly isSudo: boolean;1691 readonly isSudo: boolean;
1668 readonly asSudo: {1692 readonly asSudo: {
1685 readonly type: 'Sudo' | 'SudoUncheckedWeight' | 'SetKey' | 'SudoAs';1709 readonly type: 'Sudo' | 'SudoUncheckedWeight' | 'SetKey' | 'SudoAs';
1686 }1710 }
16871711
1688 /** @name OrmlVestingModuleCall (190) */1712 /** @name OrmlVestingModuleCall (192) */
1689 interface OrmlVestingModuleCall extends Enum {1713 interface OrmlVestingModuleCall extends Enum {
1690 readonly isClaim: boolean;1714 readonly isClaim: boolean;
1691 readonly isVestedTransfer: boolean;1715 readonly isVestedTransfer: boolean;
1705 readonly type: 'Claim' | 'VestedTransfer' | 'UpdateVestingSchedules' | 'ClaimFor';1729 readonly type: 'Claim' | 'VestedTransfer' | 'UpdateVestingSchedules' | 'ClaimFor';
1706 }1730 }
17071731
1708 /** @name CumulusPalletXcmpQueueCall (192) */1732 /** @name CumulusPalletXcmpQueueCall (194) */
1709 interface CumulusPalletXcmpQueueCall extends Enum {1733 interface CumulusPalletXcmpQueueCall extends Enum {
1710 readonly isServiceOverweight: boolean;1734 readonly isServiceOverweight: boolean;
1711 readonly asServiceOverweight: {1735 readonly asServiceOverweight: {
1741 readonly type: 'ServiceOverweight' | 'SuspendXcmExecution' | 'ResumeXcmExecution' | 'UpdateSuspendThreshold' | 'UpdateDropThreshold' | 'UpdateResumeThreshold' | 'UpdateThresholdWeight' | 'UpdateWeightRestrictDecay' | 'UpdateXcmpMaxIndividualWeight';1765 readonly type: 'ServiceOverweight' | 'SuspendXcmExecution' | 'ResumeXcmExecution' | 'UpdateSuspendThreshold' | 'UpdateDropThreshold' | 'UpdateResumeThreshold' | 'UpdateThresholdWeight' | 'UpdateWeightRestrictDecay' | 'UpdateXcmpMaxIndividualWeight';
1742 }1766 }
17431767
1744 /** @name PalletXcmCall (193) */1768 /** @name PalletXcmCall (195) */
1745 interface PalletXcmCall extends Enum {1769 interface PalletXcmCall extends Enum {
1746 readonly isSend: boolean;1770 readonly isSend: boolean;
1747 readonly asSend: {1771 readonly asSend: {
1803 readonly type: 'Send' | 'TeleportAssets' | 'ReserveTransferAssets' | 'Execute' | 'ForceXcmVersion' | 'ForceDefaultXcmVersion' | 'ForceSubscribeVersionNotify' | 'ForceUnsubscribeVersionNotify' | 'LimitedReserveTransferAssets' | 'LimitedTeleportAssets';1827 readonly type: 'Send' | 'TeleportAssets' | 'ReserveTransferAssets' | 'Execute' | 'ForceXcmVersion' | 'ForceDefaultXcmVersion' | 'ForceSubscribeVersionNotify' | 'ForceUnsubscribeVersionNotify' | 'LimitedReserveTransferAssets' | 'LimitedTeleportAssets';
1804 }1828 }
18051829
1806 /** @name XcmVersionedXcm (194) */1830 /** @name XcmVersionedXcm (196) */
1807 interface XcmVersionedXcm extends Enum {1831 interface XcmVersionedXcm extends Enum {
1808 readonly isV0: boolean;1832 readonly isV0: boolean;
1809 readonly asV0: XcmV0Xcm;1833 readonly asV0: XcmV0Xcm;
1814 readonly type: 'V0' | 'V1' | 'V2';1838 readonly type: 'V0' | 'V1' | 'V2';
1815 }1839 }
18161840
1817 /** @name XcmV0Xcm (195) */1841 /** @name XcmV0Xcm (197) */
1818 interface XcmV0Xcm extends Enum {1842 interface XcmV0Xcm extends Enum {
1819 readonly isWithdrawAsset: boolean;1843 readonly isWithdrawAsset: boolean;
1820 readonly asWithdrawAsset: {1844 readonly asWithdrawAsset: {
1877 readonly type: 'WithdrawAsset' | 'ReserveAssetDeposit' | 'TeleportAsset' | 'QueryResponse' | 'TransferAsset' | 'TransferReserveAsset' | 'Transact' | 'HrmpNewChannelOpenRequest' | 'HrmpChannelAccepted' | 'HrmpChannelClosing' | 'RelayedFrom';1901 readonly type: 'WithdrawAsset' | 'ReserveAssetDeposit' | 'TeleportAsset' | 'QueryResponse' | 'TransferAsset' | 'TransferReserveAsset' | 'Transact' | 'HrmpNewChannelOpenRequest' | 'HrmpChannelAccepted' | 'HrmpChannelClosing' | 'RelayedFrom';
1878 }1902 }
18791903
1880 /** @name XcmV0Order (197) */1904 /** @name XcmV0Order (199) */
1881 interface XcmV0Order extends Enum {1905 interface XcmV0Order extends Enum {
1882 readonly isNull: boolean;1906 readonly isNull: boolean;
1883 readonly isDepositAsset: boolean;1907 readonly isDepositAsset: boolean;
1925 readonly type: 'Null' | 'DepositAsset' | 'DepositReserveAsset' | 'ExchangeAsset' | 'InitiateReserveWithdraw' | 'InitiateTeleport' | 'QueryHolding' | 'BuyExecution';1949 readonly type: 'Null' | 'DepositAsset' | 'DepositReserveAsset' | 'ExchangeAsset' | 'InitiateReserveWithdraw' | 'InitiateTeleport' | 'QueryHolding' | 'BuyExecution';
1926 }1950 }
19271951
1928 /** @name XcmV0Response (199) */1952 /** @name XcmV0Response (201) */
1929 interface XcmV0Response extends Enum {1953 interface XcmV0Response extends Enum {
1930 readonly isAssets: boolean;1954 readonly isAssets: boolean;
1931 readonly asAssets: Vec<XcmV0MultiAsset>;1955 readonly asAssets: Vec<XcmV0MultiAsset>;
1932 readonly type: 'Assets';1956 readonly type: 'Assets';
1933 }1957 }
19341958
1935 /** @name XcmV1Xcm (200) */1959 /** @name XcmV1Xcm (202) */
1936 interface XcmV1Xcm extends Enum {1960 interface XcmV1Xcm extends Enum {
1937 readonly isWithdrawAsset: boolean;1961 readonly isWithdrawAsset: boolean;
1938 readonly asWithdrawAsset: {1962 readonly asWithdrawAsset: {
2001 readonly type: 'WithdrawAsset' | 'ReserveAssetDeposited' | 'ReceiveTeleportedAsset' | 'QueryResponse' | 'TransferAsset' | 'TransferReserveAsset' | 'Transact' | 'HrmpNewChannelOpenRequest' | 'HrmpChannelAccepted' | 'HrmpChannelClosing' | 'RelayedFrom' | 'SubscribeVersion' | 'UnsubscribeVersion';2025 readonly type: 'WithdrawAsset' | 'ReserveAssetDeposited' | 'ReceiveTeleportedAsset' | 'QueryResponse' | 'TransferAsset' | 'TransferReserveAsset' | 'Transact' | 'HrmpNewChannelOpenRequest' | 'HrmpChannelAccepted' | 'HrmpChannelClosing' | 'RelayedFrom' | 'SubscribeVersion' | 'UnsubscribeVersion';
2002 }2026 }
20032027
2004 /** @name XcmV1Order (202) */2028 /** @name XcmV1Order (204) */
2005 interface XcmV1Order extends Enum {2029 interface XcmV1Order extends Enum {
2006 readonly isNoop: boolean;2030 readonly isNoop: boolean;
2007 readonly isDepositAsset: boolean;2031 readonly isDepositAsset: boolean;
2051 readonly type: 'Noop' | 'DepositAsset' | 'DepositReserveAsset' | 'ExchangeAsset' | 'InitiateReserveWithdraw' | 'InitiateTeleport' | 'QueryHolding' | 'BuyExecution';2075 readonly type: 'Noop' | 'DepositAsset' | 'DepositReserveAsset' | 'ExchangeAsset' | 'InitiateReserveWithdraw' | 'InitiateTeleport' | 'QueryHolding' | 'BuyExecution';
2052 }2076 }
20532077
2054 /** @name XcmV1Response (204) */2078 /** @name XcmV1Response (206) */
2055 interface XcmV1Response extends Enum {2079 interface XcmV1Response extends Enum {
2056 readonly isAssets: boolean;2080 readonly isAssets: boolean;
2057 readonly asAssets: XcmV1MultiassetMultiAssets;2081 readonly asAssets: XcmV1MultiassetMultiAssets;
2060 readonly type: 'Assets' | 'Version';2084 readonly type: 'Assets' | 'Version';
2061 }2085 }
20622086
2063 /** @name CumulusPalletXcmCall (218) */2087 /** @name CumulusPalletXcmCall (220) */
2064 type CumulusPalletXcmCall = Null;2088 type CumulusPalletXcmCall = Null;
20652089
2066 /** @name CumulusPalletDmpQueueCall (219) */2090 /** @name CumulusPalletDmpQueueCall (221) */
2067 interface CumulusPalletDmpQueueCall extends Enum {2091 interface CumulusPalletDmpQueueCall extends Enum {
2068 readonly isServiceOverweight: boolean;2092 readonly isServiceOverweight: boolean;
2069 readonly asServiceOverweight: {2093 readonly asServiceOverweight: {
2073 readonly type: 'ServiceOverweight';2097 readonly type: 'ServiceOverweight';
2074 }2098 }
20752099
2076 /** @name PalletInflationCall (220) */2100 /** @name PalletInflationCall (222) */
2077 interface PalletInflationCall extends Enum {2101 interface PalletInflationCall extends Enum {
2078 readonly isStartInflation: boolean;2102 readonly isStartInflation: boolean;
2079 readonly asStartInflation: {2103 readonly asStartInflation: {
2082 readonly type: 'StartInflation';2106 readonly type: 'StartInflation';
2083 }2107 }
20842108
2085 /** @name PalletUniqueCall (221) */2109 /** @name PalletUniqueCall (223) */
2086 interface PalletUniqueCall extends Enum {2110 interface PalletUniqueCall extends Enum {
2087 readonly isCreateCollection: boolean;2111 readonly isCreateCollection: boolean;
2088 readonly asCreateCollection: {2112 readonly asCreateCollection: {
2240 readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition';2264 readonly type: 'CreateCollection' | 'CreateCollectionEx' | 'DestroyCollection' | 'AddToAllowList' | 'RemoveFromAllowList' | 'ChangeCollectionOwner' | 'AddCollectionAdmin' | 'RemoveCollectionAdmin' | 'SetCollectionSponsor' | 'ConfirmSponsorship' | 'RemoveCollectionSponsor' | 'CreateItem' | 'CreateMultipleItems' | 'SetCollectionProperties' | 'DeleteCollectionProperties' | 'SetTokenProperties' | 'DeleteTokenProperties' | 'SetTokenPropertyPermissions' | 'CreateMultipleItemsEx' | 'SetTransfersEnabledFlag' | 'BurnItem' | 'BurnFrom' | 'Transfer' | 'Approve' | 'TransferFrom' | 'SetCollectionLimits' | 'SetCollectionPermissions' | 'Repartition';
2241 }2265 }
22422266
2243 /** @name UpDataStructsCollectionMode (226) */2267 /** @name UpDataStructsCollectionMode (228) */
2244 interface UpDataStructsCollectionMode extends Enum {2268 interface UpDataStructsCollectionMode extends Enum {
2245 readonly isNft: boolean;2269 readonly isNft: boolean;
2246 readonly isFungible: boolean;2270 readonly isFungible: boolean;
2249 readonly type: 'Nft' | 'Fungible' | 'ReFungible';2273 readonly type: 'Nft' | 'Fungible' | 'ReFungible';
2250 }2274 }
22512275
2252 /** @name UpDataStructsCreateCollectionData (227) */2276 /** @name UpDataStructsCreateCollectionData (229) */
2253 interface UpDataStructsCreateCollectionData extends Struct {2277 interface UpDataStructsCreateCollectionData extends Struct {
2254 readonly mode: UpDataStructsCollectionMode;2278 readonly mode: UpDataStructsCollectionMode;
2255 readonly access: Option<UpDataStructsAccessMode>;2279 readonly access: Option<UpDataStructsAccessMode>;
2263 readonly properties: Vec<UpDataStructsProperty>;2287 readonly properties: Vec<UpDataStructsProperty>;
2264 }2288 }
22652289
2266 /** @name UpDataStructsAccessMode (229) */2290 /** @name UpDataStructsAccessMode (231) */
2267 interface UpDataStructsAccessMode extends Enum {2291 interface UpDataStructsAccessMode extends Enum {
2268 readonly isNormal: boolean;2292 readonly isNormal: boolean;
2269 readonly isAllowList: boolean;2293 readonly isAllowList: boolean;
2270 readonly type: 'Normal' | 'AllowList';2294 readonly type: 'Normal' | 'AllowList';
2271 }2295 }
22722296
2273 /** @name UpDataStructsCollectionLimits (231) */2297 /** @name UpDataStructsCollectionLimits (233) */
2274 interface UpDataStructsCollectionLimits extends Struct {2298 interface UpDataStructsCollectionLimits extends Struct {
2275 readonly accountTokenOwnershipLimit: Option<u32>;2299 readonly accountTokenOwnershipLimit: Option<u32>;
2276 readonly sponsoredDataSize: Option<u32>;2300 readonly sponsoredDataSize: Option<u32>;
2283 readonly transfersEnabled: Option<bool>;2307 readonly transfersEnabled: Option<bool>;
2284 }2308 }
22852309
2286 /** @name UpDataStructsSponsoringRateLimit (233) */2310 /** @name UpDataStructsSponsoringRateLimit (235) */
2287 interface UpDataStructsSponsoringRateLimit extends Enum {2311 interface UpDataStructsSponsoringRateLimit extends Enum {
2288 readonly isSponsoringDisabled: boolean;2312 readonly isSponsoringDisabled: boolean;
2289 readonly isBlocks: boolean;2313 readonly isBlocks: boolean;
2290 readonly asBlocks: u32;2314 readonly asBlocks: u32;
2291 readonly type: 'SponsoringDisabled' | 'Blocks';2315 readonly type: 'SponsoringDisabled' | 'Blocks';
2292 }2316 }
22932317
2294 /** @name UpDataStructsCollectionPermissions (236) */2318 /** @name UpDataStructsCollectionPermissions (238) */
2295 interface UpDataStructsCollectionPermissions extends Struct {2319 interface UpDataStructsCollectionPermissions extends Struct {
2296 readonly access: Option<UpDataStructsAccessMode>;2320 readonly access: Option<UpDataStructsAccessMode>;
2297 readonly mintMode: Option<bool>;2321 readonly mintMode: Option<bool>;
2298 readonly nesting: Option<UpDataStructsNestingPermissions>;2322 readonly nesting: Option<UpDataStructsNestingPermissions>;
2299 }2323 }
23002324
2301 /** @name UpDataStructsNestingPermissions (238) */2325 /** @name UpDataStructsNestingPermissions (240) */
2302 interface UpDataStructsNestingPermissions extends Struct {2326 interface UpDataStructsNestingPermissions extends Struct {
2303 readonly tokenOwner: bool;2327 readonly tokenOwner: bool;
2304 readonly collectionAdmin: bool;2328 readonly collectionAdmin: bool;
2305 readonly restricted: Option<UpDataStructsOwnerRestrictedSet>;2329 readonly restricted: Option<UpDataStructsOwnerRestrictedSet>;
2306 }2330 }
23072331
2308 /** @name UpDataStructsOwnerRestrictedSet (240) */2332 /** @name UpDataStructsOwnerRestrictedSet (242) */
2309 interface UpDataStructsOwnerRestrictedSet extends BTreeSet<u32> {}2333 interface UpDataStructsOwnerRestrictedSet extends BTreeSet<u32> {}
23102334
2311 /** @name UpDataStructsPropertyKeyPermission (245) */2335 /** @name UpDataStructsPropertyKeyPermission (247) */
2312 interface UpDataStructsPropertyKeyPermission extends Struct {2336 interface UpDataStructsPropertyKeyPermission extends Struct {
2313 readonly key: Bytes;2337 readonly key: Bytes;
2314 readonly permission: UpDataStructsPropertyPermission;2338 readonly permission: UpDataStructsPropertyPermission;
2315 }2339 }
23162340
2317 /** @name UpDataStructsPropertyPermission (246) */2341 /** @name UpDataStructsPropertyPermission (248) */
2318 interface UpDataStructsPropertyPermission extends Struct {2342 interface UpDataStructsPropertyPermission extends Struct {
2319 readonly mutable: bool;2343 readonly mutable: bool;
2320 readonly collectionAdmin: bool;2344 readonly collectionAdmin: bool;
2321 readonly tokenOwner: bool;2345 readonly tokenOwner: bool;
2322 }2346 }
23232347
2324 /** @name UpDataStructsProperty (249) */2348 /** @name UpDataStructsProperty (251) */
2325 interface UpDataStructsProperty extends Struct {2349 interface UpDataStructsProperty extends Struct {
2326 readonly key: Bytes;2350 readonly key: Bytes;
2327 readonly value: Bytes;2351 readonly value: Bytes;
2328 }2352 }
23292353
2330 /** @name UpDataStructsCreateItemData (252) */2354 /** @name UpDataStructsCreateItemData (254) */
2331 interface UpDataStructsCreateItemData extends Enum {2355 interface UpDataStructsCreateItemData extends Enum {
2332 readonly isNft: boolean;2356 readonly isNft: boolean;
2333 readonly asNft: UpDataStructsCreateNftData;2357 readonly asNft: UpDataStructsCreateNftData;
2338 readonly type: 'Nft' | 'Fungible' | 'ReFungible';2362 readonly type: 'Nft' | 'Fungible' | 'ReFungible';
2339 }2363 }
23402364
2341 /** @name UpDataStructsCreateNftData (253) */2365 /** @name UpDataStructsCreateNftData (255) */
2342 interface UpDataStructsCreateNftData extends Struct {2366 interface UpDataStructsCreateNftData extends Struct {
2343 readonly properties: Vec<UpDataStructsProperty>;2367 readonly properties: Vec<UpDataStructsProperty>;
2344 }2368 }
23452369
2346 /** @name UpDataStructsCreateFungibleData (254) */2370 /** @name UpDataStructsCreateFungibleData (256) */
2347 interface UpDataStructsCreateFungibleData extends Struct {2371 interface UpDataStructsCreateFungibleData extends Struct {
2348 readonly value: u128;2372 readonly value: u128;
2349 }2373 }
23502374
2351 /** @name UpDataStructsCreateReFungibleData (255) */2375 /** @name UpDataStructsCreateReFungibleData (257) */
2352 interface UpDataStructsCreateReFungibleData extends Struct {2376 interface UpDataStructsCreateReFungibleData extends Struct {
2353 readonly pieces: u128;2377 readonly pieces: u128;
2354 readonly properties: Vec<UpDataStructsProperty>;2378 readonly properties: Vec<UpDataStructsProperty>;
2355 }2379 }
23562380
2357 /** @name UpDataStructsCreateItemExData (258) */2381 /** @name UpDataStructsCreateItemExData (260) */
2358 interface UpDataStructsCreateItemExData extends Enum {2382 interface UpDataStructsCreateItemExData extends Enum {
2359 readonly isNft: boolean;2383 readonly isNft: boolean;
2360 readonly asNft: Vec<UpDataStructsCreateNftExData>;2384 readonly asNft: Vec<UpDataStructsCreateNftExData>;
2367 readonly type: 'Nft' | 'Fungible' | 'RefungibleMultipleItems' | 'RefungibleMultipleOwners';2391 readonly type: 'Nft' | 'Fungible' | 'RefungibleMultipleItems' | 'RefungibleMultipleOwners';
2368 }2392 }
23692393
2370 /** @name UpDataStructsCreateNftExData (260) */2394 /** @name UpDataStructsCreateNftExData (262) */
2371 interface UpDataStructsCreateNftExData extends Struct {2395 interface UpDataStructsCreateNftExData extends Struct {
2372 readonly properties: Vec<UpDataStructsProperty>;2396 readonly properties: Vec<UpDataStructsProperty>;
2373 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;2397 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
2374 }2398 }
23752399
2376 /** @name UpDataStructsCreateRefungibleExSingleOwner (267) */2400 /** @name UpDataStructsCreateRefungibleExSingleOwner (269) */
2377 interface UpDataStructsCreateRefungibleExSingleOwner extends Struct {2401 interface UpDataStructsCreateRefungibleExSingleOwner extends Struct {
2378 readonly user: PalletEvmAccountBasicCrossAccountIdRepr;2402 readonly user: PalletEvmAccountBasicCrossAccountIdRepr;
2379 readonly pieces: u128;2403 readonly pieces: u128;
2380 readonly properties: Vec<UpDataStructsProperty>;2404 readonly properties: Vec<UpDataStructsProperty>;
2381 }2405 }
23822406
2383 /** @name UpDataStructsCreateRefungibleExMultipleOwners (269) */2407 /** @name UpDataStructsCreateRefungibleExMultipleOwners (271) */
2384 interface UpDataStructsCreateRefungibleExMultipleOwners extends Struct {2408 interface UpDataStructsCreateRefungibleExMultipleOwners extends Struct {
2385 readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;2409 readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;
2386 readonly properties: Vec<UpDataStructsProperty>;2410 readonly properties: Vec<UpDataStructsProperty>;
2387 }2411 }
23882412
2389 /** @name PalletUniqueSchedulerCall (270) */2413 /** @name PalletUniqueSchedulerCall (272) */
2390 interface PalletUniqueSchedulerCall extends Enum {2414 interface PalletUniqueSchedulerCall extends Enum {
2391 readonly isScheduleNamed: boolean;2415 readonly isScheduleNamed: boolean;
2392 readonly asScheduleNamed: {2416 readonly asScheduleNamed: {
2411 readonly type: 'ScheduleNamed' | 'CancelNamed' | 'ScheduleNamedAfter';2435 readonly type: 'ScheduleNamed' | 'CancelNamed' | 'ScheduleNamedAfter';
2412 }2436 }
24132437
2414 /** @name FrameSupportScheduleMaybeHashed (272) */2438 /** @name FrameSupportScheduleMaybeHashed (274) */
2415 interface FrameSupportScheduleMaybeHashed extends Enum {2439 interface FrameSupportScheduleMaybeHashed extends Enum {
2416 readonly isValue: boolean;2440 readonly isValue: boolean;
2417 readonly asValue: Call;2441 readonly asValue: Call;
2420 readonly type: 'Value' | 'Hash';2444 readonly type: 'Value' | 'Hash';
2421 }2445 }
24222446
2423 /** @name PalletConfigurationCall (273) */2447 /** @name PalletConfigurationCall (275) */
2424 interface PalletConfigurationCall extends Enum {2448 interface PalletConfigurationCall extends Enum {
2425 readonly isSetWeightToFeeCoefficientOverride: boolean;2449 readonly isSetWeightToFeeCoefficientOverride: boolean;
2426 readonly asSetWeightToFeeCoefficientOverride: {2450 readonly asSetWeightToFeeCoefficientOverride: {
2433 readonly type: 'SetWeightToFeeCoefficientOverride' | 'SetMinGasPriceOverride';2457 readonly type: 'SetWeightToFeeCoefficientOverride' | 'SetMinGasPriceOverride';
2434 }2458 }
24352459
2436 /** @name PalletTemplateTransactionPaymentCall (274) */2460 /** @name PalletTemplateTransactionPaymentCall (276) */
2437 type PalletTemplateTransactionPaymentCall = Null;2461 type PalletTemplateTransactionPaymentCall = Null;
24382462
2439 /** @name PalletStructureCall (275) */2463 /** @name PalletStructureCall (277) */
2440 type PalletStructureCall = Null;2464 type PalletStructureCall = Null;
24412465
2442 /** @name PalletRmrkCoreCall (276) */2466 /** @name PalletRmrkCoreCall (278) */
2443 interface PalletRmrkCoreCall extends Enum {2467 interface PalletRmrkCoreCall extends Enum {
2444 readonly isCreateCollection: boolean;2468 readonly isCreateCollection: boolean;
2445 readonly asCreateCollection: {2469 readonly asCreateCollection: {
2545 readonly type: 'CreateCollection' | 'DestroyCollection' | 'ChangeCollectionIssuer' | 'LockCollection' | 'MintNft' | 'BurnNft' | 'Send' | 'AcceptNft' | 'RejectNft' | 'AcceptResource' | 'AcceptResourceRemoval' | 'SetProperty' | 'SetPriority' | 'AddBasicResource' | 'AddComposableResource' | 'AddSlotResource' | 'RemoveResource';2569 readonly type: 'CreateCollection' | 'DestroyCollection' | 'ChangeCollectionIssuer' | 'LockCollection' | 'MintNft' | 'BurnNft' | 'Send' | 'AcceptNft' | 'RejectNft' | 'AcceptResource' | 'AcceptResourceRemoval' | 'SetProperty' | 'SetPriority' | 'AddBasicResource' | 'AddComposableResource' | 'AddSlotResource' | 'RemoveResource';
2546 }2570 }
25472571
2548 /** @name RmrkTraitsResourceResourceTypes (282) */2572 /** @name RmrkTraitsResourceResourceTypes (284) */
2549 interface RmrkTraitsResourceResourceTypes extends Enum {2573 interface RmrkTraitsResourceResourceTypes extends Enum {
2550 readonly isBasic: boolean;2574 readonly isBasic: boolean;
2551 readonly asBasic: RmrkTraitsResourceBasicResource;2575 readonly asBasic: RmrkTraitsResourceBasicResource;
2556 readonly type: 'Basic' | 'Composable' | 'Slot';2580 readonly type: 'Basic' | 'Composable' | 'Slot';
2557 }2581 }
25582582
2559 /** @name RmrkTraitsResourceBasicResource (284) */2583 /** @name RmrkTraitsResourceBasicResource (286) */
2560 interface RmrkTraitsResourceBasicResource extends Struct {2584 interface RmrkTraitsResourceBasicResource extends Struct {
2561 readonly src: Option<Bytes>;2585 readonly src: Option<Bytes>;
2562 readonly metadata: Option<Bytes>;2586 readonly metadata: Option<Bytes>;
2563 readonly license: Option<Bytes>;2587 readonly license: Option<Bytes>;
2564 readonly thumb: Option<Bytes>;2588 readonly thumb: Option<Bytes>;
2565 }2589 }
25662590
2567 /** @name RmrkTraitsResourceComposableResource (286) */2591 /** @name RmrkTraitsResourceComposableResource (288) */
2568 interface RmrkTraitsResourceComposableResource extends Struct {2592 interface RmrkTraitsResourceComposableResource extends Struct {
2569 readonly parts: Vec<u32>;2593 readonly parts: Vec<u32>;
2570 readonly base: u32;2594 readonly base: u32;
2574 readonly thumb: Option<Bytes>;2598 readonly thumb: Option<Bytes>;
2575 }2599 }
25762600
2577 /** @name RmrkTraitsResourceSlotResource (287) */2601 /** @name RmrkTraitsResourceSlotResource (289) */
2578 interface RmrkTraitsResourceSlotResource extends Struct {2602 interface RmrkTraitsResourceSlotResource extends Struct {
2579 readonly base: u32;2603 readonly base: u32;
2580 readonly src: Option<Bytes>;2604 readonly src: Option<Bytes>;
2584 readonly thumb: Option<Bytes>;2608 readonly thumb: Option<Bytes>;
2585 }2609 }
25862610
2587 /** @name PalletRmrkEquipCall (290) */2611 /** @name PalletRmrkEquipCall (292) */
2588 interface PalletRmrkEquipCall extends Enum {2612 interface PalletRmrkEquipCall extends Enum {
2589 readonly isCreateBase: boolean;2613 readonly isCreateBase: boolean;
2590 readonly asCreateBase: {2614 readonly asCreateBase: {
2606 readonly type: 'CreateBase' | 'ThemeAdd' | 'Equippable';2630 readonly type: 'CreateBase' | 'ThemeAdd' | 'Equippable';
2607 }2631 }
26082632
2609 /** @name RmrkTraitsPartPartType (293) */2633 /** @name RmrkTraitsPartPartType (295) */
2610 interface RmrkTraitsPartPartType extends Enum {2634 interface RmrkTraitsPartPartType extends Enum {
2611 readonly isFixedPart: boolean;2635 readonly isFixedPart: boolean;
2612 readonly asFixedPart: RmrkTraitsPartFixedPart;2636 readonly asFixedPart: RmrkTraitsPartFixedPart;
2615 readonly type: 'FixedPart' | 'SlotPart';2639 readonly type: 'FixedPart' | 'SlotPart';
2616 }2640 }
26172641
2618 /** @name RmrkTraitsPartFixedPart (295) */2642 /** @name RmrkTraitsPartFixedPart (297) */
2619 interface RmrkTraitsPartFixedPart extends Struct {2643 interface RmrkTraitsPartFixedPart extends Struct {
2620 readonly id: u32;2644 readonly id: u32;
2621 readonly z: u32;2645 readonly z: u32;
2622 readonly src: Bytes;2646 readonly src: Bytes;
2623 }2647 }
26242648
2625 /** @name RmrkTraitsPartSlotPart (296) */2649 /** @name RmrkTraitsPartSlotPart (298) */
2626 interface RmrkTraitsPartSlotPart extends Struct {2650 interface RmrkTraitsPartSlotPart extends Struct {
2627 readonly id: u32;2651 readonly id: u32;
2628 readonly equippable: RmrkTraitsPartEquippableList;2652 readonly equippable: RmrkTraitsPartEquippableList;
2629 readonly src: Bytes;2653 readonly src: Bytes;
2630 readonly z: u32;2654 readonly z: u32;
2631 }2655 }
26322656
2633 /** @name RmrkTraitsPartEquippableList (297) */2657 /** @name RmrkTraitsPartEquippableList (299) */
2634 interface RmrkTraitsPartEquippableList extends Enum {2658 interface RmrkTraitsPartEquippableList extends Enum {
2635 readonly isAll: boolean;2659 readonly isAll: boolean;
2636 readonly isEmpty: boolean;2660 readonly isEmpty: boolean;
2639 readonly type: 'All' | 'Empty' | 'Custom';2663 readonly type: 'All' | 'Empty' | 'Custom';
2640 }2664 }
26412665
2642 /** @name RmrkTraitsTheme (299) */2666 /** @name RmrkTraitsTheme (301) */
2643 interface RmrkTraitsTheme extends Struct {2667 interface RmrkTraitsTheme extends Struct {
2644 readonly name: Bytes;2668 readonly name: Bytes;
2645 readonly properties: Vec<RmrkTraitsThemeThemeProperty>;2669 readonly properties: Vec<RmrkTraitsThemeThemeProperty>;
2646 readonly inherit: bool;2670 readonly inherit: bool;
2647 }2671 }
26482672
2649 /** @name RmrkTraitsThemeThemeProperty (301) */2673 /** @name RmrkTraitsThemeThemeProperty (303) */
2650 interface RmrkTraitsThemeThemeProperty extends Struct {2674 interface RmrkTraitsThemeThemeProperty extends Struct {
2651 readonly key: Bytes;2675 readonly key: Bytes;
2652 readonly value: Bytes;2676 readonly value: Bytes;
2653 }2677 }
2678
2679 /** @name PalletAppPromotionCall (305) */
2680 interface PalletAppPromotionCall extends Enum {
2681 readonly isSetAdminAddress: boolean;
2682 readonly asSetAdminAddress: {
2683 readonly admin: PalletEvmAccountBasicCrossAccountIdRepr;
2684 } & Struct;
2685 readonly isStake: boolean;
2686 readonly asStake: {
2687 readonly amount: u128;
2688 } & Struct;
2689 readonly isUnstake: boolean;
2690 readonly isSponsorCollection: boolean;
2691 readonly asSponsorCollection: {
2692 readonly collectionId: u32;
2693 } & Struct;
2694 readonly isStopSponsoringCollection: boolean;
2695 readonly asStopSponsoringCollection: {
2696 readonly collectionId: u32;
2697 } & Struct;
2698 readonly isSponsorContract: boolean;
2699 readonly asSponsorContract: {
2700 readonly contractId: H160;
2701 } & Struct;
2702 readonly isStopSponsoringContract: boolean;
2703 readonly asStopSponsoringContract: {
2704 readonly contractId: H160;
2705 } & Struct;
2706 readonly isPayoutStakers: boolean;
2707 readonly asPayoutStakers: {
2708 readonly stakersNumber: Option<u8>;
2709 } & Struct;
2710 readonly type: 'SetAdminAddress' | 'Stake' | 'Unstake' | 'SponsorCollection' | 'StopSponsoringCollection' | 'SponsorContract' | 'StopSponsoringContract' | 'PayoutStakers';
2711 }
26542712
2655 /** @name PalletEvmCall (303) */2713 /** @name PalletEvmCall (307) */
2656 interface PalletEvmCall extends Enum {2714 interface PalletEvmCall extends Enum {
2657 readonly isWithdraw: boolean;2715 readonly isWithdraw: boolean;
2658 readonly asWithdraw: {2716 readonly asWithdraw: {
2697 readonly type: 'Withdraw' | 'Call' | 'Create' | 'Create2';2755 readonly type: 'Withdraw' | 'Call' | 'Create' | 'Create2';
2698 }2756 }
26992757
2700 /** @name PalletEthereumCall (307) */2758 /** @name PalletEthereumCall (311) */
2701 interface PalletEthereumCall extends Enum {2759 interface PalletEthereumCall extends Enum {
2702 readonly isTransact: boolean;2760 readonly isTransact: boolean;
2703 readonly asTransact: {2761 readonly asTransact: {
2706 readonly type: 'Transact';2764 readonly type: 'Transact';
2707 }2765 }
27082766
2709 /** @name EthereumTransactionTransactionV2 (308) */2767 /** @name EthereumTransactionTransactionV2 (312) */
2710 interface EthereumTransactionTransactionV2 extends Enum {2768 interface EthereumTransactionTransactionV2 extends Enum {
2711 readonly isLegacy: boolean;2769 readonly isLegacy: boolean;
2712 readonly asLegacy: EthereumTransactionLegacyTransaction;2770 readonly asLegacy: EthereumTransactionLegacyTransaction;
2717 readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';2775 readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';
2718 }2776 }
27192777
2720 /** @name EthereumTransactionLegacyTransaction (309) */2778 /** @name EthereumTransactionLegacyTransaction (313) */
2721 interface EthereumTransactionLegacyTransaction extends Struct {2779 interface EthereumTransactionLegacyTransaction extends Struct {
2722 readonly nonce: U256;2780 readonly nonce: U256;
2723 readonly gasPrice: U256;2781 readonly gasPrice: U256;
2728 readonly signature: EthereumTransactionTransactionSignature;2786 readonly signature: EthereumTransactionTransactionSignature;
2729 }2787 }
27302788
2731 /** @name EthereumTransactionTransactionAction (310) */2789 /** @name EthereumTransactionTransactionAction (314) */
2732 interface EthereumTransactionTransactionAction extends Enum {2790 interface EthereumTransactionTransactionAction extends Enum {
2733 readonly isCall: boolean;2791 readonly isCall: boolean;
2734 readonly asCall: H160;2792 readonly asCall: H160;
2735 readonly isCreate: boolean;2793 readonly isCreate: boolean;
2736 readonly type: 'Call' | 'Create';2794 readonly type: 'Call' | 'Create';
2737 }2795 }
27382796
2739 /** @name EthereumTransactionTransactionSignature (311) */2797 /** @name EthereumTransactionTransactionSignature (315) */
2740 interface EthereumTransactionTransactionSignature extends Struct {2798 interface EthereumTransactionTransactionSignature extends Struct {
2741 readonly v: u64;2799 readonly v: u64;
2742 readonly r: H256;2800 readonly r: H256;
2743 readonly s: H256;2801 readonly s: H256;
2744 }2802 }
27452803
2746 /** @name EthereumTransactionEip2930Transaction (313) */2804 /** @name EthereumTransactionEip2930Transaction (317) */
2747 interface EthereumTransactionEip2930Transaction extends Struct {2805 interface EthereumTransactionEip2930Transaction extends Struct {
2748 readonly chainId: u64;2806 readonly chainId: u64;
2749 readonly nonce: U256;2807 readonly nonce: U256;
2758 readonly s: H256;2816 readonly s: H256;
2759 }2817 }
27602818
2761 /** @name EthereumTransactionAccessListItem (315) */2819 /** @name EthereumTransactionAccessListItem (319) */
2762 interface EthereumTransactionAccessListItem extends Struct {2820 interface EthereumTransactionAccessListItem extends Struct {
2763 readonly address: H160;2821 readonly address: H160;
2764 readonly storageKeys: Vec<H256>;2822 readonly storageKeys: Vec<H256>;
2765 }2823 }
27662824
2767 /** @name EthereumTransactionEip1559Transaction (316) */2825 /** @name EthereumTransactionEip1559Transaction (320) */
2768 interface EthereumTransactionEip1559Transaction extends Struct {2826 interface EthereumTransactionEip1559Transaction extends Struct {
2769 readonly chainId: u64;2827 readonly chainId: u64;
2770 readonly nonce: U256;2828 readonly nonce: U256;
2780 readonly s: H256;2838 readonly s: H256;
2781 }2839 }
27822840
2783 /** @name PalletEvmMigrationCall (317) */2841 /** @name PalletEvmMigrationCall (321) */
2784 interface PalletEvmMigrationCall extends Enum {2842 interface PalletEvmMigrationCall extends Enum {
2785 readonly isBegin: boolean;2843 readonly isBegin: boolean;
2786 readonly asBegin: {2844 readonly asBegin: {
2799 readonly type: 'Begin' | 'SetData' | 'Finish';2857 readonly type: 'Begin' | 'SetData' | 'Finish';
2800 }2858 }
28012859
2802 /** @name PalletSudoError (320) */2860 /** @name PalletSudoError (324) */
2803 interface PalletSudoError extends Enum {2861 interface PalletSudoError extends Enum {
2804 readonly isRequireSudo: boolean;2862 readonly isRequireSudo: boolean;
2805 readonly type: 'RequireSudo';2863 readonly type: 'RequireSudo';
2806 }2864 }
28072865
2808 /** @name OrmlVestingModuleError (322) */2866 /** @name OrmlVestingModuleError (326) */
2809 interface OrmlVestingModuleError extends Enum {2867 interface OrmlVestingModuleError extends Enum {
2810 readonly isZeroVestingPeriod: boolean;2868 readonly isZeroVestingPeriod: boolean;
2811 readonly isZeroVestingPeriodCount: boolean;2869 readonly isZeroVestingPeriodCount: boolean;
2816 readonly type: 'ZeroVestingPeriod' | 'ZeroVestingPeriodCount' | 'InsufficientBalanceToLock' | 'TooManyVestingSchedules' | 'AmountLow' | 'MaxVestingSchedulesExceeded';2874 readonly type: 'ZeroVestingPeriod' | 'ZeroVestingPeriodCount' | 'InsufficientBalanceToLock' | 'TooManyVestingSchedules' | 'AmountLow' | 'MaxVestingSchedulesExceeded';
2817 }2875 }
28182876
2819 /** @name CumulusPalletXcmpQueueInboundChannelDetails (324) */2877 /** @name CumulusPalletXcmpQueueInboundChannelDetails (328) */
2820 interface CumulusPalletXcmpQueueInboundChannelDetails extends Struct {2878 interface CumulusPalletXcmpQueueInboundChannelDetails extends Struct {
2821 readonly sender: u32;2879 readonly sender: u32;
2822 readonly state: CumulusPalletXcmpQueueInboundState;2880 readonly state: CumulusPalletXcmpQueueInboundState;
2823 readonly messageMetadata: Vec<ITuple<[u32, PolkadotParachainPrimitivesXcmpMessageFormat]>>;2881 readonly messageMetadata: Vec<ITuple<[u32, PolkadotParachainPrimitivesXcmpMessageFormat]>>;
2824 }2882 }
28252883
2826 /** @name CumulusPalletXcmpQueueInboundState (325) */2884 /** @name CumulusPalletXcmpQueueInboundState (329) */
2827 interface CumulusPalletXcmpQueueInboundState extends Enum {2885 interface CumulusPalletXcmpQueueInboundState extends Enum {
2828 readonly isOk: boolean;2886 readonly isOk: boolean;
2829 readonly isSuspended: boolean;2887 readonly isSuspended: boolean;
2830 readonly type: 'Ok' | 'Suspended';2888 readonly type: 'Ok' | 'Suspended';
2831 }2889 }
28322890
2833 /** @name PolkadotParachainPrimitivesXcmpMessageFormat (328) */2891 /** @name PolkadotParachainPrimitivesXcmpMessageFormat (332) */
2834 interface PolkadotParachainPrimitivesXcmpMessageFormat extends Enum {2892 interface PolkadotParachainPrimitivesXcmpMessageFormat extends Enum {
2835 readonly isConcatenatedVersionedXcm: boolean;2893 readonly isConcatenatedVersionedXcm: boolean;
2836 readonly isConcatenatedEncodedBlob: boolean;2894 readonly isConcatenatedEncodedBlob: boolean;
2837 readonly isSignals: boolean;2895 readonly isSignals: boolean;
2838 readonly type: 'ConcatenatedVersionedXcm' | 'ConcatenatedEncodedBlob' | 'Signals';2896 readonly type: 'ConcatenatedVersionedXcm' | 'ConcatenatedEncodedBlob' | 'Signals';
2839 }2897 }
28402898
2841 /** @name CumulusPalletXcmpQueueOutboundChannelDetails (331) */2899 /** @name CumulusPalletXcmpQueueOutboundChannelDetails (335) */
2842 interface CumulusPalletXcmpQueueOutboundChannelDetails extends Struct {2900 interface CumulusPalletXcmpQueueOutboundChannelDetails extends Struct {
2843 readonly recipient: u32;2901 readonly recipient: u32;
2844 readonly state: CumulusPalletXcmpQueueOutboundState;2902 readonly state: CumulusPalletXcmpQueueOutboundState;
2847 readonly lastIndex: u16;2905 readonly lastIndex: u16;
2848 }2906 }
28492907
2850 /** @name CumulusPalletXcmpQueueOutboundState (332) */2908 /** @name CumulusPalletXcmpQueueOutboundState (336) */
2851 interface CumulusPalletXcmpQueueOutboundState extends Enum {2909 interface CumulusPalletXcmpQueueOutboundState extends Enum {
2852 readonly isOk: boolean;2910 readonly isOk: boolean;
2853 readonly isSuspended: boolean;2911 readonly isSuspended: boolean;
2854 readonly type: 'Ok' | 'Suspended';2912 readonly type: 'Ok' | 'Suspended';
2855 }2913 }
28562914
2857 /** @name CumulusPalletXcmpQueueQueueConfigData (334) */2915 /** @name CumulusPalletXcmpQueueQueueConfigData (338) */
2858 interface CumulusPalletXcmpQueueQueueConfigData extends Struct {2916 interface CumulusPalletXcmpQueueQueueConfigData extends Struct {
2859 readonly suspendThreshold: u32;2917 readonly suspendThreshold: u32;
2860 readonly dropThreshold: u32;2918 readonly dropThreshold: u32;
2864 readonly xcmpMaxIndividualWeight: u64;2922 readonly xcmpMaxIndividualWeight: u64;
2865 }2923 }
28662924
2867 /** @name CumulusPalletXcmpQueueError (336) */2925 /** @name CumulusPalletXcmpQueueError (340) */
2868 interface CumulusPalletXcmpQueueError extends Enum {2926 interface CumulusPalletXcmpQueueError extends Enum {
2869 readonly isFailedToSend: boolean;2927 readonly isFailedToSend: boolean;
2870 readonly isBadXcmOrigin: boolean;2928 readonly isBadXcmOrigin: boolean;
2874 readonly type: 'FailedToSend' | 'BadXcmOrigin' | 'BadXcm' | 'BadOverweightIndex' | 'WeightOverLimit';2932 readonly type: 'FailedToSend' | 'BadXcmOrigin' | 'BadXcm' | 'BadOverweightIndex' | 'WeightOverLimit';
2875 }2933 }
28762934
2877 /** @name PalletXcmError (337) */2935 /** @name PalletXcmError (341) */
2878 interface PalletXcmError extends Enum {2936 interface PalletXcmError extends Enum {
2879 readonly isUnreachable: boolean;2937 readonly isUnreachable: boolean;
2880 readonly isSendFailure: boolean;2938 readonly isSendFailure: boolean;
2892 readonly type: 'Unreachable' | 'SendFailure' | 'Filtered' | 'UnweighableMessage' | 'DestinationNotInvertible' | 'Empty' | 'CannotReanchor' | 'TooManyAssets' | 'InvalidOrigin' | 'BadVersion' | 'BadLocation' | 'NoSubscription' | 'AlreadySubscribed';2950 readonly type: 'Unreachable' | 'SendFailure' | 'Filtered' | 'UnweighableMessage' | 'DestinationNotInvertible' | 'Empty' | 'CannotReanchor' | 'TooManyAssets' | 'InvalidOrigin' | 'BadVersion' | 'BadLocation' | 'NoSubscription' | 'AlreadySubscribed';
2893 }2951 }
28942952
2895 /** @name CumulusPalletXcmError (338) */2953 /** @name CumulusPalletXcmError (342) */
2896 type CumulusPalletXcmError = Null;2954 type CumulusPalletXcmError = Null;
28972955
2898 /** @name CumulusPalletDmpQueueConfigData (339) */2956 /** @name CumulusPalletDmpQueueConfigData (343) */
2899 interface CumulusPalletDmpQueueConfigData extends Struct {2957 interface CumulusPalletDmpQueueConfigData extends Struct {
2900 readonly maxIndividual: u64;2958 readonly maxIndividual: u64;
2901 }2959 }
29022960
2903 /** @name CumulusPalletDmpQueuePageIndexData (340) */2961 /** @name CumulusPalletDmpQueuePageIndexData (344) */
2904 interface CumulusPalletDmpQueuePageIndexData extends Struct {2962 interface CumulusPalletDmpQueuePageIndexData extends Struct {
2905 readonly beginUsed: u32;2963 readonly beginUsed: u32;
2906 readonly endUsed: u32;2964 readonly endUsed: u32;
2907 readonly overweightCount: u64;2965 readonly overweightCount: u64;
2908 }2966 }
29092967
2910 /** @name CumulusPalletDmpQueueError (343) */2968 /** @name CumulusPalletDmpQueueError (347) */
2911 interface CumulusPalletDmpQueueError extends Enum {2969 interface CumulusPalletDmpQueueError extends Enum {
2912 readonly isUnknown: boolean;2970 readonly isUnknown: boolean;
2913 readonly isOverLimit: boolean;2971 readonly isOverLimit: boolean;
2914 readonly type: 'Unknown' | 'OverLimit';2972 readonly type: 'Unknown' | 'OverLimit';
2915 }2973 }
29162974
2917 /** @name PalletUniqueError (347) */2975 /** @name PalletUniqueError (351) */
2918 interface PalletUniqueError extends Enum {2976 interface PalletUniqueError extends Enum {
2919 readonly isCollectionDecimalPointLimitExceeded: boolean;2977 readonly isCollectionDecimalPointLimitExceeded: boolean;
2920 readonly isConfirmUnsetSponsorFail: boolean;2978 readonly isConfirmUnsetSponsorFail: boolean;
2923 readonly type: 'CollectionDecimalPointLimitExceeded' | 'ConfirmUnsetSponsorFail' | 'EmptyArgument' | 'RepartitionCalledOnNonRefungibleCollection';2981 readonly type: 'CollectionDecimalPointLimitExceeded' | 'ConfirmUnsetSponsorFail' | 'EmptyArgument' | 'RepartitionCalledOnNonRefungibleCollection';
2924 }2982 }
29252983
2926 /** @name PalletUniqueSchedulerScheduledV3 (350) */2984 /** @name PalletUniqueSchedulerScheduledV3 (354) */
2927 interface PalletUniqueSchedulerScheduledV3 extends Struct {2985 interface PalletUniqueSchedulerScheduledV3 extends Struct {
2928 readonly maybeId: Option<U8aFixed>;2986 readonly maybeId: Option<U8aFixed>;
2929 readonly priority: u8;2987 readonly priority: u8;
2932 readonly origin: OpalRuntimeOriginCaller;2990 readonly origin: OpalRuntimeOriginCaller;
2933 }2991 }
29342992
2935 /** @name OpalRuntimeOriginCaller (351) */2993 /** @name OpalRuntimeOriginCaller (355) */
2936 interface OpalRuntimeOriginCaller extends Enum {2994 interface OpalRuntimeOriginCaller extends Enum {
2937 readonly isSystem: boolean;2995 readonly isSystem: boolean;
2938 readonly asSystem: FrameSupportDispatchRawOrigin;2996 readonly asSystem: FrameSupportDispatchRawOrigin;
2946 readonly type: 'System' | 'Void' | 'PolkadotXcm' | 'CumulusXcm' | 'Ethereum';3004 readonly type: 'System' | 'Void' | 'PolkadotXcm' | 'CumulusXcm' | 'Ethereum';
2947 }3005 }
29483006
2949 /** @name FrameSupportDispatchRawOrigin (352) */3007 /** @name FrameSupportDispatchRawOrigin (356) */
2950 interface FrameSupportDispatchRawOrigin extends Enum {3008 interface FrameSupportDispatchRawOrigin extends Enum {
2951 readonly isRoot: boolean;3009 readonly isRoot: boolean;
2952 readonly isSigned: boolean;3010 readonly isSigned: boolean;
2955 readonly type: 'Root' | 'Signed' | 'None';3013 readonly type: 'Root' | 'Signed' | 'None';
2956 }3014 }
29573015
2958 /** @name PalletXcmOrigin (353) */3016 /** @name PalletXcmOrigin (357) */
2959 interface PalletXcmOrigin extends Enum {3017 interface PalletXcmOrigin extends Enum {
2960 readonly isXcm: boolean;3018 readonly isXcm: boolean;
2961 readonly asXcm: XcmV1MultiLocation;3019 readonly asXcm: XcmV1MultiLocation;
2964 readonly type: 'Xcm' | 'Response';3022 readonly type: 'Xcm' | 'Response';
2965 }3023 }
29663024
2967 /** @name CumulusPalletXcmOrigin (354) */3025 /** @name CumulusPalletXcmOrigin (358) */
2968 interface CumulusPalletXcmOrigin extends Enum {3026 interface CumulusPalletXcmOrigin extends Enum {
2969 readonly isRelay: boolean;3027 readonly isRelay: boolean;
2970 readonly isSiblingParachain: boolean;3028 readonly isSiblingParachain: boolean;
2971 readonly asSiblingParachain: u32;3029 readonly asSiblingParachain: u32;
2972 readonly type: 'Relay' | 'SiblingParachain';3030 readonly type: 'Relay' | 'SiblingParachain';
2973 }3031 }
29743032
2975 /** @name PalletEthereumRawOrigin (355) */3033 /** @name PalletEthereumRawOrigin (359) */
2976 interface PalletEthereumRawOrigin extends Enum {3034 interface PalletEthereumRawOrigin extends Enum {
2977 readonly isEthereumTransaction: boolean;3035 readonly isEthereumTransaction: boolean;
2978 readonly asEthereumTransaction: H160;3036 readonly asEthereumTransaction: H160;
2979 readonly type: 'EthereumTransaction';3037 readonly type: 'EthereumTransaction';
2980 }3038 }
29813039
2982 /** @name SpCoreVoid (356) */3040 /** @name SpCoreVoid (360) */
2983 type SpCoreVoid = Null;3041 type SpCoreVoid = Null;
29843042
2985 /** @name PalletUniqueSchedulerError (357) */3043 /** @name PalletUniqueSchedulerError (361) */
2986 interface PalletUniqueSchedulerError extends Enum {3044 interface PalletUniqueSchedulerError extends Enum {
2987 readonly isFailedToSchedule: boolean;3045 readonly isFailedToSchedule: boolean;
2988 readonly isNotFound: boolean;3046 readonly isNotFound: boolean;
2991 readonly type: 'FailedToSchedule' | 'NotFound' | 'TargetBlockNumberInPast' | 'RescheduleNoChange';3049 readonly type: 'FailedToSchedule' | 'NotFound' | 'TargetBlockNumberInPast' | 'RescheduleNoChange';
2992 }3050 }
29933051
2994 /** @name UpDataStructsCollection (358) */3052 /** @name UpDataStructsCollection (362) */
2995 interface UpDataStructsCollection extends Struct {3053 interface UpDataStructsCollection extends Struct {
2996 readonly owner: AccountId32;3054 readonly owner: AccountId32;
2997 readonly mode: UpDataStructsCollectionMode;3055 readonly mode: UpDataStructsCollectionMode;
2998 readonly name: Vec<u16>;3056 readonly name: Vec<u16>;
2999 readonly description: Vec<u16>;3057 readonly description: Vec<u16>;
3000 readonly tokenPrefix: Bytes;3058 readonly tokenPrefix: Bytes;
3001 readonly sponsorship: UpDataStructsSponsorshipState;3059 readonly sponsorship: UpDataStructsSponsorshipStateAccountId32;
3002 readonly limits: UpDataStructsCollectionLimits;3060 readonly limits: UpDataStructsCollectionLimits;
3003 readonly permissions: UpDataStructsCollectionPermissions;3061 readonly permissions: UpDataStructsCollectionPermissions;
3004 readonly externalCollection: bool;3062 readonly externalCollection: bool;
3005 }3063 }
30063064
3007 /** @name UpDataStructsSponsorshipState (359) */3065 /** @name UpDataStructsSponsorshipStateAccountId32 (363) */
3008 interface UpDataStructsSponsorshipState extends Enum {3066 interface UpDataStructsSponsorshipStateAccountId32 extends Enum {
3009 readonly isDisabled: boolean;3067 readonly isDisabled: boolean;
3010 readonly isUnconfirmed: boolean;3068 readonly isUnconfirmed: boolean;
3011 readonly asUnconfirmed: AccountId32;3069 readonly asUnconfirmed: AccountId32;
3014 readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';3072 readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';
3015 }3073 }
30163074
3017 /** @name UpDataStructsProperties (360) */3075 /** @name UpDataStructsProperties (364) */
3018 interface UpDataStructsProperties extends Struct {3076 interface UpDataStructsProperties extends Struct {
3019 readonly map: UpDataStructsPropertiesMapBoundedVec;3077 readonly map: UpDataStructsPropertiesMapBoundedVec;
3020 readonly consumedSpace: u32;3078 readonly consumedSpace: u32;
3021 readonly spaceLimit: u32;3079 readonly spaceLimit: u32;
3022 }3080 }
30233081
3024 /** @name UpDataStructsPropertiesMapBoundedVec (361) */3082 /** @name UpDataStructsPropertiesMapBoundedVec (365) */
3025 interface UpDataStructsPropertiesMapBoundedVec extends BTreeMap<Bytes, Bytes> {}3083 interface UpDataStructsPropertiesMapBoundedVec extends BTreeMap<Bytes, Bytes> {}
30263084
3027 /** @name UpDataStructsPropertiesMapPropertyPermission (366) */3085 /** @name UpDataStructsPropertiesMapPropertyPermission (370) */
3028 interface UpDataStructsPropertiesMapPropertyPermission extends BTreeMap<Bytes, UpDataStructsPropertyPermission> {}3086 interface UpDataStructsPropertiesMapPropertyPermission extends BTreeMap<Bytes, UpDataStructsPropertyPermission> {}
30293087
3030 /** @name UpDataStructsCollectionStats (373) */3088 /** @name UpDataStructsCollectionStats (377) */
3031 interface UpDataStructsCollectionStats extends Struct {3089 interface UpDataStructsCollectionStats extends Struct {
3032 readonly created: u32;3090 readonly created: u32;
3033 readonly destroyed: u32;3091 readonly destroyed: u32;
3034 readonly alive: u32;3092 readonly alive: u32;
3035 }3093 }
30363094
3037 /** @name UpDataStructsTokenChild (374) */3095 /** @name UpDataStructsTokenChild (378) */
3038 interface UpDataStructsTokenChild extends Struct {3096 interface UpDataStructsTokenChild extends Struct {
3039 readonly token: u32;3097 readonly token: u32;
3040 readonly collection: u32;3098 readonly collection: u32;
3041 }3099 }
30423100
3043 /** @name PhantomTypeUpDataStructs (375) */3101 /** @name PhantomTypeUpDataStructs (379) */
3044 interface PhantomTypeUpDataStructs extends Vec<ITuple<[UpDataStructsTokenData, UpDataStructsRpcCollection, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftNftInfo, RmrkTraitsResourceResourceInfo, RmrkTraitsPropertyPropertyInfo, RmrkTraitsBaseBaseInfo, RmrkTraitsPartPartType, RmrkTraitsTheme, RmrkTraitsNftNftChild]>> {}3102 interface PhantomTypeUpDataStructs extends Vec<ITuple<[UpDataStructsTokenData, UpDataStructsRpcCollection, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftNftInfo, RmrkTraitsResourceResourceInfo, RmrkTraitsPropertyPropertyInfo, RmrkTraitsBaseBaseInfo, RmrkTraitsPartPartType, RmrkTraitsTheme, RmrkTraitsNftNftChild]>> {}
30453103
3046 /** @name UpDataStructsTokenData (377) */3104 /** @name UpDataStructsTokenData (381) */
3047 interface UpDataStructsTokenData extends Struct {3105 interface UpDataStructsTokenData extends Struct {
3048 readonly properties: Vec<UpDataStructsProperty>;3106 readonly properties: Vec<UpDataStructsProperty>;
3049 readonly owner: Option<PalletEvmAccountBasicCrossAccountIdRepr>;3107 readonly owner: Option<PalletEvmAccountBasicCrossAccountIdRepr>;
3050 readonly pieces: u128;3108 readonly pieces: u128;
3051 }3109 }
30523110
3053 /** @name UpDataStructsRpcCollection (379) */3111 /** @name UpDataStructsRpcCollection (383) */
3054 interface UpDataStructsRpcCollection extends Struct {3112 interface UpDataStructsRpcCollection extends Struct {
3055 readonly owner: AccountId32;3113 readonly owner: AccountId32;
3056 readonly mode: UpDataStructsCollectionMode;3114 readonly mode: UpDataStructsCollectionMode;
3057 readonly name: Vec<u16>;3115 readonly name: Vec<u16>;
3058 readonly description: Vec<u16>;3116 readonly description: Vec<u16>;
3059 readonly tokenPrefix: Bytes;3117 readonly tokenPrefix: Bytes;
3060 readonly sponsorship: UpDataStructsSponsorshipState;3118 readonly sponsorship: UpDataStructsSponsorshipStateAccountId32;
3061 readonly limits: UpDataStructsCollectionLimits;3119 readonly limits: UpDataStructsCollectionLimits;
3062 readonly permissions: UpDataStructsCollectionPermissions;3120 readonly permissions: UpDataStructsCollectionPermissions;
3063 readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;3121 readonly tokenPropertyPermissions: Vec<UpDataStructsPropertyKeyPermission>;
3064 readonly properties: Vec<UpDataStructsProperty>;3122 readonly properties: Vec<UpDataStructsProperty>;
3065 readonly readOnly: bool;3123 readonly readOnly: bool;
3066 }3124 }
30673125
3068 /** @name RmrkTraitsCollectionCollectionInfo (380) */3126 /** @name RmrkTraitsCollectionCollectionInfo (384) */
3069 interface RmrkTraitsCollectionCollectionInfo extends Struct {3127 interface RmrkTraitsCollectionCollectionInfo extends Struct {
3070 readonly issuer: AccountId32;3128 readonly issuer: AccountId32;
3071 readonly metadata: Bytes;3129 readonly metadata: Bytes;
3074 readonly nftsCount: u32;3132 readonly nftsCount: u32;
3075 }3133 }
30763134
3077 /** @name RmrkTraitsNftNftInfo (381) */3135 /** @name RmrkTraitsNftNftInfo (385) */
3078 interface RmrkTraitsNftNftInfo extends Struct {3136 interface RmrkTraitsNftNftInfo extends Struct {
3079 readonly owner: RmrkTraitsNftAccountIdOrCollectionNftTuple;3137 readonly owner: RmrkTraitsNftAccountIdOrCollectionNftTuple;
3080 readonly royalty: Option<RmrkTraitsNftRoyaltyInfo>;3138 readonly royalty: Option<RmrkTraitsNftRoyaltyInfo>;
3083 readonly pending: bool;3141 readonly pending: bool;
3084 }3142 }
30853143
3086 /** @name RmrkTraitsNftRoyaltyInfo (383) */3144 /** @name RmrkTraitsNftRoyaltyInfo (387) */
3087 interface RmrkTraitsNftRoyaltyInfo extends Struct {3145 interface RmrkTraitsNftRoyaltyInfo extends Struct {
3088 readonly recipient: AccountId32;3146 readonly recipient: AccountId32;
3089 readonly amount: Permill;3147 readonly amount: Permill;
3090 }3148 }
30913149
3092 /** @name RmrkTraitsResourceResourceInfo (384) */3150 /** @name RmrkTraitsResourceResourceInfo (388) */
3093 interface RmrkTraitsResourceResourceInfo extends Struct {3151 interface RmrkTraitsResourceResourceInfo extends Struct {
3094 readonly id: u32;3152 readonly id: u32;
3095 readonly resource: RmrkTraitsResourceResourceTypes;3153 readonly resource: RmrkTraitsResourceResourceTypes;
3096 readonly pending: bool;3154 readonly pending: bool;
3097 readonly pendingRemoval: bool;3155 readonly pendingRemoval: bool;
3098 }3156 }
30993157
3100 /** @name RmrkTraitsPropertyPropertyInfo (385) */3158 /** @name RmrkTraitsPropertyPropertyInfo (389) */
3101 interface RmrkTraitsPropertyPropertyInfo extends Struct {3159 interface RmrkTraitsPropertyPropertyInfo extends Struct {
3102 readonly key: Bytes;3160 readonly key: Bytes;
3103 readonly value: Bytes;3161 readonly value: Bytes;
3104 }3162 }
31053163
3106 /** @name RmrkTraitsBaseBaseInfo (386) */3164 /** @name RmrkTraitsBaseBaseInfo (390) */
3107 interface RmrkTraitsBaseBaseInfo extends Struct {3165 interface RmrkTraitsBaseBaseInfo extends Struct {
3108 readonly issuer: AccountId32;3166 readonly issuer: AccountId32;
3109 readonly baseType: Bytes;3167 readonly baseType: Bytes;
3110 readonly symbol: Bytes;3168 readonly symbol: Bytes;
3111 }3169 }
31123170
3113 /** @name RmrkTraitsNftNftChild (387) */3171 /** @name RmrkTraitsNftNftChild (391) */
3114 interface RmrkTraitsNftNftChild extends Struct {3172 interface RmrkTraitsNftNftChild extends Struct {
3115 readonly collectionId: u32;3173 readonly collectionId: u32;
3116 readonly nftId: u32;3174 readonly nftId: u32;
3117 }3175 }
31183176
3119 /** @name PalletCommonError (389) */3177 /** @name PalletCommonError (393) */
3120 interface PalletCommonError extends Enum {3178 interface PalletCommonError extends Enum {
3121 readonly isCollectionNotFound: boolean;3179 readonly isCollectionNotFound: boolean;
3122 readonly isMustBeTokenOwner: boolean;3180 readonly isMustBeTokenOwner: boolean;
3155 readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'CantDestroyNotEmptyCollection' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds' | 'UserIsNotAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'PropertyKeyIsTooLong' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey' | 'CollectionIsExternal' | 'CollectionIsInternal';3213 readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'CantDestroyNotEmptyCollection' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds' | 'UserIsNotAllowedToNest' | 'SourceCollectionIsNotAllowedToNest' | 'CollectionFieldSizeExceeded' | 'NoSpaceForProperty' | 'PropertyLimitReached' | 'PropertyKeyIsTooLong' | 'InvalidCharacterInPropertyKey' | 'EmptyPropertyKey' | 'CollectionIsExternal' | 'CollectionIsInternal';
3156 }3214 }
31573215
3158 /** @name PalletFungibleError (391) */3216 /** @name PalletFungibleError (395) */
3159 interface PalletFungibleError extends Enum {3217 interface PalletFungibleError extends Enum {
3160 readonly isNotFungibleDataUsedToMintFungibleCollectionToken: boolean;3218 readonly isNotFungibleDataUsedToMintFungibleCollectionToken: boolean;
3161 readonly isFungibleItemsHaveNoId: boolean;3219 readonly isFungibleItemsHaveNoId: boolean;
3165 readonly type: 'NotFungibleDataUsedToMintFungibleCollectionToken' | 'FungibleItemsHaveNoId' | 'FungibleItemsDontHaveData' | 'FungibleDisallowsNesting' | 'SettingPropertiesNotAllowed';3223 readonly type: 'NotFungibleDataUsedToMintFungibleCollectionToken' | 'FungibleItemsHaveNoId' | 'FungibleItemsDontHaveData' | 'FungibleDisallowsNesting' | 'SettingPropertiesNotAllowed';
3166 }3224 }
31673225
3168 /** @name PalletRefungibleItemData (392) */3226 /** @name PalletRefungibleItemData (396) */
3169 interface PalletRefungibleItemData extends Struct {3227 interface PalletRefungibleItemData extends Struct {
3170 readonly constData: Bytes;3228 readonly constData: Bytes;
3171 }3229 }
31723230
3173 /** @name PalletRefungibleError (397) */3231 /** @name PalletRefungibleError (401) */
3174 interface PalletRefungibleError extends Enum {3232 interface PalletRefungibleError extends Enum {
3175 readonly isNotRefungibleDataUsedToMintFungibleCollectionToken: boolean;3233 readonly isNotRefungibleDataUsedToMintFungibleCollectionToken: boolean;
3176 readonly isWrongRefungiblePieces: boolean;3234 readonly isWrongRefungiblePieces: boolean;
3180 readonly type: 'NotRefungibleDataUsedToMintFungibleCollectionToken' | 'WrongRefungiblePieces' | 'RepartitionWhileNotOwningAllPieces' | 'RefungibleDisallowsNesting' | 'SettingPropertiesNotAllowed';3238 readonly type: 'NotRefungibleDataUsedToMintFungibleCollectionToken' | 'WrongRefungiblePieces' | 'RepartitionWhileNotOwningAllPieces' | 'RefungibleDisallowsNesting' | 'SettingPropertiesNotAllowed';
3181 }3239 }
31823240
3183 /** @name PalletNonfungibleItemData (398) */3241 /** @name PalletNonfungibleItemData (402) */
3184 interface PalletNonfungibleItemData extends Struct {3242 interface PalletNonfungibleItemData extends Struct {
3185 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;3243 readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
3186 }3244 }
31873245
3188 /** @name UpDataStructsPropertyScope (400) */3246 /** @name UpDataStructsPropertyScope (404) */
3189 interface UpDataStructsPropertyScope extends Enum {3247 interface UpDataStructsPropertyScope extends Enum {
3190 readonly isNone: boolean;3248 readonly isNone: boolean;
3191 readonly isRmrk: boolean;3249 readonly isRmrk: boolean;
3192 readonly isEth: boolean;
3193 readonly type: 'None' | 'Rmrk' | 'Eth';3250 readonly type: 'None' | 'Rmrk';
3194 }3251 }
31953252
3196 /** @name PalletNonfungibleError (402) */3253 /** @name PalletNonfungibleError (406) */
3197 interface PalletNonfungibleError extends Enum {3254 interface PalletNonfungibleError extends Enum {
3198 readonly isNotNonfungibleDataUsedToMintFungibleCollectionToken: boolean;3255 readonly isNotNonfungibleDataUsedToMintFungibleCollectionToken: boolean;
3199 readonly isNonfungibleItemsHaveNoAmount: boolean;3256 readonly isNonfungibleItemsHaveNoAmount: boolean;
3200 readonly isCantBurnNftWithChildren: boolean;3257 readonly isCantBurnNftWithChildren: boolean;
3201 readonly type: 'NotNonfungibleDataUsedToMintFungibleCollectionToken' | 'NonfungibleItemsHaveNoAmount' | 'CantBurnNftWithChildren';3258 readonly type: 'NotNonfungibleDataUsedToMintFungibleCollectionToken' | 'NonfungibleItemsHaveNoAmount' | 'CantBurnNftWithChildren';
3202 }3259 }
32033260
3204 /** @name PalletStructureError (403) */3261 /** @name PalletStructureError (407) */
3205 interface PalletStructureError extends Enum {3262 interface PalletStructureError extends Enum {
3206 readonly isOuroborosDetected: boolean;3263 readonly isOuroborosDetected: boolean;
3207 readonly isDepthLimit: boolean;3264 readonly isDepthLimit: boolean;
3210 readonly type: 'OuroborosDetected' | 'DepthLimit' | 'BreadthLimit' | 'TokenNotFound';3267 readonly type: 'OuroborosDetected' | 'DepthLimit' | 'BreadthLimit' | 'TokenNotFound';
3211 }3268 }
32123269
3213 /** @name PalletRmrkCoreError (404) */3270 /** @name PalletRmrkCoreError (408) */
3214 interface PalletRmrkCoreError extends Enum {3271 interface PalletRmrkCoreError extends Enum {
3215 readonly isCorruptedCollectionType: boolean;3272 readonly isCorruptedCollectionType: boolean;
3216 readonly isRmrkPropertyKeyIsTooLong: boolean;3273 readonly isRmrkPropertyKeyIsTooLong: boolean;
3234 readonly type: 'CorruptedCollectionType' | 'RmrkPropertyKeyIsTooLong' | 'RmrkPropertyValueIsTooLong' | 'RmrkPropertyIsNotFound' | 'UnableToDecodeRmrkData' | 'CollectionNotEmpty' | 'NoAvailableCollectionId' | 'NoAvailableNftId' | 'CollectionUnknown' | 'NoPermission' | 'NonTransferable' | 'CollectionFullOrLocked' | 'ResourceDoesntExist' | 'CannotSendToDescendentOrSelf' | 'CannotAcceptNonOwnedNft' | 'CannotRejectNonOwnedNft' | 'CannotRejectNonPendingNft' | 'ResourceNotPending' | 'NoAvailableResourceId';3291 readonly type: 'CorruptedCollectionType' | 'RmrkPropertyKeyIsTooLong' | 'RmrkPropertyValueIsTooLong' | 'RmrkPropertyIsNotFound' | 'UnableToDecodeRmrkData' | 'CollectionNotEmpty' | 'NoAvailableCollectionId' | 'NoAvailableNftId' | 'CollectionUnknown' | 'NoPermission' | 'NonTransferable' | 'CollectionFullOrLocked' | 'ResourceDoesntExist' | 'CannotSendToDescendentOrSelf' | 'CannotAcceptNonOwnedNft' | 'CannotRejectNonOwnedNft' | 'CannotRejectNonPendingNft' | 'ResourceNotPending' | 'NoAvailableResourceId';
3235 }3292 }
32363293
3237 /** @name PalletRmrkEquipError (406) */3294 /** @name PalletRmrkEquipError (410) */
3238 interface PalletRmrkEquipError extends Enum {3295 interface PalletRmrkEquipError extends Enum {
3239 readonly isPermissionError: boolean;3296 readonly isPermissionError: boolean;
3240 readonly isNoAvailableBaseId: boolean;3297 readonly isNoAvailableBaseId: boolean;
3246 readonly type: 'PermissionError' | 'NoAvailableBaseId' | 'NoAvailablePartId' | 'BaseDoesntExist' | 'NeedsDefaultThemeFirst' | 'PartDoesntExist' | 'NoEquippableOnFixedPart';3303 readonly type: 'PermissionError' | 'NoAvailableBaseId' | 'NoAvailablePartId' | 'BaseDoesntExist' | 'NeedsDefaultThemeFirst' | 'PartDoesntExist' | 'NoEquippableOnFixedPart';
3247 }3304 }
3305
3306 /** @name PalletAppPromotionError (416) */
3307 interface PalletAppPromotionError extends Enum {
3308 readonly isAdminNotSet: boolean;
3309 readonly isNoPermission: boolean;
3310 readonly isNotSufficientFunds: boolean;
3311 readonly isPendingForBlockOverflow: boolean;
3312 readonly isSponsorNotSet: boolean;
3313 readonly isIncorrectLockedBalanceOperation: boolean;
3314 readonly type: 'AdminNotSet' | 'NoPermission' | 'NotSufficientFunds' | 'PendingForBlockOverflow' | 'SponsorNotSet' | 'IncorrectLockedBalanceOperation';
3315 }
32483316
3249 /** @name PalletEvmError (409) */3317 /** @name PalletEvmError (419) */
3250 interface PalletEvmError extends Enum {3318 interface PalletEvmError extends Enum {
3251 readonly isBalanceLow: boolean;3319 readonly isBalanceLow: boolean;
3252 readonly isFeeOverflow: boolean;3320 readonly isFeeOverflow: boolean;
3257 readonly type: 'BalanceLow' | 'FeeOverflow' | 'PaymentOverflow' | 'WithdrawFailed' | 'GasPriceTooLow' | 'InvalidNonce';3325 readonly type: 'BalanceLow' | 'FeeOverflow' | 'PaymentOverflow' | 'WithdrawFailed' | 'GasPriceTooLow' | 'InvalidNonce';
3258 }3326 }
32593327
3260 /** @name FpRpcTransactionStatus (412) */3328 /** @name FpRpcTransactionStatus (422) */
3261 interface FpRpcTransactionStatus extends Struct {3329 interface FpRpcTransactionStatus extends Struct {
3262 readonly transactionHash: H256;3330 readonly transactionHash: H256;
3263 readonly transactionIndex: u32;3331 readonly transactionIndex: u32;
3268 readonly logsBloom: EthbloomBloom;3336 readonly logsBloom: EthbloomBloom;
3269 }3337 }
32703338
3271 /** @name EthbloomBloom (414) */3339 /** @name EthbloomBloom (424) */
3272 interface EthbloomBloom extends U8aFixed {}3340 interface EthbloomBloom extends U8aFixed {}
32733341
3274 /** @name EthereumReceiptReceiptV3 (416) */3342 /** @name EthereumReceiptReceiptV3 (426) */
3275 interface EthereumReceiptReceiptV3 extends Enum {3343 interface EthereumReceiptReceiptV3 extends Enum {
3276 readonly isLegacy: boolean;3344 readonly isLegacy: boolean;
3277 readonly asLegacy: EthereumReceiptEip658ReceiptData;3345 readonly asLegacy: EthereumReceiptEip658ReceiptData;
3282 readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';3350 readonly type: 'Legacy' | 'Eip2930' | 'Eip1559';
3283 }3351 }
32843352
3285 /** @name EthereumReceiptEip658ReceiptData (417) */3353 /** @name EthereumReceiptEip658ReceiptData (427) */
3286 interface EthereumReceiptEip658ReceiptData extends Struct {3354 interface EthereumReceiptEip658ReceiptData extends Struct {
3287 readonly statusCode: u8;3355 readonly statusCode: u8;
3288 readonly usedGas: U256;3356 readonly usedGas: U256;
3289 readonly logsBloom: EthbloomBloom;3357 readonly logsBloom: EthbloomBloom;
3290 readonly logs: Vec<EthereumLog>;3358 readonly logs: Vec<EthereumLog>;
3291 }3359 }
32923360
3293 /** @name EthereumBlock (418) */3361 /** @name EthereumBlock (428) */
3294 interface EthereumBlock extends Struct {3362 interface EthereumBlock extends Struct {
3295 readonly header: EthereumHeader;3363 readonly header: EthereumHeader;
3296 readonly transactions: Vec<EthereumTransactionTransactionV2>;3364 readonly transactions: Vec<EthereumTransactionTransactionV2>;
3297 readonly ommers: Vec<EthereumHeader>;3365 readonly ommers: Vec<EthereumHeader>;
3298 }3366 }
32993367
3300 /** @name EthereumHeader (419) */3368 /** @name EthereumHeader (429) */
3301 interface EthereumHeader extends Struct {3369 interface EthereumHeader extends Struct {
3302 readonly parentHash: H256;3370 readonly parentHash: H256;
3303 readonly ommersHash: H256;3371 readonly ommersHash: H256;
3316 readonly nonce: EthereumTypesHashH64;3384 readonly nonce: EthereumTypesHashH64;
3317 }3385 }
33183386
3319 /** @name EthereumTypesHashH64 (420) */3387 /** @name EthereumTypesHashH64 (430) */
3320 interface EthereumTypesHashH64 extends U8aFixed {}3388 interface EthereumTypesHashH64 extends U8aFixed {}
33213389
3322 /** @name PalletEthereumError (425) */3390 /** @name PalletEthereumError (435) */
3323 interface PalletEthereumError extends Enum {3391 interface PalletEthereumError extends Enum {
3324 readonly isInvalidSignature: boolean;3392 readonly isInvalidSignature: boolean;
3325 readonly isPreLogExists: boolean;3393 readonly isPreLogExists: boolean;
3326 readonly type: 'InvalidSignature' | 'PreLogExists';3394 readonly type: 'InvalidSignature' | 'PreLogExists';
3327 }3395 }
33283396
3329 /** @name PalletEvmCoderSubstrateError (426) */3397 /** @name PalletEvmCoderSubstrateError (436) */
3330 interface PalletEvmCoderSubstrateError extends Enum {3398 interface PalletEvmCoderSubstrateError extends Enum {
3331 readonly isOutOfGas: boolean;3399 readonly isOutOfGas: boolean;
3332 readonly isOutOfFund: boolean;3400 readonly isOutOfFund: boolean;
3333 readonly type: 'OutOfGas' | 'OutOfFund';3401 readonly type: 'OutOfGas' | 'OutOfFund';
3334 }3402 }
3403
3404 /** @name UpDataStructsSponsorshipStateBasicCrossAccountIdRepr (437) */
3405 interface UpDataStructsSponsorshipStateBasicCrossAccountIdRepr extends Enum {
3406 readonly isDisabled: boolean;
3407 readonly isUnconfirmed: boolean;
3408 readonly asUnconfirmed: PalletEvmAccountBasicCrossAccountIdRepr;
3409 readonly isConfirmed: boolean;
3410 readonly asConfirmed: PalletEvmAccountBasicCrossAccountIdRepr;
3411 readonly type: 'Disabled' | 'Unconfirmed' | 'Confirmed';
3412 }
33353413
3336 /** @name PalletEvmContractHelpersSponsoringModeT (427) */3414 /** @name PalletEvmContractHelpersSponsoringModeT (438) */
3337 interface PalletEvmContractHelpersSponsoringModeT extends Enum {3415 interface PalletEvmContractHelpersSponsoringModeT extends Enum {
3338 readonly isDisabled: boolean;3416 readonly isDisabled: boolean;
3339 readonly isAllowlisted: boolean;3417 readonly isAllowlisted: boolean;
3340 readonly isGenerous: boolean;3418 readonly isGenerous: boolean;
3341 readonly type: 'Disabled' | 'Allowlisted' | 'Generous';3419 readonly type: 'Disabled' | 'Allowlisted' | 'Generous';
3342 }3420 }
33433421
3344 /** @name PalletEvmContractHelpersError (429) */3422 /** @name PalletEvmContractHelpersError (440) */
3345 interface PalletEvmContractHelpersError extends Enum {3423 interface PalletEvmContractHelpersError extends Enum {
3346 readonly isNoPermission: boolean;3424 readonly isNoPermission: boolean;
3425 readonly isNoPendingSponsor: boolean;
3347 readonly type: 'NoPermission';3426 readonly type: 'NoPermission' | 'NoPendingSponsor';
3348 }3427 }
33493428
3350 /** @name PalletEvmMigrationError (430) */3429 /** @name PalletEvmMigrationError (441) */
3351 interface PalletEvmMigrationError extends Enum {3430 interface PalletEvmMigrationError extends Enum {
3352 readonly isAccountNotEmpty: boolean;3431 readonly isAccountNotEmpty: boolean;
3353 readonly isAccountIsNotMigrating: boolean;3432 readonly isAccountIsNotMigrating: boolean;
3354 readonly type: 'AccountNotEmpty' | 'AccountIsNotMigrating';3433 readonly type: 'AccountNotEmpty' | 'AccountIsNotMigrating';
3355 }3434 }
33563435
3357 /** @name SpRuntimeMultiSignature (432) */3436 /** @name SpRuntimeMultiSignature (443) */
3358 interface SpRuntimeMultiSignature extends Enum {3437 interface SpRuntimeMultiSignature extends Enum {
3359 readonly isEd25519: boolean;3438 readonly isEd25519: boolean;
3360 readonly asEd25519: SpCoreEd25519Signature;3439 readonly asEd25519: SpCoreEd25519Signature;
3365 readonly type: 'Ed25519' | 'Sr25519' | 'Ecdsa';3444 readonly type: 'Ed25519' | 'Sr25519' | 'Ecdsa';
3366 }3445 }
33673446
3368 /** @name SpCoreEd25519Signature (433) */3447 /** @name SpCoreEd25519Signature (444) */
3369 interface SpCoreEd25519Signature extends U8aFixed {}3448 interface SpCoreEd25519Signature extends U8aFixed {}
33703449
3371 /** @name SpCoreSr25519Signature (435) */3450 /** @name SpCoreSr25519Signature (446) */
3372 interface SpCoreSr25519Signature extends U8aFixed {}3451 interface SpCoreSr25519Signature extends U8aFixed {}
33733452
3374 /** @name SpCoreEcdsaSignature (436) */3453 /** @name SpCoreEcdsaSignature (447) */
3375 interface SpCoreEcdsaSignature extends U8aFixed {}3454 interface SpCoreEcdsaSignature extends U8aFixed {}
33763455
3377 /** @name FrameSystemExtensionsCheckSpecVersion (439) */3456 /** @name FrameSystemExtensionsCheckSpecVersion (450) */
3378 type FrameSystemExtensionsCheckSpecVersion = Null;3457 type FrameSystemExtensionsCheckSpecVersion = Null;
33793458
3380 /** @name FrameSystemExtensionsCheckGenesis (440) */3459 /** @name FrameSystemExtensionsCheckGenesis (451) */
3381 type FrameSystemExtensionsCheckGenesis = Null;3460 type FrameSystemExtensionsCheckGenesis = Null;
33823461
3383 /** @name FrameSystemExtensionsCheckNonce (443) */3462 /** @name FrameSystemExtensionsCheckNonce (454) */
3384 interface FrameSystemExtensionsCheckNonce extends Compact<u32> {}3463 interface FrameSystemExtensionsCheckNonce extends Compact<u32> {}
33853464
3386 /** @name FrameSystemExtensionsCheckWeight (444) */3465 /** @name FrameSystemExtensionsCheckWeight (455) */
3387 type FrameSystemExtensionsCheckWeight = Null;3466 type FrameSystemExtensionsCheckWeight = Null;
33883467
3389 /** @name PalletTemplateTransactionPaymentChargeTransactionPayment (445) */3468 /** @name PalletTemplateTransactionPaymentChargeTransactionPayment (456) */
3390 interface PalletTemplateTransactionPaymentChargeTransactionPayment extends Compact<u128> {}3469 interface PalletTemplateTransactionPaymentChargeTransactionPayment extends Compact<u128> {}
33913470
3392 /** @name OpalRuntimeRuntime (446) */3471 /** @name OpalRuntimeRuntime (457) */
3393 type OpalRuntimeRuntime = Null;3472 type OpalRuntimeRuntime = Null;
33943473
3395 /** @name PalletEthereumFakeTransactionFinalizer (447) */3474 /** @name PalletEthereumFakeTransactionFinalizer (458) */
3396 type PalletEthereumFakeTransactionFinalizer = Null;3475 type PalletEthereumFakeTransactionFinalizer = Null;
33973476
3398} // declare module3477} // declare module
modifiedtests/src/interfaces/types.tsdiffbeforeafterboth
2/* eslint-disable */2/* eslint-disable */
33
4export * from './unique/types';4export * from './unique/types';
5export * from './appPromotion/types';
5export * from './rmrk/types';6export * from './rmrk/types';
6export * from './default/types';7export * from './default/types';
78
modifiedtests/src/pallet-presence.test.tsdiffbeforeafterboth
68 const refungible = 'refungible';68 const refungible = 'refungible';
69 const scheduler = 'scheduler';69 const scheduler = 'scheduler';
70 const rmrkPallets = ['rmrkcore', 'rmrkequip'];70 const rmrkPallets = ['rmrkcore', 'rmrkequip'];
71 const appPromotion = 'apppromotion';
7172
72 if (chain.eq('OPAL by UNIQUE')) {73 if (chain.eq('OPAL by UNIQUE')) {
73 requiredPallets.push(refungible, scheduler, ...rmrkPallets);74 requiredPallets.push(refungible, scheduler, appPromotion, ...rmrkPallets);
74 } else if (chain.eq('QUARTZ by UNIQUE')) {75 } else if (chain.eq('QUARTZ by UNIQUE')) {
75 // Insert Quartz additional pallets here76 // Insert Quartz additional pallets here
76 } else if (chain.eq('UNIQUE')) {77 } else if (chain.eq('UNIQUE')) {
modifiedtests/src/refungible.test.tsdiffbeforeafterboth
245 section: 'common',245 section: 'common',
246 index: '0x4202',246 index: '0x4202',
247 data: [ 247 data: [
248 collection.collectionId.toString(), 248 helper.api!.createType('u32', collection.collectionId).toHuman(),
249 token.tokenId.toString(), 249 helper.api!.createType('u32', token.tokenId).toHuman(),
250 {Substrate: alice.address}, 250 {Substrate: alice.address},
251 '100',251 '100',
252 ],252 ],
265 section: 'common',265 section: 'common',
266 index: '0x4203',266 index: '0x4203',
267 data: [ 267 data: [
268 collection.collectionId.toString(), 268 helper.api!.createType('u32', collection.collectionId).toHuman(),
269 token.tokenId.toString(), 269 helper.api!.createType('u32', token.tokenId).toHuman(),
270 {Substrate: alice.address}, 270 {Substrate: alice.address},
271 '50',271 '50',
272 ],272 ],
modifiedtests/src/removeCollectionAdmin.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/substrate/substrate-api.tsdiffbeforeafterboth
25import privateKey from './privateKey';25import privateKey from './privateKey';
26import promisifySubstrate from './promisify-substrate';26import promisifySubstrate from './promisify-substrate';
27
28import {SilentConsole} from '../util/playgrounds/unique.dev';
2729
2830
2931
42 },44 },
43 rpc: {45 rpc: {
44 unique: defs.unique.rpc,46 unique: defs.unique.rpc,
47 appPromotion: defs.appPromotion.rpc,
45 rmrk: defs.rmrk.rpc,48 rmrk: defs.rmrk.rpc,
46 eth: {49 eth: {
47 feeHistory: {50 feeHistory: {
75 const api: ApiPromise = new ApiPromise(settings);78 const api: ApiPromise = new ApiPromise(settings);
76 let result: T = null as unknown as T;79 let result: T = null as unknown as T;
77
78 // TODO: Remove, this is temporary: Filter unneeded API output
79 // (Jaco promised it will be removed in the next version)
80 const consoleErr = console.error;
81 const consoleLog = console.log;
82 const consoleWarn = console.warn;
8380
84 const outFn = (printer: any) => (...args: any[]) => {81 const silentConsole = new SilentConsole();
85 for (const arg of args) {
86 if (typeof arg !== 'string')
87 continue;
88 if (arg.includes('1000:: Normal connection closure') || arg.includes('Not decorating unknown runtime apis:') || arg.includes('RPC methods not decorated:') || arg === 'Normal connection closure')
89 return;
90 }
91 printer(...args);
92 };
93
94 console.error = outFn(consoleErr.bind(console));82 silentConsole.enable();
95 console.log = outFn(consoleLog.bind(console));
96 console.warn = outFn(consoleWarn.bind(console));
9783
98 try {84 try {
99 await promisifySubstrate(api, async () => {85 await promisifySubstrate(api, async () => {
106 })();92 })();
107 } finally {93 } finally {
108 await api.disconnect();94 await api.disconnect();
109 console.error = consoleErr;95 silentConsole.disable();
110 console.log = consoleLog;
111 console.warn = consoleWarn;
112 }96 }
113 return result as T;97 return result as T;
114}98}
modifiedtests/src/util/helpers.tsdiffbeforeafterboth
17import '../interfaces/augment-api-rpc';17import '../interfaces/augment-api-rpc';
18import '../interfaces/augment-api-query';18import '../interfaces/augment-api-query';
19import {ApiPromise} from '@polkadot/api';19import {ApiPromise} from '@polkadot/api';
20import type {AccountId, EventRecord, Event} from '@polkadot/types/interfaces';20import type {AccountId, EventRecord, Event, BlockNumber} from '@polkadot/types/interfaces';
21import type {GenericEventData} from '@polkadot/types';21import type {GenericEventData} from '@polkadot/types';
22import {AnyTuple, IEvent, IKeyringPair} from '@polkadot/types/types';22import {AnyTuple, IEvent, IKeyringPair} from '@polkadot/types/types';
23import {evmToAddress} from '@polkadot/util-crypto';23import {evmToAddress} from '@polkadot/util-crypto';
24import {AnyNumber} from '@polkadot/types-codec/types';
24import BN from 'bn.js';25import BN from 'bn.js';
25import chai from 'chai';26import chai from 'chai';
26import chaiAsPromised from 'chai-as-promised';27import chaiAsPromised from 'chai-as-promised';
48 Fungible = 'fungible',49 Fungible = 'fungible',
49 NFT = 'nonfungible',50 NFT = 'nonfungible',
50 Scheduler = 'scheduler',51 Scheduler = 'scheduler',
52 AppPromotion = 'apppromotion',
51}53}
5254
53export async function isUnique(): Promise<boolean> {55export async function isUnique(): Promise<boolean> {
1781itApi.skip = (name: string, cb: (apis: { api: ApiPromise, privateKeyWrapper: (account: string) => IKeyringPair }) => any) => itApi(name, cb, {skip: true});1783itApi.skip = (name: string, cb: (apis: { api: ApiPromise, privateKeyWrapper: (account: string) => IKeyringPair }) => any) => itApi(name, cb, {skip: true});
17821784
1785
1786export async function expectSubstrateEventsAtBlock(api: ApiPromise, blockNumber: AnyNumber | BlockNumber, section: string, methods: string[], dryRun = false) {
1787 const blockHash = await api.rpc.chain.getBlockHash(blockNumber);
1788 const subEvents = (await api.query.system.events.at(blockHash))
1789 .filter(x => x.event.section === section)
1790 .map((x) => x.toHuman());
1791 const events = methods.map((m) => {
1792 return {
1793 event: {
1794 method: m,
1795 section,
1796 },
1797 };
1798 });
1799 if (!dryRun) {
1800 expect(subEvents).to.be.like(events);
1801 }
1802 return subEvents;
1803}
modifiedtests/src/util/playgrounds/index.tsdiffbeforeafterboth
2// SPDX-License-Identifier: Apache-2.02// SPDX-License-Identifier: Apache-2.0
33
4import {IKeyringPair} from '@polkadot/types/types';4import {IKeyringPair} from '@polkadot/types/types';
5import {Context} from 'mocha';
5import config from '../../config';6import config from '../../config';
6import '../../interfaces/augment-api-events';7import '../../interfaces/augment-api-events';
7import {DevUniqueHelper} from './unique.dev';8import {DevUniqueHelper, SilentLogger, SilentConsole} from './unique.dev';
89
9class SilentLogger {
10 log(msg: any, level: any): void { }
11 level = {
12 ERROR: 'ERROR' as const,
13 WARNING: 'WARNING' as const,
14 INFO: 'INFO' as const,
15 };
16}
1710
18export const usingPlaygrounds = async (code: (helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair) => Promise<void>) => {11export const usingPlaygrounds = async (code: (helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair) => Promise<void>) => {
19 // TODO: Remove, this is temporary: Filter unneeded API output
20 // (Jaco promised it will be removed in the next version)
21 const consoleErr = console.error;
22 const consoleLog = console.log;
23 const consoleWarn = console.warn;
24
25 const outFn = (printer: any) => (...args: any[]) => {12 const silentConsole = new SilentConsole();
26 for (const arg of args) {
27 if (typeof arg !== 'string')
28 continue;
29 if (arg.includes('1000:: Normal connection closure') || arg.includes('Not decorating unknown runtime apis:') || arg.includes('RPC methods not decorated:') || arg === 'Normal connection closure')
30 return;
31 }
32 printer(...args);
33 };
34
35 console.error = outFn(consoleErr.bind(console));13 silentConsole.enable();
36 console.log = outFn(consoleLog.bind(console));14
37 console.warn = outFn(consoleWarn.bind(console));
38 const helper = new DevUniqueHelper(new SilentLogger());15 const helper = new DevUniqueHelper(new SilentLogger());
3916
40 try {17 try {
45 }22 }
46 finally {23 finally {
47 await helper.disconnect();24 await helper.disconnect();
48 console.error = consoleErr;25 silentConsole.disable();
49 console.log = consoleLog;
50 console.warn = consoleWarn;
51 }26 }
52};27};
28
29export enum Pallets {
30 Inflation = 'inflation',
31 RmrkCore = 'rmrkcore',
32 RmrkEquip = 'rmrkequip',
33 ReFungible = 'refungible',
34 Fungible = 'fungible',
35 NFT = 'nonfungible',
36 Scheduler = 'scheduler',
37}
38
39export function requirePalletsOrSkip(test: Context, helper: DevUniqueHelper, requiredPallets: string[]) {
40 const missingPallets = helper.fetchMissingPalletNames(requiredPallets);
41
42 if (missingPallets.length > 0) {
43 const skipMsg = `\tSkipping test '${test.test?.title}'.\n\tThe following pallets are missing:\n\t- ${missingPallets.join('\n\t- ')}`;
44 console.warn('\x1b[38:5:208m%s\x1b[0m', skipMsg);
45 test.skip();
46 }
47}
48
49export async function itSub(name: string, cb: (apis: { helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair }) => any, opts: { only?: boolean, skip?: boolean, requiredPallets?: string[] } = {}) {
50 (opts.only ? it.only :
51 opts.skip ? it.skip : it)(name, async function () {
52 await usingPlaygrounds(async (helper, privateKey) => {
53 if (opts.requiredPallets) {
54 requirePalletsOrSkip(this, helper, opts.requiredPallets);
55 }
56
57 await cb({helper, privateKey});
58 });
59 });
60}
61itSub.only = (name: string, cb: (apis: { helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair }) => any) => itSub(name, cb, {only: true});
62itSub.skip = (name: string, cb: (apis: { helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair }) => any) => itSub(name, cb, {skip: true});
63itSub.ifWithPallets = (name: string, required: string[], cb: (apis: { helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair }) => any) => itSub(name, cb, {requiredPallets: required});
5364
modifiedtests/src/util/playgrounds/types.tsdiffbeforeafterboth
101 tokenId: number;101 tokenId: number;
102}102}
103
104export interface IBlock {
105 extrinsics: IExtrinsic[]
106 header: {
107 parentHash: string,
108 number: number,
109 };
110}
111
112export interface IExtrinsic {
113 isSigned: boolean,
114 method: {
115 method: string,
116 section: string,
117 args: any[]
118 }
119}
103120
104export interface ICollectionCreationOptions {121export interface ICollectionCreationOptions {
105 name: string | number[];122 name?: string | number[];
106 description: string | number[];123 description?: string | number[];
107 tokenPrefix: string | number[];124 tokenPrefix?: string | number[];
108 mode?: {125 mode?: {
109 nft?: null;126 nft?: null;
110 refungible?: null;127 refungible?: null;
123 tokenSymbol: string[]140 tokenSymbol: string[]
124}141}
142
143export interface ISubstrateBalance {
144 free: bigint,
145 reserved: bigint,
146 miscFrozen: bigint,
147 feeFrozen: bigint
148}
125149
126export type TSubstrateAccount = string;150export type TSubstrateAccount = string;
127export type TEthereumAccount = string;151export type TEthereumAccount = string;
modifiedtests/src/util/playgrounds/unique.dev.tsdiffbeforeafterboth
5import {UniqueHelper} from './unique';5import {UniqueHelper} from './unique';
6import {ApiPromise, WsProvider} from '@polkadot/api';6import {ApiPromise, WsProvider} from '@polkadot/api';
7import * as defs from '../../interfaces/definitions';7import * as defs from '../../interfaces/definitions';
8import {TSigner} from './types';
9import {IKeyringPair} from '@polkadot/types/types';8import {IKeyringPair} from '@polkadot/types/types';
9
10
11export class SilentLogger {
12 log(_msg: any, _level: any): void { }
13 level = {
14 ERROR: 'ERROR' as const,
15 WARNING: 'WARNING' as const,
16 INFO: 'INFO' as const,
17 };
18}
19
20export class SilentConsole {
21 // TODO: Remove, this is temporary: Filter unneeded API output
22 // (Jaco promised it will be removed in the next version)
23 consoleErr: any;
24 consoleLog: any;
25 consoleWarn: any;
26
27 constructor() {
28 this.consoleErr = console.error;
29 this.consoleLog = console.log;
30 this.consoleWarn = console.warn;
31 }
32
33 enable() {
34 const outFn = (printer: any) => (...args: any[]) => {
35 for (const arg of args) {
36 if (typeof arg !== 'string')
37 continue;
38 if (arg.includes('1000:: Normal connection closure') || arg.includes('Not decorating unknown runtime apis:') || arg.includes('RPC methods not decorated:') || arg === 'Normal connection closure')
39 return;
40 }
41 printer(...args);
42 };
43
44 console.error = outFn(this.consoleErr.bind(console));
45 console.log = outFn(this.consoleLog.bind(console));
46 console.warn = outFn(this.consoleWarn.bind(console));
47 }
48
49 disable() {
50 console.error = this.consoleErr;
51 console.log = this.consoleLog;
52 console.warn = this.consoleWarn;
53 }
54}
1055
1156
12export class DevUniqueHelper extends UniqueHelper {57export class DevUniqueHelper extends UniqueHelper {
13 /**58 /**
14 * Arrange methods for tests59 * Arrange methods for tests
15 */60 */
16 arrange: ArrangeGroup;61 arrange: ArrangeGroup;
62 wait: WaitGroup;
1763
18 constructor(logger: { log: (msg: any, level: any) => void, level: any }) {64 constructor(logger: { log: (msg: any, level: any) => void, level: any }) {
19 super(logger);65 super(logger);
20 this.arrange = new ArrangeGroup(this);66 this.arrange = new ArrangeGroup(this);
67 this.wait = new WaitGroup(this);
21 }68 }
2269
23 async connect(wsEndpoint: string, listeners?: any): Promise<void> {70 async connect(wsEndpoint: string, _listeners?: any): Promise<void> {
24 const wsProvider = new WsProvider(wsEndpoint);71 const wsProvider = new WsProvider(wsEndpoint);
25 this.api = new ApiPromise({72 this.api = new ApiPromise({
26 provider: wsProvider,73 provider: wsProvider,
36 },83 },
37 rpc: {84 rpc: {
38 unique: defs.unique.rpc,85 unique: defs.unique.rpc,
86 appPromotion: defs.appPromotion.rpc,
39 rmrk: defs.rmrk.rpc,87 rmrk: defs.rmrk.rpc,
40 eth: {88 eth: {
41 feeHistory: {89 feeHistory: {
56 }104 }
57}105}
106
107class ArrangeGroup {
108 helper: UniqueHelper;
109
110 constructor(helper: UniqueHelper) {
111 this.helper = helper;
112 }
113
114 /**
115 * Generates accounts with the specified UNQ token balance
116 * @param balances balances for generated accounts. Each balance will be multiplied by the token nominal.
117 * @param donor donor account for balances
118 * @returns array of newly created accounts
119 * @example const [acc1, acc2, acc3] = await createAccounts([0n, 10n, 20n], donor);
120 */
121 createAccounts = async (balances: bigint[], donor: IKeyringPair): Promise<IKeyringPair[]> => {
122 let nonce = await this.helper.chain.getNonce(donor.address);
123 const ss58Format = this.helper.chain.getChainProperties().ss58Format;
124 const tokenNominal = this.helper.balance.getOneTokenNominal();
125 const transactions = [];
126 const accounts: IKeyringPair[] = [];
127 for (const balance of balances) {
128 const recipient = this.helper.util.fromSeed(mnemonicGenerate(), ss58Format);
129 accounts.push(recipient);
130 if (balance !== 0n) {
131 const tx = this.helper.constructApiCall('api.tx.balances.transfer', [{Id: recipient.address}, balance * tokenNominal]);
132 transactions.push(this.helper.signTransaction(donor, tx, 'account generation', {nonce}));
133 nonce++;
134 }
135 }
136
137 await Promise.all(transactions).catch(_e => {});
138
139 //#region TODO remove this region, when nonce problem will be solved
140 const checkBalances = async () => {
141 let isSuccess = true;
142 for (let i = 0; i < balances.length; i++) {
143 const balance = await this.helper.balance.getSubstrate(accounts[i].address);
144 if (balance !== balances[i] * tokenNominal) {
145 isSuccess = false;
146 break;
147 }
148 }
149 return isSuccess;
150 };
151
152 let accountsCreated = false;
153 // checkBalances retry up to 5 blocks
154 for (let index = 0; index < 5; index++) {
155 accountsCreated = await checkBalances();
156 if(accountsCreated) break;
157
158 }
159
160 if (!accountsCreated) throw Error('Accounts generation failed');
161 //#endregion
162
163 return accounts;
164 };
165
166 // TODO combine this method and createAccounts into one
167 createCrowd = async (accountsToCreate: number, withBalance: bigint, donor: IKeyringPair): Promise<IKeyringPair[]> => {
168 const createAsManyAsCan = async () => {
169 let transactions: any = [];
170 const accounts: IKeyringPair[] = [];
171 let nonce = await this.helper.chain.getNonce(donor.address);
172 const tokenNominal = this.helper.balance.getOneTokenNominal();
173 for (let i = 0; i < accountsToCreate; i++) {
174 if (i === 500) { // if there are too many accounts to create
175 await Promise.allSettled(transactions); // wait while first 500 (should be 100 for devnode) tx will be settled
176 transactions = []; //
177 nonce = await this.helper.chain.getNonce(donor.address); // update nonce
178 }
179 const recepient = this.helper.util.fromSeed(mnemonicGenerate());
180 accounts.push(recepient);
181 if (withBalance !== 0n) {
182 const tx = this.helper.constructApiCall('api.tx.balances.transfer', [{Id: recepient.address}, withBalance * tokenNominal]);
183 transactions.push(this.helper.signTransaction(donor, tx, 'account generation', {nonce}));
184 nonce++;
185 }
186 }
187
188 const fullfilledAccounts = [];
189 await Promise.allSettled(transactions);
190 for (const account of accounts) {
191 const accountBalance = await this.helper.balance.getSubstrate(account.address);
192 if (accountBalance === withBalance * tokenNominal) {
193 fullfilledAccounts.push(account);
194 }
195 }
196 return fullfilledAccounts;
197 };
198
199
200 const crowd: IKeyringPair[] = [];
201 // do up to 5 retries
202 for (let index = 0; index < 5 && accountsToCreate !== 0; index++) {
203 const asManyAsCan = await createAsManyAsCan();
204 crowd.push(...asManyAsCan);
205 accountsToCreate -= asManyAsCan.length;
206 }
207
208 if (accountsToCreate !== 0) throw Error(`Crowd generation failed: ${accountsToCreate} accounts left`);
209
210 return crowd;
211 };
212
213 isDevNode = async () => {
214 const block1 = await this.helper.api?.rpc.chain.getBlock(await this.helper.api?.rpc.chain.getBlockHash(1));
215 const block2 = await this.helper.api?.rpc.chain.getBlock(await this.helper.api?.rpc.chain.getBlockHash(2));
216 const findCreationDate = async (block: any) => {
217 const humanBlock = block.toHuman();
218 let date;
219 humanBlock.block.extrinsics.forEach((ext: any) => {
220 if(ext.method.section === 'timestamp') {
221 date = Number(ext.method.args.now.replaceAll(',', ''));
222 }
223 });
224 return date;
225 };
226 const block1date = await findCreationDate(block1);
227 const block2date = await findCreationDate(block2);
228 if(block2date! - block1date! < 9000) return true;
229 };
230}
58231
59class ArrangeGroup {232class WaitGroup {
60 helper: UniqueHelper;233 helper: UniqueHelper;
61234
62 constructor(helper: UniqueHelper) {235 constructor(helper: UniqueHelper) {
63 this.helper = helper;236 this.helper = helper;
64 }237 }
65238
66 /**239 /**
67 * Generates accounts with the specified UNQ token balance 240 * Wait for specified bnumber of blocks
68 * @param balances balances for generated accounts. Each balance will be multiplied by the token nominal.241 * @param blocksCount number of blocks to wait
69 * @param donor donor account for balances242 * @returns
70 * @returns array of newly created accounts243 */
71 * @example const [acc1, acc2, acc3] = await createAccounts([0n, 10n, 20n], donor);
72 */
73 createAccounts = async (balances: bigint[], donor: IKeyringPair): Promise<IKeyringPair[]> => {244 async newBlocks(blocksCount = 1): Promise<void> {
74 let nonce = await this.helper.chain.getNonce(donor.address);245 // eslint-disable-next-line no-async-promise-executor
75 const tokenNominal = this.helper.balance.getOneTokenNominal();
76 const transactions = [];
77 const accounts: IKeyringPair[] = [];
78 for (const balance of balances) {
79 const recepient = this.helper.util.fromSeed(mnemonicGenerate());
80 accounts.push(recepient);
81 if (balance !== 0n) {
82 const tx = this.helper.constructApiCall('api.tx.balances.transfer', [{Id: recepient.address}, balance * tokenNominal]);
83 transactions.push(this.helper.signTransaction(donor, tx, 'account generation', {nonce}));
84 nonce++;
85 }
86 }
87
88 await Promise.all(transactions).catch(e => {});
89
90 //#region TODO remove this region, when nonce problem will be solved
91 const checkBalances = async () => {246 const promise = new Promise<void>(async (resolve) => {
92 let isSuccess = true;
93 for (let i = 0; i < balances.length; i++) {
94 const balance = await this.helper.balance.getSubstrate(accounts[i].address);247 const unsubscribe = await this.helper.api!.rpc.chain.subscribeNewHeads(() => {
95 if (balance !== balances[i] * tokenNominal) {248 if (blocksCount > 0) {
96 isSuccess = false;249 blocksCount--;
97 break;250 } else {
98 }251 unsubscribe();
99 }252 resolve();
100 return isSuccess;253 }
254 });
101 };255 });
102
103 let accountsCreated = false;
104 // checkBalances retry up to 5 blocks
105 for (let index = 0; index < 5; index++) {
106 accountsCreated = await checkBalances();
107 if(accountsCreated) break;
108 await this.waitNewBlocks(1);
109 }
110
111 if (!accountsCreated) throw Error('Accounts generation failed');
112 //#endregion
113
114 return accounts;256 return promise;
115 };257 }
116258
117 /**
118 * Wait for specified bnumber of blocks
119 * @param blocksCount number of blocks to wait
120 * @returns
121 */
122 async waitNewBlocks(blocksCount = 1): Promise<void> {259 async forParachainBlockNumber(blockNumber: bigint) {
123 const promise = new Promise<void>(async (resolve) => {260 return new Promise<void>(async (resolve) => {
124 const unsubscribe = await this.helper.api!.rpc.chain.subscribeNewHeads(() => {261 const unsubscribe = await this.helper.api!.rpc.chain.subscribeNewHeads(async (data: any) => {
125 if (blocksCount > 0) {262 if (data.number.toNumber() >= blockNumber) {
126 blocksCount--;
127 } else {
128 unsubscribe();263 unsubscribe();
129 resolve();264 resolve();
130 }265 }
131 });266 });
132 });267 });
133 return promise;
134 }268 }
269
270 async forRelayBlockNumber(blockNumber: bigint) {
271 return new Promise<void>(async (resolve) => {
272 const unsubscribe = await this.helper.api!.query.parachainSystem.validationData(async (data: any) => {
273 if (data.value.relayParentNumber.toNumber() >= blockNumber) {
274 // @ts-ignore
275 unsubscribe();
276 resolve();
277 }
278 });
279 });
280 }
135}281}
282
modifiedtests/src/util/playgrounds/unique.tsdiffbeforeafterboth
9import {ApiInterfaceEvents} from '@polkadot/api/types';9import {ApiInterfaceEvents} from '@polkadot/api/types';
10import {encodeAddress, decodeAddress, keccakAsHex, evmToAddress, addressToEvm} from '@polkadot/util-crypto';10import {encodeAddress, decodeAddress, keccakAsHex, evmToAddress, addressToEvm} from '@polkadot/util-crypto';
11import {IKeyringPair} from '@polkadot/types/types';11import {IKeyringPair} from '@polkadot/types/types';
12import {IApiListeners, IChainEvent, IChainProperties, ICollectionCreationOptions, ICollectionLimits, ICollectionPermissions, ICrossAccountId, ICrossAccountIdLower, ILogger, INestingPermissions, IProperty, IToken, ITokenPropertyPermission, ITransactionResult, IUniqueHelperLog, TApiAllowedListeners, TEthereumAccount, TSigner, TSubstrateAccount, TUniqueNetworks} from './types';12import {IApiListeners, IBlock, IChainEvent, IChainProperties, ICollectionCreationOptions, ICollectionLimits, ICollectionPermissions, ICrossAccountId, ICrossAccountIdLower, ILogger, INestingPermissions, IProperty, ISubstrateBalance, IToken, ITokenPropertyPermission, ITransactionResult, IUniqueHelperLog, TApiAllowedListeners, TEthereumAccount, TSigner, TSubstrateAccount, TUniqueNetworks} from './types';
1313
14const crossAccountIdFromLower = (lowerAddress: ICrossAccountIdLower): ICrossAccountId => {14export const crossAccountIdFromLower = (lowerAddress: ICrossAccountIdLower): ICrossAccountId => {
15 const address = {} as ICrossAccountId;15 const address = {} as ICrossAccountId;
16 if(lowerAddress.substrate) address.Substrate = lowerAddress.substrate;16 if(lowerAddress.substrate) address.Substrate = lowerAddress.substrate;
17 if(lowerAddress.ethereum) address.Ethereum = lowerAddress.ethereum;17 if(lowerAddress.ethereum) address.Ethereum = lowerAddress.ethereum;
18 return address;18 return address;
19};19};
2020
21
22const nesting = {21const nesting = {
23 toChecksumAddress(address: string): string {22 toChecksumAddress(address: string): string {
24 if (typeof address === 'undefined') return '';23 if (typeof address === 'undefined') return '';
91 return encodeAddress(decodeAddress(address), ss58Format);90 return encodeAddress(decodeAddress(address), ss58Format);
92 }91 }
9392
94 static extractCollectionIdFromCreationResult(creationResult: ITransactionResult, label = 'new collection') {93 static extractCollectionIdFromCreationResult(creationResult: ITransactionResult) {
95 if (creationResult.status !== this.transactionStatus.SUCCESS) {94 if (creationResult.status !== this.transactionStatus.SUCCESS) {
96 throw Error(`Unable to create collection for ${label}`);95 throw Error('Unable to create collection!');
97 }96 }
9897
99 let collectionId = null;98 let collectionId = null;
104 });103 });
105104
106 if (collectionId === null) {105 if (collectionId === null) {
107 throw Error(`No CollectionCreated event for ${label}`);106 throw Error('No CollectionCreated event was found!');
108 }107 }
109108
110 return collectionId;109 return collectionId;
111 }110 }
112111
113 static extractTokensFromCreationResult(creationResult: ITransactionResult, label = 'new tokens') {112 static extractTokensFromCreationResult(creationResult: ITransactionResult) {
114 if (creationResult.status !== this.transactionStatus.SUCCESS) {113 if (creationResult.status !== this.transactionStatus.SUCCESS) {
115 throw Error(`Unable to create tokens for ${label}`);114 throw Error('Unable to create tokens!');
116 }115 }
117 let success = false;116 let success = false;
118 const tokens = [] as any;117 const tokens = [] as any;
130 return {success, tokens};129 return {success, tokens};
131 }130 }
132131
133 static extractTokensFromBurnResult(burnResult: ITransactionResult, label = 'burned tokens') {132 static extractTokensFromBurnResult(burnResult: ITransactionResult) {
134 if (burnResult.status !== this.transactionStatus.SUCCESS) {133 if (burnResult.status !== this.transactionStatus.SUCCESS) {
135 throw Error(`Unable to burn tokens for ${label}`);134 throw Error('Unable to burn tokens!');
136 }135 }
137 let success = false;136 let success = false;
138 const tokens = [] as any;137 const tokens = [] as any;
150 return {success, tokens};149 return {success, tokens};
151 }150 }
152151
153 static findCollectionInEvents(events: {event: IChainEvent}[], collectionId: number, expectedSection: string, expectedMethod: string, label?: string) {152 static findCollectionInEvents(events: {event: IChainEvent}[], collectionId: number, expectedSection: string, expectedMethod: string) {
154 let eventId = null;153 let eventId = null;
155 events.forEach(({event: {data, method, section}}) => {154 events.forEach(({event: {data, method, section}}) => {
156 if ((section === expectedSection) && (method === expectedMethod)) {155 if ((section === expectedSection) && (method === expectedMethod)) {
159 });158 });
160159
161 if (eventId === null) {160 if (eventId === null) {
162 throw Error(`No ${expectedMethod} event for ${label}`);161 throw Error(`No ${expectedMethod} event was found!`);
163 }162 }
164 return eventId === collectionId;163 return eventId === collectionId;
165 }164 }
317 if(options !== null) return transaction.signAndSend(sender, options, callback);316 if(options !== null) return transaction.signAndSend(sender, options, callback);
318 return transaction.signAndSend(sender, callback);317 return transaction.signAndSend(sender, callback);
319 };318 };
319 // eslint-disable-next-line no-async-promise-executor
320 return new Promise(async (resolve, reject) => {320 return new Promise(async (resolve, reject) => {
321 try {321 try {
322 const unsub = await sign((result: any) => {322 const unsub = await sign((result: any) => {
364 return call(...params);364 return call(...params);
365 }365 }
366366
367 async executeExtrinsic(sender: TSigner, extrinsic: string, params: any[], expectSuccess=false, failureMessage='expected success') {367 async executeExtrinsic(sender: TSigner, extrinsic: string, params: any[], expectSuccess=false/*, failureMessage='expected success'*/) {
368 if(this.api === null) throw Error('API not initialized');368 if(this.api === null) throw Error('API not initialized');
369 if(!extrinsic.startsWith('api.tx.')) throw Error(`${extrinsic} is not transaction`);369 if(!extrinsic.startsWith('api.tx.')) throw Error(`${extrinsic} is not transaction`);
370370
388 type: this.chainLogType.EXTRINSIC,388 type: this.chainLogType.EXTRINSIC,
389 status: result.status,389 status: result.status,
390 call: extrinsic,390 call: extrinsic,
391 signer: this.getSignerAddress(sender),
391 params,392 params,
392 } as IUniqueHelperLog;393 } as IUniqueHelperLog;
393394
396397
397 this.chainLog.push(log);398 this.chainLog.push(log);
398399
399 if(expectSuccess && result.status !== this.transactionStatus.SUCCESS) throw Error(failureMessage);400 if(expectSuccess && result.status !== this.transactionStatus.SUCCESS) throw Error(`${result.moduleError}`);
400 return result;401 return result;
401 }402 }
402403
438 if(typeof signer === 'string') return signer;439 if(typeof signer === 'string') return signer;
439 return signer.address;440 return signer.address;
440 }441 }
442
443 fetchAllPalletNames(): string[] {
444 if(this.api === null) throw Error('API not initialized');
445 return this.api.runtimeMetadata.asLatest.pallets.map(m => m.name.toString().toLowerCase());
446 }
447
448 fetchMissingPalletNames(requiredPallets: string[]): string[] {
449 const palletNames = this.fetchAllPalletNames();
450 return requiredPallets.filter(p => !palletNames.includes(p));
451 }
441}452}
442453
443454
474 }485 }
475486
476 /**487 /**
477 * Get information about the collection with additional data, including the number of tokens it contains, its administrators, the normalized address of the collection's owner, and decoded name and description.488 * Get information about the collection with additional data,
489 * including the number of tokens it contains, its administrators,
490 * the normalized address of the collection's owner, and decoded name and description.
478 *491 *
479 * @param collectionId ID of collection492 * @param collectionId ID of collection
480 * @example await getData(2)493 * @example await getData(2)
502 collectionData[key] = this.helper.util.vec2str(humanCollection[key]);515 collectionData[key] = this.helper.util.vec2str(humanCollection[key]);
503 }516 }
504517
505 collectionData.tokensCount = (['RFT', 'NFT'].includes(humanCollection.mode)) ? await this.helper[humanCollection.mode.toLocaleLowerCase() as 'nft' | 'rft'].getLastTokenId(collectionId) : 0;518 collectionData.tokensCount = (['RFT', 'NFT'].includes(humanCollection.mode))
519 ? await this.helper[humanCollection.mode.toLocaleLowerCase() as 'nft' | 'rft'].getLastTokenId(collectionId)
520 : 0;
506 collectionData.admins = await this.getAdmins(collectionId);521 collectionData.admins = await this.getAdmins(collectionId);
507522
508 return collectionData;523 return collectionData;
509 }524 }
510525
511 /**526 /**
512 * Get the normalized addresses of the collection's administrators.527 * Get the addresses of the collection's administrators, optionally normalized.
513 *528 *
514 * @param collectionId ID of collection529 * @param collectionId ID of collection
530 * @param normalize whether to normalize the addresses to the default ss58 format
515 * @example await getAdmins(1)531 * @example await getAdmins(1)
516 * @returns array of administrators532 * @returns array of administrators
517 */533 */
518 async getAdmins(collectionId: number): Promise<ICrossAccountId[]> {534 async getAdmins(collectionId: number, normalize = false): Promise<ICrossAccountId[]> {
519 const normalized = [];535 const admins = (await this.helper.callRpc('api.rpc.unique.adminlist', [collectionId])).toHuman();
536
537 return normalize
520 for(const admin of (await this.helper.callRpc('api.rpc.unique.adminlist', [collectionId])).toHuman()) {538 ? admins.map((address: any) => {
521 if(admin.Substrate) normalized.push({Substrate: this.helper.address.normalizeSubstrate(admin.Substrate)});539 return address.Substrate
540 ? {Substrate: this.helper.address.normalizeSubstrate(address.Substrate)}
522 else normalized.push(admin);541 : address;
523 }542 })
524 return normalized;543 : admins;
525 }544 }
526545
527 /**546 /**
528 * Get the normalized addresses added to the collection allow-list.547 * Get the addresses added to the collection allow-list, optionally normalized.
529 * @param collectionId ID of collection548 * @param collectionId ID of collection
549 * @param normalize whether to normalize the addresses to the default ss58 format
530 * @example await getAllowList(1)550 * @example await getAllowList(1)
531 * @returns array of allow-listed addresses551 * @returns array of allow-listed addresses
532 */552 */
533 async getAllowList(collectionId: number): Promise<ICrossAccountId[]> {553 async getAllowList(collectionId: number, normalize = false): Promise<ICrossAccountId[]> {
534 const normalized = [];
535 const allowListed = (await this.helper.callRpc('api.rpc.unique.allowlist', [collectionId])).toHuman();554 const allowListed = (await this.helper.callRpc('api.rpc.unique.allowlist', [collectionId])).toHuman();
536 for (const address of allowListed) {555 return normalize
556 ? allowListed.map((address: any) => {
537 if (address.Substrate) normalized.push({Substrate: this.helper.address.normalizeSubstrate(address.Substrate)});557 return address.Substrate
558 ? {Substrate: this.helper.address.normalizeSubstrate(address.Substrate)}
538 else normalized.push(address);559 : address;
539 }560 })
540 return normalized;561 : allowListed;
541 }562 }
542563
543 /**564 /**
556 *577 *
557 * @param signer keyring of signer578 * @param signer keyring of signer
558 * @param collectionId ID of collection579 * @param collectionId ID of collection
559 * @param label extra label for log
560 * @example await helper.collection.burn(aliceKeyring, 3);580 * @example await helper.collection.burn(aliceKeyring, 3);
561 * @returns ```true``` if extrinsic success, otherwise ```false```581 * @returns ```true``` if extrinsic success, otherwise ```false```
562 */582 */
563 async burn(signer: TSigner, collectionId: number, label?: string): Promise<boolean> {583 async burn(signer: TSigner, collectionId: number): Promise<boolean> {
564 if(typeof label === 'undefined') label = `collection #${collectionId}`;
565 const result = await this.helper.executeExtrinsic(584 const result = await this.helper.executeExtrinsic(
566 signer,585 signer,
567 'api.tx.unique.destroyCollection', [collectionId],586 'api.tx.unique.destroyCollection', [collectionId],
568 true, `Unable to burn collection for ${label}`,587 true,
569 );588 );
570589
571 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'common', 'CollectionDestroyed', label);590 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'common', 'CollectionDestroyed');
572 }591 }
573592
574 /**593 /**
575 * Sets the sponsor for the collection (Requires the Substrate address).594 * Sets the sponsor for the collection (Requires the Substrate address). Needs confirmation by the sponsor.
576 *595 *
577 * @param signer keyring of signer596 * @param signer keyring of signer
578 * @param collectionId ID of collection597 * @param collectionId ID of collection
579 * @param sponsorAddress Sponsor substrate address598 * @param sponsorAddress Sponsor substrate address
580 * @param label extra label for log
581 * @example setSponsor(aliceKeyring, 10, "5DyN4Y92vZCjv38fg...")599 * @example setSponsor(aliceKeyring, 10, "5DyN4Y92vZCjv38fg...")
582 * @returns ```true``` if extrinsic success, otherwise ```false```600 * @returns ```true``` if extrinsic success, otherwise ```false```
583 */601 */
584 async setSponsor(signer: TSigner, collectionId: number, sponsorAddress: TSubstrateAccount, label?: string): Promise<boolean> {602 async setSponsor(signer: TSigner, collectionId: number, sponsorAddress: TSubstrateAccount): Promise<boolean> {
585 if(typeof label === 'undefined') label = `collection #${collectionId}`;
586 const result = await this.helper.executeExtrinsic(603 const result = await this.helper.executeExtrinsic(
587 signer,604 signer,
588 'api.tx.unique.setCollectionSponsor', [collectionId, sponsorAddress],605 'api.tx.unique.setCollectionSponsor', [collectionId, sponsorAddress],
589 true, `Unable to set collection sponsor for ${label}`,606 true,
590 );607 );
591608
592 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'CollectionSponsorSet', label);609 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'CollectionSponsorSet');
593 }610 }
594611
595 /**612 /**
596 * Confirms consent to sponsor the collection on behalf of the signer.613 * Confirms consent to sponsor the collection on behalf of the signer.
597 *614 *
598 * @param signer keyring of signer615 * @param signer keyring of signer
599 * @param collectionId ID of collection616 * @param collectionId ID of collection
600 * @param label extra label for log
601 * @example confirmSponsorship(aliceKeyring, 10)617 * @example confirmSponsorship(aliceKeyring, 10)
602 * @returns ```true``` if extrinsic success, otherwise ```false```618 * @returns ```true``` if extrinsic success, otherwise ```false```
603 */619 */
604 async confirmSponsorship(signer: TSigner, collectionId: number, label?: string): Promise<boolean> {620 async confirmSponsorship(signer: TSigner, collectionId: number): Promise<boolean> {
605 if(typeof label === 'undefined') label = `collection #${collectionId}`;
606 const result = await this.helper.executeExtrinsic(621 const result = await this.helper.executeExtrinsic(
607 signer,622 signer,
608 'api.tx.unique.confirmSponsorship', [collectionId],623 'api.tx.unique.confirmSponsorship', [collectionId],
609 true, `Unable to confirm collection sponsorship for ${label}`,624 true,
610 );625 );
611626
612 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'SponsorshipConfirmed', label);627 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'SponsorshipConfirmed');
613 }628 }
614629
615 /**630 /**
631 * Removes the sponsor of a collection, regardless if it consented or not.
632 *
633 * @param signer keyring of signer
634 * @param collectionId ID of collection
635 * @example removeSponsor(aliceKeyring, 10)
636 * @returns ```true``` if extrinsic success, otherwise ```false```
637 */
638 async removeSponsor(signer: TSigner, collectionId: number): Promise<boolean> {
639 const result = await this.helper.executeExtrinsic(
640 signer,
641 'api.tx.unique.removeCollectionSponsor', [collectionId],
642 true,
643 );
644
645 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'CollectionSponsorRemoved');
646 }
647
648 /**
616 * Sets the limits of the collection. At least one limit must be specified for a correct call.649 * Sets the limits of the collection. At least one limit must be specified for a correct call.
617 *650 *
618 * @param signer keyring of signer651 * @param signer keyring of signer
619 * @param collectionId ID of collection652 * @param collectionId ID of collection
620 * @param limits collection limits object653 * @param limits collection limits object
621 * @param label extra label for log
622 * @example654 * @example
623 * await setLimits(655 * await setLimits(
624 * aliceKeyring,656 * aliceKeyring,
630 * )662 * )
631 * @returns ```true``` if extrinsic success, otherwise ```false```663 * @returns ```true``` if extrinsic success, otherwise ```false```
632 */664 */
633 async setLimits(signer: TSigner, collectionId: number, limits: ICollectionLimits, label?: string): Promise<boolean> {665 async setLimits(signer: TSigner, collectionId: number, limits: ICollectionLimits): Promise<boolean> {
634 if(typeof label === 'undefined') label = `collection #${collectionId}`;
635 const result = await this.helper.executeExtrinsic(666 const result = await this.helper.executeExtrinsic(
636 signer,667 signer,
637 'api.tx.unique.setCollectionLimits', [collectionId, limits],668 'api.tx.unique.setCollectionLimits', [collectionId, limits],
638 true, `Unable to set collection limits for ${label}`,669 true,
639 );670 );
640671
641 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'CollectionLimitSet', label);672 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'CollectionLimitSet');
642 }673 }
643674
644 /**675 /**
647 * @param signer keyring of signer678 * @param signer keyring of signer
648 * @param collectionId ID of collection679 * @param collectionId ID of collection
649 * @param ownerAddress substrate address of new owner680 * @param ownerAddress substrate address of new owner
650 * @param label extra label for log
651 * @example changeOwner(aliceKeyring, 10, "5DyN4Y92vZCjv38fg...")681 * @example changeOwner(aliceKeyring, 10, "5DyN4Y92vZCjv38fg...")
652 * @returns ```true``` if extrinsic success, otherwise ```false```682 * @returns ```true``` if extrinsic success, otherwise ```false```
653 */683 */
654 async changeOwner(signer: TSigner, collectionId: number, ownerAddress: TSubstrateAccount, label?: string): Promise<boolean> {684 async changeOwner(signer: TSigner, collectionId: number, ownerAddress: TSubstrateAccount): Promise<boolean> {
655 if(typeof label === 'undefined') label = `collection #${collectionId}`;
656 const result = await this.helper.executeExtrinsic(685 const result = await this.helper.executeExtrinsic(
657 signer,686 signer,
658 'api.tx.unique.changeCollectionOwner', [collectionId, ownerAddress],687 'api.tx.unique.changeCollectionOwner', [collectionId, ownerAddress],
659 true, `Unable to change collection owner for ${label}`,688 true,
660 );689 );
661690
662 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'CollectionOwnedChanged', label);691 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'CollectionOwnedChanged');
663 }692 }
664693
665 /**694 /**
668 * @param signer keyring of signer697 * @param signer keyring of signer
669 * @param collectionId ID of collection698 * @param collectionId ID of collection
670 * @param adminAddressObj Administrator address (substrate or ethereum)699 * @param adminAddressObj Administrator address (substrate or ethereum)
671 * @param label extra label for log
672 * @example addAdmin(aliceKeyring, 10, {Substrate: "5DyN4Y92vZCjv38fg..."})700 * @example addAdmin(aliceKeyring, 10, {Substrate: "5DyN4Y92vZCjv38fg..."})
673 * @returns ```true``` if extrinsic success, otherwise ```false```701 * @returns ```true``` if extrinsic success, otherwise ```false```
674 */702 */
675 async addAdmin(signer: TSigner, collectionId: number, adminAddressObj: ICrossAccountId, label?: string): Promise<boolean> {703 async addAdmin(signer: TSigner, collectionId: number, adminAddressObj: ICrossAccountId): Promise<boolean> {
676 if(typeof label === 'undefined') label = `collection #${collectionId}`;
677 const result = await this.helper.executeExtrinsic(704 const result = await this.helper.executeExtrinsic(
678 signer,705 signer,
679 'api.tx.unique.addCollectionAdmin', [collectionId, adminAddressObj],706 'api.tx.unique.addCollectionAdmin', [collectionId, adminAddressObj],
680 true, `Unable to add collection admin for ${label}`,707 true,
681 );708 );
682709
683 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'CollectionAdminAdded', label);710 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'CollectionAdminAdded');
684 }711 }
685712
686 /**713 /**
687 * Adds an address to allow list714 * Removes a collection administrator.
715 *
688 * @param signer keyring of signer716 * @param signer keyring of signer
689 * @param collectionId ID of collection717 * @param collectionId ID of collection
690 * @param addressObj address to add to the allow list718 * @param adminAddressObj Administrator address (substrate or ethereum)
691 * @param label extra label for log719 * @example removeAdmin(aliceKeyring, 10, {Substrate: "5DyN4Y92vZCjv38fg..."})
692 * @returns ```true``` if extrinsic success, otherwise ```false```720 * @returns ```true``` if extrinsic success, otherwise ```false```
693 */721 */
694 async addToAllowList(signer: TSigner, collectionId: number, addressObj: ICrossAccountId, label?: string): Promise<boolean> {722 async removeAdmin(signer: TSigner, collectionId: number, adminAddressObj: ICrossAccountId): Promise<boolean> {
695 if(typeof label === 'undefined') label = `collection #${collectionId}`;
696 const result = await this.helper.executeExtrinsic(723 const result = await this.helper.executeExtrinsic(
697 signer,724 signer,
698 'api.tx.unique.addToAllowList', [collectionId, addressObj],725 'api.tx.unique.removeCollectionAdmin', [collectionId, adminAddressObj],
699 true, `Unable to add address to allow list for ${label}`,726 true,
700 );727 );
701728
702 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'AllowListAddressAdded');729 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'CollectionAdminRemoved');
703 }730 }
704731
705 /**732 /**
706 * Removes an address from allow list.733 * Adds an address to allow list
707 *
708 * @param signer keyring of signer734 * @param signer keyring of signer
709 * @param collectionId ID of collection735 * @param collectionId ID of collection
710 * @param addressObj address to be removed from allow list (substrate or ethereum)736 * @param addressObj address to add to the allow list
711 * @param label extra label for log
712 * @example removeFromAllowList(aliceKeyring, 10, {Substrate: "5DyN4Y92vZCjv38fg..."})
713 * @returns ```true``` if extrinsic success, otherwise ```false```737 * @returns ```true``` if extrinsic success, otherwise ```false```
714 */738 */
715 async removeFromAllowList(signer: TSigner, collectionId: number, addressObj: ICrossAccountId, label?: string): Promise<boolean> {739 async addToAllowList(signer: TSigner, collectionId: number, addressObj: ICrossAccountId): Promise<boolean> {
716 if(typeof label === 'undefined') label = `collection #${collectionId}`;
717 const result = await this.helper.executeExtrinsic(740 const result = await this.helper.executeExtrinsic(
718 signer,741 signer,
719 'api.tx.unique.removeFromAllowList', [collectionId, addressObj],742 'api.tx.unique.addToAllowList', [collectionId, addressObj],
720 true, `Unable to remove address from allow list for ${label}`,743 true,
721 );744 );
722745
723 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'AllowListAddressRemoved', label);746 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'AllowListAddressAdded');
724 }747 }
725748
726 /**749 /**
727 * Removes a collection administrator.750 * Removes an address from allow list
728 *751 *
729 * @param signer keyring of signer752 * @param signer keyring of signer
730 * @param collectionId ID of collection753 * @param collectionId ID of collection
731 * @param adminAddressObj Administrator address (substrate or ethereum)754 * @param addressObj address to remove from the allow list
732 * @param label extra label for log
733 * @example removeAdmin(aliceKeyring, 10, {Substrate: "5DyN4Y92vZCjv38fg..."})
734 * @returns ```true``` if extrinsic success, otherwise ```false```755 * @returns ```true``` if extrinsic success, otherwise ```false```
735 */756 */
736 async removeAdmin(signer: TSigner, collectionId: number, adminAddressObj: ICrossAccountId, label?: string): Promise<boolean> {757 async removeFromAllowList(signer: TSigner, collectionId: number, addressObj: ICrossAccountId): Promise<boolean> {
737 if(typeof label === 'undefined') label = `collection #${collectionId}`;
738 const result = await this.helper.executeExtrinsic(758 const result = await this.helper.executeExtrinsic(
739 signer,759 signer,
740 'api.tx.unique.removeCollectionAdmin', [collectionId, adminAddressObj],760 'api.tx.unique.removeFromAllowList', [collectionId, addressObj],
741 true, `Unable to remove collection admin for ${label}`,761 true,
742 );762 );
743763
744 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'CollectionAdminRemoved', label);764 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'AllowListAddressRemoved');
745 }765 }
746766
747 /**767 /**
750 * @param signer keyring of signer770 * @param signer keyring of signer
751 * @param collectionId ID of collection771 * @param collectionId ID of collection
752 * @param permissions collection permissions object772 * @param permissions collection permissions object
753 * @param label extra label for log
754 * @example setPermissions(aliceKeyring, 10, {access:'AllowList', mintMode: true, nesting: {collectionAdmin: true, tokenOwner: true}});773 * @example setPermissions(aliceKeyring, 10, {access:'AllowList', mintMode: true, nesting: {collectionAdmin: true, tokenOwner: true}});
755 * @returns ```true``` if extrinsic success, otherwise ```false```774 * @returns ```true``` if extrinsic success, otherwise ```false```
756 */775 */
757 async setPermissions(signer: TSigner, collectionId: number, permissions: ICollectionPermissions, label?: string): Promise<boolean> {776 async setPermissions(signer: TSigner, collectionId: number, permissions: ICollectionPermissions): Promise<boolean> {
758 if(typeof label === 'undefined') label = `collection #${collectionId}`;
759 const result = await this.helper.executeExtrinsic(777 const result = await this.helper.executeExtrinsic(
760 signer,778 signer,
761 'api.tx.unique.setCollectionPermissions', [collectionId, permissions],779 'api.tx.unique.setCollectionPermissions', [collectionId, permissions],
762 true, `Unable to set collection permissions for ${label}`,780 true,
763 );781 );
764782
765 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'CollectionPermissionSet', label);783 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'unique', 'CollectionPermissionSet');
766 }784 }
767785
768 /**786 /**
771 * @param signer keyring of signer789 * @param signer keyring of signer
772 * @param collectionId ID of collection790 * @param collectionId ID of collection
773 * @param permissions nesting permissions object791 * @param permissions nesting permissions object
774 * @param label extra label for log
775 * @example enableNesting(aliceKeyring, 10, {collectionAdmin: true, tokenOwner: true});792 * @example enableNesting(aliceKeyring, 10, {collectionAdmin: true, tokenOwner: true});
776 * @returns ```true``` if extrinsic success, otherwise ```false```793 * @returns ```true``` if extrinsic success, otherwise ```false```
777 */794 */
778 async enableNesting(signer: TSigner, collectionId: number, permissions: INestingPermissions, label?: string): Promise<boolean> {795 async enableNesting(signer: TSigner, collectionId: number, permissions: INestingPermissions): Promise<boolean> {
779 return await this.setPermissions(signer, collectionId, {nesting: permissions}, label);796 return await this.setPermissions(signer, collectionId, {nesting: permissions});
780 }797 }
781798
782 /**799 /**
783 * Disables nesting for selected collection.800 * Disables nesting for selected collection.
784 *801 *
785 * @param signer keyring of signer802 * @param signer keyring of signer
786 * @param collectionId ID of collection803 * @param collectionId ID of collection
787 * @param label extra label for log
788 * @example disableNesting(aliceKeyring, 10);804 * @example disableNesting(aliceKeyring, 10);
789 * @returns ```true``` if extrinsic success, otherwise ```false```805 * @returns ```true``` if extrinsic success, otherwise ```false```
790 */806 */
791 async disableNesting(signer: TSigner, collectionId: number, label?: string): Promise<boolean> {807 async disableNesting(signer: TSigner, collectionId: number): Promise<boolean> {
792 return await this.setPermissions(signer, collectionId, {nesting: {tokenOwner: false, collectionAdmin: false}}, label);808 return await this.setPermissions(signer, collectionId, {nesting: {tokenOwner: false, collectionAdmin: false}});
793 }809 }
794810
795 /**811 /**
798 * @param signer keyring of signer814 * @param signer keyring of signer
799 * @param collectionId ID of collection815 * @param collectionId ID of collection
800 * @param properties array of property objects816 * @param properties array of property objects
801 * @param label extra label for log
802 * @example setProperties(aliceKeyring, 10, [{key: "gender", value: "male"}]);817 * @example setProperties(aliceKeyring, 10, [{key: "gender", value: "male"}]);
803 * @returns ```true``` if extrinsic success, otherwise ```false```818 * @returns ```true``` if extrinsic success, otherwise ```false```
804 */819 */
805 async setProperties(signer: TSigner, collectionId: number, properties: IProperty[], label?: string): Promise<boolean> {820 async setProperties(signer: TSigner, collectionId: number, properties: IProperty[]): Promise<boolean> {
806 if(typeof label === 'undefined') label = `collection #${collectionId}`;
807 const result = await this.helper.executeExtrinsic(821 const result = await this.helper.executeExtrinsic(
808 signer,822 signer,
809 'api.tx.unique.setCollectionProperties', [collectionId, properties],823 'api.tx.unique.setCollectionProperties', [collectionId, properties],
810 true, `Unable to set collection properties for ${label}`,824 true,
811 );825 );
812826
813 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'common', 'CollectionPropertySet', label);827 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'common', 'CollectionPropertySet');
814 }828 }
815829
816 /**830 /**
819 * @param signer keyring of signer833 * @param signer keyring of signer
820 * @param collectionId ID of collection834 * @param collectionId ID of collection
821 * @param propertyKeys array of property keys to delete835 * @param propertyKeys array of property keys to delete
822 * @param label
823 * @example deleteProperties(aliceKeyring, 10, ["gender", "age"]);836 * @example deleteProperties(aliceKeyring, 10, ["gender", "age"]);
824 * @returns ```true``` if extrinsic success, otherwise ```false```837 * @returns ```true``` if extrinsic success, otherwise ```false```
825 */838 */
826 async deleteProperties(signer: TSigner, collectionId: number, propertyKeys: string[], label?: string): Promise<boolean> {839 async deleteProperties(signer: TSigner, collectionId: number, propertyKeys: string[]): Promise<boolean> {
827 if(typeof label === 'undefined') label = `collection #${collectionId}`;
828 const result = await this.helper.executeExtrinsic(840 const result = await this.helper.executeExtrinsic(
829 signer,841 signer,
830 'api.tx.unique.deleteCollectionProperties', [collectionId, propertyKeys],842 'api.tx.unique.deleteCollectionProperties', [collectionId, propertyKeys],
831 true, `Unable to delete collection properties for ${label}`,843 true,
832 );844 );
833845
834 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'common', 'CollectionPropertyDeleted', label);846 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'common', 'CollectionPropertyDeleted');
835 }847 }
836848
837 /**849 /**
849 const result = await this.helper.executeExtrinsic(861 const result = await this.helper.executeExtrinsic(
850 signer,862 signer,
851 'api.tx.unique.transfer', [addressObj, collectionId, tokenId, amount],863 'api.tx.unique.transfer', [addressObj, collectionId, tokenId, amount],
852 true, `Unable to transfer token #${tokenId} from collection #${collectionId}`,864 true, // `Unable to transfer token #${tokenId} from collection #${collectionId}`,
853 );865 );
854866
855 return this.helper.util.isTokenTransferSuccess(result.result.events, collectionId, tokenId, {Substrate: typeof signer === 'string' ? signer : signer.address}, addressObj, amount);867 return this.helper.util.isTokenTransferSuccess(result.result.events, collectionId, tokenId, {Substrate: typeof signer === 'string' ? signer : signer.address}, addressObj, amount);
872 const result = await this.helper.executeExtrinsic(884 const result = await this.helper.executeExtrinsic(
873 signer,885 signer,
874 'api.tx.unique.transferFrom', [fromAddressObj, toAddressObj, collectionId, tokenId, amount],886 'api.tx.unique.transferFrom', [fromAddressObj, toAddressObj, collectionId, tokenId, amount],
875 true, `Unable to transfer token #${tokenId} from collection #${collectionId}`,887 true, // `Unable to transfer token #${tokenId} from collection #${collectionId}`,
876 );888 );
877 return this.helper.util.isTokenTransferSuccess(result.result.events, collectionId, tokenId, fromAddressObj, toAddressObj, amount);889 return this.helper.util.isTokenTransferSuccess(result.result.events, collectionId, tokenId, fromAddressObj, toAddressObj, amount);
878 }890 }
884 * @param signer keyring of signer896 * @param signer keyring of signer
885 * @param collectionId ID of collection897 * @param collectionId ID of collection
886 * @param tokenId ID of token898 * @param tokenId ID of token
887 * @param label
888 * @param amount amount of tokens to be burned. For NFT must be set to 1n899 * @param amount amount of tokens to be burned. For NFT must be set to 1n
889 * @example burnToken(aliceKeyring, 10, 5);900 * @example burnToken(aliceKeyring, 10, 5);
890 * @returns ```true``` and burnt token number is extrinsic success. Otherwise ```false``` and ```null```901 * @returns ```true``` and burnt token number is extrinsic success. Otherwise ```false``` and ```null```
891 */902 */
892 async burnToken(signer: TSigner, collectionId: number, tokenId: number, label?: string, amount=1n): Promise<{903 async burnToken(signer: TSigner, collectionId: number, tokenId: number, amount=1n): Promise<{
893 success: boolean,904 success: boolean,
894 token: number | null905 token: number | null
895 }> {906 }> {
896 if(typeof label === 'undefined') label = `collection #${collectionId}`;
897 const burnResult = await this.helper.executeExtrinsic(907 const burnResult = await this.helper.executeExtrinsic(
898 signer,908 signer,
899 'api.tx.unique.burnItem', [collectionId, tokenId, amount],909 'api.tx.unique.burnItem', [collectionId, tokenId, amount],
900 true, `Unable to burn token for ${label}`,910 true, // `Unable to burn token for ${label}`,
901 );911 );
902 const burnedTokens = this.helper.util.extractTokensFromBurnResult(burnResult, label);912 const burnedTokens = this.helper.util.extractTokensFromBurnResult(burnResult);
903 if (burnedTokens.tokens.length > 1) throw Error('Burned multiple tokens');913 if (burnedTokens.tokens.length > 1) throw Error('Burned multiple tokens');
904 return {success: burnedTokens.success, token: burnedTokens.tokens.length > 0 ? burnedTokens.tokens[0] : null};914 return {success: burnedTokens.success, token: burnedTokens.tokens.length > 0 ? burnedTokens.tokens[0] : null};
905 }915 }
911 * @param collectionId ID of collection921 * @param collectionId ID of collection
912 * @param fromAddressObj address on behalf of which the token will be burnt922 * @param fromAddressObj address on behalf of which the token will be burnt
913 * @param tokenId ID of token923 * @param tokenId ID of token
914 * @param label
915 * @param amount amount of tokens to be burned. For NFT must be set to 1n924 * @param amount amount of tokens to be burned. For NFT must be set to 1n
916 * @example burnTokenFrom(aliceKeyring, 10, {Substrate: "5DyN4Y92vZCjv38fg..."}, 5, {Ethereum: "0x9F0583DbB85..."})925 * @example burnTokenFrom(aliceKeyring, 10, {Substrate: "5DyN4Y92vZCjv38fg..."}, 5, {Ethereum: "0x9F0583DbB85..."})
917 * @returns ```true``` if extrinsic success, otherwise ```false```926 * @returns ```true``` if extrinsic success, otherwise ```false```
918 */927 */
919 async burnTokenFrom(signer: TSigner, collectionId: number, fromAddressObj: ICrossAccountId, tokenId: number, label?: string, amount=1n): Promise<boolean> {928 async burnTokenFrom(signer: TSigner, collectionId: number, fromAddressObj: ICrossAccountId, tokenId: number, amount=1n): Promise<boolean> {
920 if(typeof label === 'undefined') label = `collection #${collectionId}`;
921 const burnResult = await this.helper.executeExtrinsic(929 const burnResult = await this.helper.executeExtrinsic(
922 signer,930 signer,
923 'api.tx.unique.burnFrom', [collectionId, fromAddressObj, tokenId, amount],931 'api.tx.unique.burnFrom', [collectionId, fromAddressObj, tokenId, amount],
924 true, `Unable to burn token from for ${label}`,932 true, // `Unable to burn token from for ${label}`,
925 );933 );
926 const burnedTokens = this.helper.util.extractTokensFromBurnResult(burnResult, label);934 const burnedTokens = this.helper.util.extractTokensFromBurnResult(burnResult);
927 return burnedTokens.success && burnedTokens.tokens.length > 0;935 return burnedTokens.success && burnedTokens.tokens.length > 0;
928 }936 }
929937
933 * @param signer keyring of signer941 * @param signer keyring of signer
934 * @param collectionId ID of collection942 * @param collectionId ID of collection
935 * @param tokenId ID of token943 * @param tokenId ID of token
936 * @param toAddressObj944 * @param toAddressObj Substrate or Ethereum address which gets approved use of the signer's tokens
937 * @param label
938 * @param amount amount of token to be approved. For NFT must be set to 1n945 * @param amount amount of token to be approved. For NFT must be set to 1n
939 * @returns ```true``` if extrinsic success, otherwise ```false```946 * @returns ```true``` if extrinsic success, otherwise ```false```
940 */947 */
941 async approveToken(signer: IKeyringPair, collectionId: number, tokenId: number, toAddressObj: ICrossAccountId, label?: string, amount=1n) {948 async approveToken(signer: IKeyringPair, collectionId: number, tokenId: number, toAddressObj: ICrossAccountId, amount=1n) {
942 if(typeof label === 'undefined') label = `collection #${collectionId}`;
943 const approveResult = await this.helper.executeExtrinsic(949 const approveResult = await this.helper.executeExtrinsic(
944 signer,950 signer,
945 'api.tx.unique.approve', [toAddressObj, collectionId, tokenId, amount],951 'api.tx.unique.approve', [toAddressObj, collectionId, tokenId, amount],
946 true, `Unable to approve token for ${label}`,952 true, // `Unable to approve token for ${label}`,
947 );953 );
948954
949 return this.helper.util.findCollectionInEvents(approveResult.result.events, collectionId, 'common', 'Approved', label);955 return this.helper.util.findCollectionInEvents(approveResult.result.events, collectionId, 'common', 'Approved');
950 }956 }
951957
952 /**958 /**
953 * Get the amount of token pieces approved to transfer959 * Get the amount of token pieces approved to transfer or burn. Normally 0.
960 *
954 * @param collectionId ID of collection961 * @param collectionId ID of collection
955 * @param tokenId ID of token962 * @param tokenId ID of token
956 * @param toAccountObj963 * @param toAccountObj address which is approved to use token pieces
957 * @param fromAccountObj964 * @param fromAccountObj address which may have allowed the use of its owned tokens
958 * @example getTokenApprovedPieces(10, 5, {Substrate: "5DyN4Y92vZCjv38fg..."}, {Substrate: "5ERZNF88Mm7UGfPP3mdG..."})965 * @example getTokenApprovedPieces(10, 5, {Substrate: "5DyN4Y92vZCjv38fg..."}, {Substrate: "5ERZNF88Mm7UGfPP3mdG..."})
959 * @returns number of approved to transfer pieces966 * @returns number of approved to transfer pieces
960 */967 */
963 }970 }
964971
965 /**972 /**
966 * Get the last created token id973 * Get the last created token ID in a collection
974 *
967 * @param collectionId ID of collection975 * @param collectionId ID of collection
968 * @example getLastTokenId(10);976 * @example getLastTokenId(10);
969 * @returns id of the last created token977 * @returns id of the last created token
974982
975 /**983 /**
976 * Check if token exists984 * Check if token exists
985 *
977 * @param collectionId ID of collection986 * @param collectionId ID of collection
978 * @param tokenId ID of token987 * @param tokenId ID of token
979 * @example isTokenExists(10, 20);988 * @example isTokenExists(10, 20);
9991008
1000 /**1009 /**
1001 * Get token data1010 * Get token data
1011 *
1002 * @param collectionId ID of collection1012 * @param collectionId ID of collection
1003 * @param tokenId ID of token1013 * @param tokenId ID of token
1004 * @param blockHashAt1014 * @param propertyKeys optionally filter the token properties to only these keys
1005 * @param propertyKeys1015 * @param blockHashAt optionally query the data at some block with this hash
1006 * @example getToken(10, 5);1016 * @example getToken(10, 5);
1007 * @returns human readable token data1017 * @returns human readable token data
1008 */1018 */
1009 async getToken(collectionId: number, tokenId: number, blockHashAt?: string, propertyKeys?: string[]): Promise<{1019 async getToken(collectionId: number, tokenId: number, propertyKeys: string[] = [], blockHashAt?: string): Promise<{
1010 properties: IProperty[];1020 properties: IProperty[];
1011 owner: ICrossAccountId;1021 owner: ICrossAccountId;
1012 normalizedOwner: ICrossAccountId;1022 normalizedOwner: ICrossAccountId;
1016 tokenData = await this.helper.callRpc('api.rpc.unique.tokenData', [collectionId, tokenId]);1026 tokenData = await this.helper.callRpc('api.rpc.unique.tokenData', [collectionId, tokenId]);
1017 }1027 }
1018 else {1028 else {
1019 if(typeof propertyKeys === 'undefined') {1029 if(propertyKeys.length == 0) {
1020 const collection = (await this.helper.callRpc('api.rpc.unique.collectionById', [collectionId])).toHuman();1030 const collection = (await this.helper.callRpc('api.rpc.unique.collectionById', [collectionId])).toHuman();
1021 if(!collection) return null;1031 if(!collection) return null;
1022 propertyKeys = collection.tokenPropertyPermissions.map((x: ITokenPropertyPermission) => x.key);1032 propertyKeys = collection.tokenPropertyPermissions.map((x: ITokenPropertyPermission) => x.key);
10351045
1036 /**1046 /**
1037 * Set permissions to change token properties1047 * Set permissions to change token properties
1048 *
1038 * @param signer keyring of signer1049 * @param signer keyring of signer
1039 * @param collectionId ID of collection1050 * @param collectionId ID of collection
1040 * @param permissions permissions to change a property by the collection owner or admin1051 * @param permissions permissions to change a property by the collection owner or admin
1041 * @param label
1042 * @example setTokenPropertyPermissions(1052 * @example setTokenPropertyPermissions(
1043 * aliceKeyring, 10, [{key: "gender", permission: {tokenOwner: true, mutable: true, collectionAdmin: true}}]1053 * aliceKeyring, 10, [{key: "gender", permission: {tokenOwner: true, mutable: true, collectionAdmin: true}}]
1044 * )1054 * )
1045 * @returns true if extrinsic success otherwise false1055 * @returns true if extrinsic success otherwise false
1046 */1056 */
1047 async setTokenPropertyPermissions(signer: TSigner, collectionId: number, permissions: ITokenPropertyPermission[], label?: string): Promise<boolean> {1057 async setTokenPropertyPermissions(signer: TSigner, collectionId: number, permissions: ITokenPropertyPermission[]): Promise<boolean> {
1048 if(typeof label === 'undefined') label = `collection #${collectionId}`;
1049 const result = await this.helper.executeExtrinsic(1058 const result = await this.helper.executeExtrinsic(
1050 signer,1059 signer,
1051 'api.tx.unique.setTokenPropertyPermissions', [collectionId, permissions],1060 'api.tx.unique.setTokenPropertyPermissions', [collectionId, permissions],
1052 true, `Unable to set token property permissions for ${label}`,1061 true,
1053 );1062 );
10541063
1055 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'common', 'PropertyPermissionSet', label);1064 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'common', 'PropertyPermissionSet');
1056 }1065 }
10571066
1058 /**1067 /**
1059 * Set token properties1068 * Set token properties
1069 *
1060 * @param signer keyring of signer1070 * @param signer keyring of signer
1061 * @param collectionId ID of collection1071 * @param collectionId ID of collection
1062 * @param tokenId ID of token1072 * @param tokenId ID of token
1063 * @param properties1073 * @param properties key-value pairs of metadata which to add to a token. Keys must be permitted in the collection
1064 * @param label
1065 * @example setTokenProperties(aliceKeyring, 10, 5, [{key: "gender", value: "female"}, {key: "age", value: "23"}])1074 * @example setTokenProperties(aliceKeyring, 10, 5, [{key: "gender", value: "female"}, {key: "age", value: "23"}])
1066 * @returns ```true``` if extrinsic success, otherwise ```false```1075 * @returns ```true``` if extrinsic success, otherwise ```false```
1067 */1076 */
1068 async setTokenProperties(signer: TSigner, collectionId: number, tokenId: number, properties: IProperty[], label?: string): Promise<boolean> {1077 async setTokenProperties(signer: TSigner, collectionId: number, tokenId: number, properties: IProperty[]): Promise<boolean> {
1069 if(typeof label === 'undefined') label = `token #${tokenId} from collection #${collectionId}`;
1070 const result = await this.helper.executeExtrinsic(1078 const result = await this.helper.executeExtrinsic(
1071 signer,1079 signer,
1072 'api.tx.unique.setTokenProperties', [collectionId, tokenId, properties],1080 'api.tx.unique.setTokenProperties', [collectionId, tokenId, properties],
1073 true, `Unable to set token properties for ${label}`,1081 true,
1074 );1082 );
10751083
1076 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'common', 'TokenPropertySet', label);1084 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'common', 'TokenPropertySet');
1077 }1085 }
10781086
1079 /**1087 /**
1082 * @param collectionId ID of collection1090 * @param collectionId ID of collection
1083 * @param tokenId ID of token1091 * @param tokenId ID of token
1084 * @param propertyKeys property keys to be deleted1092 * @param propertyKeys property keys to be deleted
1085 * @param label
1086 * @example deleteTokenProperties(aliceKeyring, 10, 5, ["gender", "age"])1093 * @example deleteTokenProperties(aliceKeyring, 10, 5, ["gender", "age"])
1087 * @returns ```true``` if extrinsic success, otherwise ```false```1094 * @returns ```true``` if extrinsic success, otherwise ```false```
1088 */1095 */
1089 async deleteTokenProperties(signer: TSigner, collectionId: number, tokenId: number, propertyKeys: string[], label?: string): Promise<boolean> {1096 async deleteTokenProperties(signer: TSigner, collectionId: number, tokenId: number, propertyKeys: string[]): Promise<boolean> {
1090 if(typeof label === 'undefined') label = `token #${tokenId} from collection #${collectionId}`;
1091 const result = await this.helper.executeExtrinsic(1097 const result = await this.helper.executeExtrinsic(
1092 signer,1098 signer,
1093 'api.tx.unique.deleteTokenProperties', [collectionId, tokenId, propertyKeys],1099 'api.tx.unique.deleteTokenProperties', [collectionId, tokenId, propertyKeys],
1094 true, `Unable to delete token properties for ${label}`,1100 true,
1095 );1101 );
10961102
1097 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'common', 'TokenPropertyDeleted', label);1103 return this.helper.util.findCollectionInEvents(result.result.events, collectionId, 'common', 'TokenPropertyDeleted');
1098 }1104 }
10991105
1100 /**1106 /**
1101 * Mint new collection1107 * Mint new collection
1108 *
1102 * @param signer keyring of signer1109 * @param signer keyring of signer
1103 * @param collectionOptions basic collection options and properties1110 * @param collectionOptions basic collection options and properties
1104 * @param mode NFT or RFT type of a collection1111 * @param mode NFT or RFT type of a collection
1105 * @param errorLabel
1106 * @example mintCollection(aliceKeyring, {name: 'New', description: "New collection", tokenPrefix: "NEW"}, "NFT")1112 * @example mintCollection(aliceKeyring, {name: 'New', description: "New collection", tokenPrefix: "NEW"}, "NFT")
1107 * @returns object of the created collection1113 * @returns object of the created collection
1108 */1114 */
1109 async mintCollection(signer: TSigner, collectionOptions: ICollectionCreationOptions, mode: 'NFT' | 'RFT', errorLabel = 'Unable to mint collection'): Promise<UniqueCollectionBase> {1115 async mintCollection(signer: TSigner, collectionOptions: ICollectionCreationOptions, mode: 'NFT' | 'RFT'): Promise<UniqueCollectionBase> {
1110 collectionOptions = JSON.parse(JSON.stringify(collectionOptions)) as ICollectionCreationOptions; // Clone object1116 collectionOptions = JSON.parse(JSON.stringify(collectionOptions)) as ICollectionCreationOptions; // Clone object
1111 collectionOptions.mode = (mode === 'NFT') ? {nft: null} : {refungible: null};1117 collectionOptions.mode = (mode === 'NFT') ? {nft: null} : {refungible: null};
1112 for (const key of ['name', 'description', 'tokenPrefix']) {1118 for (const key of ['name', 'description', 'tokenPrefix']) {
1115 const creationResult = await this.helper.executeExtrinsic(1121 const creationResult = await this.helper.executeExtrinsic(
1116 signer,1122 signer,
1117 'api.tx.unique.createCollectionEx', [collectionOptions],1123 'api.tx.unique.createCollectionEx', [collectionOptions],
1118 true, errorLabel,1124 true, // errorLabel,
1119 );1125 );
1120 return this.getCollectionObject(this.helper.util.extractCollectionIdFromCreationResult(creationResult, errorLabel));1126 return this.getCollectionObject(this.helper.util.extractCollectionIdFromCreationResult(creationResult));
1121 }1127 }
11221128
1123 getCollectionObject(collectionId: number): any {1129 getCollectionObject(_collectionId: number): any {
1124 return null;1130 return null;
1125 }1131 }
11261132
1127 getTokenObject(collectionId: number, tokenId: number): any {1133 getTokenObject(_collectionId: number, _tokenId: number): any {
1128 return null;1134 return null;
1129 }1135 }
1130}1136}
1156 * Get token's owner1162 * Get token's owner
1157 * @param collectionId ID of collection1163 * @param collectionId ID of collection
1158 * @param tokenId ID of token1164 * @param tokenId ID of token
1159 * @param blockHashAt1165 * @param blockHashAt optionally query the data at the block with this hash
1160 * @example getTokenOwner(10, 5);1166 * @example getTokenOwner(10, 5);
1161 * @returns Address in CrossAccountId format, e.g. {Substrate: "5DnSF6RRjwteE3BrCj..."}1167 * @returns Address in CrossAccountId format, e.g. {Substrate: "5DnSF6RRjwteE3BrCj..."}
1162 */1168 */
1238 * Get tokens nested in the provided token1244 * Get tokens nested in the provided token
1239 * @param collectionId ID of collection1245 * @param collectionId ID of collection
1240 * @param tokenId ID of token1246 * @param tokenId ID of token
1241 * @param blockHashAt1247 * @param blockHashAt optionally query the data at the block with this hash
1242 * @example getTokenChildren(10, 5);1248 * @example getTokenChildren(10, 5);
1243 * @returns tokens whose depth of nesting is <= 51249 * @returns tokens whose depth of nesting is <= 5
1244 */1250 */
1260 * @param signer keyring of signer1266 * @param signer keyring of signer
1261 * @param tokenObj token to be nested1267 * @param tokenObj token to be nested
1262 * @param rootTokenObj token to be parent1268 * @param rootTokenObj token to be parent
1263 * @param label
1264 * @example nestToken(aliceKeyring, {collectionId: 10, tokenId: 5}, {collectionId: 10, tokenId: 4});1269 * @example nestToken(aliceKeyring, {collectionId: 10, tokenId: 5}, {collectionId: 10, tokenId: 4});
1265 * @returns ```true``` if extrinsic success, otherwise ```false```1270 * @returns ```true``` if extrinsic success, otherwise ```false```
1266 */1271 */
1267 async nestToken(signer: TSigner, tokenObj: IToken, rootTokenObj: IToken, label='nest token'): Promise<boolean> {1272 async nestToken(signer: TSigner, tokenObj: IToken, rootTokenObj: IToken): Promise<boolean> {
1268 const rootTokenAddress = {Ethereum: this.helper.util.getNestingTokenAddress(rootTokenObj.collectionId, rootTokenObj.tokenId)};1273 const rootTokenAddress = {Ethereum: this.helper.util.getNestingTokenAddress(rootTokenObj.collectionId, rootTokenObj.tokenId)};
1269 const result = await this.transferToken(signer, tokenObj.collectionId, tokenObj.tokenId, rootTokenAddress);1274 const result = await this.transferToken(signer, tokenObj.collectionId, tokenObj.tokenId, rootTokenAddress);
1270 if(!result) {1275 if(!result) {
1271 throw Error(`Unable to nest token for ${label}`);1276 throw Error('Unable to nest token!');
1272 }1277 }
1273 return result;1278 return result;
1274 }1279 }
1279 * @param tokenObj token to unnest1284 * @param tokenObj token to unnest
1280 * @param rootTokenObj parent of a token1285 * @param rootTokenObj parent of a token
1281 * @param toAddressObj address of a new token owner1286 * @param toAddressObj address of a new token owner
1282 * @param label
1283 * @example unnestToken(aliceKeyring, {collectionId: 10, tokenId: 5}, {collectionId: 10, tokenId: 4}, {Substrate: "5DyN4Y92vZCjv38fg..."});1287 * @example unnestToken(aliceKeyring, {collectionId: 10, tokenId: 5}, {collectionId: 10, tokenId: 4}, {Substrate: "5DyN4Y92vZCjv38fg..."});
1284 * @returns ```true``` if extrinsic success, otherwise ```false```1288 * @returns ```true``` if extrinsic success, otherwise ```false```
1285 */1289 */
1286 async unnestToken(signer: TSigner, tokenObj: IToken, rootTokenObj: IToken, toAddressObj: ICrossAccountId, label='unnest token'): Promise<boolean> {1290 async unnestToken(signer: TSigner, tokenObj: IToken, rootTokenObj: IToken, toAddressObj: ICrossAccountId): Promise<boolean> {
1287 const rootTokenAddress = {Ethereum: this.helper.util.getNestingTokenAddress(rootTokenObj.collectionId, rootTokenObj.tokenId)};1291 const rootTokenAddress = {Ethereum: this.helper.util.getNestingTokenAddress(rootTokenObj.collectionId, rootTokenObj.tokenId)};
1288 const result = await this.transferTokenFrom(signer, tokenObj.collectionId, tokenObj.tokenId, rootTokenAddress, toAddressObj);1292 const result = await this.transferTokenFrom(signer, tokenObj.collectionId, tokenObj.tokenId, rootTokenAddress, toAddressObj);
1289 if(!result) {1293 if(!result) {
1290 throw Error(`Unable to unnest token for ${label}`);1294 throw Error('Unable to unnest token!');
1291 }1295 }
1292 return result;1296 return result;
1293 }1297 }
1296 * Mint new collection1300 * Mint new collection
1297 * @param signer keyring of signer1301 * @param signer keyring of signer
1298 * @param collectionOptions Collection options1302 * @param collectionOptions Collection options
1299 * @param label
1300 * @example1303 * @example
1301 * mintCollection(aliceKeyring, {1304 * mintCollection(aliceKeyring, {
1302 * name: 'New',1305 * name: 'New',
1305 * })1308 * })
1306 * @returns object of the created collection1309 * @returns object of the created collection
1307 */1310 */
1308 async mintCollection(signer: TSigner, collectionOptions: ICollectionCreationOptions, label = 'new collection'): Promise<UniqueNFTCollection> {1311 async mintCollection(signer: TSigner, collectionOptions: ICollectionCreationOptions): Promise<UniqueNFTCollection> {
1309 return await super.mintCollection(signer, collectionOptions, 'NFT', `Unable to mint NFT collection for ${label}`) as UniqueNFTCollection;1312 return await super.mintCollection(signer, collectionOptions, 'NFT') as UniqueNFTCollection;
1310 }1313 }
13111314
1312 /**1315 /**
1313 * Mint new token1316 * Mint new token
1314 * @param signer keyring of signer1317 * @param signer keyring of signer
1315 * @param data token data1318 * @param data token data
1316 * @param label
1317 * @returns created token object1319 * @returns created token object
1318 */1320 */
1319 async mintToken(signer: TSigner, data: { collectionId: number; owner: ICrossAccountId | string; properties?: IProperty[]; }, label?: string): Promise<UniqueNFTToken> {1321 async mintToken(signer: TSigner, data: { collectionId: number; owner: ICrossAccountId | string; properties?: IProperty[]; }): Promise<UniqueNFTToken> {
1320 if(typeof label === 'undefined') label = `collection #${data.collectionId}`;
1321 const creationResult = await this.helper.executeExtrinsic(1322 const creationResult = await this.helper.executeExtrinsic(
1322 signer,1323 signer,
1323 'api.tx.unique.createItem', [data.collectionId, (typeof data.owner === 'string') ? {Substrate: data.owner} : data.owner, {1324 'api.tx.unique.createItem', [data.collectionId, (typeof data.owner === 'string') ? {Substrate: data.owner} : data.owner, {
1324 nft: {1325 nft: {
1325 properties: data.properties,1326 properties: data.properties,
1326 },1327 },
1327 }],1328 }],
1328 true, `Unable to mint NFT token for ${label}`,1329 true,
1329 );1330 );
1330 const createdTokens = this.helper.util.extractTokensFromCreationResult(creationResult, label);1331 const createdTokens = this.helper.util.extractTokensFromCreationResult(creationResult);
1331 if (createdTokens.tokens.length > 1) throw Error('Minted multiple tokens');1332 if (createdTokens.tokens.length > 1) throw Error('Minted multiple tokens');
1332 if (createdTokens.tokens.length < 1) throw Error('No tokens minted');1333 if (createdTokens.tokens.length < 1) throw Error('No tokens minted');
1333 return this.getTokenObject(data.collectionId, createdTokens.tokens[0].tokenId);1334 return this.getTokenObject(data.collectionId, createdTokens.tokens[0].tokenId);
1338 * @param signer keyring of signer1339 * @param signer keyring of signer
1339 * @param collectionId ID of collection1340 * @param collectionId ID of collection
1340 * @param tokens array of tokens with owner and properties1341 * @param tokens array of tokens with owner and properties
1341 * @param label
1342 * @example1342 * @example
1343 * mintMultipleTokens(aliceKeyring, 10, [{1343 * mintMultipleTokens(aliceKeyring, 10, [{
1344 * owner: {Substrate: "5DyN4Y92vZCjv38fg..."},1344 * owner: {Substrate: "5DyN4Y92vZCjv38fg..."},
1349 * }]);1349 * }]);
1350 * @returns ```true``` if extrinsic success, otherwise ```false```1350 * @returns ```true``` if extrinsic success, otherwise ```false```
1351 */1351 */
1352 async mintMultipleTokens(signer: TSigner, collectionId: number, tokens: {owner: ICrossAccountId, properties?: IProperty[]}[], label?: string): Promise<UniqueNFTToken[]> {1352 async mintMultipleTokens(signer: TSigner, collectionId: number, tokens: {owner: ICrossAccountId, properties?: IProperty[]}[]): Promise<UniqueNFTToken[]> {
1353 if(typeof label === 'undefined') label = `collection #${collectionId}`;
1354 const creationResult = await this.helper.executeExtrinsic(1353 const creationResult = await this.helper.executeExtrinsic(
1355 signer,1354 signer,
1356 'api.tx.unique.createMultipleItemsEx', [collectionId, {NFT: tokens}],1355 'api.tx.unique.createMultipleItemsEx', [collectionId, {NFT: tokens}],
1357 true, `Unable to mint NFT tokens for ${label}`,1356 true,
1358 );1357 );
1359 const collection = this.getCollectionObject(collectionId);1358 const collection = this.getCollectionObject(collectionId);
1360 return this.helper.util.extractTokensFromCreationResult(creationResult, label).tokens.map((x: IToken) => collection.getTokenObject(x.tokenId));1359 return this.helper.util.extractTokensFromCreationResult(creationResult).tokens.map((x: IToken) => collection.getTokenObject(x.tokenId));
1361 }1360 }
13621361
1363 /**1362 /**
1366 * @param collectionId ID of collection1365 * @param collectionId ID of collection
1367 * @param owner tokens owner1366 * @param owner tokens owner
1368 * @param tokens array of tokens with owner and properties1367 * @param tokens array of tokens with owner and properties
1369 * @param label
1370 * @example1368 * @example
1371 * mintMultipleTokensWithOneOwner(aliceKeyring, 10, "5DyN4Y92vZCjv38fg...", [{1369 * mintMultipleTokensWithOneOwner(aliceKeyring, 10, "5DyN4Y92vZCjv38fg...", [{
1372 * properties: [{1370 * properties: [{
1379 * }]);1377 * }]);
1380 * @returns array of newly created tokens1378 * @returns array of newly created tokens
1381 */1379 */
1382 async mintMultipleTokensWithOneOwner(signer: TSigner, collectionId: number, owner: ICrossAccountId, tokens: {properties?: IProperty[]}[], label?: string): Promise<UniqueNFTToken[]> {1380 async mintMultipleTokensWithOneOwner(signer: TSigner, collectionId: number, owner: ICrossAccountId, tokens: {properties?: IProperty[]}[]): Promise<UniqueNFTToken[]> {
1383 if(typeof label === 'undefined') label = `collection #${collectionId}`;
1384 const rawTokens = [];1381 const rawTokens = [];
1385 for (const token of tokens) {1382 for (const token of tokens) {
1386 const raw = {NFT: {properties: token.properties}};1383 const raw = {NFT: {properties: token.properties}};
1389 const creationResult = await this.helper.executeExtrinsic(1386 const creationResult = await this.helper.executeExtrinsic(
1390 signer,1387 signer,
1391 'api.tx.unique.createMultipleItems', [collectionId, owner, rawTokens],1388 'api.tx.unique.createMultipleItems', [collectionId, owner, rawTokens],
1392 true, `Unable to mint NFT tokens for ${label}`,1389 true,
1393 );1390 );
1394 const collection = this.getCollectionObject(collectionId);1391 const collection = this.getCollectionObject(collectionId);
1395 return this.helper.util.extractTokensFromCreationResult(creationResult, label).tokens.map((x: IToken) => collection.getTokenObject(x.tokenId));1392 return this.helper.util.extractTokensFromCreationResult(creationResult).tokens.map((x: IToken) => collection.getTokenObject(x.tokenId));
1396 }1393 }
13971394
1398 /**1395 /**
1399 * Destroys a concrete instance of NFT.
1400 * @param signer keyring of signer
1401 * @param collectionId ID of collection
1402 * @param tokenId ID of token
1403 * @param label
1404 * @example burnToken(aliceKeyring, 10, 5);
1405 * @returns ```true``` and burnt token number is extrinsic success. Otherwise ```false``` and ```null```
1406 */
1407 async burnToken(signer: IKeyringPair, collectionId: number, tokenId: number, label?: string): Promise<{ success: boolean; token: number | null; }> {
1408 return await super.burnToken(signer, collectionId, tokenId, label, 1n);
1409 }
1410
1411 /**
1412 * Set, change, or remove approved address to transfer the ownership of the NFT.1396 * Set, change, or remove approved address to transfer the ownership of the NFT.
1413 *1397 *
1414 * @param signer keyring of signer1398 * @param signer keyring of signer
1415 * @param collectionId ID of collection1399 * @param collectionId ID of collection
1416 * @param tokenId ID of token1400 * @param tokenId ID of token
1417 * @param toAddressObj address to approve1401 * @param toAddressObj address to approve
1418 * @param label
1419 * @example approveToken(aliceKeyring, 10, 5, {Substrate: "5DyN4Y92vZCjv38fg..."})1402 * @example approveToken(aliceKeyring, 10, 5, {Substrate: "5DyN4Y92vZCjv38fg..."})
1420 * @returns ```true``` if extrinsic success, otherwise ```false```1403 * @returns ```true``` if extrinsic success, otherwise ```false```
1421 */1404 */
1422 async approveToken(signer: IKeyringPair, collectionId: number, tokenId: number, toAddressObj: ICrossAccountId, label?: string, amount=1n) {1405 async approveToken(signer: IKeyringPair, collectionId: number, tokenId: number, toAddressObj: ICrossAccountId) {
1423 return super.approveToken(signer, collectionId, tokenId, toAddressObj, label, amount);1406 return super.approveToken(signer, collectionId, tokenId, toAddressObj, 1n);
1424 }1407 }
1425}1408}
14261409
1480 * @example transferTokenFrom(aliceKeyring, 10, 5, {Substrate: "5DyN4Y92vZCjv38fg..."}, 2000n)1463 * @example transferTokenFrom(aliceKeyring, 10, 5, {Substrate: "5DyN4Y92vZCjv38fg..."}, 2000n)
1481 * @returns ```true``` if extrinsic success, otherwise ```false```1464 * @returns ```true``` if extrinsic success, otherwise ```false```
1482 */1465 */
1483 async transferToken(signer: TSigner, collectionId: number, tokenId: number, addressObj: ICrossAccountId, amount=100n): Promise<boolean> {1466 async transferToken(signer: TSigner, collectionId: number, tokenId: number, addressObj: ICrossAccountId, amount=1n): Promise<boolean> {
1484 return await super.transferToken(signer, collectionId, tokenId, addressObj, amount);1467 return await super.transferToken(signer, collectionId, tokenId, addressObj, amount);
1485 }1468 }
14861469
1495 * @example transferTokenFrom(aliceKeyring, 10, 5, {Substrate: "5DyN4Y92vZCjv38fg..."}, {Substrate: "5DfhbVfww7ThF8q6f3i..."}, 2000n)1478 * @example transferTokenFrom(aliceKeyring, 10, 5, {Substrate: "5DyN4Y92vZCjv38fg..."}, {Substrate: "5DfhbVfww7ThF8q6f3i..."}, 2000n)
1496 * @returns ```true``` if extrinsic success, otherwise ```false```1479 * @returns ```true``` if extrinsic success, otherwise ```false```
1497 */1480 */
1498 async transferTokenFrom(signer: TSigner, collectionId: number, tokenId: number, fromAddressObj: ICrossAccountId, toAddressObj: ICrossAccountId, amount=100n): Promise<boolean> {1481 async transferTokenFrom(signer: TSigner, collectionId: number, tokenId: number, fromAddressObj: ICrossAccountId, toAddressObj: ICrossAccountId, amount=1n): Promise<boolean> {
1499 return await super.transferTokenFrom(signer, collectionId, tokenId, fromAddressObj, toAddressObj, amount);1482 return await super.transferTokenFrom(signer, collectionId, tokenId, fromAddressObj, toAddressObj, amount);
1500 }1483 }
15011484
1502 /**1485 /**
1503 * Mint new collection1486 * Mint new collection
1504 * @param signer keyring of signer1487 * @param signer keyring of signer
1505 * @param collectionOptions Collection options1488 * @param collectionOptions Collection options
1506 * @param label
1507 * @example1489 * @example
1508 * mintCollection(aliceKeyring, {1490 * mintCollection(aliceKeyring, {
1509 * name: 'New',1491 * name: 'New',
1512 * })1494 * })
1513 * @returns object of the created collection1495 * @returns object of the created collection
1514 */1496 */
1515 async mintCollection(signer: TSigner, collectionOptions: ICollectionCreationOptions, label = 'new collection'): Promise<UniqueRFTCollection> {1497 async mintCollection(signer: TSigner, collectionOptions: ICollectionCreationOptions): Promise<UniqueRFTCollection> {
1516 return await super.mintCollection(signer, collectionOptions, 'RFT', `Unable to mint RFT collection for ${label}`) as UniqueRFTCollection;1498 return await super.mintCollection(signer, collectionOptions, 'RFT') as UniqueRFTCollection;
1517 }1499 }
15181500
1519 /**1501 /**
1520 * Mint new token1502 * Mint new token
1521 * @param signer keyring of signer1503 * @param signer keyring of signer
1522 * @param data token data1504 * @param data token data
1523 * @param label
1524 * @example mintToken(aliceKeyring, {collectionId: 10, owner: {Substrate: '5GHoZe9c73RYbVzq...'}, pieces: 10000n});1505 * @example mintToken(aliceKeyring, {collectionId: 10, owner: {Substrate: '5GHoZe9c73RYbVzq...'}, pieces: 10000n});
1525 * @returns created token object1506 * @returns created token object
1526 */1507 */
1527 async mintToken(signer: TSigner, data: { collectionId: number; owner: ICrossAccountId | string; pieces: bigint; properties?: IProperty[]; }, label?: string): Promise<UniqueRFTToken> {1508 async mintToken(signer: TSigner, data: { collectionId: number; owner: ICrossAccountId | string; pieces: bigint; properties?: IProperty[]; }): Promise<UniqueRFTToken> {
1528 if(typeof label === 'undefined') label = `collection #${data.collectionId}`;
1529 const creationResult = await this.helper.executeExtrinsic(1509 const creationResult = await this.helper.executeExtrinsic(
1530 signer,1510 signer,
1531 'api.tx.unique.createItem', [data.collectionId, (typeof data.owner === 'string') ? {Substrate: data.owner} : data.owner, {1511 'api.tx.unique.createItem', [data.collectionId, (typeof data.owner === 'string') ? {Substrate: data.owner} : data.owner, {
1534 properties: data.properties,1514 properties: data.properties,
1535 },1515 },
1536 }],1516 }],
1537 true, `Unable to mint RFT token for ${label}`,1517 true,
1538 );1518 );
1539 const createdTokens = this.helper.util.extractTokensFromCreationResult(creationResult, label);1519 const createdTokens = this.helper.util.extractTokensFromCreationResult(creationResult);
1540 if (createdTokens.tokens.length > 1) throw Error('Minted multiple tokens');1520 if (createdTokens.tokens.length > 1) throw Error('Minted multiple tokens');
1541 if (createdTokens.tokens.length < 1) throw Error('No tokens minted');1521 if (createdTokens.tokens.length < 1) throw Error('No tokens minted');
1542 return this.getTokenObject(data.collectionId, createdTokens.tokens[0].tokenId);1522 return this.getTokenObject(data.collectionId, createdTokens.tokens[0].tokenId);
1543 }1523 }
15441524
1545 async mintMultipleTokens(signer: TSigner, collectionId: number, tokens: {owner: ICrossAccountId, pieces: bigint, properties?: IProperty[]}[], label?: string): Promise<UniqueRFTToken[]> {1525 async mintMultipleTokens(signer: TSigner, collectionId: number, tokens: {owner: ICrossAccountId, pieces: bigint, properties?: IProperty[]}[]): Promise<UniqueRFTToken[]> {
1546 throw Error('Not implemented');1526 throw Error('Not implemented');
1547 if(typeof label === 'undefined') label = `collection #${collectionId}`;
1548 const creationResult = await this.helper.executeExtrinsic(1527 const creationResult = await this.helper.executeExtrinsic(
1549 signer,1528 signer,
1550 'api.tx.unique.createMultipleItemsEx', [collectionId, {RefungibleMultipleOwners: tokens}],1529 'api.tx.unique.createMultipleItemsEx', [collectionId, {RefungibleMultipleOwners: tokens}],
1551 true, `Unable to mint RFT tokens for ${label}`,1530 true, // `Unable to mint RFT tokens for ${label}`,
1552 );1531 );
1553 const collection = this.getCollectionObject(collectionId);1532 const collection = this.getCollectionObject(collectionId);
1554 return this.helper.util.extractTokensFromCreationResult(creationResult, label).tokens.map((x: IToken) => collection.getTokenObject(x.tokenId));1533 return this.helper.util.extractTokensFromCreationResult(creationResult).tokens.map((x: IToken) => collection.getTokenObject(x.tokenId));
1555 }1534 }
15561535
1557 /**1536 /**
1560 * @param collectionId ID of collection1539 * @param collectionId ID of collection
1561 * @param owner tokens owner1540 * @param owner tokens owner
1562 * @param tokens array of tokens with properties and pieces1541 * @param tokens array of tokens with properties and pieces
1563 * @param label
1564 * @example mintMultipleTokensWithOneOwner(aliceKeyring, 10, {Substrate: "5GHoZe9c73RYbVzq..."}, [{pieces: 100000n, properties: [{key: "gender", value: "male"}]}]);1542 * @example mintMultipleTokensWithOneOwner(aliceKeyring, 10, {Substrate: "5GHoZe9c73RYbVzq..."}, [{pieces: 100000n, properties: [{key: "gender", value: "male"}]}]);
1565 * @returns array of newly created RFT tokens1543 * @returns array of newly created RFT tokens
1566 */1544 */
1567 async mintMultipleTokensWithOneOwner(signer: TSigner, collectionId: number, owner: ICrossAccountId, tokens: {pieces: bigint, properties?: IProperty[]}[], label?: string): Promise<UniqueRFTToken[]> {1545 async mintMultipleTokensWithOneOwner(signer: TSigner, collectionId: number, owner: ICrossAccountId, tokens: {pieces: bigint, properties?: IProperty[]}[]): Promise<UniqueRFTToken[]> {
1568 if(typeof label === 'undefined') label = `collection #${collectionId}`;
1569 const rawTokens = [];1546 const rawTokens = [];
1570 for (const token of tokens) {1547 for (const token of tokens) {
1571 const raw = {ReFungible: {pieces: token.pieces, properties: token.properties}};1548 const raw = {ReFungible: {pieces: token.pieces, properties: token.properties}};
1574 const creationResult = await this.helper.executeExtrinsic(1551 const creationResult = await this.helper.executeExtrinsic(
1575 signer,1552 signer,
1576 'api.tx.unique.createMultipleItems', [collectionId, owner, rawTokens],1553 'api.tx.unique.createMultipleItems', [collectionId, owner, rawTokens],
1577 true, `Unable to mint RFT tokens for ${label}`,1554 true,
1578 );1555 );
1579 const collection = this.getCollectionObject(collectionId);1556 const collection = this.getCollectionObject(collectionId);
1580 return this.helper.util.extractTokensFromCreationResult(creationResult, label).tokens.map((x: IToken) => collection.getTokenObject(x.tokenId));1557 return this.helper.util.extractTokensFromCreationResult(creationResult).tokens.map((x: IToken) => collection.getTokenObject(x.tokenId));
1581 }1558 }
15821559
1583 /**1560 /**
1584 * Destroys a concrete instance of RFT.1561 * Destroys a concrete instance of RFT.
1585 * @param signer keyring of signer1562 * @param signer keyring of signer
1586 * @param collectionId ID of collection1563 * @param collectionId ID of collection
1587 * @param tokenId ID of token1564 * @param tokenId ID of token
1588 * @param label
1589 * @param amount number of pieces to be burnt1565 * @param amount number of pieces to be burnt
1590 * @example burnToken(aliceKeyring, 10, 5);1566 * @example burnToken(aliceKeyring, 10, 5);
1591 * @returns ```true``` and burnt token number is extrinsic success. Otherwise ```false``` and ```null```1567 * @returns ```true``` and burnt token number is extrinsic success. Otherwise ```false``` and ```null```
1592 */1568 */
1593 async burnToken(signer: IKeyringPair, collectionId: number, tokenId: number, label?: string, amount=100n): Promise<{ success: boolean; token: number | null; }> {1569 async burnToken(signer: IKeyringPair, collectionId: number, tokenId: number, amount=1n): Promise<{ success: boolean; token: number | null; }> {
1594 return await super.burnToken(signer, collectionId, tokenId, label, amount);1570 return await super.burnToken(signer, collectionId, tokenId, amount);
1595 }1571 }
15961572
1597 /**1573 /**
1601 * @param collectionId ID of collection1577 * @param collectionId ID of collection
1602 * @param tokenId ID of token1578 * @param tokenId ID of token
1603 * @param toAddressObj address to approve1579 * @param toAddressObj address to approve
1604 * @param label
1605 * @param amount number of pieces to be approved1580 * @param amount number of pieces to be approved
1606 * @example approveToken(aliceKeyring, 10, 5, {Substrate: "5GHoZe9c73RYbVzq..."}, "", 10000n);1581 * @example approveToken(aliceKeyring, 10, 5, {Substrate: "5GHoZe9c73RYbVzq..."}, "", 10000n);
1607 * @returns true if the token success, otherwise false1582 * @returns true if the token success, otherwise false
1608 */1583 */
1609 async approveToken(signer: IKeyringPair, collectionId: number, tokenId: number, toAddressObj: ICrossAccountId, label?: string, amount=100n) {1584 async approveToken(signer: IKeyringPair, collectionId: number, tokenId: number, toAddressObj: ICrossAccountId, amount=1n) {
1610 return super.approveToken(signer, collectionId, tokenId, toAddressObj, label, amount);1585 return super.approveToken(signer, collectionId, tokenId, toAddressObj, amount);
1611 }1586 }
16121587
1613 /**1588 /**
1627 * @param collectionId ID of collection1602 * @param collectionId ID of collection
1628 * @param tokenId ID of token1603 * @param tokenId ID of token
1629 * @param amount new number of pieces1604 * @param amount new number of pieces
1630 * @param label
1631 * @example repartitionToken(aliceKeyring, 10, 5, 12345n);1605 * @example repartitionToken(aliceKeyring, 10, 5, 12345n);
1632 * @returns true if the repartion was success, otherwise false1606 * @returns true if the repartion was success, otherwise false
1633 */1607 */
1634 async repartitionToken(signer: TSigner, collectionId: number, tokenId: number, amount: bigint, label?: string): Promise<boolean> {1608 async repartitionToken(signer: TSigner, collectionId: number, tokenId: number, amount: bigint): Promise<boolean> {
1635 if(typeof label === 'undefined') label = `collection #${collectionId}`;
1636 const currentAmount = await this.getTokenTotalPieces(collectionId, tokenId);1609 const currentAmount = await this.getTokenTotalPieces(collectionId, tokenId);
1637 const repartitionResult = await this.helper.executeExtrinsic(1610 const repartitionResult = await this.helper.executeExtrinsic(
1638 signer,1611 signer,
1639 'api.tx.unique.repartition', [collectionId, tokenId, amount],1612 'api.tx.unique.repartition', [collectionId, tokenId, amount],
1640 true, `Unable to repartition RFT token for ${label}`,1613 true,
1641 );1614 );
1642 if(currentAmount < amount) return this.helper.util.findCollectionInEvents(repartitionResult.result.events, collectionId, 'common', 'ItemCreated', label);1615 if(currentAmount < amount) return this.helper.util.findCollectionInEvents(repartitionResult.result.events, collectionId, 'common', 'ItemCreated');
1643 return this.helper.util.findCollectionInEvents(repartitionResult.result.events, collectionId, 'common', 'ItemDestroyed', label);1616 return this.helper.util.findCollectionInEvents(repartitionResult.result.events, collectionId, 'common', 'ItemDestroyed');
1644 }1617 }
1645}1618}
16461619
1661 * @param signer keyring of signer1634 * @param signer keyring of signer
1662 * @param collectionOptions Collection options1635 * @param collectionOptions Collection options
1663 * @param decimalPoints number of token decimals1636 * @param decimalPoints number of token decimals
1664 * @param errorLabel
1665 * @example1637 * @example
1666 * mintCollection(aliceKeyring, {1638 * mintCollection(aliceKeyring, {
1667 * name: 'New',1639 * name: 'New',
1670 * }, 18)1642 * }, 18)
1671 * @returns newly created fungible collection1643 * @returns newly created fungible collection
1672 */1644 */
1673 async mintCollection(signer: TSigner, collectionOptions: ICollectionCreationOptions, decimalPoints = 0, errorLabel = 'Unable to mint collection'): Promise<UniqueFTCollection> {1645 async mintCollection(signer: TSigner, collectionOptions: ICollectionCreationOptions, decimalPoints = 0): Promise<UniqueFTCollection> {
1674 collectionOptions = JSON.parse(JSON.stringify(collectionOptions)) as ICollectionCreationOptions; // Clone object1646 collectionOptions = JSON.parse(JSON.stringify(collectionOptions)) as ICollectionCreationOptions; // Clone object
1675 if(collectionOptions.tokenPropertyPermissions) throw Error('Fungible collections has no tokenPropertyPermissions');1647 if(collectionOptions.tokenPropertyPermissions) throw Error('Fungible collections has no tokenPropertyPermissions');
1676 collectionOptions.mode = {fungible: decimalPoints};1648 collectionOptions.mode = {fungible: decimalPoints};
1680 const creationResult = await this.helper.executeExtrinsic(1652 const creationResult = await this.helper.executeExtrinsic(
1681 signer,1653 signer,
1682 'api.tx.unique.createCollectionEx', [collectionOptions],1654 'api.tx.unique.createCollectionEx', [collectionOptions],
1683 true, errorLabel,1655 true,
1684 );1656 );
1685 return this.getCollectionObject(this.helper.util.extractCollectionIdFromCreationResult(creationResult, errorLabel));1657 return this.getCollectionObject(this.helper.util.extractCollectionIdFromCreationResult(creationResult));
1686 }1658 }
16871659
1688 /**1660 /**
1691 * @param collectionId ID of collection1663 * @param collectionId ID of collection
1692 * @param owner address owner of new tokens1664 * @param owner address owner of new tokens
1693 * @param amount amount of tokens to be meanted1665 * @param amount amount of tokens to be meanted
1694 * @param label
1695 * @example mintTokens(aliceKeyring, 10, {Substrate: "5GHoZe9c73RYbVzq"}, 1000n);1666 * @example mintTokens(aliceKeyring, 10, {Substrate: "5GHoZe9c73RYbVzq"}, 1000n);
1696 * @returns ```true``` if extrinsic success, otherwise ```false```1667 * @returns ```true``` if extrinsic success, otherwise ```false```
1697 */1668 */
1698 async mintTokens(signer: TSigner, collectionId: number, owner: ICrossAccountId | string, amount: bigint, label?: string): Promise<boolean> {1669 async mintTokens(signer: TSigner, collectionId: number, owner: ICrossAccountId | string, amount: bigint): Promise<boolean> {
1699 if(typeof label === 'undefined') label = `collection #${collectionId}`;
1700 const creationResult = await this.helper.executeExtrinsic(1670 const creationResult = await this.helper.executeExtrinsic(
1701 signer,1671 signer,
1702 'api.tx.unique.createItem', [collectionId, (typeof owner === 'string') ? {Substrate: owner} : owner, {1672 'api.tx.unique.createItem', [collectionId, (typeof owner === 'string') ? {Substrate: owner} : owner, {
1703 fungible: {1673 fungible: {
1704 value: amount,1674 value: amount,
1705 },1675 },
1706 }],1676 }],
1707 true, `Unable to mint fungible tokens for ${label}`,1677 true, // `Unable to mint fungible tokens for ${label}`,
1708 );1678 );
1709 return this.helper.util.findCollectionInEvents(creationResult.result.events, collectionId, 'common', 'ItemCreated', label);1679 return this.helper.util.findCollectionInEvents(creationResult.result.events, collectionId, 'common', 'ItemCreated');
1710 }1680 }
17111681
1712 /**1682 /**
1715 * @param collectionId ID of collection1685 * @param collectionId ID of collection
1716 * @param owner tokens owner1686 * @param owner tokens owner
1717 * @param tokens array of tokens with properties and pieces1687 * @param tokens array of tokens with properties and pieces
1718 * @param label
1719 * @returns ```true``` if extrinsic success, otherwise ```false```1688 * @returns ```true``` if extrinsic success, otherwise ```false```
1720 */1689 */
1721 async mintMultipleTokensWithOneOwner(signer: TSigner, collectionId: number, owner: ICrossAccountId, tokens: {value: bigint}[], label?: string): Promise<boolean> {1690 async mintMultipleTokensWithOneOwner(signer: TSigner, collectionId: number, owner: ICrossAccountId, tokens: {value: bigint}[]): Promise<boolean> {
1722 if(typeof label === 'undefined') label = `collection #${collectionId}`;
1723 const rawTokens = [];1691 const rawTokens = [];
1724 for (const token of tokens) {1692 for (const token of tokens) {
1725 const raw = {Fungible: {Value: token.value}};1693 const raw = {Fungible: {Value: token.value}};
1728 const creationResult = await this.helper.executeExtrinsic(1696 const creationResult = await this.helper.executeExtrinsic(
1729 signer,1697 signer,
1730 'api.tx.unique.createMultipleItems', [collectionId, owner, rawTokens],1698 'api.tx.unique.createMultipleItems', [collectionId, owner, rawTokens],
1731 true, `Unable to mint RFT tokens for ${label}`,1699 true,
1732 );1700 );
1733 return this.helper.util.findCollectionInEvents(creationResult.result.events, collectionId, 'common', 'ItemCreated', label);1701 return this.helper.util.findCollectionInEvents(creationResult.result.events, collectionId, 'common', 'ItemCreated');
1734 }1702 }
17351703
1736 /**1704 /**
1758 * Transfer tokens to address1726 * Transfer tokens to address
1759 * @param signer keyring of signer1727 * @param signer keyring of signer
1760 * @param collectionId ID of collection1728 * @param collectionId ID of collection
1761 * @param toAddressObj address recepient1729 * @param toAddressObj address recipient
1762 * @param amount amount of tokens to be sent1730 * @param amount amount of tokens to be sent
1763 * @example transfer(aliceKeyring, 10, {Substrate: "5GHoZe9c73RYbVzq..."}, 1000n);1731 * @example transfer(aliceKeyring, 10, {Substrate: "5GHoZe9c73RYbVzq..."}, 1000n);
1764 * @returns ```true``` if extrinsic success, otherwise ```false```1732 * @returns ```true``` if extrinsic success, otherwise ```false```
1765 */1733 */
1766 async transfer(signer: TSigner, collectionId: number, toAddressObj: ICrossAccountId, amount: bigint) {1734 async transfer(signer: TSigner, collectionId: number, toAddressObj: ICrossAccountId, amount=1n) {
1767 return await super.transferToken(signer, collectionId, 0, toAddressObj, amount);1735 return await super.transferToken(signer, collectionId, 0, toAddressObj, amount);
1768 }1736 }
17691737
1777 * @example transferFrom(aliceKeyring, 10, {Substrate: "5GHoZe9c73RYbVzq..."}, {Substrate: "5DfhbVfww7ThF8q6f3ij..."}, 10000n);1745 * @example transferFrom(aliceKeyring, 10, {Substrate: "5GHoZe9c73RYbVzq..."}, {Substrate: "5DfhbVfww7ThF8q6f3ij..."}, 10000n);
1778 * @returns ```true``` if extrinsic success, otherwise ```false```1746 * @returns ```true``` if extrinsic success, otherwise ```false```
1779 */1747 */
1780 async transferFrom(signer: TSigner, collectionId: number, fromAddressObj: ICrossAccountId, toAddressObj: ICrossAccountId, amount: bigint) {1748 async transferFrom(signer: TSigner, collectionId: number, fromAddressObj: ICrossAccountId, toAddressObj: ICrossAccountId, amount=1n) {
1781 return await super.transferTokenFrom(signer, collectionId, 0, fromAddressObj, toAddressObj, amount);1749 return await super.transferTokenFrom(signer, collectionId, 0, fromAddressObj, toAddressObj, amount);
1782 }1750 }
17831751
1786 * @param signer keyring of signer1754 * @param signer keyring of signer
1787 * @param collectionId ID of collection1755 * @param collectionId ID of collection
1788 * @param amount amount of tokens to be destroyed1756 * @param amount amount of tokens to be destroyed
1789 * @param label
1790 * @example burnTokens(aliceKeyring, 10, 1000n);1757 * @example burnTokens(aliceKeyring, 10, 1000n);
1791 * @returns ```true``` if extrinsic success, otherwise ```false```1758 * @returns ```true``` if extrinsic success, otherwise ```false```
1792 */1759 */
1793 async burnTokens(signer: IKeyringPair, collectionId: number, amount=100n, label?: string): Promise<boolean> {1760 async burnTokens(signer: IKeyringPair, collectionId: number, amount=1n): Promise<boolean> {
1794 return (await super.burnToken(signer, collectionId, 0, label, amount)).success;1761 return (await super.burnToken(signer, collectionId, 0, amount)).success;
1795 }1762 }
17961763
1797 /**1764 /**
1800 * @param collectionId ID of collection1767 * @param collectionId ID of collection
1801 * @param fromAddressObj address on behalf of which tokens will be burnt1768 * @param fromAddressObj address on behalf of which tokens will be burnt
1802 * @param amount amount of tokens to be burnt1769 * @param amount amount of tokens to be burnt
1803 * @param label
1804 * @example burnTokensFrom(aliceKeyring, 10, {Substrate: "5GHoZe9c73RYbVzq..."}, 1000n);1770 * @example burnTokensFrom(aliceKeyring, 10, {Substrate: "5GHoZe9c73RYbVzq..."}, 1000n);
1805 * @returns ```true``` if extrinsic success, otherwise ```false```1771 * @returns ```true``` if extrinsic success, otherwise ```false```
1806 */1772 */
1807 async burnTokensFrom(signer: IKeyringPair, collectionId: number, fromAddressObj: ICrossAccountId, amount=100n, label?: string): Promise<boolean> {1773 async burnTokensFrom(signer: IKeyringPair, collectionId: number, fromAddressObj: ICrossAccountId, amount=1n): Promise<boolean> {
1808 return await super.burnTokenFrom(signer, collectionId, fromAddressObj, 0, label, amount);1774 return await super.burnTokenFrom(signer, collectionId, fromAddressObj, 0, amount);
1809 }1775 }
18101776
1811 /**1777 /**
1824 * @param collectionId ID of collection1790 * @param collectionId ID of collection
1825 * @param toAddressObj address to be approved1791 * @param toAddressObj address to be approved
1826 * @param amount amount of tokens to be approved1792 * @param amount amount of tokens to be approved
1827 * @param label
1828 * @example approveTokens(aliceKeyring, 10, {Substrate: "5GHoZe9c73RYbVzq..."}, 1000n)1793 * @example approveTokens(aliceKeyring, 10, {Substrate: "5GHoZe9c73RYbVzq..."}, 1000n)
1829 * @returns ```true``` if extrinsic success, otherwise ```false```1794 * @returns ```true``` if extrinsic success, otherwise ```false```
1830 */1795 */
1831 async approveTokens(signer: IKeyringPair, collectionId: number, toAddressObj: ICrossAccountId, amount=100n, label?: string) {1796 async approveTokens(signer: IKeyringPair, collectionId: number, toAddressObj: ICrossAccountId, amount=1n) {
1832 return super.approveToken(signer, collectionId, 0, toAddressObj, label, amount);1797 return super.approveToken(signer, collectionId, 0, toAddressObj, amount);
1833 }1798 }
18341799
1835 /**1800 /**
1881 return blockHash;1846 return blockHash;
1882 }1847 }
18831848
1849 // TODO add docs
1850 async getBlock(blockHashOrNumber: string | number): Promise<IBlock | null> {
1851 const blockHash = typeof blockHashOrNumber === 'string' ? blockHashOrNumber : await this.getBlockHashByNumber(blockHashOrNumber);
1852 if (!blockHash) return null;
1853 return (await this.helper.callRpc('api.rpc.chain.getBlock', [blockHash])).toHuman().block;
1854 }
1855
1884 /**1856 /**
1885 * Get account nonce1857 * Get account nonce
1886 * @param address substrate address1858 * @param address substrate address
1915 }1887 }
19161888
1917 /**1889 /**
1890 * Get full substrate balance including free, miscFrozen, feeFrozen, and reserved
1891 * @param address substrate address
1892 * @returns
1893 */
1894 async getSubstrateFull(address: TSubstrateAccount): Promise<ISubstrateBalance> {
1895 const accountInfo = (await this.helper.callRpc('api.query.system.account', [address])).data;
1896 return {free: accountInfo.free.toBigInt(), miscFrozen: accountInfo.miscFrozen.toBigInt(), feeFrozen: accountInfo.feeFrozen.toBigInt(), reserved: accountInfo.reserved.toBigInt()};
1897 }
1898
1899 /**
1918 * Get ethereum address balance1900 * Get ethereum address balance
1919 * @param address ethereum address1901 * @param address ethereum address
1920 * @example getEthereum("0x9F0583DbB855d...")1902 * @example getEthereum("0x9F0583DbB855d...")
1927 /**1909 /**
1928 * Transfer tokens to substrate address1910 * Transfer tokens to substrate address
1929 * @param signer keyring of signer1911 * @param signer keyring of signer
1930 * @param address substrate address of a recepient1912 * @param address substrate address of a recipient
1931 * @param amount amount of tokens to be transfered1913 * @param amount amount of tokens to be transfered
1932 * @example transferToSubstrate(aliceKeyring, "5GrwvaEF5zXb26Fz...", 100_000_000_000n);1914 * @example transferToSubstrate(aliceKeyring, "5GrwvaEF5zXb26Fz...", 100_000_000_000n);
1933 * @returns ```true``` if extrinsic success, otherwise ```false```1915 * @returns ```true``` if extrinsic success, otherwise ```false```
1934 */1916 */
1935 async transferToSubstrate(signer: TSigner, address: TSubstrateAccount, amount: bigint | string): Promise<boolean> {1917 async transferToSubstrate(signer: TSigner, address: TSubstrateAccount, amount: bigint | string): Promise<boolean> {
1936 const result = await this.helper.executeExtrinsic(signer, 'api.tx.balances.transfer', [address, amount], true, `Unable to transfer balance from ${this.helper.getSignerAddress(signer)} to ${address}`);1918 const result = await this.helper.executeExtrinsic(signer, 'api.tx.balances.transfer', [address, amount], true/*, `Unable to transfer balance from ${this.helper.getSignerAddress(signer)} to ${address}`*/);
19371919
1938 let transfer = {from: null, to: null, amount: 0n} as any;1920 let transfer = {from: null, to: null, amount: 0n} as any;
1939 result.result.events.forEach(({event: {data, method, section}}) => {1921 result.result.events.forEach(({event: {data, method, section}}) => {
2000 }1982 }
2001}1983}
20021984
1985class StakingGroup extends HelperGroup {
1986 /**
1987 * Stake tokens for App Promotion
1988 * @param signer keyring of signer
1989 * @param amountToStake amount of tokens to stake
1990 * @param label extra label for log
1991 * @returns
1992 */
1993 async stake(signer: TSigner, amountToStake: bigint, label?: string): Promise<boolean> {
1994 if(typeof label === 'undefined') label = `${signer.address} amount: ${amountToStake}`;
1995 const stakeResult = await this.helper.executeExtrinsic(
1996 signer, 'api.tx.appPromotion.stake',
1997 [amountToStake], true,
1998 );
1999 // TODO extract info from stakeResult
2000 return true;
2001 }
20032002
2003 /**
2004 * Unstake tokens for App Promotion
2005 * @param signer keyring of signer
2006 * @param amountToUnstake amount of tokens to unstake
2007 * @param label extra label for log
2008 * @returns block number where balances will be unlocked
2009 */
2010 async unstake(signer: TSigner, label?: string): Promise<number> {
2011 if(typeof label === 'undefined') label = `${signer.address}`;
2012 const unstakeResult = await this.helper.executeExtrinsic(
2013 signer, 'api.tx.appPromotion.unstake',
2014 [], true,
2015 );
2016 // TODO extract block number fron events
2017 return 1;
2018 }
2019
2020 async getTotalStaked(address?: ICrossAccountId): Promise<bigint> {
2021 if (address) return (await this.helper.callRpc('api.rpc.appPromotion.totalStaked', [address])).toBigInt();
2022 return (await this.helper.callRpc('api.rpc.appPromotion.totalStaked')).toBigInt();
2023 }
2024
2025 async getTotalStakedPerBlock(address: ICrossAccountId): Promise<bigint[][]> {
2026 return (await this.helper.callRpc('api.rpc.appPromotion.totalStakedPerBlock', [address])).map(([block, amount]: any[]) => [block.toBigInt(), amount.toBigInt()]);
2027 }
2028
2029 async getPendingUnstake(address: ICrossAccountId): Promise<bigint> {
2030 return (await this.helper.callRpc('api.rpc.appPromotion.pendingUnstake', [address])).toBigInt();
2031 }
2032
2033 async getPendingUnstakePerBlock(address: ICrossAccountId): Promise<bigint[][]> {
2034 return (await this.helper.callRpc('api.rpc.appPromotion.pendingUnstakePerBlock', [address])).map(([block, amount]: any[]) => [block.toBigInt(), amount.toBigInt()]);
2035 }
2036}
2037
2004export class UniqueHelper extends ChainHelperBase {2038export class UniqueHelper extends ChainHelperBase {
2005 chain: ChainGroup;2039 chain: ChainGroup;
2006 balance: BalanceGroup;2040 balance: BalanceGroup;
2009 nft: NFTGroup;2043 nft: NFTGroup;
2010 rft: RFTGroup;2044 rft: RFTGroup;
2011 ft: FTGroup;2045 ft: FTGroup;
2046 staking: StakingGroup;
20122047
2013 constructor(logger?: ILogger) {2048 constructor(logger?: ILogger) {
2014 super(logger);2049 super(logger);
2019 this.nft = new NFTGroup(this);2054 this.nft = new NFTGroup(this);
2020 this.rft = new RFTGroup(this);2055 this.rft = new RFTGroup(this);
2021 this.ft = new FTGroup(this);2056 this.ft = new FTGroup(this);
2057 this.staking = new StakingGroup(this);
2022 }2058 }
2023}2059}
20242060
20542090
2055 async getEffectiveLimits() {2091 async getEffectiveLimits() {
2056 return await this.helper.collection.getEffectiveLimits(this.collectionId);2092 return await this.helper.collection.getEffectiveLimits(this.collectionId);
2093 }
2094
2095 async setSponsor(signer: TSigner, sponsorAddress: TSubstrateAccount) {
2096 return await this.helper.collection.setSponsor(signer, this.collectionId, sponsorAddress);
2097 }
2098
2099 async confirmSponsorship(signer: TSigner) {
2100 return await this.helper.collection.confirmSponsorship(signer, this.collectionId);
2057 }2101 }
20582102
2059 async setSponsor(signer: TSigner, sponsorAddress: TSubstrateAccount, label?: string) {2103 async removeSponsor(signer: TSigner) {
2060 return await this.helper.collection.setSponsor(signer, this.collectionId, sponsorAddress, label);2104 return await this.helper.collection.removeSponsor(signer, this.collectionId);
2061 }2105 }
20622106
2063 async confirmSponsorship(signer: TSigner, label?: string) {2107 async setLimits(signer: TSigner, limits: ICollectionLimits) {
2064 return await this.helper.collection.confirmSponsorship(signer, this.collectionId, label);2108 return await this.helper.collection.setLimits(signer, this.collectionId, limits);
2065 }2109 }
20662110
2067 async setLimits(signer: TSigner, limits: ICollectionLimits, label?: string) {2111 async changeOwner(signer: TSigner, ownerAddress: TSubstrateAccount) {
2068 return await this.helper.collection.setLimits(signer, this.collectionId, limits, label);2112 return await this.helper.collection.changeOwner(signer, this.collectionId, ownerAddress);
2069 }2113 }
20702114
2071 async changeOwner(signer: TSigner, ownerAddress: TSubstrateAccount, label?: string) {2115 async addAdmin(signer: TSigner, adminAddressObj: ICrossAccountId) {
2072 return await this.helper.collection.changeOwner(signer, this.collectionId, ownerAddress, label);2116 return await this.helper.collection.addAdmin(signer, this.collectionId, adminAddressObj);
2073 }2117 }
20742118
2075 async addAdmin(signer: TSigner, adminAddressObj: ICrossAccountId, label?: string) {2119 async enableCertainPermissions(signer: TSigner, accessMode: 'AllowList' | 'Normal' | undefined = 'AllowList', mintMode: boolean | undefined = true) {
2076 return await this.helper.collection.addAdmin(signer, this.collectionId, adminAddressObj, label);2120 return await this.setPermissions(signer, {access: accessMode, mintMode: mintMode});
2077 }2121 }
20782122
2079 async addToAllowList(signer: TSigner, addressObj: ICrossAccountId, label?: string) {2123 async addToAllowList(signer: TSigner, addressObj: ICrossAccountId) {
2080 return await this.helper.collection.addToAllowList(signer, this.collectionId, addressObj, label);2124 return await this.helper.collection.addToAllowList(signer, this.collectionId, addressObj);
2081 }2125 }
20822126
2083 async removeFromAllowList(signer: TSigner, addressObj: ICrossAccountId, label?: string) {2127 async removeFromAllowList(signer: TSigner, addressObj: ICrossAccountId) {
2084 return await this.helper.collection.removeFromAllowList(signer, this.collectionId, addressObj, label);2128 return await this.helper.collection.removeFromAllowList(signer, this.collectionId, addressObj);
2085 }2129 }
20862130
2087 async removeAdmin(signer: TSigner, adminAddressObj: ICrossAccountId, label?: string) {2131 async removeAdmin(signer: TSigner, adminAddressObj: ICrossAccountId) {
2088 return await this.helper.collection.removeAdmin(signer, this.collectionId, adminAddressObj, label);2132 return await this.helper.collection.removeAdmin(signer, this.collectionId, adminAddressObj);
2089 }2133 }
20902134
2091 async setProperties(signer: TSigner, properties: IProperty[], label?: string) {2135 async setProperties(signer: TSigner, properties: IProperty[]) {
2092 return await this.helper.collection.setProperties(signer, this.collectionId, properties, label);2136 return await this.helper.collection.setProperties(signer, this.collectionId, properties);
2093 }2137 }
20942138
2095 async deleteProperties(signer: TSigner, propertyKeys: string[], label?: string) {2139 async deleteProperties(signer: TSigner, propertyKeys: string[]) {
2096 return await this.helper.collection.deleteProperties(signer, this.collectionId, propertyKeys, label);2140 return await this.helper.collection.deleteProperties(signer, this.collectionId, propertyKeys);
2097 }2141 }
20982142
2099 async getTokenNextSponsored(tokenId: number, addressObj: ICrossAccountId) {2143 async getTokenNextSponsored(tokenId: number, addressObj: ICrossAccountId) {
2100 return await this.helper.collection.getTokenNextSponsored(this.collectionId, tokenId, addressObj);2144 return await this.helper.collection.getTokenNextSponsored(this.collectionId, tokenId, addressObj);
2101 }2145 }
21022146
2103 async setPermissions(signer: TSigner, permissions: ICollectionPermissions, label?: string) {2147 async setPermissions(signer: TSigner, permissions: ICollectionPermissions) {
2104 return await this.helper.collection.setPermissions(signer, this.collectionId, permissions, label);2148 return await this.helper.collection.setPermissions(signer, this.collectionId, permissions);
2105 }2149 }
21062150
2107 async enableNesting(signer: TSigner, permissions: INestingPermissions, label?: string) {2151 async enableNesting(signer: TSigner, permissions: INestingPermissions) {
2108 return await this.helper.collection.enableNesting(signer, this.collectionId, permissions, label);2152 return await this.helper.collection.enableNesting(signer, this.collectionId, permissions);
2109 }2153 }
21102154
2111 async disableNesting(signer: TSigner, label?: string) {2155 async disableNesting(signer: TSigner) {
2112 return await this.helper.collection.disableNesting(signer, this.collectionId, label);2156 return await this.helper.collection.disableNesting(signer, this.collectionId);
2113 }2157 }
21142158
2115 async burn(signer: TSigner, label?: string) {2159 async burn(signer: TSigner) {
2116 return await this.helper.collection.burn(signer, this.collectionId, label);2160 return await this.helper.collection.burn(signer, this.collectionId);
2117 }2161 }
2118}2162}
21192163
2128 }2172 }
21292173
2130 async getToken(tokenId: number, blockHashAt?: string) {2174 async getToken(tokenId: number, blockHashAt?: string) {
2131 return await this.helper.nft.getToken(this.collectionId, tokenId, blockHashAt);2175 return await this.helper.nft.getToken(this.collectionId, tokenId, [], blockHashAt);
2132 }2176 }
21332177
2134 async getTokenOwner(tokenId: number, blockHashAt?: string) {2178 async getTokenOwner(tokenId: number, blockHashAt?: string) {
2151 return await this.helper.nft.transferTokenFrom(signer, this.collectionId, tokenId, fromAddressObj, toAddressObj);2195 return await this.helper.nft.transferTokenFrom(signer, this.collectionId, tokenId, fromAddressObj, toAddressObj);
2152 }2196 }
21532197
2154 async approveToken(signer: TSigner, tokenId: number, toAddressObj: ICrossAccountId, label?: string) {2198 async approveToken(signer: TSigner, tokenId: number, toAddressObj: ICrossAccountId) {
2155 return await this.helper.nft.approveToken(signer, this.collectionId, tokenId, toAddressObj, label);2199 return await this.helper.nft.approveToken(signer, this.collectionId, tokenId, toAddressObj);
2156 }2200 }
21572201
2158 async isTokenApproved(tokenId: number, toAddressObj: ICrossAccountId) {2202 async isTokenApproved(tokenId: number, toAddressObj: ICrossAccountId) {
2159 return await this.helper.nft.isTokenApproved(this.collectionId, tokenId, toAddressObj);2203 return await this.helper.nft.isTokenApproved(this.collectionId, tokenId, toAddressObj);
2160 }2204 }
21612205
2162 async mintToken(signer: TSigner, owner: ICrossAccountId, properties?: IProperty[], label?: string) {2206 async mintToken(signer: TSigner, owner: ICrossAccountId, properties?: IProperty[]) {
2163 return await this.helper.nft.mintToken(signer, {collectionId: this.collectionId, owner, properties}, label);2207 return await this.helper.nft.mintToken(signer, {collectionId: this.collectionId, owner, properties});
2164 }2208 }
21652209
2166 async mintMultipleTokens(signer: TSigner, tokens: {owner: ICrossAccountId, properties?: IProperty[]}[], label?: string) {2210 async mintMultipleTokens(signer: TSigner, tokens: {owner: ICrossAccountId, properties?: IProperty[]}[]) {
2167 return await this.helper.nft.mintMultipleTokens(signer, this.collectionId, tokens, label);2211 return await this.helper.nft.mintMultipleTokens(signer, this.collectionId, tokens);
2168 }2212 }
21692213
2170 async burnToken(signer: TSigner, tokenId: number, label?: string) {2214 async burnToken(signer: TSigner, tokenId: number) {
2171 return await this.helper.nft.burnToken(signer, this.collectionId, tokenId, label);2215 return await this.helper.nft.burnToken(signer, this.collectionId, tokenId);
2172 }2216 }
21732217
2174 async setTokenProperties(signer: TSigner, tokenId: number, properties: IProperty[], label?: string) {2218 async setTokenProperties(signer: TSigner, tokenId: number, properties: IProperty[]) {
2175 return await this.helper.nft.setTokenProperties(signer, this.collectionId, tokenId, properties, label);2219 return await this.helper.nft.setTokenProperties(signer, this.collectionId, tokenId, properties);
2176 }2220 }
21772221
2178 async deleteTokenProperties(signer: TSigner, tokenId: number, propertyKeys: string[], label?: string) {2222 async deleteTokenProperties(signer: TSigner, tokenId: number, propertyKeys: string[]) {
2179 return await this.helper.nft.deleteTokenProperties(signer, this.collectionId, tokenId, propertyKeys, label);2223 return await this.helper.nft.deleteTokenProperties(signer, this.collectionId, tokenId, propertyKeys);
2180 }2224 }
21812225
2182 async setTokenPropertyPermissions(signer: TSigner, permissions: ITokenPropertyPermission[], label?: string) {2226 async setTokenPropertyPermissions(signer: TSigner, permissions: ITokenPropertyPermission[]) {
2183 return await this.helper.nft.setTokenPropertyPermissions(signer, this.collectionId, permissions, label);2227 return await this.helper.nft.setTokenPropertyPermissions(signer, this.collectionId, permissions);
2184 }2228 }
21852229
2186 async nestToken(signer: TSigner, tokenId: number, toTokenObj: IToken, label?: string) {2230 async nestToken(signer: TSigner, tokenId: number, toTokenObj: IToken) {
2187 return await this.helper.nft.nestToken(signer, {collectionId: this.collectionId, tokenId}, toTokenObj, label);2231 return await this.helper.nft.nestToken(signer, {collectionId: this.collectionId, tokenId}, toTokenObj);
2188 }2232 }
21892233
2190 async unnestToken(signer: TSigner, tokenId: number, fromTokenObj: IToken, toAddressObj: ICrossAccountId, label?: string) {2234 async unnestToken(signer: TSigner, tokenId: number, fromTokenObj: IToken, toAddressObj: ICrossAccountId) {
2191 return await this.helper.nft.unnestToken(signer, {collectionId: this.collectionId, tokenId}, fromTokenObj, toAddressObj, label);2235 return await this.helper.nft.unnestToken(signer, {collectionId: this.collectionId, tokenId}, fromTokenObj, toAddressObj);
2192 }2236 }
2193}2237}
21942238
2214 return await this.helper.rft.getTokenTotalPieces(this.collectionId, tokenId);2258 return await this.helper.rft.getTokenTotalPieces(this.collectionId, tokenId);
2215 }2259 }
22162260
2217 async transferToken(signer: TSigner, tokenId: number, addressObj: ICrossAccountId, amount=100n) {2261 async transferToken(signer: TSigner, tokenId: number, addressObj: ICrossAccountId, amount=1n) {
2218 return await this.helper.rft.transferToken(signer, this.collectionId, tokenId, addressObj, amount);2262 return await this.helper.rft.transferToken(signer, this.collectionId, tokenId, addressObj, amount);
2219 }2263 }
22202264
2221 async transferTokenFrom(signer: TSigner, tokenId: number, fromAddressObj: ICrossAccountId, toAddressObj: ICrossAccountId, amount=100n) {2265 async transferTokenFrom(signer: TSigner, tokenId: number, fromAddressObj: ICrossAccountId, toAddressObj: ICrossAccountId, amount=1n) {
2222 return await this.helper.rft.transferTokenFrom(signer, this.collectionId, tokenId, fromAddressObj, toAddressObj, amount);2266 return await this.helper.rft.transferTokenFrom(signer, this.collectionId, tokenId, fromAddressObj, toAddressObj, amount);
2223 }2267 }
22242268
2225 async approveToken(signer: TSigner, tokenId: number, toAddressObj: ICrossAccountId, amount=100n, label?: string) {2269 async approveToken(signer: TSigner, tokenId: number, toAddressObj: ICrossAccountId, amount=1n) {
2226 return await this.helper.rft.approveToken(signer, this.collectionId, tokenId, toAddressObj, label, amount);2270 return await this.helper.rft.approveToken(signer, this.collectionId, tokenId, toAddressObj, amount);
2227 }2271 }
22282272
2229 async getTokenApprovedPieces(tokenId: number, fromAddressObj: ICrossAccountId, toAddressObj: ICrossAccountId) {2273 async getTokenApprovedPieces(tokenId: number, fromAddressObj: ICrossAccountId, toAddressObj: ICrossAccountId) {
2230 return await this.helper.rft.getTokenApprovedPieces(this.collectionId, tokenId, toAddressObj, fromAddressObj);2274 return await this.helper.rft.getTokenApprovedPieces(this.collectionId, tokenId, toAddressObj, fromAddressObj);
2231 }2275 }
22322276
2233 async repartitionToken(signer: TSigner, tokenId: number, amount: bigint, label?: string) {2277 async repartitionToken(signer: TSigner, tokenId: number, amount: bigint) {
2234 return await this.helper.rft.repartitionToken(signer, this.collectionId, tokenId, amount, label);2278 return await this.helper.rft.repartitionToken(signer, this.collectionId, tokenId, amount);
2235 }2279 }
22362280
2237 async mintToken(signer: TSigner, owner: ICrossAccountId, pieces=100n, properties?: IProperty[], label?: string) {2281 async mintToken(signer: TSigner, owner: ICrossAccountId, pieces=100n, properties?: IProperty[]) {
2238 return await this.helper.rft.mintToken(signer, {collectionId: this.collectionId, owner, pieces, properties}, label);2282 return await this.helper.rft.mintToken(signer, {collectionId: this.collectionId, owner, pieces, properties});
2239 }2283 }
22402284
2241 async mintMultipleTokens(signer: TSigner, tokens: {owner: ICrossAccountId, pieces: bigint, properties?: IProperty[]}[], label?: string) {2285 async mintMultipleTokens(signer: TSigner, tokens: {owner: ICrossAccountId, pieces: bigint, properties?: IProperty[]}[]) {
2242 return await this.helper.rft.mintMultipleTokens(signer, this.collectionId, tokens, label);2286 return await this.helper.rft.mintMultipleTokens(signer, this.collectionId, tokens);
2243 }2287 }
22442288
2245 async burnToken(signer: TSigner, tokenId: number, amount=100n, label?: string) {2289 async burnToken(signer: TSigner, tokenId: number, amount=1n) {
2246 return await this.helper.rft.burnToken(signer, this.collectionId, tokenId, label, amount);2290 return await this.helper.rft.burnToken(signer, this.collectionId, tokenId, amount);
2247 }2291 }
22482292
2249 async setTokenProperties(signer: TSigner, tokenId: number, properties: IProperty[], label?: string) {2293 async setTokenProperties(signer: TSigner, tokenId: number, properties: IProperty[]) {
2250 return await this.helper.rft.setTokenProperties(signer, this.collectionId, tokenId, properties, label);2294 return await this.helper.rft.setTokenProperties(signer, this.collectionId, tokenId, properties);
2251 }2295 }
22522296
2253 async deleteTokenProperties(signer: TSigner, tokenId: number, propertyKeys: string[], label?: string) {2297 async deleteTokenProperties(signer: TSigner, tokenId: number, propertyKeys: string[]) {
2254 return await this.helper.rft.deleteTokenProperties(signer, this.collectionId, tokenId, propertyKeys, label);2298 return await this.helper.rft.deleteTokenProperties(signer, this.collectionId, tokenId, propertyKeys);
2255 }2299 }
22562300
2257 async setTokenPropertyPermissions(signer: TSigner, permissions: ITokenPropertyPermission[], label?: string) {2301 async setTokenPropertyPermissions(signer: TSigner, permissions: ITokenPropertyPermission[]) {
2258 return await this.helper.rft.setTokenPropertyPermissions(signer, this.collectionId, permissions, label);2302 return await this.helper.rft.setTokenPropertyPermissions(signer, this.collectionId, permissions);
2259 }2303 }
2260}2304}
22612305
22622306
2263class UniqueFTCollection extends UniqueCollectionBase {2307class UniqueFTCollection extends UniqueCollectionBase {
2264 async mint(signer: TSigner, owner: ICrossAccountId, amount: bigint, label?: string) {2308 async mint(signer: TSigner, owner: ICrossAccountId, amount: bigint) {
2265 return await this.helper.ft.mintTokens(signer, this.collectionId, owner, amount, label);2309 return await this.helper.ft.mintTokens(signer, this.collectionId, owner, amount);
2266 }2310 }
22672311
2268 async mintWithOneOwner(signer: TSigner, owner: ICrossAccountId, tokens: {value: bigint}[], label?: string) {2312 async mintWithOneOwner(signer: TSigner, owner: ICrossAccountId, tokens: {value: bigint}[]) {
2269 return await this.helper.ft.mintMultipleTokensWithOneOwner(signer, this.collectionId, owner, tokens, label);2313 return await this.helper.ft.mintMultipleTokensWithOneOwner(signer, this.collectionId, owner, tokens);
2270 }2314 }
22712315
2272 async getBalance(addressObj: ICrossAccountId) {2316 async getBalance(addressObj: ICrossAccountId) {
2277 return await this.helper.ft.getTop10Owners(this.collectionId);2321 return await this.helper.ft.getTop10Owners(this.collectionId);
2278 }2322 }
22792323
2280 async transfer(signer: TSigner, toAddressObj: ICrossAccountId, amount: bigint) {2324 async transfer(signer: TSigner, toAddressObj: ICrossAccountId, amount=1n) {
2281 return await this.helper.ft.transfer(signer, this.collectionId, toAddressObj, amount);2325 return await this.helper.ft.transfer(signer, this.collectionId, toAddressObj, amount);
2282 }2326 }
22832327
2284 async transferFrom(signer: TSigner, fromAddressObj: ICrossAccountId, toAddressObj: ICrossAccountId, amount: bigint) {2328 async transferFrom(signer: TSigner, fromAddressObj: ICrossAccountId, toAddressObj: ICrossAccountId, amount=1n) {
2285 return await this.helper.ft.transferFrom(signer, this.collectionId, fromAddressObj, toAddressObj, amount);2329 return await this.helper.ft.transferFrom(signer, this.collectionId, fromAddressObj, toAddressObj, amount);
2286 }2330 }
22872331
2288 async burnTokens(signer: TSigner, amount: bigint, label?: string) {2332 async burnTokens(signer: TSigner, amount=1n) {
2289 return await this.helper.ft.burnTokens(signer, this.collectionId, amount, label);2333 return await this.helper.ft.burnTokens(signer, this.collectionId, amount);
2290 }2334 }
22912335
2292 async burnTokensFrom(signer: TSigner, fromAddressObj: ICrossAccountId, amount: bigint, label?: string) {2336 async burnTokensFrom(signer: TSigner, fromAddressObj: ICrossAccountId, amount=1n) {
2293 return await this.helper.ft.burnTokensFrom(signer, this.collectionId, fromAddressObj, amount, label);2337 return await this.helper.ft.burnTokensFrom(signer, this.collectionId, fromAddressObj, amount);
2294 }2338 }
22952339
2296 async getTotalPieces() {2340 async getTotalPieces() {
2297 return await this.helper.ft.getTotalPieces(this.collectionId);2341 return await this.helper.ft.getTotalPieces(this.collectionId);
2298 }2342 }
22992343
2300 async approveTokens(signer: TSigner, toAddressObj: ICrossAccountId, amount=100n, label?: string) {2344 async approveTokens(signer: TSigner, toAddressObj: ICrossAccountId, amount=1n) {
2301 return await this.helper.ft.approveTokens(signer, this.collectionId, toAddressObj, amount, label);2345 return await this.helper.ft.approveTokens(signer, this.collectionId, toAddressObj, amount);
2302 }2346 }
23032347
2304 async getApprovedTokens(fromAddressObj: ICrossAccountId, toAddressObj: ICrossAccountId) {2348 async getApprovedTokens(fromAddressObj: ICrossAccountId, toAddressObj: ICrossAccountId) {
2322 return await this.collection.getTokenNextSponsored(this.tokenId, addressObj);2366 return await this.collection.getTokenNextSponsored(this.tokenId, addressObj);
2323 }2367 }
23242368
2325 async setProperties(signer: TSigner, properties: IProperty[], label?: string) {2369 async setProperties(signer: TSigner, properties: IProperty[]) {
2326 return await this.collection.setTokenProperties(signer, this.tokenId, properties, label);2370 return await this.collection.setTokenProperties(signer, this.tokenId, properties);
2327 }2371 }
23282372
2329 async deleteProperties(signer: TSigner, propertyKeys: string[], label?: string) {2373 async deleteProperties(signer: TSigner, propertyKeys: string[]) {
2330 return await this.collection.deleteTokenProperties(signer, this.tokenId, propertyKeys, label);2374 return await this.collection.deleteTokenProperties(signer, this.tokenId, propertyKeys);
2331 }2375 }
2332}2376}
23332377
2356 return await this.collection.getTokenChildren(this.tokenId, blockHashAt);2400 return await this.collection.getTokenChildren(this.tokenId, blockHashAt);
2357 }2401 }
23582402
2359 async nest(signer: TSigner, toTokenObj: IToken, label?: string) {2403 async nest(signer: TSigner, toTokenObj: IToken) {
2360 return await this.collection.nestToken(signer, this.tokenId, toTokenObj, label);2404 return await this.collection.nestToken(signer, this.tokenId, toTokenObj);
2361 }2405 }
23622406
2363 async unnest(signer: TSigner, fromTokenObj: IToken, toAddressObj: ICrossAccountId, label?: string) {2407 async unnest(signer: TSigner, fromTokenObj: IToken, toAddressObj: ICrossAccountId) {
2364 return await this.collection.unnestToken(signer, this.tokenId, fromTokenObj, toAddressObj, label);2408 return await this.collection.unnestToken(signer, this.tokenId, fromTokenObj, toAddressObj);
2365 }2409 }
23662410
2367 async transfer(signer: TSigner, addressObj: ICrossAccountId) {2411 async transfer(signer: TSigner, addressObj: ICrossAccountId) {
2372 return await this.collection.transferTokenFrom(signer, this.tokenId, fromAddressObj, toAddressObj);2416 return await this.collection.transferTokenFrom(signer, this.tokenId, fromAddressObj, toAddressObj);
2373 }2417 }
23742418
2375 async approve(signer: TSigner, toAddressObj: ICrossAccountId, label?: string) {2419 async approve(signer: TSigner, toAddressObj: ICrossAccountId) {
2376 return await this.collection.approveToken(signer, this.tokenId, toAddressObj, label);2420 return await this.collection.approveToken(signer, this.tokenId, toAddressObj);
2377 }2421 }
23782422
2379 async isApproved(toAddressObj: ICrossAccountId) {2423 async isApproved(toAddressObj: ICrossAccountId) {
2380 return await this.collection.isTokenApproved(this.tokenId, toAddressObj);2424 return await this.collection.isTokenApproved(this.tokenId, toAddressObj);
2381 }2425 }
23822426
2383 async burn(signer: TSigner, label?: string) {2427 async burn(signer: TSigner) {
2384 return await this.collection.burnToken(signer, this.tokenId, label);2428 return await this.collection.burnToken(signer, this.tokenId);
2385 }2429 }
2386}2430}
23872431
2405 return await this.collection.getTokenTotalPieces(this.tokenId);2449 return await this.collection.getTokenTotalPieces(this.tokenId);
2406 }2450 }
24072451
2408 async transfer(signer: TSigner, addressObj: ICrossAccountId, amount=100n) {2452 async transfer(signer: TSigner, addressObj: ICrossAccountId, amount=1n) {
2409 return await this.collection.transferToken(signer, this.tokenId, addressObj, amount);2453 return await this.collection.transferToken(signer, this.tokenId, addressObj, amount);
2410 }2454 }
24112455
2412 async transferFrom(signer: TSigner, fromAddressObj: ICrossAccountId, toAddressObj: ICrossAccountId, amount=100n) {2456 async transferFrom(signer: TSigner, fromAddressObj: ICrossAccountId, toAddressObj: ICrossAccountId, amount=1n) {
2413 return await this.collection.transferTokenFrom(signer, this.tokenId, fromAddressObj, toAddressObj, amount);2457 return await this.collection.transferTokenFrom(signer, this.tokenId, fromAddressObj, toAddressObj, amount);
2414 }2458 }
24152459
2416 async approve(signer: TSigner, toAddressObj: ICrossAccountId, amount=100n, label?: string) {2460 async approve(signer: TSigner, toAddressObj: ICrossAccountId, amount=1n) {
2417 return await this.collection.approveToken(signer, this.tokenId, toAddressObj, amount, label);2461 return await this.collection.approveToken(signer, this.tokenId, toAddressObj, amount);
2418 }2462 }
24192463
2420 async getApprovedPieces(fromAddressObj: ICrossAccountId, toAccountObj: ICrossAccountId) {2464 async getApprovedPieces(fromAddressObj: ICrossAccountId, toAccountObj: ICrossAccountId) {
2421 return await this.collection.getTokenApprovedPieces(this.tokenId, fromAddressObj, toAccountObj);2465 return await this.collection.getTokenApprovedPieces(this.tokenId, fromAddressObj, toAccountObj);
2422 }2466 }
24232467
2424 async repartition(signer: TSigner, amount: bigint, label?: string) {2468 async repartition(signer: TSigner, amount: bigint) {
2425 return await this.collection.repartitionToken(signer, this.tokenId, amount, label);2469 return await this.collection.repartitionToken(signer, this.tokenId, amount);
2426 }2470 }
24272471
2428 async burn(signer: TSigner, amount=100n, label?: string) {2472 async burn(signer: TSigner, amount=1n) {
2429 return await this.collection.burnToken(signer, this.tokenId, amount, label);2473 return await this.collection.burnToken(signer, this.tokenId, amount);
2430 }2474 }
2431}2475}
24322476