difftreelog
feat Separate rpc calls to own group
in: master
31 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -113,6 +113,20 @@
checksum = "508b352bb5c066aac251f6daf6b36eccd03e8a88e8081cd44959ea277a3af9a8"
[[package]]
+name = "app-promotion-rpc"
+version = "0.1.0"
+dependencies = [
+ "pallet-common",
+ "pallet-evm",
+ "parity-scale-codec 3.1.5",
+ "sp-api",
+ "sp-core",
+ "sp-runtime",
+ "sp-std",
+ "up-data-structs",
+]
+
+[[package]]
name = "approx"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5127,6 +5141,7 @@
name = "opal-runtime"
version = "0.9.27"
dependencies = [
+ "app-promotion-rpc",
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
"cumulus-pallet-parachain-system",
@@ -8358,6 +8373,7 @@
name = "quartz-runtime"
version = "0.9.27"
dependencies = [
+ "app-promotion-rpc",
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
"cumulus-pallet-parachain-system",
@@ -8381,6 +8397,7 @@
"hex-literal",
"log",
"orml-vesting",
+ "pallet-app-promotion",
"pallet-aura",
"pallet-balances",
"pallet-base-fee",
@@ -12132,6 +12149,7 @@
version = "0.1.3"
dependencies = [
"anyhow",
+ "app-promotion-rpc",
"jsonrpsee",
"pallet-common",
"pallet-evm",
@@ -12210,6 +12228,7 @@
name = "unique-node"
version = "0.9.27"
dependencies = [
+ "app-promotion-rpc",
"clap",
"cumulus-client-cli",
"cumulus-client-collator",
@@ -12298,6 +12317,7 @@
name = "unique-rpc"
version = "0.1.1"
dependencies = [
+ "app-promotion-rpc",
"fc-db",
"fc-mapping-sync",
"fc-rpc",
@@ -12347,6 +12367,7 @@
name = "unique-runtime"
version = "0.9.27"
dependencies = [
+ "app-promotion-rpc",
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
"cumulus-pallet-parachain-system",
@@ -12370,6 +12391,7 @@
"hex-literal",
"log",
"orml-vesting",
+ "pallet-app-promotion",
"pallet-aura",
"pallet-balances",
"pallet-base-fee",
client/rpc/Cargo.tomldiffbeforeafterboth--- a/client/rpc/Cargo.toml
+++ b/client/rpc/Cargo.toml
@@ -8,6 +8,7 @@
pallet-common = { default-features = false, path = '../../pallets/common' }
up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
up-rpc = { path = "../../primitives/rpc" }
+app-promotion-rpc = { path = "../../primitives/app_promotion_rpc"}
rmrk-rpc = { path = "../../primitives/rmrk-rpc" }
codec = { package = "parity-scale-codec", version = "3.1.2" }
jsonrpsee = { version = "0.14.0", features = ["server", "macros"] }
client/rpc/src/lib.rsdiffbeforeafterboth--- a/client/rpc/src/lib.rs
+++ b/client/rpc/src/lib.rs
@@ -31,6 +31,7 @@
use sp_api::{BlockId, BlockT, ProvideRuntimeApi, ApiExt};
use sp_blockchain::HeaderBackend;
use up_rpc::UniqueApi as UniqueRuntimeApi;
+use app_promotion_rpc::AppPromotionApi as AppPromotionRuntimeApi;
// RMRK
use rmrk_rpc::RmrkApi as RmrkRuntimeApi;
@@ -38,6 +39,7 @@
RmrkCollectionId, RmrkNftId, RmrkBaseId, RmrkNftChild, RmrkThemeName, RmrkResourceId,
};
+pub use app_promotion_unique_rpc::AppPromotionApiServer;
pub use rmrk_unique_rpc::RmrkApiServer;
#[rpc(server)]
@@ -244,39 +246,48 @@
token_id: TokenId,
at: Option<BlockHash>,
) -> Result<Option<String>>;
+}
+
+mod app_promotion_unique_rpc {
+ use super::*;
+
+ #[rpc(server)]
+ #[async_trait]
+ pub trait AppPromotionApi<BlockHash, BlockNumber, CrossAccountId, AccountId> {
+ /// Returns the total amount of staked tokens.
+ #[method(name = "appPromotion_totalStaked")]
+ fn total_staked(&self, staker: Option<CrossAccountId>, at: Option<BlockHash>)
+ -> Result<String>;
- /// Returns the total amount of staked tokens.
- #[method(name = "unique_totalStaked")]
- fn total_staked(&self, staker: Option<CrossAccountId>, at: Option<BlockHash>)
- -> Result<String>;
+ ///Returns the total amount of staked tokens per block when staked.
+ #[method(name = "appPromotion_totalStakedPerBlock")]
+ fn total_staked_per_block(
+ &self,
+ staker: CrossAccountId,
+ at: Option<BlockHash>,
+ ) -> Result<Vec<(BlockNumber, String)>>;
- ///Returns the total amount of staked tokens per block when staked.
- #[method(name = "unique_totalStakedPerBlock")]
- fn total_staked_per_block(
- &self,
- staker: CrossAccountId,
- at: Option<BlockHash>,
- ) -> Result<Vec<(BlockNumber, String)>>;
+ /// Returns the total amount locked by staking tokens.
+ #[method(name = "appPromotion_totalStakingLocked")]
+ fn total_staking_locked(&self, staker: CrossAccountId, at: Option<BlockHash>)
+ -> Result<String>;
- /// Returns the total amount locked by staking tokens.
- #[method(name = "unique_totalStakingLocked")]
- fn total_staking_locked(&self, staker: CrossAccountId, at: Option<BlockHash>)
- -> Result<String>;
+ /// Returns the total amount of tokens pending withdrawal from staking.
+ #[method(name = "appPromotion_pendingUnstake")]
+ fn pending_unstake(
+ &self,
+ staker: Option<CrossAccountId>,
+ at: Option<BlockHash>,
+ ) -> Result<String>;
- /// Returns the total amount of tokens pending withdrawal from staking.
- #[method(name = "unique_pendingUnstake")]
- fn pending_unstake(
- &self,
- staker: Option<CrossAccountId>,
- at: Option<BlockHash>,
- ) -> Result<String>;
- /// Returns the total amount of tokens pending withdrawal from staking per block.
- #[method(name = "unique_pendingUnstakePerBlock")]
- fn pending_unstake_per_block(
- &self,
- staker: CrossAccountId,
- at: Option<BlockHash>,
- ) -> Result<Vec<(BlockNumber, String)>>;
+ /// Returns the total amount of tokens pending withdrawal from staking per block.
+ #[method(name = "appPromotion_pendingUnstakePerBlock")]
+ fn pending_unstake_per_block(
+ &self,
+ staker: CrossAccountId,
+ at: Option<BlockHash>,
+ ) -> Result<Vec<(BlockNumber, String)>>;
+ }
}
mod rmrk_unique_rpc {
@@ -415,6 +426,20 @@
}
}
+pub struct AppPromotion<C, P> {
+ client: Arc<C>,
+ _marker: std::marker::PhantomData<P>,
+}
+
+impl<C, P> AppPromotion<C, P> {
+ pub fn new(client: Arc<C>) -> Self {
+ Self {
+ client,
+ _marker: Default::default(),
+ }
+ }
+}
+
pub struct Rmrk<C, P> {
client: Arc<C>,
_marker: std::marker::PhantomData<P>,
@@ -474,6 +499,12 @@
};
}
+macro_rules! app_promotion_api {
+ () => {
+ dyn AppPromotionRuntimeApi<Block, BlockNumber, CrossAccountId, AccountId>
+ };
+}
+
macro_rules! rmrk_api {
() => {
dyn RmrkRuntimeApi<Block, AccountId, CollectionInfo, NftInfo, ResourceInfo, PropertyInfo, BaseInfo, PartType, Theme>
@@ -556,7 +587,20 @@
pass_method!(effective_collection_limits(collection_id: CollectionId) -> Option<CollectionLimits>, unique_api);
pass_method!(total_pieces(collection_id: CollectionId, token_id: TokenId) -> Option<String> => |o| o.map(|number| number.to_string()) , unique_api);
pass_method!(token_owners(collection: CollectionId, token: TokenId) -> Vec<CrossAccountId>, unique_api);
- pass_method!(total_staked(staker: Option<CrossAccountId>) -> String => |v| v.to_string(), unique_api);
+}
+
+impl<C, Block, BlockNumber, CrossAccountId, AccountId>
+ app_promotion_unique_rpc::AppPromotionApiServer<<Block as BlockT>::Hash, BlockNumber, CrossAccountId, AccountId>
+ for AppPromotion<C, Block>
+where
+ Block: BlockT,
+ BlockNumber: Decode + Member + AtLeast32BitUnsigned,
+ AccountId: Decode,
+ C: 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>,
+ C::Api: AppPromotionRuntimeApi<Block, BlockNumber, CrossAccountId, AccountId>,
+ CrossAccountId: pallet_evm::account::CrossAccountId<AccountId>,
+{
+ pass_method!(total_staked(staker: Option<CrossAccountId>) -> String => |v| v.to_string(), app_promotion_api);
pass_method!(total_staked_per_block(staker: CrossAccountId) -> Vec<(BlockNumber, String)> =>
|v| v
.into_iter()
node/cli/Cargo.tomldiffbeforeafterboth--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -318,6 +318,7 @@
pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }
unique-rpc = { default-features = false, path = "../rpc" }
+app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false}
rmrk-rpc = { path = "../../primitives/rmrk-rpc" }
[features]
node/cli/src/service.rsdiffbeforeafterboth--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -364,6 +364,7 @@
+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
+ sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>
+ up_rpc::UniqueApi<Block, BlockNumber, Runtime::CrossAccountId, AccountId>
+ + app_promotion_rpc::AppPromotionApi<Block, BlockNumber, Runtime::CrossAccountId, AccountId>
+ rmrk_rpc::RmrkApi<
Block,
AccountId,
@@ -665,6 +666,7 @@
+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
+ sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>
+ up_rpc::UniqueApi<Block, BlockNumber, Runtime::CrossAccountId, AccountId>
+ + app_promotion_rpc::AppPromotionApi<Block, BlockNumber, Runtime::CrossAccountId, AccountId>
+ rmrk_rpc::RmrkApi<
Block,
AccountId,
@@ -809,6 +811,7 @@
+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
+ sp_api::ApiExt<Block, StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>
+ up_rpc::UniqueApi<Block, BlockNumber, Runtime::CrossAccountId, AccountId>
+ + app_promotion_rpc::AppPromotionApi<Block, BlockNumber, Runtime::CrossAccountId, AccountId>
+ rmrk_rpc::RmrkApi<
Block,
AccountId,
node/rpc/Cargo.tomldiffbeforeafterboth--- a/node/rpc/Cargo.toml
+++ b/node/rpc/Cargo.toml
@@ -53,6 +53,7 @@
pallet-unique = { path = "../../pallets/unique" }
uc-rpc = { path = "../../client/rpc" }
up-rpc = { path = "../../primitives/rpc" }
+app-promotion-rpc = { path = "../../primitives/app_promotion_rpc"}
rmrk-rpc = { path = "../../primitives/rmrk-rpc" }
up-data-structs = { default-features = false, path = "../../primitives/data-structs" }
node/rpc/src/lib.rsdiffbeforeafterboth--- a/node/rpc/src/lib.rs
+++ b/node/rpc/src/lib.rs
@@ -38,6 +38,7 @@
use sp_block_builder::BlockBuilder;
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
use sc_service::TransactionPool;
+use uc_rpc::AppPromotion;
use std::{collections::BTreeMap, sync::Arc};
use up_common::types::opaque::{Hash, AccountId, RuntimeInstance, Index, Block, BlockNumber, Balance};
@@ -147,6 +148,7 @@
C::Api: fp_rpc::ConvertTransactionRuntimeApi<Block>,
C::Api:
up_rpc::UniqueApi<Block, BlockNumber, <R as RuntimeInstance>::CrossAccountId, AccountId>,
+ C::Api: app_promotion_rpc::AppPromotionApi<Block, BlockNumber, <R as RuntimeInstance>::CrossAccountId, AccountId>,
C::Api: rmrk_rpc::RmrkApi<
Block,
AccountId,
@@ -171,6 +173,7 @@
EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer,
};
use uc_rpc::{UniqueApiServer, Unique};
+ use uc_rpc::{AppPromotionApiServer, AppPromotion};
#[cfg(not(feature = "unique-runtime"))]
use uc_rpc::{RmrkApiServer, Rmrk};
@@ -229,6 +232,9 @@
io.merge(Unique::new(client.clone()).into_rpc())?;
+ // #[cfg(not(feature = "unique-runtime"))]
+ io.merge(AppPromotion::new(client.clone()).into_rpc())?;
+
#[cfg(not(feature = "unique-runtime"))]
io.merge(Rmrk::new(client.clone()).into_rpc())?;
primitives/app_promotion_rpc/CHANGELOG.mddiffbeforeafterboth--- /dev/null
+++ b/primitives/app_promotion_rpc/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+
+<!-- bureaucrate goes here -->
primitives/app_promotion_rpc/Cargo.tomldiffbeforeafterboth--- /dev/null
+++ b/primitives/app_promotion_rpc/Cargo.toml
@@ -0,0 +1,29 @@
+[package]
+name = "app-promotion-rpc"
+version = "0.1.0"
+license = "GPLv3"
+edition = "2021"
+
+[dependencies]
+pallet-common = { default-features = false, path = '../../pallets/common' }
+up-data-structs = { default-features = false, path = '../data-structs' }
+codec = { package = "parity-scale-codec", version = "3.1.2", default-features = false, features = [
+ "derive",
+] }
+sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
+sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
+sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
+sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }
+
+[features]
+default = ["std"]
+std = [
+ "codec/std",
+ "sp-core/std",
+ "sp-std/std",
+ "sp-api/std",
+ "sp-runtime/std",
+ "pallet-common/std",
+ "up-data-structs/std",
+]
primitives/app_promotion_rpc/src/lib.rsdiffbeforeafterboth--- /dev/null
+++ b/primitives/app_promotion_rpc/src/lib.rs
@@ -0,0 +1,47 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+#![cfg_attr(not(feature = "std"), no_std)]
+
+use up_data_structs::{
+ CollectionId, TokenId, RpcCollection, CollectionStats, CollectionLimits, Property,
+ PropertyKeyPermission, TokenData, TokenChild,
+};
+
+use sp_std::vec::Vec;
+use codec::Decode;
+use sp_runtime::{
+ DispatchError,
+ traits::{AtLeast32BitUnsigned, Member},
+};
+
+type Result<T> = core::result::Result<T, DispatchError>;
+
+sp_api::decl_runtime_apis! {
+ #[api_version(2)]
+ /// Trait for generate rpc.
+ pub trait AppPromotionApi<BlockNumber ,CrossAccountId, AccountId> where
+ BlockNumber: Decode + Member + AtLeast32BitUnsigned,
+ AccountId: Decode,
+ CrossAccountId: pallet_evm::account::CrossAccountId<AccountId>,
+ {
+ fn total_staked(staker: Option<CrossAccountId>) -> Result<u128>;
+ fn total_staked_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>>;
+ fn total_staking_locked(staker: CrossAccountId) -> Result<u128>;
+ fn pending_unstake(staker: Option<CrossAccountId>) -> Result<u128>;
+ fn pending_unstake_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>>;
+ }
+}
primitives/rpc/src/lib.rsdiffbeforeafterboth--- a/primitives/rpc/src/lib.rs
+++ b/primitives/rpc/src/lib.rs
@@ -127,11 +127,5 @@
fn total_pieces(collection_id: CollectionId, token_id: TokenId) -> Result<Option<u128>>;
fn token_owners(collection: CollectionId, token: TokenId) -> Result<Vec<CrossAccountId>>;
- fn total_staked(staker: Option<CrossAccountId>) -> Result<u128>;
- fn total_staked_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>>;
- fn total_staking_locked(staker: CrossAccountId) -> Result<u128>;
- fn pending_unstake(staker: Option<CrossAccountId>) -> Result<u128>;
- fn pending_unstake_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>>;
-
}
}
runtime/common/runtime_apis.rsdiffbeforeafterboth--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -187,25 +187,47 @@
fn total_pieces(collection: CollectionId, token_id: TokenId) -> Result<Option<u128>, DispatchError> {
dispatch_unique_runtime!(collection.total_pieces(token_id))
}
+ }
+ impl app_promotion_rpc::AppPromotionApi<Block, BlockNumber, CrossAccountId, AccountId> for Runtime {
fn total_staked(staker: Option<CrossAccountId>) -> Result<u128, DispatchError> {
- Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_total_staked(staker).unwrap_or_default())
- }
+ #[cfg(not(feature = "app-promotion"))]
+ return unsupported!();
+ #[cfg(feature = "app-promotion")]
+ return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_total_staked(staker).unwrap_or_default());
+ }
+
fn total_staked_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>, DispatchError> {
- Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_total_staked_per_block(staker))
+ #[cfg(not(feature = "app-promotion"))]
+ return unsupported!();
+
+ #[cfg(feature = "app-promotion")]
+ return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_total_staked_per_block(staker));
}
fn total_staking_locked(staker: CrossAccountId) -> Result<u128, DispatchError> {
- Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_locked_balance(staker))
+ #[cfg(not(feature = "app-promotion"))]
+ return unsupported!();
+
+ #[cfg(feature = "app-promotion")]
+ return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_locked_balance(staker));
}
fn pending_unstake(staker: Option<CrossAccountId>) -> Result<u128, DispatchError> {
- Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_pending_unstake(staker))
+ #[cfg(not(feature = "app-promotion"))]
+ return unsupported!();
+
+ #[cfg(feature = "app-promotion")]
+ return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_pending_unstake(staker));
}
fn pending_unstake_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>, DispatchError> {
- Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_pending_unstake_per_block(staker))
+ #[cfg(not(feature = "app-promotion"))]
+ return unsupported!();
+
+ #[cfg(feature = "app-promotion")]
+ return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_pending_unstake_per_block(staker))
}
}
runtime/opal/Cargo.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -83,6 +83,7 @@
'pallet-base-fee/std',
'fp-rpc/std',
'up-rpc/std',
+ 'app-promotion-rpc/std',
'fp-evm-mapping/std',
'fp-self-contained/std',
'parachain-info/std',
@@ -414,6 +415,7 @@
derivative = "2.2.0"
pallet-unique = { path = '../../pallets/unique', default-features = false }
up-rpc = { path = "../../primitives/rpc", default-features = false }
+app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false}
rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }
fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }
pallet-inflation = { path = '../../pallets/inflation', default-features = false }
runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -82,6 +82,7 @@
'pallet-base-fee/std',
'fp-rpc/std',
'up-rpc/std',
+ 'app-promotion-rpc/std',
'fp-evm-mapping/std',
'fp-self-contained/std',
'parachain-info/std',
@@ -416,8 +417,10 @@
derivative = "2.2.0"
pallet-unique = { path = '../../pallets/unique', default-features = false }
up-rpc = { path = "../../primitives/rpc", default-features = false }
+app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false}
fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }
pallet-inflation = { path = '../../pallets/inflation', default-features = false }
+pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }
up-data-structs = { path = '../../primitives/data-structs', default-features = false }
pallet-configuration = { default-features = false, path = "../../pallets/configuration" }
pallet-common = { default-features = false, path = "../../pallets/common" }
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -83,6 +83,7 @@
'pallet-base-fee/std',
'fp-rpc/std',
'up-rpc/std',
+ 'app-promotion-rpc/std',
'fp-evm-mapping/std',
'fp-self-contained/std',
'parachain-info/std',
@@ -409,8 +410,10 @@
derivative = "2.2.0"
pallet-unique = { path = '../../pallets/unique', default-features = false }
up-rpc = { path = "../../primitives/rpc", default-features = false }
+app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false}
rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }
pallet-inflation = { path = '../../pallets/inflation', default-features = false }
+pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }
up-data-structs = { path = '../../primitives/data-structs', default-features = false }
pallet-configuration = { default-features = false, path = "../../pallets/configuration" }
pallet-common = { default-features = false, path = "../../pallets/common" }
tests/src/interfaces/appPromotion/definitions.tsdiffbeforeafterboth--- /dev/null
+++ b/tests/src/interfaces/appPromotion/definitions.ts
@@ -0,0 +1,66 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+type RpcParam = {
+ name: string;
+ type: string;
+ isOptional?: true;
+};
+
+const CROSS_ACCOUNT_ID_TYPE = 'PalletEvmAccountBasicCrossAccountIdRepr';
+
+const collectionParam = {name: 'collection', type: 'u32'};
+const tokenParam = {name: 'tokenId', type: 'u32'};
+const propertyKeysParam = {name: 'propertyKeys', type: 'Vec<String>', isOptional: true};
+const crossAccountParam = (name = 'account') => ({name, type: CROSS_ACCOUNT_ID_TYPE});
+const atParam = {name: 'at', type: 'Hash', isOptional: true};
+
+const fun = (description: string, params: RpcParam[], type: string) => ({
+ description,
+ params: [...params, atParam],
+ type,
+});
+
+export default {
+ types: {},
+ rpc: {
+ totalStaked: fun(
+ 'Returns the total amount of staked tokens',
+ [{name: 'staker', type: CROSS_ACCOUNT_ID_TYPE, isOptional: true}],
+ 'u128',
+ ),
+ totalStakedPerBlock: fun(
+ 'Returns the total amount of staked tokens per block when staked',
+ [crossAccountParam('staker')],
+ 'Vec<(u32, u128)>',
+ ),
+ totalStakingLocked: fun(
+ 'Return the total amount locked by staking tokens',
+ [crossAccountParam('staker')],
+ 'u128',
+ ),
+ pendingUnstake: fun(
+ 'Returns the total amount of unstaked tokens',
+ [{name: 'staker', type: CROSS_ACCOUNT_ID_TYPE, isOptional: true}],
+ 'u128',
+ ),
+ pendingUnstakePerBlock: fun(
+ 'Returns the total amount of unstaked tokens per block',
+ [crossAccountParam('staker')],
+ 'Vec<(u32, u128)>',
+ ),
+ },
+};
tests/src/interfaces/appPromotion/index.tsdiffbeforeafterboth--- /dev/null
+++ b/tests/src/interfaces/appPromotion/index.ts
@@ -0,0 +1,4 @@
+// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
+/* eslint-disable */
+
+export * from './types';
tests/src/interfaces/appPromotion/types.tsdiffbeforeafterboth--- /dev/null
+++ b/tests/src/interfaces/appPromotion/types.ts
@@ -0,0 +1,4 @@
+// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
+/* eslint-disable */
+
+export type PHANTOM_APPPROMOTION = 'appPromotion';
tests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-errors.ts
+++ b/tests/src/interfaces/augment-api-errors.ts
@@ -269,7 +269,7 @@
**/
NoPendingSponsor: AugmentedError<ApiType>;
/**
- * This method is only executable by owner.
+ * This method is only executable by contract owner
**/
NoPermission: AugmentedError<ApiType>;
/**
@@ -278,7 +278,13 @@
[key: string]: AugmentedError<ApiType>;
};
evmMigration: {
+ /**
+ * Migration of this account is not yet started, or already finished.
+ **/
AccountIsNotMigrating: AugmentedError<ApiType>;
+ /**
+ * Can only migrate to empty address.
+ **/
AccountNotEmpty: AugmentedError<ApiType>;
/**
* Generic error
tests/src/interfaces/augment-api-query.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-query.ts
+++ b/tests/src/interfaces/augment-api-query.ts
@@ -335,7 +335,7 @@
*
* Currently used to store RMRK data.
**/
- 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]>;
+ 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]>;
/**
* Used to enumerate token's children.
**/
tests/src/interfaces/augment-api-rpc.tsdiffbeforeafterboth1// Auto-generated via `yarn polkadot-types-from-chain`, do not edit2/* eslint-disable */34// import type lookup before we augment - in some environments5// this is required to allow for ambient/previous definitions6import '@polkadot/rpc-core/types/jsonrpc';78import type { PalletEvmAccountBasicCrossAccountIdRepr, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsPartPartType, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceResourceInfo, RmrkTraitsTheme, UpDataStructsCollectionLimits, UpDataStructsCollectionStats, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsRpcCollection, UpDataStructsTokenChild, UpDataStructsTokenData } from './default';9import type { AugmentedRpc } from '@polkadot/rpc-core/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';12import type { AnyNumber, Codec, ITuple } from '@polkadot/types-codec/types';13import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';14import type { EpochAuthorship } from '@polkadot/types/interfaces/babe';15import type { BeefySignedCommitment } from '@polkadot/types/interfaces/beefy';16import type { BlockHash } from '@polkadot/types/interfaces/chain';17import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';18import type { AuthorityId } from '@polkadot/types/interfaces/consensus';19import type { CodeUploadRequest, CodeUploadResult, ContractCallRequest, ContractExecResult, ContractInstantiateResult, InstantiateRequest } from '@polkadot/types/interfaces/contracts';20import type { BlockStats } from '@polkadot/types/interfaces/dev';21import type { CreatedBlock } from '@polkadot/types/interfaces/engine';22import type { EthAccount, EthCallRequest, EthFeeHistory, EthFilter, EthFilterChanges, EthLog, EthReceipt, EthRichBlock, EthSubKind, EthSubParams, EthSyncStatus, EthTransaction, EthTransactionRequest, EthWork } from '@polkadot/types/interfaces/eth';23import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';24import type { EncodedFinalityProofs, JustificationNotification, ReportedRoundStates } from '@polkadot/types/interfaces/grandpa';25import type { MmrLeafBatchProof, MmrLeafProof } from '@polkadot/types/interfaces/mmr';26import type { StorageKind } from '@polkadot/types/interfaces/offchain';27import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';28import type { RpcMethods } from '@polkadot/types/interfaces/rpc';29import type { AccountId, AccountId32, BlockNumber, H160, H256, H64, Hash, Header, Index, Justification, KeyValue, SignedBlock, StorageData } from '@polkadot/types/interfaces/runtime';30import type { MigrationStatusResult, ReadProof, RuntimeVersion, TraceBlockResponse } from '@polkadot/types/interfaces/state';31import type { ApplyExtrinsicResult, ChainProperties, ChainType, Health, NetworkState, NodeRole, PeerInfo, SyncState } from '@polkadot/types/interfaces/system';32import type { IExtrinsic, Observable } from '@polkadot/types/types';3334export type __AugmentedRpc = AugmentedRpc<() => unknown>;3536declare module '@polkadot/rpc-core/types/jsonrpc' {37 interface RpcInterface {38 author: {39 /**40 * Returns true if the keystore has private keys for the given public key and key type.41 **/42 hasKey: AugmentedRpc<(publicKey: Bytes | string | Uint8Array, keyType: Text | string) => Observable<bool>>;43 /**44 * Returns true if the keystore has private keys for the given session public keys.45 **/46 hasSessionKeys: AugmentedRpc<(sessionKeys: Bytes | string | Uint8Array) => Observable<bool>>;47 /**48 * Insert a key into the keystore.49 **/50 insertKey: AugmentedRpc<(keyType: Text | string, suri: Text | string, publicKey: Bytes | string | Uint8Array) => Observable<Bytes>>;51 /**52 * Returns all pending extrinsics, potentially grouped by sender53 **/54 pendingExtrinsics: AugmentedRpc<() => Observable<Vec<Extrinsic>>>;55 /**56 * Remove given extrinsic from the pool and temporarily ban it to prevent reimporting57 **/58 removeExtrinsic: AugmentedRpc<(bytesOrHash: Vec<ExtrinsicOrHash> | (ExtrinsicOrHash | { Hash: any } | { Extrinsic: any } | string | Uint8Array)[]) => Observable<Vec<Hash>>>;59 /**60 * Generate new session keys and returns the corresponding public keys61 **/62 rotateKeys: AugmentedRpc<() => Observable<Bytes>>;63 /**64 * Submit and subscribe to watch an extrinsic until unsubscribed65 **/66 submitAndWatchExtrinsic: AugmentedRpc<(extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<ExtrinsicStatus>>;67 /**68 * Submit a fully formatted extrinsic for block inclusion69 **/70 submitExtrinsic: AugmentedRpc<(extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<Hash>>;71 };72 babe: {73 /**74 * Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore75 **/76 epochAuthorship: AugmentedRpc<() => Observable<HashMap<AuthorityId, EpochAuthorship>>>;77 };78 beefy: {79 /**80 * Returns hash of the latest BEEFY finalized block as seen by this client.81 **/82 getFinalizedHead: AugmentedRpc<() => Observable<H256>>;83 /**84 * Returns the block most recently finalized by BEEFY, alongside side its justification.85 **/86 subscribeJustifications: AugmentedRpc<() => Observable<BeefySignedCommitment>>;87 };88 chain: {89 /**90 * Get header and body of a relay chain block91 **/92 getBlock: AugmentedRpc<(hash?: BlockHash | string | Uint8Array) => Observable<SignedBlock>>;93 /**94 * Get the block hash for a specific block95 **/96 getBlockHash: AugmentedRpc<(blockNumber?: BlockNumber | AnyNumber | Uint8Array) => Observable<BlockHash>>;97 /**98 * Get hash of the last finalized block in the canon chain99 **/100 getFinalizedHead: AugmentedRpc<() => Observable<BlockHash>>;101 /**102 * Retrieves the header for a specific block103 **/104 getHeader: AugmentedRpc<(hash?: BlockHash | string | Uint8Array) => Observable<Header>>;105 /**106 * Retrieves the newest header via subscription107 **/108 subscribeAllHeads: AugmentedRpc<() => Observable<Header>>;109 /**110 * Retrieves the best finalized header via subscription111 **/112 subscribeFinalizedHeads: AugmentedRpc<() => Observable<Header>>;113 /**114 * Retrieves the best header via subscription115 **/116 subscribeNewHeads: AugmentedRpc<() => Observable<Header>>;117 };118 childstate: {119 /**120 * Returns the keys with prefix from a child storage, leave empty to get all the keys121 **/122 getKeys: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, prefix: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Vec<StorageKey>>>;123 /**124 * Returns the keys with prefix from a child storage with pagination support125 **/126 getKeysPaged: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, prefix: StorageKey | string | Uint8Array | any, count: u32 | AnyNumber | Uint8Array, startKey?: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Vec<StorageKey>>>;127 /**128 * Returns a child storage entry at a specific block state129 **/130 getStorage: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<StorageData>>>;131 /**132 * Returns child storage entries for multiple keys at a specific block state133 **/134 getStorageEntries: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: Hash | string | Uint8Array) => Observable<Vec<Option<StorageData>>>>;135 /**136 * Returns the hash of a child storage entry at a block state137 **/138 getStorageHash: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<Hash>>>;139 /**140 * Returns the size of a child storage entry at a block state141 **/142 getStorageSize: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<u64>>>;143 };144 contracts: {145 /**146 * Executes a call to a contract147 **/148 call: AugmentedRpc<(callRequest: ContractCallRequest | { origin?: any; dest?: any; value?: any; gasLimit?: any; storageDepositLimit?: any; inputData?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractExecResult>>;149 /**150 * Returns the value under a specified storage key in a contract151 **/152 getStorage: AugmentedRpc<(address: AccountId | string | Uint8Array, key: H256 | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<Bytes>>>;153 /**154 * Instantiate a new contract155 **/156 instantiate: AugmentedRpc<(request: InstantiateRequest | { origin?: any; value?: any; gasLimit?: any; storageDepositLimit?: any; code?: any; data?: any; salt?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractInstantiateResult>>;157 /**158 * Returns the projected time a given contract will be able to sustain paying its rent159 **/160 rentProjection: AugmentedRpc<(address: AccountId | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<BlockNumber>>>;161 /**162 * Upload new code without instantiating a contract from it163 **/164 uploadCode: AugmentedRpc<(uploadRequest: CodeUploadRequest | { origin?: any; code?: any; storageDepositLimit?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<CodeUploadResult>>;165 };166 dev: {167 /**168 * Reexecute the specified `block_hash` and gather statistics while doing so169 **/170 getBlockStats: AugmentedRpc<(at: Hash | string | Uint8Array) => Observable<Option<BlockStats>>>;171 };172 engine: {173 /**174 * Instructs the manual-seal authorship task to create a new block175 **/176 createBlock: AugmentedRpc<(createEmpty: bool | boolean | Uint8Array, finalize: bool | boolean | Uint8Array, parentHash?: BlockHash | string | Uint8Array) => Observable<CreatedBlock>>;177 /**178 * Instructs the manual-seal authorship task to finalize a block179 **/180 finalizeBlock: AugmentedRpc<(hash: BlockHash | string | Uint8Array, justification?: Justification) => Observable<bool>>;181 };182 eth: {183 /**184 * Returns accounts list.185 **/186 accounts: AugmentedRpc<() => Observable<Vec<H160>>>;187 /**188 * Returns the blockNumber189 **/190 blockNumber: AugmentedRpc<() => Observable<U256>>;191 /**192 * Call contract, returning the output data.193 **/194 call: AugmentedRpc<(request: EthCallRequest | { from?: any; to?: any; gasPrice?: any; gas?: any; value?: any; data?: any; nonce?: any } | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<Bytes>>;195 /**196 * Returns the chain ID used for transaction signing at the current best block. None is returned if not available.197 **/198 chainId: AugmentedRpc<() => Observable<U64>>;199 /**200 * Returns block author.201 **/202 coinbase: AugmentedRpc<() => Observable<H160>>;203 /**204 * Estimate gas needed for execution of given contract.205 **/206 estimateGas: AugmentedRpc<(request: EthCallRequest | { from?: any; to?: any; gasPrice?: any; gas?: any; value?: any; data?: any; nonce?: any } | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;207 /**208 * Returns fee history for given block count & reward percentiles209 **/210 feeHistory: AugmentedRpc<(blockCount: U256 | AnyNumber | Uint8Array, newestBlock: BlockNumber | AnyNumber | Uint8Array, rewardPercentiles: Option<Vec<f64>> | null | Uint8Array | Vec<f64> | (f64)[]) => Observable<EthFeeHistory>>;211 /**212 * Returns current gas price.213 **/214 gasPrice: AugmentedRpc<() => Observable<U256>>;215 /**216 * Returns balance of the given account.217 **/218 getBalance: AugmentedRpc<(address: H160 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;219 /**220 * Returns block with given hash.221 **/222 getBlockByHash: AugmentedRpc<(hash: H256 | string | Uint8Array, full: bool | boolean | Uint8Array) => Observable<Option<EthRichBlock>>>;223 /**224 * Returns block with given number.225 **/226 getBlockByNumber: AugmentedRpc<(block: BlockNumber | AnyNumber | Uint8Array, full: bool | boolean | Uint8Array) => Observable<Option<EthRichBlock>>>;227 /**228 * Returns the number of transactions in a block with given hash.229 **/230 getBlockTransactionCountByHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<U256>>;231 /**232 * Returns the number of transactions in a block with given block number.233 **/234 getBlockTransactionCountByNumber: AugmentedRpc<(block: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;235 /**236 * Returns the code at given address at given time (block number).237 **/238 getCode: AugmentedRpc<(address: H160 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<Bytes>>;239 /**240 * Returns filter changes since last poll.241 **/242 getFilterChanges: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<EthFilterChanges>>;243 /**244 * Returns all logs matching given filter (in a range 'from' - 'to').245 **/246 getFilterLogs: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<Vec<EthLog>>>;247 /**248 * Returns logs matching given filter object.249 **/250 getLogs: AugmentedRpc<(filter: EthFilter | { fromBlock?: any; toBlock?: any; blockHash?: any; address?: any; topics?: any } | string | Uint8Array) => Observable<Vec<EthLog>>>;251 /**252 * Returns proof for account and storage.253 **/254 getProof: AugmentedRpc<(address: H160 | string | Uint8Array, storageKeys: Vec<H256> | (H256 | string | Uint8Array)[], number: BlockNumber | AnyNumber | Uint8Array) => Observable<EthAccount>>;255 /**256 * Returns content of the storage at given address.257 **/258 getStorageAt: AugmentedRpc<(address: H160 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<H256>>;259 /**260 * Returns transaction at given block hash and index.261 **/262 getTransactionByBlockHashAndIndex: AugmentedRpc<(hash: H256 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthTransaction>>;263 /**264 * Returns transaction by given block number and index.265 **/266 getTransactionByBlockNumberAndIndex: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthTransaction>>;267 /**268 * Get transaction by its hash.269 **/270 getTransactionByHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<EthTransaction>>;271 /**272 * Returns the number of transactions sent from given address at given time (block number).273 **/274 getTransactionCount: AugmentedRpc<(hash: H256 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;275 /**276 * Returns transaction receipt by transaction hash.277 **/278 getTransactionReceipt: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<EthReceipt>>;279 /**280 * Returns an uncles at given block and index.281 **/282 getUncleByBlockHashAndIndex: AugmentedRpc<(hash: H256 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthRichBlock>>;283 /**284 * Returns an uncles at given block and index.285 **/286 getUncleByBlockNumberAndIndex: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthRichBlock>>;287 /**288 * Returns the number of uncles in a block with given hash.289 **/290 getUncleCountByBlockHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<U256>>;291 /**292 * Returns the number of uncles in a block with given block number.293 **/294 getUncleCountByBlockNumber: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;295 /**296 * Returns the hash of the current block, the seedHash, and the boundary condition to be met.297 **/298 getWork: AugmentedRpc<() => Observable<EthWork>>;299 /**300 * Returns the number of hashes per second that the node is mining with.301 **/302 hashrate: AugmentedRpc<() => Observable<U256>>;303 /**304 * Returns max priority fee per gas305 **/306 maxPriorityFeePerGas: AugmentedRpc<() => Observable<U256>>;307 /**308 * Returns true if client is actively mining new blocks.309 **/310 mining: AugmentedRpc<() => Observable<bool>>;311 /**312 * Returns id of new block filter.313 **/314 newBlockFilter: AugmentedRpc<() => Observable<U256>>;315 /**316 * Returns id of new filter.317 **/318 newFilter: AugmentedRpc<(filter: EthFilter | { fromBlock?: any; toBlock?: any; blockHash?: any; address?: any; topics?: any } | string | Uint8Array) => Observable<U256>>;319 /**320 * Returns id of new block filter.321 **/322 newPendingTransactionFilter: AugmentedRpc<() => Observable<U256>>;323 /**324 * Returns protocol version encoded as a string (quotes are necessary).325 **/326 protocolVersion: AugmentedRpc<() => Observable<u64>>;327 /**328 * Sends signed transaction, returning its hash.329 **/330 sendRawTransaction: AugmentedRpc<(bytes: Bytes | string | Uint8Array) => Observable<H256>>;331 /**332 * Sends transaction; will block waiting for signer to return the transaction hash333 **/334 sendTransaction: AugmentedRpc<(tx: EthTransactionRequest | { from?: any; to?: any; gasPrice?: any; gas?: any; value?: any; data?: any; nonce?: any } | string | Uint8Array) => Observable<H256>>;335 /**336 * Used for submitting mining hashrate.337 **/338 submitHashrate: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array, hash: H256 | string | Uint8Array) => Observable<bool>>;339 /**340 * Used for submitting a proof-of-work solution.341 **/342 submitWork: AugmentedRpc<(nonce: H64 | string | Uint8Array, headerHash: H256 | string | Uint8Array, mixDigest: H256 | string | Uint8Array) => Observable<bool>>;343 /**344 * Subscribe to Eth subscription.345 **/346 subscribe: AugmentedRpc<(kind: EthSubKind | 'newHeads' | 'logs' | 'newPendingTransactions' | 'syncing' | number | Uint8Array, params?: EthSubParams | { None: any } | { Logs: any } | string | Uint8Array) => Observable<Null>>;347 /**348 * Returns an object with data about the sync status or false.349 **/350 syncing: AugmentedRpc<() => Observable<EthSyncStatus>>;351 /**352 * Uninstalls filter.353 **/354 uninstallFilter: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<bool>>;355 };356 grandpa: {357 /**358 * Prove finality for the given block number, returning the Justification for the last block in the set.359 **/360 proveFinality: AugmentedRpc<(blockNumber: BlockNumber | AnyNumber | Uint8Array) => Observable<Option<EncodedFinalityProofs>>>;361 /**362 * Returns the state of the current best round state as well as the ongoing background rounds363 **/364 roundState: AugmentedRpc<() => Observable<ReportedRoundStates>>;365 /**366 * Subscribes to grandpa justifications367 **/368 subscribeJustifications: AugmentedRpc<() => Observable<JustificationNotification>>;369 };370 mmr: {371 /**372 * Generate MMR proof for the given leaf indices.373 **/374 generateBatchProof: AugmentedRpc<(leafIndices: Vec<u64> | (u64 | AnyNumber | Uint8Array)[], at?: BlockHash | string | Uint8Array) => Observable<MmrLeafProof>>;375 /**376 * Generate MMR proof for given leaf index.377 **/378 generateProof: AugmentedRpc<(leafIndex: u64 | AnyNumber | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<MmrLeafBatchProof>>;379 };380 net: {381 /**382 * Returns true if client is actively listening for network connections. Otherwise false.383 **/384 listening: AugmentedRpc<() => Observable<bool>>;385 /**386 * Returns number of peers connected to node.387 **/388 peerCount: AugmentedRpc<() => Observable<Text>>;389 /**390 * Returns protocol version.391 **/392 version: AugmentedRpc<() => Observable<Text>>;393 };394 offchain: {395 /**396 * Get offchain local storage under given key and prefix397 **/398 localStorageGet: AugmentedRpc<(kind: StorageKind | 'PERSISTENT' | 'LOCAL' | number | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;399 /**400 * Set offchain local storage under given key and prefix401 **/402 localStorageSet: AugmentedRpc<(kind: StorageKind | 'PERSISTENT' | 'LOCAL' | number | Uint8Array, key: Bytes | string | Uint8Array, value: Bytes | string | Uint8Array) => Observable<Null>>;403 };404 payment: {405 /**406 * Query the detailed fee of a given encoded extrinsic407 **/408 queryFeeDetails: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<FeeDetails>>;409 /**410 * Retrieves the fee information for an encoded extrinsic411 **/412 queryInfo: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<RuntimeDispatchInfo>>;413 };414 rmrk: {415 /**416 * Get tokens owned by an account in a collection417 **/418 accountTokens: AugmentedRpc<(accountId: AccountId32 | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;419 /**420 * Get base info421 **/422 base: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<RmrkTraitsBaseBaseInfo>>>;423 /**424 * Get all Base's parts425 **/426 baseParts: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTraitsPartPartType>>>;427 /**428 * Get collection by id429 **/430 collectionById: AugmentedRpc<(id: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<RmrkTraitsCollectionCollectionInfo>>>;431 /**432 * Get collection properties433 **/434 collectionProperties: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, filterKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTraitsPropertyPropertyInfo>>>;435 /**436 * Get the latest created collection id437 **/438 lastCollectionIdx: AugmentedRpc<(at?: Hash | string | Uint8Array) => Observable<u32>>;439 /**440 * Get NFT by collection id and NFT id441 **/442 nftById: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<RmrkTraitsNftNftInfo>>>;443 /**444 * Get NFT children445 **/446 nftChildren: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTraitsNftNftChild>>>;447 /**448 * Get NFT properties449 **/450 nftProperties: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, filterKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTraitsPropertyPropertyInfo>>>;451 /**452 * Get NFT resource priorities453 **/454 nftResourcePriority: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, resourceId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<u32>>>;455 /**456 * Get NFT resources457 **/458 nftResources: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTraitsResourceResourceInfo>>>;459 /**460 * Get Base's theme names461 **/462 themeNames: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<Bytes>>>;463 /**464 * Get Theme's keys values465 **/466 themes: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, themeName: Text | string, keys: Option<Vec<Text>> | null | Uint8Array | Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Option<RmrkTraitsTheme>>>;467 };468 rpc: {469 /**470 * Retrieves the list of RPC methods that are exposed by the node471 **/472 methods: AugmentedRpc<() => Observable<RpcMethods>>;473 };474 state: {475 /**476 * Perform a call to a builtin on the chain477 **/478 call: AugmentedRpc<(method: Text | string, data: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Bytes>>;479 /**480 * Retrieves the keys with prefix of a specific child storage481 **/482 getChildKeys: AugmentedRpc<(childStorageKey: StorageKey | string | Uint8Array | any, childDefinition: StorageKey | string | Uint8Array | any, childType: u32 | AnyNumber | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;483 /**484 * Returns proof of storage for child key entries at a specific block state.485 **/486 getChildReadProof: AugmentedRpc<(childStorageKey: PrefixedStorageKey | string | Uint8Array, keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: BlockHash | string | Uint8Array) => Observable<ReadProof>>;487 /**488 * Retrieves the child storage for a key489 **/490 getChildStorage: AugmentedRpc<(childStorageKey: StorageKey | string | Uint8Array | any, childDefinition: StorageKey | string | Uint8Array | any, childType: u32 | AnyNumber | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<StorageData>>;491 /**492 * Retrieves the child storage hash493 **/494 getChildStorageHash: AugmentedRpc<(childStorageKey: StorageKey | string | Uint8Array | any, childDefinition: StorageKey | string | Uint8Array | any, childType: u32 | AnyNumber | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Hash>>;495 /**496 * Retrieves the child storage size497 **/498 getChildStorageSize: AugmentedRpc<(childStorageKey: StorageKey | string | Uint8Array | any, childDefinition: StorageKey | string | Uint8Array | any, childType: u32 | AnyNumber | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<u64>>;499 /**500 * Retrieves the keys with a certain prefix501 **/502 getKeys: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;503 /**504 * Returns the keys with prefix with pagination support.505 **/506 getKeysPaged: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, count: u32 | AnyNumber | Uint8Array, startKey?: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;507 /**508 * Returns the runtime metadata509 **/510 getMetadata: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<Metadata>>;511 /**512 * Returns the keys with prefix, leave empty to get all the keys (deprecated: Use getKeysPaged)513 **/514 getPairs: AugmentedRpc<(prefix: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<KeyValue>>>;515 /**516 * Returns proof of storage entries at a specific block state517 **/518 getReadProof: AugmentedRpc<(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: BlockHash | string | Uint8Array) => Observable<ReadProof>>;519 /**520 * Get the runtime version521 **/522 getRuntimeVersion: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<RuntimeVersion>>;523 /**524 * Retrieves the storage for a key525 **/526 getStorage: AugmentedRpc<<T = Codec>(key: StorageKey | string | Uint8Array | any, block?: Hash | Uint8Array | string) => Observable<T>>;527 /**528 * Retrieves the storage hash529 **/530 getStorageHash: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Hash>>;531 /**532 * Retrieves the storage size533 **/534 getStorageSize: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<u64>>;535 /**536 * Query historical storage entries (by key) starting from a start block537 **/538 queryStorage: AugmentedRpc<<T = Codec[]>(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], fromBlock?: Hash | Uint8Array | string, toBlock?: Hash | Uint8Array | string) => Observable<[Hash, T][]>>;539 /**540 * Query storage entries (by key) starting at block hash given as the second parameter541 **/542 queryStorageAt: AugmentedRpc<<T = Codec[]>(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: Hash | Uint8Array | string) => Observable<T>>;543 /**544 * Retrieves the runtime version via subscription545 **/546 subscribeRuntimeVersion: AugmentedRpc<() => Observable<RuntimeVersion>>;547 /**548 * Subscribes to storage changes for the provided keys549 **/550 subscribeStorage: AugmentedRpc<<T = Codec[]>(keys?: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[]) => Observable<T>>;551 /**552 * Provides a way to trace the re-execution of a single block553 **/554 traceBlock: AugmentedRpc<(block: Hash | string | Uint8Array, targets: Option<Text> | null | Uint8Array | Text | string, storageKeys: Option<Text> | null | Uint8Array | Text | string, methods: Option<Text> | null | Uint8Array | Text | string) => Observable<TraceBlockResponse>>;555 /**556 * Check current migration state557 **/558 trieMigrationStatus: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<MigrationStatusResult>>;559 };560 syncstate: {561 /**562 * Returns the json-serialized chainspec running the node, with a sync state.563 **/564 genSyncSpec: AugmentedRpc<(raw: bool | boolean | Uint8Array) => Observable<Json>>;565 };566 system: {567 /**568 * Retrieves the next accountIndex as available on the node569 **/570 accountNextIndex: AugmentedRpc<(accountId: AccountId | string | Uint8Array) => Observable<Index>>;571 /**572 * Adds the supplied directives to the current log filter573 **/574 addLogFilter: AugmentedRpc<(directives: Text | string) => Observable<Null>>;575 /**576 * Adds a reserved peer577 **/578 addReservedPeer: AugmentedRpc<(peer: Text | string) => Observable<Text>>;579 /**580 * Retrieves the chain581 **/582 chain: AugmentedRpc<() => Observable<Text>>;583 /**584 * Retrieves the chain type585 **/586 chainType: AugmentedRpc<() => Observable<ChainType>>;587 /**588 * Dry run an extrinsic at a given block589 **/590 dryRun: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ApplyExtrinsicResult>>;591 /**592 * Return health status of the node593 **/594 health: AugmentedRpc<() => Observable<Health>>;595 /**596 * The addresses include a trailing /p2p/ with the local PeerId, and are thus suitable to be passed to addReservedPeer or as a bootnode address for example597 **/598 localListenAddresses: AugmentedRpc<() => Observable<Vec<Text>>>;599 /**600 * Returns the base58-encoded PeerId of the node601 **/602 localPeerId: AugmentedRpc<() => Observable<Text>>;603 /**604 * Retrieves the node name605 **/606 name: AugmentedRpc<() => Observable<Text>>;607 /**608 * Returns current state of the network609 **/610 networkState: AugmentedRpc<() => Observable<NetworkState>>;611 /**612 * Returns the roles the node is running as613 **/614 nodeRoles: AugmentedRpc<() => Observable<Vec<NodeRole>>>;615 /**616 * Returns the currently connected peers617 **/618 peers: AugmentedRpc<() => Observable<Vec<PeerInfo>>>;619 /**620 * Get a custom set of properties as a JSON object, defined in the chain spec621 **/622 properties: AugmentedRpc<() => Observable<ChainProperties>>;623 /**624 * Remove a reserved peer625 **/626 removeReservedPeer: AugmentedRpc<(peerId: Text | string) => Observable<Text>>;627 /**628 * Returns the list of reserved peers629 **/630 reservedPeers: AugmentedRpc<() => Observable<Vec<Text>>>;631 /**632 * Resets the log filter to Substrate defaults633 **/634 resetLogFilter: AugmentedRpc<() => Observable<Null>>;635 /**636 * Returns the state of the syncing of the node637 **/638 syncState: AugmentedRpc<() => Observable<SyncState>>;639 /**640 * Retrieves the version of the node641 **/642 version: AugmentedRpc<() => Observable<Text>>;643 };644 unique: {645 /**646 * Get the amount of any user tokens owned by an account647 **/648 accountBalance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;649 /**650 * Get tokens owned by an account in a collection651 **/652 accountTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;653 /**654 * Get the list of admin accounts of a collection655 **/656 adminlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletEvmAccountBasicCrossAccountIdRepr>>>;657 /**658 * Get the amount of currently possible sponsored transactions on a token for the fee to be taken off a sponsor659 **/660 allowance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, sender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, spender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;661 /**662 * Check if a user is allowed to operate within a collection663 **/664 allowed: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;665 /**666 * Get the list of accounts allowed to operate within a collection667 **/668 allowlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletEvmAccountBasicCrossAccountIdRepr>>>;669 /**670 * Get the amount of a specific token owned by an account671 **/672 balance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;673 /**674 * Get a collection by the specified ID675 **/676 collectionById: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsRpcCollection>>>;677 /**678 * Get collection properties, optionally limited to the provided keys679 **/680 collectionProperties: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsProperty>>>;681 /**682 * Get chain stats about collections683 **/684 collectionStats: AugmentedRpc<(at?: Hash | string | Uint8Array) => Observable<UpDataStructsCollectionStats>>;685 /**686 * Get tokens contained within a collection687 **/688 collectionTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;689 /**690 * Get token constant metadata691 **/692 constMetadata: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Bytes>>;693 /**694 * Get effective collection limits695 **/696 effectiveCollectionLimits: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsCollectionLimits>>>;697 /**698 * Get the last token ID created in a collection699 **/700 lastTokenId: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;701 /**702 * Get the number of blocks until sponsoring a transaction is available703 **/704 nextSponsored: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<u64>>>;705 /**706 * Returns the total amount of unstaked tokens707 **/708 pendingUnstake: AugmentedRpc<(staker?: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;709 /**710 * Returns the total amount of unstaked tokens per block711 **/712 pendingUnstakePerBlock: AugmentedRpc<(staker: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<ITuple<[u32, u128]>>>>;713 /**714 * Get property permissions, optionally limited to the provided keys715 **/716 propertyPermissions: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsPropertyKeyPermission>>>;717 /**718 * Get tokens nested directly into the token719 **/720 tokenChildren: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsTokenChild>>>;721 /**722 * Get token data, including properties, optionally limited to the provided keys, and total pieces for an RFT723 **/724 tokenData: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<UpDataStructsTokenData>>;725 /**726 * Check if the token exists727 **/728 tokenExists: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;729 /**730 * Get the token owner731 **/732 tokenOwner: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<PalletEvmAccountBasicCrossAccountIdRepr>>>;733 /**734 * Returns 10 tokens owners in no particular order735 **/736 tokenOwners: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletEvmAccountBasicCrossAccountIdRepr>>>;737 /**738 * Get token properties, optionally limited to the provided keys739 **/740 tokenProperties: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsProperty>>>;741 /**742 * Get the topmost token owner in the hierarchy of a possibly nested token743 **/744 topmostTokenOwner: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<PalletEvmAccountBasicCrossAccountIdRepr>>>;745 /**746 * Get the total amount of pieces of an RFT747 **/748 totalPieces: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<u128>>>;749 /**750 * Returns the total amount of staked tokens751 **/752 totalStaked: AugmentedRpc<(staker?: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;753 /**754 * Returns the total amount of staked tokens per block when staked755 **/756 totalStakedPerBlock: AugmentedRpc<(staker: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<ITuple<[u32, u128]>>>>;757 /**758 * Return the total amount locked by staking tokens759 **/760 totalStakingLocked: AugmentedRpc<(staker: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;761 /**762 * Get the amount of distinctive tokens present in a collection763 **/764 totalSupply: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;765 /**766 * Get token variable metadata767 **/768 variableMetadata: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Bytes>>;769 };770 web3: {771 /**772 * Returns current client version.773 **/774 clientVersion: AugmentedRpc<() => Observable<Text>>;775 /**776 * Returns sha3 of the given data777 **/778 sha3: AugmentedRpc<(data: Bytes | string | Uint8Array) => Observable<H256>>;779 };780 } // RpcInterface781} // declare module1// Auto-generated via `yarn polkadot-types-from-chain`, do not edit2/* eslint-disable */34// import type lookup before we augment - in some environments5// this is required to allow for ambient/previous definitions6import '@polkadot/rpc-core/types/jsonrpc';78import type { PalletEvmAccountBasicCrossAccountIdRepr, RmrkTraitsBaseBaseInfo, RmrkTraitsCollectionCollectionInfo, RmrkTraitsNftNftChild, RmrkTraitsNftNftInfo, RmrkTraitsPartPartType, RmrkTraitsPropertyPropertyInfo, RmrkTraitsResourceResourceInfo, RmrkTraitsTheme, UpDataStructsCollectionLimits, UpDataStructsCollectionStats, UpDataStructsProperty, UpDataStructsPropertyKeyPermission, UpDataStructsRpcCollection, UpDataStructsTokenChild, UpDataStructsTokenData } from './default';9import type { AugmentedRpc } from '@polkadot/rpc-core/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';12import type { AnyNumber, Codec, ITuple } from '@polkadot/types-codec/types';13import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';14import type { EpochAuthorship } from '@polkadot/types/interfaces/babe';15import type { BeefySignedCommitment } from '@polkadot/types/interfaces/beefy';16import type { BlockHash } from '@polkadot/types/interfaces/chain';17import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';18import type { AuthorityId } from '@polkadot/types/interfaces/consensus';19import type { CodeUploadRequest, CodeUploadResult, ContractCallRequest, ContractExecResult, ContractInstantiateResult, InstantiateRequest } from '@polkadot/types/interfaces/contracts';20import type { BlockStats } from '@polkadot/types/interfaces/dev';21import type { CreatedBlock } from '@polkadot/types/interfaces/engine';22import type { EthAccount, EthCallRequest, EthFeeHistory, EthFilter, EthFilterChanges, EthLog, EthReceipt, EthRichBlock, EthSubKind, EthSubParams, EthSyncStatus, EthTransaction, EthTransactionRequest, EthWork } from '@polkadot/types/interfaces/eth';23import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';24import type { EncodedFinalityProofs, JustificationNotification, ReportedRoundStates } from '@polkadot/types/interfaces/grandpa';25import type { MmrLeafBatchProof, MmrLeafProof } from '@polkadot/types/interfaces/mmr';26import type { StorageKind } from '@polkadot/types/interfaces/offchain';27import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';28import type { RpcMethods } from '@polkadot/types/interfaces/rpc';29import type { AccountId, AccountId32, BlockNumber, H160, H256, H64, Hash, Header, Index, Justification, KeyValue, SignedBlock, StorageData } from '@polkadot/types/interfaces/runtime';30import type { MigrationStatusResult, ReadProof, RuntimeVersion, TraceBlockResponse } from '@polkadot/types/interfaces/state';31import type { ApplyExtrinsicResult, ChainProperties, ChainType, Health, NetworkState, NodeRole, PeerInfo, SyncState } from '@polkadot/types/interfaces/system';32import type { IExtrinsic, Observable } from '@polkadot/types/types';3334export type __AugmentedRpc = AugmentedRpc<() => unknown>;3536declare module '@polkadot/rpc-core/types/jsonrpc' {37 interface RpcInterface {38 appPromotion: {39 /**40 * Returns the total amount of unstaked tokens41 **/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 block45 **/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 tokens49 **/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 staked53 **/54 totalStakedPerBlock: AugmentedRpc<(staker: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<ITuple<[u32, u128]>>>>;55 /**56 * Return the total amount locked by staking tokens57 **/58 totalStakingLocked: AugmentedRpc<(staker: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;59 };60 author: {61 /**62 * Returns true if the keystore has private keys for the given public key and key type.63 **/64 hasKey: AugmentedRpc<(publicKey: Bytes | string | Uint8Array, keyType: Text | string) => Observable<bool>>;65 /**66 * Returns true if the keystore has private keys for the given session public keys.67 **/68 hasSessionKeys: AugmentedRpc<(sessionKeys: Bytes | string | Uint8Array) => Observable<bool>>;69 /**70 * Insert a key into the keystore.71 **/72 insertKey: AugmentedRpc<(keyType: Text | string, suri: Text | string, publicKey: Bytes | string | Uint8Array) => Observable<Bytes>>;73 /**74 * Returns all pending extrinsics, potentially grouped by sender75 **/76 pendingExtrinsics: AugmentedRpc<() => Observable<Vec<Extrinsic>>>;77 /**78 * Remove given extrinsic from the pool and temporarily ban it to prevent reimporting79 **/80 removeExtrinsic: AugmentedRpc<(bytesOrHash: Vec<ExtrinsicOrHash> | (ExtrinsicOrHash | { Hash: any } | { Extrinsic: any } | string | Uint8Array)[]) => Observable<Vec<Hash>>>;81 /**82 * Generate new session keys and returns the corresponding public keys83 **/84 rotateKeys: AugmentedRpc<() => Observable<Bytes>>;85 /**86 * Submit and subscribe to watch an extrinsic until unsubscribed87 **/88 submitAndWatchExtrinsic: AugmentedRpc<(extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<ExtrinsicStatus>>;89 /**90 * Submit a fully formatted extrinsic for block inclusion91 **/92 submitExtrinsic: AugmentedRpc<(extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<Hash>>;93 };94 babe: {95 /**96 * Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore97 **/98 epochAuthorship: AugmentedRpc<() => Observable<HashMap<AuthorityId, EpochAuthorship>>>;99 };100 beefy: {101 /**102 * Returns hash of the latest BEEFY finalized block as seen by this client.103 **/104 getFinalizedHead: AugmentedRpc<() => Observable<H256>>;105 /**106 * Returns the block most recently finalized by BEEFY, alongside side its justification.107 **/108 subscribeJustifications: AugmentedRpc<() => Observable<BeefySignedCommitment>>;109 };110 chain: {111 /**112 * Get header and body of a relay chain block113 **/114 getBlock: AugmentedRpc<(hash?: BlockHash | string | Uint8Array) => Observable<SignedBlock>>;115 /**116 * Get the block hash for a specific block117 **/118 getBlockHash: AugmentedRpc<(blockNumber?: BlockNumber | AnyNumber | Uint8Array) => Observable<BlockHash>>;119 /**120 * Get hash of the last finalized block in the canon chain121 **/122 getFinalizedHead: AugmentedRpc<() => Observable<BlockHash>>;123 /**124 * Retrieves the header for a specific block125 **/126 getHeader: AugmentedRpc<(hash?: BlockHash | string | Uint8Array) => Observable<Header>>;127 /**128 * Retrieves the newest header via subscription129 **/130 subscribeAllHeads: AugmentedRpc<() => Observable<Header>>;131 /**132 * Retrieves the best finalized header via subscription133 **/134 subscribeFinalizedHeads: AugmentedRpc<() => Observable<Header>>;135 /**136 * Retrieves the best header via subscription137 **/138 subscribeNewHeads: AugmentedRpc<() => Observable<Header>>;139 };140 childstate: {141 /**142 * Returns the keys with prefix from a child storage, leave empty to get all the keys143 **/144 getKeys: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, prefix: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Vec<StorageKey>>>;145 /**146 * Returns the keys with prefix from a child storage with pagination support147 **/148 getKeysPaged: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, prefix: StorageKey | string | Uint8Array | any, count: u32 | AnyNumber | Uint8Array, startKey?: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Vec<StorageKey>>>;149 /**150 * Returns a child storage entry at a specific block state151 **/152 getStorage: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<StorageData>>>;153 /**154 * Returns child storage entries for multiple keys at a specific block state155 **/156 getStorageEntries: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: Hash | string | Uint8Array) => Observable<Vec<Option<StorageData>>>>;157 /**158 * Returns the hash of a child storage entry at a block state159 **/160 getStorageHash: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<Hash>>>;161 /**162 * Returns the size of a child storage entry at a block state163 **/164 getStorageSize: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<u64>>>;165 };166 contracts: {167 /**168 * Executes a call to a contract169 **/170 call: AugmentedRpc<(callRequest: ContractCallRequest | { origin?: any; dest?: any; value?: any; gasLimit?: any; storageDepositLimit?: any; inputData?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractExecResult>>;171 /**172 * Returns the value under a specified storage key in a contract173 **/174 getStorage: AugmentedRpc<(address: AccountId | string | Uint8Array, key: H256 | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<Bytes>>>;175 /**176 * Instantiate a new contract177 **/178 instantiate: AugmentedRpc<(request: InstantiateRequest | { origin?: any; value?: any; gasLimit?: any; storageDepositLimit?: any; code?: any; data?: any; salt?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractInstantiateResult>>;179 /**180 * Returns the projected time a given contract will be able to sustain paying its rent181 **/182 rentProjection: AugmentedRpc<(address: AccountId | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<BlockNumber>>>;183 /**184 * Upload new code without instantiating a contract from it185 **/186 uploadCode: AugmentedRpc<(uploadRequest: CodeUploadRequest | { origin?: any; code?: any; storageDepositLimit?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<CodeUploadResult>>;187 };188 dev: {189 /**190 * Reexecute the specified `block_hash` and gather statistics while doing so191 **/192 getBlockStats: AugmentedRpc<(at: Hash | string | Uint8Array) => Observable<Option<BlockStats>>>;193 };194 engine: {195 /**196 * Instructs the manual-seal authorship task to create a new block197 **/198 createBlock: AugmentedRpc<(createEmpty: bool | boolean | Uint8Array, finalize: bool | boolean | Uint8Array, parentHash?: BlockHash | string | Uint8Array) => Observable<CreatedBlock>>;199 /**200 * Instructs the manual-seal authorship task to finalize a block201 **/202 finalizeBlock: AugmentedRpc<(hash: BlockHash | string | Uint8Array, justification?: Justification) => Observable<bool>>;203 };204 eth: {205 /**206 * Returns accounts list.207 **/208 accounts: AugmentedRpc<() => Observable<Vec<H160>>>;209 /**210 * Returns the blockNumber211 **/212 blockNumber: AugmentedRpc<() => Observable<U256>>;213 /**214 * Call contract, returning the output data.215 **/216 call: AugmentedRpc<(request: EthCallRequest | { from?: any; to?: any; gasPrice?: any; gas?: any; value?: any; data?: any; nonce?: any } | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<Bytes>>;217 /**218 * Returns the chain ID used for transaction signing at the current best block. None is returned if not available.219 **/220 chainId: AugmentedRpc<() => Observable<U64>>;221 /**222 * Returns block author.223 **/224 coinbase: AugmentedRpc<() => Observable<H160>>;225 /**226 * Estimate gas needed for execution of given contract.227 **/228 estimateGas: AugmentedRpc<(request: EthCallRequest | { from?: any; to?: any; gasPrice?: any; gas?: any; value?: any; data?: any; nonce?: any } | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;229 /**230 * Returns fee history for given block count & reward percentiles231 **/232 feeHistory: AugmentedRpc<(blockCount: U256 | AnyNumber | Uint8Array, newestBlock: BlockNumber | AnyNumber | Uint8Array, rewardPercentiles: Option<Vec<f64>> | null | Uint8Array | Vec<f64> | (f64)[]) => Observable<EthFeeHistory>>;233 /**234 * Returns current gas price.235 **/236 gasPrice: AugmentedRpc<() => Observable<U256>>;237 /**238 * Returns balance of the given account.239 **/240 getBalance: AugmentedRpc<(address: H160 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;241 /**242 * Returns block with given hash.243 **/244 getBlockByHash: AugmentedRpc<(hash: H256 | string | Uint8Array, full: bool | boolean | Uint8Array) => Observable<Option<EthRichBlock>>>;245 /**246 * Returns block with given number.247 **/248 getBlockByNumber: AugmentedRpc<(block: BlockNumber | AnyNumber | Uint8Array, full: bool | boolean | Uint8Array) => Observable<Option<EthRichBlock>>>;249 /**250 * Returns the number of transactions in a block with given hash.251 **/252 getBlockTransactionCountByHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<U256>>;253 /**254 * Returns the number of transactions in a block with given block number.255 **/256 getBlockTransactionCountByNumber: AugmentedRpc<(block: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;257 /**258 * Returns the code at given address at given time (block number).259 **/260 getCode: AugmentedRpc<(address: H160 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<Bytes>>;261 /**262 * Returns filter changes since last poll.263 **/264 getFilterChanges: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<EthFilterChanges>>;265 /**266 * Returns all logs matching given filter (in a range 'from' - 'to').267 **/268 getFilterLogs: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<Vec<EthLog>>>;269 /**270 * Returns logs matching given filter object.271 **/272 getLogs: AugmentedRpc<(filter: EthFilter | { fromBlock?: any; toBlock?: any; blockHash?: any; address?: any; topics?: any } | string | Uint8Array) => Observable<Vec<EthLog>>>;273 /**274 * Returns proof for account and storage.275 **/276 getProof: AugmentedRpc<(address: H160 | string | Uint8Array, storageKeys: Vec<H256> | (H256 | string | Uint8Array)[], number: BlockNumber | AnyNumber | Uint8Array) => Observable<EthAccount>>;277 /**278 * Returns content of the storage at given address.279 **/280 getStorageAt: AugmentedRpc<(address: H160 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<H256>>;281 /**282 * Returns transaction at given block hash and index.283 **/284 getTransactionByBlockHashAndIndex: AugmentedRpc<(hash: H256 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthTransaction>>;285 /**286 * Returns transaction by given block number and index.287 **/288 getTransactionByBlockNumberAndIndex: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthTransaction>>;289 /**290 * Get transaction by its hash.291 **/292 getTransactionByHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<EthTransaction>>;293 /**294 * Returns the number of transactions sent from given address at given time (block number).295 **/296 getTransactionCount: AugmentedRpc<(hash: H256 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;297 /**298 * Returns transaction receipt by transaction hash.299 **/300 getTransactionReceipt: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<EthReceipt>>;301 /**302 * Returns an uncles at given block and index.303 **/304 getUncleByBlockHashAndIndex: AugmentedRpc<(hash: H256 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthRichBlock>>;305 /**306 * Returns an uncles at given block and index.307 **/308 getUncleByBlockNumberAndIndex: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthRichBlock>>;309 /**310 * Returns the number of uncles in a block with given hash.311 **/312 getUncleCountByBlockHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<U256>>;313 /**314 * Returns the number of uncles in a block with given block number.315 **/316 getUncleCountByBlockNumber: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;317 /**318 * Returns the hash of the current block, the seedHash, and the boundary condition to be met.319 **/320 getWork: AugmentedRpc<() => Observable<EthWork>>;321 /**322 * Returns the number of hashes per second that the node is mining with.323 **/324 hashrate: AugmentedRpc<() => Observable<U256>>;325 /**326 * Returns max priority fee per gas327 **/328 maxPriorityFeePerGas: AugmentedRpc<() => Observable<U256>>;329 /**330 * Returns true if client is actively mining new blocks.331 **/332 mining: AugmentedRpc<() => Observable<bool>>;333 /**334 * Returns id of new block filter.335 **/336 newBlockFilter: AugmentedRpc<() => Observable<U256>>;337 /**338 * Returns id of new filter.339 **/340 newFilter: AugmentedRpc<(filter: EthFilter | { fromBlock?: any; toBlock?: any; blockHash?: any; address?: any; topics?: any } | string | Uint8Array) => Observable<U256>>;341 /**342 * Returns id of new block filter.343 **/344 newPendingTransactionFilter: AugmentedRpc<() => Observable<U256>>;345 /**346 * Returns protocol version encoded as a string (quotes are necessary).347 **/348 protocolVersion: AugmentedRpc<() => Observable<u64>>;349 /**350 * Sends signed transaction, returning its hash.351 **/352 sendRawTransaction: AugmentedRpc<(bytes: Bytes | string | Uint8Array) => Observable<H256>>;353 /**354 * Sends transaction; will block waiting for signer to return the transaction hash355 **/356 sendTransaction: AugmentedRpc<(tx: EthTransactionRequest | { from?: any; to?: any; gasPrice?: any; gas?: any; value?: any; data?: any; nonce?: any } | string | Uint8Array) => Observable<H256>>;357 /**358 * Used for submitting mining hashrate.359 **/360 submitHashrate: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array, hash: H256 | string | Uint8Array) => Observable<bool>>;361 /**362 * Used for submitting a proof-of-work solution.363 **/364 submitWork: AugmentedRpc<(nonce: H64 | string | Uint8Array, headerHash: H256 | string | Uint8Array, mixDigest: H256 | string | Uint8Array) => Observable<bool>>;365 /**366 * Subscribe to Eth subscription.367 **/368 subscribe: AugmentedRpc<(kind: EthSubKind | 'newHeads' | 'logs' | 'newPendingTransactions' | 'syncing' | number | Uint8Array, params?: EthSubParams | { None: any } | { Logs: any } | string | Uint8Array) => Observable<Null>>;369 /**370 * Returns an object with data about the sync status or false.371 **/372 syncing: AugmentedRpc<() => Observable<EthSyncStatus>>;373 /**374 * Uninstalls filter.375 **/376 uninstallFilter: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<bool>>;377 };378 grandpa: {379 /**380 * Prove finality for the given block number, returning the Justification for the last block in the set.381 **/382 proveFinality: AugmentedRpc<(blockNumber: BlockNumber | AnyNumber | Uint8Array) => Observable<Option<EncodedFinalityProofs>>>;383 /**384 * Returns the state of the current best round state as well as the ongoing background rounds385 **/386 roundState: AugmentedRpc<() => Observable<ReportedRoundStates>>;387 /**388 * Subscribes to grandpa justifications389 **/390 subscribeJustifications: AugmentedRpc<() => Observable<JustificationNotification>>;391 };392 mmr: {393 /**394 * Generate MMR proof for the given leaf indices.395 **/396 generateBatchProof: AugmentedRpc<(leafIndices: Vec<u64> | (u64 | AnyNumber | Uint8Array)[], at?: BlockHash | string | Uint8Array) => Observable<MmrLeafProof>>;397 /**398 * Generate MMR proof for given leaf index.399 **/400 generateProof: AugmentedRpc<(leafIndex: u64 | AnyNumber | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<MmrLeafBatchProof>>;401 };402 net: {403 /**404 * Returns true if client is actively listening for network connections. Otherwise false.405 **/406 listening: AugmentedRpc<() => Observable<bool>>;407 /**408 * Returns number of peers connected to node.409 **/410 peerCount: AugmentedRpc<() => Observable<Text>>;411 /**412 * Returns protocol version.413 **/414 version: AugmentedRpc<() => Observable<Text>>;415 };416 offchain: {417 /**418 * Get offchain local storage under given key and prefix419 **/420 localStorageGet: AugmentedRpc<(kind: StorageKind | 'PERSISTENT' | 'LOCAL' | number | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;421 /**422 * Set offchain local storage under given key and prefix423 **/424 localStorageSet: AugmentedRpc<(kind: StorageKind | 'PERSISTENT' | 'LOCAL' | number | Uint8Array, key: Bytes | string | Uint8Array, value: Bytes | string | Uint8Array) => Observable<Null>>;425 };426 payment: {427 /**428 * Query the detailed fee of a given encoded extrinsic429 **/430 queryFeeDetails: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<FeeDetails>>;431 /**432 * Retrieves the fee information for an encoded extrinsic433 **/434 queryInfo: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<RuntimeDispatchInfo>>;435 };436 rmrk: {437 /**438 * Get tokens owned by an account in a collection439 **/440 accountTokens: AugmentedRpc<(accountId: AccountId32 | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;441 /**442 * Get base info443 **/444 base: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<RmrkTraitsBaseBaseInfo>>>;445 /**446 * Get all Base's parts447 **/448 baseParts: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTraitsPartPartType>>>;449 /**450 * Get collection by id451 **/452 collectionById: AugmentedRpc<(id: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<RmrkTraitsCollectionCollectionInfo>>>;453 /**454 * Get collection properties455 **/456 collectionProperties: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, filterKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTraitsPropertyPropertyInfo>>>;457 /**458 * Get the latest created collection id459 **/460 lastCollectionIdx: AugmentedRpc<(at?: Hash | string | Uint8Array) => Observable<u32>>;461 /**462 * Get NFT by collection id and NFT id463 **/464 nftById: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<RmrkTraitsNftNftInfo>>>;465 /**466 * Get NFT children467 **/468 nftChildren: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTraitsNftNftChild>>>;469 /**470 * Get NFT properties471 **/472 nftProperties: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, filterKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTraitsPropertyPropertyInfo>>>;473 /**474 * Get NFT resource priorities475 **/476 nftResourcePriority: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, resourceId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<u32>>>;477 /**478 * Get NFT resources479 **/480 nftResources: AugmentedRpc<(collectionId: u32 | AnyNumber | Uint8Array, nftId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<RmrkTraitsResourceResourceInfo>>>;481 /**482 * Get Base's theme names483 **/484 themeNames: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<Bytes>>>;485 /**486 * Get Theme's keys values487 **/488 themes: AugmentedRpc<(baseId: u32 | AnyNumber | Uint8Array, themeName: Text | string, keys: Option<Vec<Text>> | null | Uint8Array | Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Option<RmrkTraitsTheme>>>;489 };490 rpc: {491 /**492 * Retrieves the list of RPC methods that are exposed by the node493 **/494 methods: AugmentedRpc<() => Observable<RpcMethods>>;495 };496 state: {497 /**498 * Perform a call to a builtin on the chain499 **/500 call: AugmentedRpc<(method: Text | string, data: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Bytes>>;501 /**502 * Retrieves the keys with prefix of a specific child storage503 **/504 getChildKeys: AugmentedRpc<(childStorageKey: StorageKey | string | Uint8Array | any, childDefinition: StorageKey | string | Uint8Array | any, childType: u32 | AnyNumber | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;505 /**506 * Returns proof of storage for child key entries at a specific block state.507 **/508 getChildReadProof: AugmentedRpc<(childStorageKey: PrefixedStorageKey | string | Uint8Array, keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: BlockHash | string | Uint8Array) => Observable<ReadProof>>;509 /**510 * Retrieves the child storage for a key511 **/512 getChildStorage: AugmentedRpc<(childStorageKey: StorageKey | string | Uint8Array | any, childDefinition: StorageKey | string | Uint8Array | any, childType: u32 | AnyNumber | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<StorageData>>;513 /**514 * Retrieves the child storage hash515 **/516 getChildStorageHash: AugmentedRpc<(childStorageKey: StorageKey | string | Uint8Array | any, childDefinition: StorageKey | string | Uint8Array | any, childType: u32 | AnyNumber | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Hash>>;517 /**518 * Retrieves the child storage size519 **/520 getChildStorageSize: AugmentedRpc<(childStorageKey: StorageKey | string | Uint8Array | any, childDefinition: StorageKey | string | Uint8Array | any, childType: u32 | AnyNumber | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<u64>>;521 /**522 * Retrieves the keys with a certain prefix523 **/524 getKeys: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;525 /**526 * Returns the keys with prefix with pagination support.527 **/528 getKeysPaged: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, count: u32 | AnyNumber | Uint8Array, startKey?: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;529 /**530 * Returns the runtime metadata531 **/532 getMetadata: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<Metadata>>;533 /**534 * Returns the keys with prefix, leave empty to get all the keys (deprecated: Use getKeysPaged)535 **/536 getPairs: AugmentedRpc<(prefix: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<KeyValue>>>;537 /**538 * Returns proof of storage entries at a specific block state539 **/540 getReadProof: AugmentedRpc<(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: BlockHash | string | Uint8Array) => Observable<ReadProof>>;541 /**542 * Get the runtime version543 **/544 getRuntimeVersion: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<RuntimeVersion>>;545 /**546 * Retrieves the storage for a key547 **/548 getStorage: AugmentedRpc<<T = Codec>(key: StorageKey | string | Uint8Array | any, block?: Hash | Uint8Array | string) => Observable<T>>;549 /**550 * Retrieves the storage hash551 **/552 getStorageHash: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Hash>>;553 /**554 * Retrieves the storage size555 **/556 getStorageSize: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<u64>>;557 /**558 * Query historical storage entries (by key) starting from a start block559 **/560 queryStorage: AugmentedRpc<<T = Codec[]>(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], fromBlock?: Hash | Uint8Array | string, toBlock?: Hash | Uint8Array | string) => Observable<[Hash, T][]>>;561 /**562 * Query storage entries (by key) starting at block hash given as the second parameter563 **/564 queryStorageAt: AugmentedRpc<<T = Codec[]>(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: Hash | Uint8Array | string) => Observable<T>>;565 /**566 * Retrieves the runtime version via subscription567 **/568 subscribeRuntimeVersion: AugmentedRpc<() => Observable<RuntimeVersion>>;569 /**570 * Subscribes to storage changes for the provided keys571 **/572 subscribeStorage: AugmentedRpc<<T = Codec[]>(keys?: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[]) => Observable<T>>;573 /**574 * Provides a way to trace the re-execution of a single block575 **/576 traceBlock: AugmentedRpc<(block: Hash | string | Uint8Array, targets: Option<Text> | null | Uint8Array | Text | string, storageKeys: Option<Text> | null | Uint8Array | Text | string, methods: Option<Text> | null | Uint8Array | Text | string) => Observable<TraceBlockResponse>>;577 /**578 * Check current migration state579 **/580 trieMigrationStatus: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<MigrationStatusResult>>;581 };582 syncstate: {583 /**584 * Returns the json-serialized chainspec running the node, with a sync state.585 **/586 genSyncSpec: AugmentedRpc<(raw: bool | boolean | Uint8Array) => Observable<Json>>;587 };588 system: {589 /**590 * Retrieves the next accountIndex as available on the node591 **/592 accountNextIndex: AugmentedRpc<(accountId: AccountId | string | Uint8Array) => Observable<Index>>;593 /**594 * Adds the supplied directives to the current log filter595 **/596 addLogFilter: AugmentedRpc<(directives: Text | string) => Observable<Null>>;597 /**598 * Adds a reserved peer599 **/600 addReservedPeer: AugmentedRpc<(peer: Text | string) => Observable<Text>>;601 /**602 * Retrieves the chain603 **/604 chain: AugmentedRpc<() => Observable<Text>>;605 /**606 * Retrieves the chain type607 **/608 chainType: AugmentedRpc<() => Observable<ChainType>>;609 /**610 * Dry run an extrinsic at a given block611 **/612 dryRun: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ApplyExtrinsicResult>>;613 /**614 * Return health status of the node615 **/616 health: AugmentedRpc<() => Observable<Health>>;617 /**618 * The addresses include a trailing /p2p/ with the local PeerId, and are thus suitable to be passed to addReservedPeer or as a bootnode address for example619 **/620 localListenAddresses: AugmentedRpc<() => Observable<Vec<Text>>>;621 /**622 * Returns the base58-encoded PeerId of the node623 **/624 localPeerId: AugmentedRpc<() => Observable<Text>>;625 /**626 * Retrieves the node name627 **/628 name: AugmentedRpc<() => Observable<Text>>;629 /**630 * Returns current state of the network631 **/632 networkState: AugmentedRpc<() => Observable<NetworkState>>;633 /**634 * Returns the roles the node is running as635 **/636 nodeRoles: AugmentedRpc<() => Observable<Vec<NodeRole>>>;637 /**638 * Returns the currently connected peers639 **/640 peers: AugmentedRpc<() => Observable<Vec<PeerInfo>>>;641 /**642 * Get a custom set of properties as a JSON object, defined in the chain spec643 **/644 properties: AugmentedRpc<() => Observable<ChainProperties>>;645 /**646 * Remove a reserved peer647 **/648 removeReservedPeer: AugmentedRpc<(peerId: Text | string) => Observable<Text>>;649 /**650 * Returns the list of reserved peers651 **/652 reservedPeers: AugmentedRpc<() => Observable<Vec<Text>>>;653 /**654 * Resets the log filter to Substrate defaults655 **/656 resetLogFilter: AugmentedRpc<() => Observable<Null>>;657 /**658 * Returns the state of the syncing of the node659 **/660 syncState: AugmentedRpc<() => Observable<SyncState>>;661 /**662 * Retrieves the version of the node663 **/664 version: AugmentedRpc<() => Observable<Text>>;665 };666 unique: {667 /**668 * Get the amount of any user tokens owned by an account669 **/670 accountBalance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;671 /**672 * Get tokens owned by an account in a collection673 **/674 accountTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;675 /**676 * Get the list of admin accounts of a collection677 **/678 adminlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletEvmAccountBasicCrossAccountIdRepr>>>;679 /**680 * Get the amount of currently possible sponsored transactions on a token for the fee to be taken off a sponsor681 **/682 allowance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, sender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, spender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;683 /**684 * Check if a user is allowed to operate within a collection685 **/686 allowed: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;687 /**688 * Get the list of accounts allowed to operate within a collection689 **/690 allowlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletEvmAccountBasicCrossAccountIdRepr>>>;691 /**692 * Get the amount of a specific token owned by an account693 **/694 balance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;695 /**696 * Get a collection by the specified ID697 **/698 collectionById: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsRpcCollection>>>;699 /**700 * Get collection properties, optionally limited to the provided keys701 **/702 collectionProperties: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsProperty>>>;703 /**704 * Get chain stats about collections705 **/706 collectionStats: AugmentedRpc<(at?: Hash | string | Uint8Array) => Observable<UpDataStructsCollectionStats>>;707 /**708 * Get tokens contained within a collection709 **/710 collectionTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;711 /**712 * Get token constant metadata713 **/714 constMetadata: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Bytes>>;715 /**716 * Get effective collection limits717 **/718 effectiveCollectionLimits: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsCollectionLimits>>>;719 /**720 * Get the last token ID created in a collection721 **/722 lastTokenId: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;723 /**724 * Get the number of blocks until sponsoring a transaction is available725 **/726 nextSponsored: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<u64>>>;727 /**728 * Get property permissions, optionally limited to the provided keys729 **/730 propertyPermissions: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsPropertyKeyPermission>>>;731 /**732 * Get tokens nested directly into the token733 **/734 tokenChildren: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsTokenChild>>>;735 /**736 * Get token data, including properties, optionally limited to the provided keys, and total pieces for an RFT737 **/738 tokenData: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<UpDataStructsTokenData>>;739 /**740 * Check if the token exists741 **/742 tokenExists: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;743 /**744 * Get the token owner745 **/746 tokenOwner: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<PalletEvmAccountBasicCrossAccountIdRepr>>>;747 /**748 * Returns 10 tokens owners in no particular order749 **/750 tokenOwners: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletEvmAccountBasicCrossAccountIdRepr>>>;751 /**752 * Get token properties, optionally limited to the provided keys753 **/754 tokenProperties: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, propertyKeys?: Vec<Text> | (Text | string)[], at?: Hash | string | Uint8Array) => Observable<Vec<UpDataStructsProperty>>>;755 /**756 * Get the topmost token owner in the hierarchy of a possibly nested token757 **/758 topmostTokenOwner: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<PalletEvmAccountBasicCrossAccountIdRepr>>>;759 /**760 * Get the total amount of pieces of an RFT761 **/762 totalPieces: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<u128>>>;763 /**764 * Get the amount of distinctive tokens present in a collection765 **/766 totalSupply: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;767 /**768 * Get token variable metadata769 **/770 variableMetadata: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Bytes>>;771 };772 web3: {773 /**774 * Returns current client version.775 **/776 clientVersion: AugmentedRpc<() => Observable<Text>>;777 /**778 * Returns sha3 of the given data779 **/780 sha3: AugmentedRpc<(data: Bytes | string | Uint8Array) => Observable<H256>>;781 };782 } // RpcInterface783} // declare moduletests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-tx.ts
+++ b/tests/src/interfaces/augment-api-tx.ts
@@ -181,8 +181,21 @@
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
evmMigration: {
+ /**
+ * Start contract migration, inserts contract stub at target address,
+ * and marks account as pending, allowing to insert storage
+ **/
begin: AugmentedSubmittable<(address: H160 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160]>;
+ /**
+ * Finish contract migration, allows it to be called.
+ * It is not possible to alter contract storage via [`Self::set_data`]
+ * after this call.
+ **/
finish: AugmentedSubmittable<(address: H160 | string | Uint8Array, code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160, Bytes]>;
+ /**
+ * Insert items into contract storage, this method can be called
+ * multiple times
+ **/
setData: AugmentedSubmittable<(address: H160 | string | Uint8Array, data: Vec<ITuple<[H256, H256]>> | ([H256 | string | Uint8Array, H256 | string | Uint8Array])[]) => SubmittableExtrinsic<ApiType>, [H160, Vec<ITuple<[H256, H256]>>]>;
/**
* Generic tx
@@ -372,7 +385,7 @@
stopAppPromotion: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
stopSponsoringCollection: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
stopSponsoringContract: AugmentedSubmittable<(contractId: H160 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160]>;
- unstake: AugmentedSubmittable<(amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128]>;
+ unstake: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* Generic tx
**/
tests/src/interfaces/default/types.tsdiffbeforeafterboth--- a/tests/src/interfaces/default/types.ts
+++ b/tests/src/interfaces/default/types.ts
@@ -822,9 +822,6 @@
readonly amount: u128;
} & Struct;
readonly isUnstake: boolean;
- readonly asUnstake: {
- readonly amount: u128;
- } & Struct;
readonly isSponsorCollection: boolean;
readonly asSponsorCollection: {
readonly collectionId: u32;
@@ -2639,8 +2636,7 @@
export interface UpDataStructsPropertyScope extends Enum {
readonly isNone: boolean;
readonly isRmrk: boolean;
- readonly isEth: boolean;
- readonly type: 'None' | 'Rmrk' | 'Eth';
+ readonly type: 'None' | 'Rmrk';
}
/** @name UpDataStructsRpcCollection */
tests/src/interfaces/definitions.tsdiffbeforeafterboth--- a/tests/src/interfaces/definitions.ts
+++ b/tests/src/interfaces/definitions.ts
@@ -15,5 +15,6 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
export {default as unique} from './unique/definitions';
+export {default as appPromotion} from './appPromotion/definitions';
export {default as rmrk} from './rmrk/definitions';
export {default as default} from './default/definitions';
\ No newline at end of file
tests/src/interfaces/lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/lookup.ts
+++ b/tests/src/interfaces/lookup.ts
@@ -2467,9 +2467,7 @@
stake: {
amount: 'u128',
},
- unstake: {
- amount: 'u128',
- },
+ unstake: 'Null',
sponsor_collection: {
collectionId: 'u32',
},
@@ -3078,7 +3076,7 @@
* Lookup403: up_data_structs::PropertyScope
**/
UpDataStructsPropertyScope: {
- _enum: ['None', 'Rmrk', 'Eth']
+ _enum: ['None', 'Rmrk']
},
/**
* Lookup405: pallet_nonfungible::pallet::Error<T>
tests/src/interfaces/types-lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/types-lookup.ts
+++ b/tests/src/interfaces/types-lookup.ts
@@ -2675,9 +2675,6 @@
readonly amount: u128;
} & Struct;
readonly isUnstake: boolean;
- readonly asUnstake: {
- readonly amount: u128;
- } & Struct;
readonly isSponsorCollection: boolean;
readonly asSponsorCollection: {
readonly collectionId: u32;
@@ -3238,8 +3235,7 @@
interface UpDataStructsPropertyScope extends Enum {
readonly isNone: boolean;
readonly isRmrk: boolean;
- readonly isEth: boolean;
- readonly type: 'None' | 'Rmrk' | 'Eth';
+ readonly type: 'None' | 'Rmrk';
}
/** @name PalletNonfungibleError (405) */
tests/src/interfaces/types.tsdiffbeforeafterboth--- a/tests/src/interfaces/types.ts
+++ b/tests/src/interfaces/types.ts
@@ -2,5 +2,6 @@
/* eslint-disable */
export * from './unique/types';
+export * from './appPromotion/types';
export * from './rmrk/types';
export * from './default/types';
tests/src/interfaces/unique/definitions.tsdiffbeforeafterboth--- a/tests/src/interfaces/unique/definitions.ts
+++ b/tests/src/interfaces/unique/definitions.ts
@@ -175,30 +175,5 @@
[collectionParam, tokenParam],
'Option<u128>',
),
- totalStaked: fun(
- 'Returns the total amount of staked tokens',
- [{name: 'staker', type: CROSS_ACCOUNT_ID_TYPE, isOptional: true}],
- 'u128',
- ),
- totalStakedPerBlock: fun(
- 'Returns the total amount of staked tokens per block when staked',
- [crossAccountParam('staker')],
- 'Vec<(u32, u128)>',
- ),
- totalStakingLocked: fun(
- 'Return the total amount locked by staking tokens',
- [crossAccountParam('staker')],
- 'u128',
- ),
- pendingUnstake: fun(
- 'Returns the total amount of unstaked tokens',
- [{name: 'staker', type: CROSS_ACCOUNT_ID_TYPE, isOptional: true}],
- 'u128',
- ),
- pendingUnstakePerBlock: fun(
- 'Returns the total amount of unstaked tokens per block',
- [crossAccountParam('staker')],
- 'Vec<(u32, u128)>',
- ),
},
};
tests/src/substrate/substrate-api.tsdiffbeforeafterboth--- a/tests/src/substrate/substrate-api.ts
+++ b/tests/src/substrate/substrate-api.ts
@@ -42,6 +42,7 @@
},
rpc: {
unique: defs.unique.rpc,
+ appPromotion: defs.appPromotion.rpc,
rmrk: defs.rmrk.rpc,
eth: {
feeHistory: {
tests/src/util/playgrounds/unique.dev.tsdiffbeforeafterboth--- a/tests/src/util/playgrounds/unique.dev.ts
+++ b/tests/src/util/playgrounds/unique.dev.ts
@@ -35,6 +35,7 @@
},
rpc: {
unique: defs.unique.rpc,
+ appPromotion: defs.appPromotion.rpc,
rmrk: defs.rmrk.rpc,
eth: {
feeHistory: {
tests/src/util/playgrounds/unique.tsdiffbeforeafterboth--- a/tests/src/util/playgrounds/unique.ts
+++ b/tests/src/util/playgrounds/unique.ts
@@ -2027,24 +2027,24 @@
}
async getTotalStaked(address?: ICrossAccountId): Promise<bigint> {
- if (address) return (await this.helper.callRpc('api.rpc.unique.totalStaked', [address])).toBigInt();
- return (await this.helper.callRpc('api.rpc.unique.totalStaked')).toBigInt();
+ if (address) return (await this.helper.callRpc('api.rpc.appPromotion.totalStaked', [address])).toBigInt();
+ return (await this.helper.callRpc('api.rpc.appPromotion.totalStaked')).toBigInt();
}
async getTotalStakingLocked(address: ICrossAccountId): Promise<bigint> {
- return (await this.helper.callRpc('api.rpc.unique.totalStakingLocked', [address])).toBigInt();
+ return (await this.helper.callRpc('api.rpc.appPromotion.totalStakingLocked', [address])).toBigInt();
}
async getTotalStakedPerBlock(address: ICrossAccountId): Promise<bigint[][]> {
- return (await this.helper.callRpc('api.rpc.unique.totalStakedPerBlock', [address])).map(([block, amount]: any[]) => [block.toBigInt(), amount.toBigInt()]);
+ return (await this.helper.callRpc('api.rpc.appPromotion.totalStakedPerBlock', [address])).map(([block, amount]: any[]) => [block.toBigInt(), amount.toBigInt()]);
}
async getPendingUnstake(address: ICrossAccountId): Promise<bigint> {
- return (await this.helper.callRpc('api.rpc.unique.pendingUnstake', [address])).toBigInt();
+ return (await this.helper.callRpc('api.rpc.appPromotion.pendingUnstake', [address])).toBigInt();
}
async getPendingUnstakePerBlock(address: ICrossAccountId): Promise<bigint[][]> {
- return (await this.helper.callRpc('api.rpc.unique.pendingUnstakePerBlock', [address])).map(([block, amount]: any[]) => [block.toBigInt(), amount.toBigInt()]);
+ return (await this.helper.callRpc('api.rpc.appPromotion.pendingUnstakePerBlock', [address])).map(([block, amount]: any[]) => [block.toBigInt(), amount.toBigInt()]);
}
}