difftreelog
CORE-238 add effective_collection_limits
in: master
13 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -9360,6 +9360,42 @@
]
[[package]]
+name = "sc-consensus-manual-seal"
+version = "0.10.0-dev"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+dependencies = [
+ "assert_matches",
+ "async-trait",
+ "futures 0.3.21",
+ "jsonrpc-core",
+ "jsonrpc-core-client",
+ "jsonrpc-derive",
+ "log",
+ "parity-scale-codec",
+ "sc-client-api",
+ "sc-consensus",
+ "sc-consensus-aura",
+ "sc-consensus-babe",
+ "sc-consensus-epochs",
+ "sc-transaction-pool",
+ "sc-transaction-pool-api",
+ "serde",
+ "sp-api",
+ "sp-blockchain",
+ "sp-consensus",
+ "sp-consensus-aura",
+ "sp-consensus-babe",
+ "sp-consensus-slots",
+ "sp-core",
+ "sp-inherents",
+ "sp-keystore",
+ "sp-runtime",
+ "sp-timestamp",
+ "substrate-prometheus-endpoint",
+ "thiserror",
+]
+
+[[package]]
name = "sc-consensus-slots"
version = "0.10.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
@@ -11697,7 +11733,7 @@
"chrono",
"lazy_static",
"matchers",
- "parking_lot 0.11.2",
+ "parking_lot 0.10.2",
"regex",
"serde",
"serde_json",
@@ -11957,6 +11993,7 @@
"sc-client-api",
"sc-consensus",
"sc-consensus-aura",
+ "sc-consensus-manual-seal",
"sc-executor",
"sc-finality-grandpa",
"sc-keystore",
client/rpc/src/lib.rsdiffbeforeafterboth--- a/client/rpc/src/lib.rs
+++ b/client/rpc/src/lib.rs
@@ -19,7 +19,7 @@
use codec::Decode;
use jsonrpc_core::{Error as RpcError, ErrorCode, Result};
use jsonrpc_derive::rpc;
-use up_data_structs::{Collection, CollectionId, CollectionStats, TokenId};
+use up_data_structs::{Collection, CollectionId, CollectionStats, CollectionLimits, TokenId};
use sp_api::{BlockId, BlockT, ProvideRuntimeApi, ApiExt};
use sp_blockchain::HeaderBackend;
use up_rpc::UniqueApi as UniqueRuntimeApi;
@@ -119,6 +119,12 @@
) -> Result<Option<Collection<AccountId>>>;
#[rpc(name = "unique_collectionStats")]
fn collection_stats(&self, at: Option<BlockHash>) -> Result<CollectionStats>;
+ #[rpc(name = "unique_effectiveCollectionLimits")]
+ fn effective_collection_limits(
+ &self,
+ collection_id: CollectionId,
+ at: Option<BlockHash>
+ ) -> Result<Option<CollectionLimits>>;
}
pub struct Unique<C, P> {
@@ -222,4 +228,5 @@
pass_method!(last_token_id(collection: CollectionId) -> TokenId);
pass_method!(collection_by_id(collection: CollectionId) -> Option<Collection<AccountId>>);
pass_method!(collection_stats() -> CollectionStats);
+ pass_method!(effective_collection_limits(collection_id: CollectionId) -> Option<CollectionLimits>);
}
pallets/common/src/lib.rsdiffbeforeafterboth--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -33,7 +33,7 @@
TokenId, Weight, WithdrawReasons, CollectionStats, MAX_TOKEN_OWNERSHIP, CollectionMode,
NFT_SPONSOR_TRANSFER_TIMEOUT, FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, MAX_SPONSOR_TIMEOUT, CUSTOM_DATA_LIMIT, CollectionLimits,
- CustomDataLimit, CreateCollectionData, SponsorshipState, CreateItemExData,
+ CustomDataLimit, CreateCollectionData, SponsorshipState, CreateItemExData, SponsoringRateLimit
};
pub use pallet::*;
use sp_core::H160;
@@ -421,6 +421,30 @@
alive: created.0 - destroyed.0,
}
}
+
+ pub fn effective_collection_limits(collection: CollectionId) -> Option<CollectionLimits> {
+ let collection = <CollectionById<T>>::get(collection);
+ if collection.is_none() {
+ return None;
+ }
+
+ let limits = collection.unwrap().limits;
+ let effective_limits = CollectionLimits {
+ account_token_ownership_limit: Some(limits.account_token_ownership_limit()),
+ sponsored_data_size: Some(limits.sponsored_data_size()),
+ sponsored_data_rate_limit: Some(
+ limits.sponsored_data_rate_limit
+ .unwrap_or(SponsoringRateLimit::SponsoringDisabled)),
+ token_limit: Some(limits.token_limit()),
+ sponsor_transfer_timeout: Some(limits.sponsor_transfer_timeout(MAX_SPONSOR_TIMEOUT)),
+ sponsor_approve_timeout: Some(limits.sponsor_approve_timeout()),
+ owner_can_transfer: Some(limits.owner_can_transfer()),
+ owner_can_destroy: Some(limits.owner_can_destroy()),
+ transfers_enabled: Some(limits.transfers_enabled()),
+ };
+
+ Some(effective_limits)
+ }
}
impl<T: Config> Pallet<T> {
primitives/rpc/src/lib.rsdiffbeforeafterboth--- a/primitives/rpc/src/lib.rs
+++ b/primitives/rpc/src/lib.rs
@@ -16,7 +16,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
-use up_data_structs::{CollectionId, TokenId, Collection, CollectionStats};
+use up_data_structs::{CollectionId, TokenId, Collection, CollectionStats, CollectionLimits};
use sp_std::vec::Vec;
use sp_core::H160;
use codec::Decode;
@@ -59,5 +59,6 @@
fn last_token_id(collection: CollectionId) -> Result<TokenId>;
fn collection_by_id(collection: CollectionId) -> Result<Option<Collection<AccountId>>>;
fn collection_stats() -> Result<CollectionStats>;
+ fn effective_collection_limits(collection_id: CollectionId) -> Result<Option<CollectionLimits>>;
}
}
runtime/common/src/runtime_apis.rsdiffbeforeafterboth--- a/runtime/common/src/runtime_apis.rs
+++ b/runtime/common/src/runtime_apis.rs
@@ -69,6 +69,10 @@
fn collection_stats() -> Result<CollectionStats, DispatchError> {
Ok(<pallet_common::Pallet<Runtime>>::collection_stats())
}
+
+ fn effective_collection_limits(collection: CollectionId) -> Result<Option<CollectionLimits>, DispatchError> {
+ Ok(<pallet_common::Pallet<Runtime>>::effective_collection_limits(collection))
+ }
}
impl sp_api::Core<Block> for Runtime {
tests/src/interfaces/augment-api-errors.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-errors.ts
+++ b/tests/src/interfaces/augment-api-errors.ts
@@ -105,6 +105,10 @@
**/
NoPermission: AugmentedError<ApiType>;
/**
+ * Not sufficient founds to perform action
+ **/
+ NotSufficientFounds: AugmentedError<ApiType>;
+ /**
* Tried to enable permissions which are only permitted to be disabled
**/
OwnerPermissionsCantBeReverted: AugmentedError<ApiType>;
tests/src/interfaces/augment-api-rpc.tsdiffbeforeafterboth1// Auto-generated via `yarn polkadot-types-from-chain`, do not edit2/* eslint-disable */34import type { PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsCollection, UpDataStructsCollectionStats } from './unique';5import type { AugmentedRpc } from '@polkadot/rpc-core/types';6import type { Metadata, StorageKey } from '@polkadot/types';7import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, u128, u32, u64 } from '@polkadot/types-codec';8import type { AnyNumber, Codec } from '@polkadot/types-codec/types';9import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';10import type { EpochAuthorship } from '@polkadot/types/interfaces/babe';11import type { BeefySignedCommitment } from '@polkadot/types/interfaces/beefy';12import type { BlockHash } from '@polkadot/types/interfaces/chain';13import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';14import type { AuthorityId } from '@polkadot/types/interfaces/consensus';15import type { CodeUploadRequest, CodeUploadResult, ContractCallRequest, ContractExecResult, ContractInstantiateResult, InstantiateRequest } from '@polkadot/types/interfaces/contracts';16import type { CreatedBlock } from '@polkadot/types/interfaces/engine';17import type { EthAccount, EthCallRequest, EthFilter, EthFilterChanges, EthLog, EthReceipt, EthRichBlock, EthSubKind, EthSubParams, EthSyncStatus, EthTransaction, EthTransactionRequest, EthWork } from '@polkadot/types/interfaces/eth';18import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';19import type { EncodedFinalityProofs, JustificationNotification, ReportedRoundStates } from '@polkadot/types/interfaces/grandpa';20import type { MmrLeafProof } from '@polkadot/types/interfaces/mmr';21import type { StorageKind } from '@polkadot/types/interfaces/offchain';22import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';23import type { RpcMethods } from '@polkadot/types/interfaces/rpc';24import type { AccountId, BlockNumber, H160, H256, H64, Hash, Header, Index, Justification, KeyValue, SignedBlock, StorageData } from '@polkadot/types/interfaces/runtime';25import type { ReadProof, RuntimeVersion, TraceBlockResponse } from '@polkadot/types/interfaces/state';26import type { ApplyExtrinsicResult, ChainProperties, ChainType, Health, NetworkState, NodeRole, PeerInfo, SyncState } from '@polkadot/types/interfaces/system';27import type { IExtrinsic, Observable } from '@polkadot/types/types';2829declare module '@polkadot/rpc-core/types/jsonrpc' {30 export interface RpcInterface {31 author: {32 /**33 * Returns true if the keystore has private keys for the given public key and key type.34 **/35 hasKey: AugmentedRpc<(publicKey: Bytes | string | Uint8Array, keyType: Text | string) => Observable<bool>>;36 /**37 * Returns true if the keystore has private keys for the given session public keys.38 **/39 hasSessionKeys: AugmentedRpc<(sessionKeys: Bytes | string | Uint8Array) => Observable<bool>>;40 /**41 * Insert a key into the keystore.42 **/43 insertKey: AugmentedRpc<(keyType: Text | string, suri: Text | string, publicKey: Bytes | string | Uint8Array) => Observable<Bytes>>;44 /**45 * Returns all pending extrinsics, potentially grouped by sender46 **/47 pendingExtrinsics: AugmentedRpc<() => Observable<Vec<Extrinsic>>>;48 /**49 * Remove given extrinsic from the pool and temporarily ban it to prevent reimporting50 **/51 removeExtrinsic: AugmentedRpc<(bytesOrHash: Vec<ExtrinsicOrHash> | (ExtrinsicOrHash | { Hash: any } | { Extrinsic: any } | string | Uint8Array)[]) => Observable<Vec<Hash>>>;52 /**53 * Generate new session keys and returns the corresponding public keys54 **/55 rotateKeys: AugmentedRpc<() => Observable<Bytes>>;56 /**57 * Submit and subscribe to watch an extrinsic until unsubscribed58 **/59 submitAndWatchExtrinsic: AugmentedRpc<(extrinsic: IExtrinsic) => Observable<ExtrinsicStatus>>;60 /**61 * Submit a fully formatted extrinsic for block inclusion62 **/63 submitExtrinsic: AugmentedRpc<(extrinsic: IExtrinsic) => Observable<Hash>>;64 };65 babe: {66 /**67 * Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore68 **/69 epochAuthorship: AugmentedRpc<() => Observable<HashMap<AuthorityId, EpochAuthorship>>>;70 };71 beefy: {72 /**73 * Returns hash of the latest BEEFY finalized block as seen by this client.74 **/75 getFinalizedHead: AugmentedRpc<() => Observable<H256>>;76 /**77 * Returns the block most recently finalized by BEEFY, alongside side its justification.78 **/79 subscribeJustifications: AugmentedRpc<() => Observable<BeefySignedCommitment>>;80 };81 chain: {82 /**83 * Get header and body of a relay chain block84 **/85 getBlock: AugmentedRpc<(hash?: BlockHash | string | Uint8Array) => Observable<SignedBlock>>;86 /**87 * Get the block hash for a specific block88 **/89 getBlockHash: AugmentedRpc<(blockNumber?: BlockNumber | AnyNumber | Uint8Array) => Observable<BlockHash>>;90 /**91 * Get hash of the last finalized block in the canon chain92 **/93 getFinalizedHead: AugmentedRpc<() => Observable<BlockHash>>;94 /**95 * Retrieves the header for a specific block96 **/97 getHeader: AugmentedRpc<(hash?: BlockHash | string | Uint8Array) => Observable<Header>>;98 /**99 * Retrieves the newest header via subscription100 **/101 subscribeAllHeads: AugmentedRpc<() => Observable<Header>>;102 /**103 * Retrieves the best finalized header via subscription104 **/105 subscribeFinalizedHeads: AugmentedRpc<() => Observable<Header>>;106 /**107 * Retrieves the best header via subscription108 **/109 subscribeNewHeads: AugmentedRpc<() => Observable<Header>>;110 };111 childstate: {112 /**113 * Returns the keys with prefix from a child storage, leave empty to get all the keys114 **/115 getKeys: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, prefix: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Vec<StorageKey>>>;116 /**117 * Returns the keys with prefix from a child storage with pagination support118 **/119 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>>>;120 /**121 * Returns a child storage entry at a specific block state122 **/123 getStorage: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<StorageData>>>;124 /**125 * Returns child storage entries for multiple keys at a specific block state126 **/127 getStorageEntries: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: Hash | string | Uint8Array) => Observable<Vec<Option<StorageData>>>>;128 /**129 * Returns the hash of a child storage entry at a block state130 **/131 getStorageHash: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<Hash>>>;132 /**133 * Returns the size of a child storage entry at a block state134 **/135 getStorageSize: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<u64>>>;136 };137 contracts: {138 /**139 * Executes a call to a contract140 **/141 call: AugmentedRpc<(callRequest: ContractCallRequest | { origin?: any; dest?: any; value?: any; gasLimit?: any; storageDepositLimit?: any; inputData?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractExecResult>>;142 /**143 * Returns the value under a specified storage key in a contract144 **/145 getStorage: AugmentedRpc<(address: AccountId | string | Uint8Array, key: H256 | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<Bytes>>>;146 /**147 * Instantiate a new contract148 **/149 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>>;150 /**151 * Returns the projected time a given contract will be able to sustain paying its rent152 **/153 rentProjection: AugmentedRpc<(address: AccountId | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<BlockNumber>>>;154 /**155 * Upload new code without instantiating a contract from it156 **/157 uploadCode: AugmentedRpc<(uploadRequest: CodeUploadRequest | { origin?: any; code?: any; storageDepositLimit?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<CodeUploadResult>>;158 };159 engine: {160 /**161 * Instructs the manual-seal authorship task to create a new block162 **/163 createBlock: AugmentedRpc<(createEmpty: bool | boolean | Uint8Array, finalize: bool | boolean | Uint8Array, parentHash?: BlockHash | string | Uint8Array) => Observable<CreatedBlock>>;164 /**165 * Instructs the manual-seal authorship task to finalize a block166 **/167 finalizeBlock: AugmentedRpc<(hash: BlockHash | string | Uint8Array, justification?: Justification) => Observable<bool>>;168 };169 eth: {170 /**171 * Returns accounts list.172 **/173 accounts: AugmentedRpc<() => Observable<Vec<H160>>>;174 /**175 * Returns the blockNumber176 **/177 blockNumber: AugmentedRpc<() => Observable<U256>>;178 /**179 * Call contract, returning the output data.180 **/181 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>>;182 /**183 * Returns the chain ID used for transaction signing at the current best block. None is returned if not available.184 **/185 chainId: AugmentedRpc<() => Observable<U64>>;186 /**187 * Returns block author.188 **/189 coinbase: AugmentedRpc<() => Observable<H160>>;190 /**191 * Estimate gas needed for execution of given contract.192 **/193 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>>;194 /**195 * Returns current gas price.196 **/197 gasPrice: AugmentedRpc<() => Observable<U256>>;198 /**199 * Returns balance of the given account.200 **/201 getBalance: AugmentedRpc<(address: H160 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;202 /**203 * Returns block with given hash.204 **/205 getBlockByHash: AugmentedRpc<(hash: H256 | string | Uint8Array, full: bool | boolean | Uint8Array) => Observable<Option<EthRichBlock>>>;206 /**207 * Returns block with given number.208 **/209 getBlockByNumber: AugmentedRpc<(block: BlockNumber | AnyNumber | Uint8Array, full: bool | boolean | Uint8Array) => Observable<Option<EthRichBlock>>>;210 /**211 * Returns the number of transactions in a block with given hash.212 **/213 getBlockTransactionCountByHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<U256>>;214 /**215 * Returns the number of transactions in a block with given block number.216 **/217 getBlockTransactionCountByNumber: AugmentedRpc<(block: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;218 /**219 * Returns the code at given address at given time (block number).220 **/221 getCode: AugmentedRpc<(address: H160 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<Bytes>>;222 /**223 * Returns filter changes since last poll.224 **/225 getFilterChanges: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<EthFilterChanges>>;226 /**227 * Returns all logs matching given filter (in a range 'from' - 'to').228 **/229 getFilterLogs: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<Vec<EthLog>>>;230 /**231 * Returns logs matching given filter object.232 **/233 getLogs: AugmentedRpc<(filter: EthFilter | { fromBlock?: any; toBlock?: any; blockHash?: any; address?: any; topics?: any } | string | Uint8Array) => Observable<Vec<EthLog>>>;234 /**235 * Returns proof for account and storage.236 **/237 getProof: AugmentedRpc<(address: H160 | string | Uint8Array, storageKeys: Vec<H256> | (H256 | string | Uint8Array)[], number: BlockNumber | AnyNumber | Uint8Array) => Observable<EthAccount>>;238 /**239 * Returns content of the storage at given address.240 **/241 getStorageAt: AugmentedRpc<(address: H160 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<H256>>;242 /**243 * Returns transaction at given block hash and index.244 **/245 getTransactionByBlockHashAndIndex: AugmentedRpc<(hash: H256 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthTransaction>>;246 /**247 * Returns transaction by given block number and index.248 **/249 getTransactionByBlockNumberAndIndex: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthTransaction>>;250 /**251 * Get transaction by its hash.252 **/253 getTransactionByHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<EthTransaction>>;254 /**255 * Returns the number of transactions sent from given address at given time (block number).256 **/257 getTransactionCount: AugmentedRpc<(hash: H256 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;258 /**259 * Returns transaction receipt by transaction hash.260 **/261 getTransactionReceipt: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<EthReceipt>>;262 /**263 * Returns an uncles at given block and index.264 **/265 getUncleByBlockHashAndIndex: AugmentedRpc<(hash: H256 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthRichBlock>>;266 /**267 * Returns an uncles at given block and index.268 **/269 getUncleByBlockNumberAndIndex: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthRichBlock>>;270 /**271 * Returns the number of uncles in a block with given hash.272 **/273 getUncleCountByBlockHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<U256>>;274 /**275 * Returns the number of uncles in a block with given block number.276 **/277 getUncleCountByBlockNumber: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;278 /**279 * Returns the hash of the current block, the seedHash, and the boundary condition to be met.280 **/281 getWork: AugmentedRpc<() => Observable<EthWork>>;282 /**283 * Returns the number of hashes per second that the node is mining with.284 **/285 hashrate: AugmentedRpc<() => Observable<U256>>;286 /**287 * Returns true if client is actively mining new blocks.288 **/289 mining: AugmentedRpc<() => Observable<bool>>;290 /**291 * Returns id of new block filter.292 **/293 newBlockFilter: AugmentedRpc<() => Observable<U256>>;294 /**295 * Returns id of new filter.296 **/297 newFilter: AugmentedRpc<(filter: EthFilter | { fromBlock?: any; toBlock?: any; blockHash?: any; address?: any; topics?: any } | string | Uint8Array) => Observable<U256>>;298 /**299 * Returns id of new block filter.300 **/301 newPendingTransactionFilter: AugmentedRpc<() => Observable<U256>>;302 /**303 * Returns protocol version encoded as a string (quotes are necessary).304 **/305 protocolVersion: AugmentedRpc<() => Observable<u64>>;306 /**307 * Sends signed transaction, returning its hash.308 **/309 sendRawTransaction: AugmentedRpc<(bytes: Bytes | string | Uint8Array) => Observable<H256>>;310 /**311 * Sends transaction; will block waiting for signer to return the transaction hash312 **/313 sendTransaction: AugmentedRpc<(tx: EthTransactionRequest | { from?: any; to?: any; gasPrice?: any; gas?: any; value?: any; data?: any; nonce?: any } | string | Uint8Array) => Observable<H256>>;314 /**315 * Used for submitting mining hashrate.316 **/317 submitHashrate: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array, hash: H256 | string | Uint8Array) => Observable<bool>>;318 /**319 * Used for submitting a proof-of-work solution.320 **/321 submitWork: AugmentedRpc<(nonce: H64 | string | Uint8Array, headerHash: H256 | string | Uint8Array, mixDigest: H256 | string | Uint8Array) => Observable<bool>>;322 /**323 * Subscribe to Eth subscription.324 **/325 subscribe: AugmentedRpc<(kind: EthSubKind | 'newHeads' | 'logs' | 'newPendingTransactions' | 'syncing' | number | Uint8Array, params?: EthSubParams | { None: any } | { Logs: any } | string | Uint8Array) => Observable<Null>>;326 /**327 * Returns an object with data about the sync status or false.328 **/329 syncing: AugmentedRpc<() => Observable<EthSyncStatus>>;330 /**331 * Uninstalls filter.332 **/333 uninstallFilter: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<bool>>;334 };335 grandpa: {336 /**337 * Prove finality for the range (begin; end] hash.338 **/339 proveFinality: AugmentedRpc<(begin: BlockHash | string | Uint8Array, end: BlockHash | string | Uint8Array, authoritiesSetId?: u64 | AnyNumber | Uint8Array) => Observable<Option<EncodedFinalityProofs>>>;340 /**341 * Returns the state of the current best round state as well as the ongoing background rounds342 **/343 roundState: AugmentedRpc<() => Observable<ReportedRoundStates>>;344 /**345 * Subscribes to grandpa justifications346 **/347 subscribeJustifications: AugmentedRpc<() => Observable<JustificationNotification>>;348 };349 mmr: {350 /**351 * Generate MMR proof for given leaf index.352 **/353 generateProof: AugmentedRpc<(leafIndex: u64 | AnyNumber | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<MmrLeafProof>>;354 };355 net: {356 /**357 * Returns true if client is actively listening for network connections. Otherwise false.358 **/359 listening: AugmentedRpc<() => Observable<bool>>;360 /**361 * Returns number of peers connected to node.362 **/363 peerCount: AugmentedRpc<() => Observable<Text>>;364 /**365 * Returns protocol version.366 **/367 version: AugmentedRpc<() => Observable<Text>>;368 };369 offchain: {370 /**371 * Get offchain local storage under given key and prefix372 **/373 localStorageGet: AugmentedRpc<(kind: StorageKind | 'PERSISTENT' | 'LOCAL' | number | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;374 /**375 * Set offchain local storage under given key and prefix376 **/377 localStorageSet: AugmentedRpc<(kind: StorageKind | 'PERSISTENT' | 'LOCAL' | number | Uint8Array, key: Bytes | string | Uint8Array, value: Bytes | string | Uint8Array) => Observable<Null>>;378 };379 payment: {380 /**381 * Query the detailed fee of a given encoded extrinsic382 **/383 queryFeeDetails: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<FeeDetails>>;384 /**385 * Retrieves the fee information for an encoded extrinsic386 **/387 queryInfo: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<RuntimeDispatchInfo>>;388 };389 rpc: {390 /**391 * Retrieves the list of RPC methods that are exposed by the node392 **/393 methods: AugmentedRpc<() => Observable<RpcMethods>>;394 };395 state: {396 /**397 * Perform a call to a builtin on the chain398 **/399 call: AugmentedRpc<(method: Text | string, data: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Bytes>>;400 /**401 * Retrieves the keys with prefix of a specific child storage402 **/403 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>>>;404 /**405 * Returns proof of storage for child key entries at a specific block state.406 **/407 getChildReadProof: AugmentedRpc<(childStorageKey: PrefixedStorageKey | string | Uint8Array, keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: BlockHash | string | Uint8Array) => Observable<ReadProof>>;408 /**409 * Retrieves the child storage for a key410 **/411 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>>;412 /**413 * Retrieves the child storage hash414 **/415 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>>;416 /**417 * Retrieves the child storage size418 **/419 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>>;420 /**421 * Retrieves the keys with a certain prefix422 **/423 getKeys: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;424 /**425 * Returns the keys with prefix with pagination support.426 **/427 getKeysPaged: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, count: u32 | AnyNumber | Uint8Array, startKey?: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;428 /**429 * Returns the runtime metadata430 **/431 getMetadata: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<Metadata>>;432 /**433 * Returns the keys with prefix, leave empty to get all the keys (deprecated: Use getKeysPaged)434 **/435 getPairs: AugmentedRpc<(prefix: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<KeyValue>>>;436 /**437 * Returns proof of storage entries at a specific block state438 **/439 getReadProof: AugmentedRpc<(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: BlockHash | string | Uint8Array) => Observable<ReadProof>>;440 /**441 * Get the runtime version442 **/443 getRuntimeVersion: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<RuntimeVersion>>;444 /**445 * Retrieves the storage for a key446 **/447 getStorage: AugmentedRpc<<T = Codec>(key: StorageKey | string | Uint8Array | any, block?: Hash | Uint8Array | string) => Observable<T>>;448 /**449 * Retrieves the storage hash450 **/451 getStorageHash: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Hash>>;452 /**453 * Retrieves the storage size454 **/455 getStorageSize: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<u64>>;456 /**457 * Query historical storage entries (by key) starting from a start block458 **/459 queryStorage: AugmentedRpc<<T = Codec[]>(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], fromBlock?: Hash | Uint8Array | string, toBlock?: Hash | Uint8Array | string) => Observable<[Hash, T][]>>;460 /**461 * Query storage entries (by key) starting at block hash given as the second parameter462 **/463 queryStorageAt: AugmentedRpc<<T = Codec[]>(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: Hash | Uint8Array | string) => Observable<T>>;464 /**465 * Retrieves the runtime version via subscription466 **/467 subscribeRuntimeVersion: AugmentedRpc<() => Observable<RuntimeVersion>>;468 /**469 * Subscribes to storage changes for the provided keys470 **/471 subscribeStorage: AugmentedRpc<<T = Codec[]>(keys?: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[]) => Observable<T>>;472 /**473 * Provides a way to trace the re-execution of a single block474 **/475 traceBlock: AugmentedRpc<(block: Hash | string | Uint8Array, targets: Option<Text> | null | object | string | Uint8Array, storageKeys: Option<Text> | null | object | string | Uint8Array, methods: Option<Text> | null | object | string | Uint8Array) => Observable<TraceBlockResponse>>;476 };477 syncstate: {478 /**479 * Returns the json-serialized chainspec running the node, with a sync state.480 **/481 genSyncSpec: AugmentedRpc<(raw: bool | boolean | Uint8Array) => Observable<Json>>;482 };483 system: {484 /**485 * Retrieves the next accountIndex as available on the node486 **/487 accountNextIndex: AugmentedRpc<(accountId: AccountId | string | Uint8Array) => Observable<Index>>;488 /**489 * Adds the supplied directives to the current log filter490 **/491 addLogFilter: AugmentedRpc<(directives: Text | string) => Observable<Null>>;492 /**493 * Adds a reserved peer494 **/495 addReservedPeer: AugmentedRpc<(peer: Text | string) => Observable<Text>>;496 /**497 * Retrieves the chain498 **/499 chain: AugmentedRpc<() => Observable<Text>>;500 /**501 * Retrieves the chain type502 **/503 chainType: AugmentedRpc<() => Observable<ChainType>>;504 /**505 * Dry run an extrinsic at a given block506 **/507 dryRun: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ApplyExtrinsicResult>>;508 /**509 * Return health status of the node510 **/511 health: AugmentedRpc<() => Observable<Health>>;512 /**513 * 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 example514 **/515 localListenAddresses: AugmentedRpc<() => Observable<Vec<Text>>>;516 /**517 * Returns the base58-encoded PeerId of the node518 **/519 localPeerId: AugmentedRpc<() => Observable<Text>>;520 /**521 * Retrieves the node name522 **/523 name: AugmentedRpc<() => Observable<Text>>;524 /**525 * Returns current state of the network526 **/527 networkState: AugmentedRpc<() => Observable<NetworkState>>;528 /**529 * Returns the roles the node is running as530 **/531 nodeRoles: AugmentedRpc<() => Observable<Vec<NodeRole>>>;532 /**533 * Returns the currently connected peers534 **/535 peers: AugmentedRpc<() => Observable<Vec<PeerInfo>>>;536 /**537 * Get a custom set of properties as a JSON object, defined in the chain spec538 **/539 properties: AugmentedRpc<() => Observable<ChainProperties>>;540 /**541 * Remove a reserved peer542 **/543 removeReservedPeer: AugmentedRpc<(peerId: Text | string) => Observable<Text>>;544 /**545 * Returns the list of reserved peers546 **/547 reservedPeers: AugmentedRpc<() => Observable<Vec<Text>>>;548 /**549 * Resets the log filter to Substrate defaults550 **/551 resetLogFilter: AugmentedRpc<() => Observable<Null>>;552 /**553 * Returns the state of the syncing of the node554 **/555 syncState: AugmentedRpc<() => Observable<SyncState>>;556 /**557 * Retrieves the version of the node558 **/559 version: AugmentedRpc<() => Observable<Text>>;560 };561 unique: {562 /**563 * Get amount of different user tokens564 **/565 accountBalance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;566 /**567 * Get tokens owned by account568 **/569 accountTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;570 /**571 * Get admin list572 **/573 adminlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletCommonAccountBasicCrossAccountIdRepr>>>;574 /**575 * Get allowed amount576 **/577 allowance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, sender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, spender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;578 /**579 * Check if user is allowed to use collection580 **/581 allowed: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;582 /**583 * Get allowlist584 **/585 allowlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletCommonAccountBasicCrossAccountIdRepr>>>;586 /**587 * Get amount of specific account token588 **/589 balance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;590 /**591 * Get collection by specified id592 **/593 collectionById: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsCollection>>>;594 /**595 * Get collection stats596 **/597 collectionStats: AugmentedRpc<(at?: Hash | string | Uint8Array) => Observable<UpDataStructsCollectionStats>>;598 /**599 * Get tokens contained in collection600 **/601 collectionTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;602 /**603 * Get token constant metadata604 **/605 constMetadata: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Bytes>>;606 /**607 * Get last token id608 **/609 lastTokenId: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;610 /**611 * Check if token exists612 **/613 tokenExists: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;614 /**615 * Get token owner616 **/617 tokenOwner: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<PalletCommonAccountBasicCrossAccountIdRepr>>;618 /**619 * Get token variable metadata620 **/621 variableMetadata: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Bytes>>;622 };623 web3: {624 /**625 * Returns current client version.626 **/627 clientVersion: AugmentedRpc<() => Observable<Text>>;628 /**629 * Returns sha3 of the given data630 **/631 sha3: AugmentedRpc<(data: Bytes | string | Uint8Array) => Observable<H256>>;632 };633 } // RpcInterface634} // declare module1// Auto-generated via `yarn polkadot-types-from-chain`, do not edit2/* eslint-disable */34import type { PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionStats } from './unique';5import type { AugmentedRpc } from '@polkadot/rpc-core/types';6import type { Metadata, StorageKey } from '@polkadot/types';7import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, u128, u32, u64 } from '@polkadot/types-codec';8import type { AnyNumber, Codec } from '@polkadot/types-codec/types';9import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';10import type { EpochAuthorship } from '@polkadot/types/interfaces/babe';11import type { BeefySignedCommitment } from '@polkadot/types/interfaces/beefy';12import type { BlockHash } from '@polkadot/types/interfaces/chain';13import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';14import type { AuthorityId } from '@polkadot/types/interfaces/consensus';15import type { CodeUploadRequest, CodeUploadResult, ContractCallRequest, ContractExecResult, ContractInstantiateResult, InstantiateRequest } from '@polkadot/types/interfaces/contracts';16import type { CreatedBlock } from '@polkadot/types/interfaces/engine';17import type { EthAccount, EthCallRequest, EthFilter, EthFilterChanges, EthLog, EthReceipt, EthRichBlock, EthSubKind, EthSubParams, EthSyncStatus, EthTransaction, EthTransactionRequest, EthWork } from '@polkadot/types/interfaces/eth';18import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';19import type { EncodedFinalityProofs, JustificationNotification, ReportedRoundStates } from '@polkadot/types/interfaces/grandpa';20import type { MmrLeafProof } from '@polkadot/types/interfaces/mmr';21import type { StorageKind } from '@polkadot/types/interfaces/offchain';22import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';23import type { RpcMethods } from '@polkadot/types/interfaces/rpc';24import type { AccountId, BlockNumber, H160, H256, H64, Hash, Header, Index, Justification, KeyValue, SignedBlock, StorageData } from '@polkadot/types/interfaces/runtime';25import type { ReadProof, RuntimeVersion, TraceBlockResponse } from '@polkadot/types/interfaces/state';26import type { ApplyExtrinsicResult, ChainProperties, ChainType, Health, NetworkState, NodeRole, PeerInfo, SyncState } from '@polkadot/types/interfaces/system';27import type { IExtrinsic, Observable } from '@polkadot/types/types';2829declare module '@polkadot/rpc-core/types/jsonrpc' {30 export interface RpcInterface {31 author: {32 /**33 * Returns true if the keystore has private keys for the given public key and key type.34 **/35 hasKey: AugmentedRpc<(publicKey: Bytes | string | Uint8Array, keyType: Text | string) => Observable<bool>>;36 /**37 * Returns true if the keystore has private keys for the given session public keys.38 **/39 hasSessionKeys: AugmentedRpc<(sessionKeys: Bytes | string | Uint8Array) => Observable<bool>>;40 /**41 * Insert a key into the keystore.42 **/43 insertKey: AugmentedRpc<(keyType: Text | string, suri: Text | string, publicKey: Bytes | string | Uint8Array) => Observable<Bytes>>;44 /**45 * Returns all pending extrinsics, potentially grouped by sender46 **/47 pendingExtrinsics: AugmentedRpc<() => Observable<Vec<Extrinsic>>>;48 /**49 * Remove given extrinsic from the pool and temporarily ban it to prevent reimporting50 **/51 removeExtrinsic: AugmentedRpc<(bytesOrHash: Vec<ExtrinsicOrHash> | (ExtrinsicOrHash | { Hash: any } | { Extrinsic: any } | string | Uint8Array)[]) => Observable<Vec<Hash>>>;52 /**53 * Generate new session keys and returns the corresponding public keys54 **/55 rotateKeys: AugmentedRpc<() => Observable<Bytes>>;56 /**57 * Submit and subscribe to watch an extrinsic until unsubscribed58 **/59 submitAndWatchExtrinsic: AugmentedRpc<(extrinsic: IExtrinsic) => Observable<ExtrinsicStatus>>;60 /**61 * Submit a fully formatted extrinsic for block inclusion62 **/63 submitExtrinsic: AugmentedRpc<(extrinsic: IExtrinsic) => Observable<Hash>>;64 };65 babe: {66 /**67 * Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore68 **/69 epochAuthorship: AugmentedRpc<() => Observable<HashMap<AuthorityId, EpochAuthorship>>>;70 };71 beefy: {72 /**73 * Returns hash of the latest BEEFY finalized block as seen by this client.74 **/75 getFinalizedHead: AugmentedRpc<() => Observable<H256>>;76 /**77 * Returns the block most recently finalized by BEEFY, alongside side its justification.78 **/79 subscribeJustifications: AugmentedRpc<() => Observable<BeefySignedCommitment>>;80 };81 chain: {82 /**83 * Get header and body of a relay chain block84 **/85 getBlock: AugmentedRpc<(hash?: BlockHash | string | Uint8Array) => Observable<SignedBlock>>;86 /**87 * Get the block hash for a specific block88 **/89 getBlockHash: AugmentedRpc<(blockNumber?: BlockNumber | AnyNumber | Uint8Array) => Observable<BlockHash>>;90 /**91 * Get hash of the last finalized block in the canon chain92 **/93 getFinalizedHead: AugmentedRpc<() => Observable<BlockHash>>;94 /**95 * Retrieves the header for a specific block96 **/97 getHeader: AugmentedRpc<(hash?: BlockHash | string | Uint8Array) => Observable<Header>>;98 /**99 * Retrieves the newest header via subscription100 **/101 subscribeAllHeads: AugmentedRpc<() => Observable<Header>>;102 /**103 * Retrieves the best finalized header via subscription104 **/105 subscribeFinalizedHeads: AugmentedRpc<() => Observable<Header>>;106 /**107 * Retrieves the best header via subscription108 **/109 subscribeNewHeads: AugmentedRpc<() => Observable<Header>>;110 };111 childstate: {112 /**113 * Returns the keys with prefix from a child storage, leave empty to get all the keys114 **/115 getKeys: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, prefix: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Vec<StorageKey>>>;116 /**117 * Returns the keys with prefix from a child storage with pagination support118 **/119 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>>>;120 /**121 * Returns a child storage entry at a specific block state122 **/123 getStorage: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<StorageData>>>;124 /**125 * Returns child storage entries for multiple keys at a specific block state126 **/127 getStorageEntries: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: Hash | string | Uint8Array) => Observable<Vec<Option<StorageData>>>>;128 /**129 * Returns the hash of a child storage entry at a block state130 **/131 getStorageHash: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<Hash>>>;132 /**133 * Returns the size of a child storage entry at a block state134 **/135 getStorageSize: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<u64>>>;136 };137 contracts: {138 /**139 * Executes a call to a contract140 **/141 call: AugmentedRpc<(callRequest: ContractCallRequest | { origin?: any; dest?: any; value?: any; gasLimit?: any; storageDepositLimit?: any; inputData?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractExecResult>>;142 /**143 * Returns the value under a specified storage key in a contract144 **/145 getStorage: AugmentedRpc<(address: AccountId | string | Uint8Array, key: H256 | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<Bytes>>>;146 /**147 * Instantiate a new contract148 **/149 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>>;150 /**151 * Returns the projected time a given contract will be able to sustain paying its rent152 **/153 rentProjection: AugmentedRpc<(address: AccountId | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<BlockNumber>>>;154 /**155 * Upload new code without instantiating a contract from it156 **/157 uploadCode: AugmentedRpc<(uploadRequest: CodeUploadRequest | { origin?: any; code?: any; storageDepositLimit?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<CodeUploadResult>>;158 };159 engine: {160 /**161 * Instructs the manual-seal authorship task to create a new block162 **/163 createBlock: AugmentedRpc<(createEmpty: bool | boolean | Uint8Array, finalize: bool | boolean | Uint8Array, parentHash?: BlockHash | string | Uint8Array) => Observable<CreatedBlock>>;164 /**165 * Instructs the manual-seal authorship task to finalize a block166 **/167 finalizeBlock: AugmentedRpc<(hash: BlockHash | string | Uint8Array, justification?: Justification) => Observable<bool>>;168 };169 eth: {170 /**171 * Returns accounts list.172 **/173 accounts: AugmentedRpc<() => Observable<Vec<H160>>>;174 /**175 * Returns the blockNumber176 **/177 blockNumber: AugmentedRpc<() => Observable<U256>>;178 /**179 * Call contract, returning the output data.180 **/181 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>>;182 /**183 * Returns the chain ID used for transaction signing at the current best block. None is returned if not available.184 **/185 chainId: AugmentedRpc<() => Observable<U64>>;186 /**187 * Returns block author.188 **/189 coinbase: AugmentedRpc<() => Observable<H160>>;190 /**191 * Estimate gas needed for execution of given contract.192 **/193 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>>;194 /**195 * Returns current gas price.196 **/197 gasPrice: AugmentedRpc<() => Observable<U256>>;198 /**199 * Returns balance of the given account.200 **/201 getBalance: AugmentedRpc<(address: H160 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;202 /**203 * Returns block with given hash.204 **/205 getBlockByHash: AugmentedRpc<(hash: H256 | string | Uint8Array, full: bool | boolean | Uint8Array) => Observable<Option<EthRichBlock>>>;206 /**207 * Returns block with given number.208 **/209 getBlockByNumber: AugmentedRpc<(block: BlockNumber | AnyNumber | Uint8Array, full: bool | boolean | Uint8Array) => Observable<Option<EthRichBlock>>>;210 /**211 * Returns the number of transactions in a block with given hash.212 **/213 getBlockTransactionCountByHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<U256>>;214 /**215 * Returns the number of transactions in a block with given block number.216 **/217 getBlockTransactionCountByNumber: AugmentedRpc<(block: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;218 /**219 * Returns the code at given address at given time (block number).220 **/221 getCode: AugmentedRpc<(address: H160 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<Bytes>>;222 /**223 * Returns filter changes since last poll.224 **/225 getFilterChanges: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<EthFilterChanges>>;226 /**227 * Returns all logs matching given filter (in a range 'from' - 'to').228 **/229 getFilterLogs: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<Vec<EthLog>>>;230 /**231 * Returns logs matching given filter object.232 **/233 getLogs: AugmentedRpc<(filter: EthFilter | { fromBlock?: any; toBlock?: any; blockHash?: any; address?: any; topics?: any } | string | Uint8Array) => Observable<Vec<EthLog>>>;234 /**235 * Returns proof for account and storage.236 **/237 getProof: AugmentedRpc<(address: H160 | string | Uint8Array, storageKeys: Vec<H256> | (H256 | string | Uint8Array)[], number: BlockNumber | AnyNumber | Uint8Array) => Observable<EthAccount>>;238 /**239 * Returns content of the storage at given address.240 **/241 getStorageAt: AugmentedRpc<(address: H160 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<H256>>;242 /**243 * Returns transaction at given block hash and index.244 **/245 getTransactionByBlockHashAndIndex: AugmentedRpc<(hash: H256 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthTransaction>>;246 /**247 * Returns transaction by given block number and index.248 **/249 getTransactionByBlockNumberAndIndex: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthTransaction>>;250 /**251 * Get transaction by its hash.252 **/253 getTransactionByHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<EthTransaction>>;254 /**255 * Returns the number of transactions sent from given address at given time (block number).256 **/257 getTransactionCount: AugmentedRpc<(hash: H256 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;258 /**259 * Returns transaction receipt by transaction hash.260 **/261 getTransactionReceipt: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<EthReceipt>>;262 /**263 * Returns an uncles at given block and index.264 **/265 getUncleByBlockHashAndIndex: AugmentedRpc<(hash: H256 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthRichBlock>>;266 /**267 * Returns an uncles at given block and index.268 **/269 getUncleByBlockNumberAndIndex: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthRichBlock>>;270 /**271 * Returns the number of uncles in a block with given hash.272 **/273 getUncleCountByBlockHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<U256>>;274 /**275 * Returns the number of uncles in a block with given block number.276 **/277 getUncleCountByBlockNumber: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;278 /**279 * Returns the hash of the current block, the seedHash, and the boundary condition to be met.280 **/281 getWork: AugmentedRpc<() => Observable<EthWork>>;282 /**283 * Returns the number of hashes per second that the node is mining with.284 **/285 hashrate: AugmentedRpc<() => Observable<U256>>;286 /**287 * Returns true if client is actively mining new blocks.288 **/289 mining: AugmentedRpc<() => Observable<bool>>;290 /**291 * Returns id of new block filter.292 **/293 newBlockFilter: AugmentedRpc<() => Observable<U256>>;294 /**295 * Returns id of new filter.296 **/297 newFilter: AugmentedRpc<(filter: EthFilter | { fromBlock?: any; toBlock?: any; blockHash?: any; address?: any; topics?: any } | string | Uint8Array) => Observable<U256>>;298 /**299 * Returns id of new block filter.300 **/301 newPendingTransactionFilter: AugmentedRpc<() => Observable<U256>>;302 /**303 * Returns protocol version encoded as a string (quotes are necessary).304 **/305 protocolVersion: AugmentedRpc<() => Observable<u64>>;306 /**307 * Sends signed transaction, returning its hash.308 **/309 sendRawTransaction: AugmentedRpc<(bytes: Bytes | string | Uint8Array) => Observable<H256>>;310 /**311 * Sends transaction; will block waiting for signer to return the transaction hash312 **/313 sendTransaction: AugmentedRpc<(tx: EthTransactionRequest | { from?: any; to?: any; gasPrice?: any; gas?: any; value?: any; data?: any; nonce?: any } | string | Uint8Array) => Observable<H256>>;314 /**315 * Used for submitting mining hashrate.316 **/317 submitHashrate: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array, hash: H256 | string | Uint8Array) => Observable<bool>>;318 /**319 * Used for submitting a proof-of-work solution.320 **/321 submitWork: AugmentedRpc<(nonce: H64 | string | Uint8Array, headerHash: H256 | string | Uint8Array, mixDigest: H256 | string | Uint8Array) => Observable<bool>>;322 /**323 * Subscribe to Eth subscription.324 **/325 subscribe: AugmentedRpc<(kind: EthSubKind | 'newHeads' | 'logs' | 'newPendingTransactions' | 'syncing' | number | Uint8Array, params?: EthSubParams | { None: any } | { Logs: any } | string | Uint8Array) => Observable<Null>>;326 /**327 * Returns an object with data about the sync status or false.328 **/329 syncing: AugmentedRpc<() => Observable<EthSyncStatus>>;330 /**331 * Uninstalls filter.332 **/333 uninstallFilter: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<bool>>;334 };335 grandpa: {336 /**337 * Prove finality for the range (begin; end] hash.338 **/339 proveFinality: AugmentedRpc<(begin: BlockHash | string | Uint8Array, end: BlockHash | string | Uint8Array, authoritiesSetId?: u64 | AnyNumber | Uint8Array) => Observable<Option<EncodedFinalityProofs>>>;340 /**341 * Returns the state of the current best round state as well as the ongoing background rounds342 **/343 roundState: AugmentedRpc<() => Observable<ReportedRoundStates>>;344 /**345 * Subscribes to grandpa justifications346 **/347 subscribeJustifications: AugmentedRpc<() => Observable<JustificationNotification>>;348 };349 mmr: {350 /**351 * Generate MMR proof for given leaf index.352 **/353 generateProof: AugmentedRpc<(leafIndex: u64 | AnyNumber | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<MmrLeafProof>>;354 };355 net: {356 /**357 * Returns true if client is actively listening for network connections. Otherwise false.358 **/359 listening: AugmentedRpc<() => Observable<bool>>;360 /**361 * Returns number of peers connected to node.362 **/363 peerCount: AugmentedRpc<() => Observable<Text>>;364 /**365 * Returns protocol version.366 **/367 version: AugmentedRpc<() => Observable<Text>>;368 };369 offchain: {370 /**371 * Get offchain local storage under given key and prefix372 **/373 localStorageGet: AugmentedRpc<(kind: StorageKind | 'PERSISTENT' | 'LOCAL' | number | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;374 /**375 * Set offchain local storage under given key and prefix376 **/377 localStorageSet: AugmentedRpc<(kind: StorageKind | 'PERSISTENT' | 'LOCAL' | number | Uint8Array, key: Bytes | string | Uint8Array, value: Bytes | string | Uint8Array) => Observable<Null>>;378 };379 payment: {380 /**381 * Query the detailed fee of a given encoded extrinsic382 **/383 queryFeeDetails: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<FeeDetails>>;384 /**385 * Retrieves the fee information for an encoded extrinsic386 **/387 queryInfo: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<RuntimeDispatchInfo>>;388 };389 rpc: {390 /**391 * Retrieves the list of RPC methods that are exposed by the node392 **/393 methods: AugmentedRpc<() => Observable<RpcMethods>>;394 };395 state: {396 /**397 * Perform a call to a builtin on the chain398 **/399 call: AugmentedRpc<(method: Text | string, data: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Bytes>>;400 /**401 * Retrieves the keys with prefix of a specific child storage402 **/403 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>>>;404 /**405 * Returns proof of storage for child key entries at a specific block state.406 **/407 getChildReadProof: AugmentedRpc<(childStorageKey: PrefixedStorageKey | string | Uint8Array, keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: BlockHash | string | Uint8Array) => Observable<ReadProof>>;408 /**409 * Retrieves the child storage for a key410 **/411 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>>;412 /**413 * Retrieves the child storage hash414 **/415 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>>;416 /**417 * Retrieves the child storage size418 **/419 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>>;420 /**421 * Retrieves the keys with a certain prefix422 **/423 getKeys: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;424 /**425 * Returns the keys with prefix with pagination support.426 **/427 getKeysPaged: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, count: u32 | AnyNumber | Uint8Array, startKey?: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;428 /**429 * Returns the runtime metadata430 **/431 getMetadata: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<Metadata>>;432 /**433 * Returns the keys with prefix, leave empty to get all the keys (deprecated: Use getKeysPaged)434 **/435 getPairs: AugmentedRpc<(prefix: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<KeyValue>>>;436 /**437 * Returns proof of storage entries at a specific block state438 **/439 getReadProof: AugmentedRpc<(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: BlockHash | string | Uint8Array) => Observable<ReadProof>>;440 /**441 * Get the runtime version442 **/443 getRuntimeVersion: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<RuntimeVersion>>;444 /**445 * Retrieves the storage for a key446 **/447 getStorage: AugmentedRpc<<T = Codec>(key: StorageKey | string | Uint8Array | any, block?: Hash | Uint8Array | string) => Observable<T>>;448 /**449 * Retrieves the storage hash450 **/451 getStorageHash: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Hash>>;452 /**453 * Retrieves the storage size454 **/455 getStorageSize: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<u64>>;456 /**457 * Query historical storage entries (by key) starting from a start block458 **/459 queryStorage: AugmentedRpc<<T = Codec[]>(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], fromBlock?: Hash | Uint8Array | string, toBlock?: Hash | Uint8Array | string) => Observable<[Hash, T][]>>;460 /**461 * Query storage entries (by key) starting at block hash given as the second parameter462 **/463 queryStorageAt: AugmentedRpc<<T = Codec[]>(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: Hash | Uint8Array | string) => Observable<T>>;464 /**465 * Retrieves the runtime version via subscription466 **/467 subscribeRuntimeVersion: AugmentedRpc<() => Observable<RuntimeVersion>>;468 /**469 * Subscribes to storage changes for the provided keys470 **/471 subscribeStorage: AugmentedRpc<<T = Codec[]>(keys?: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[]) => Observable<T>>;472 /**473 * Provides a way to trace the re-execution of a single block474 **/475 traceBlock: AugmentedRpc<(block: Hash | string | Uint8Array, targets: Option<Text> | null | object | string | Uint8Array, storageKeys: Option<Text> | null | object | string | Uint8Array, methods: Option<Text> | null | object | string | Uint8Array) => Observable<TraceBlockResponse>>;476 };477 syncstate: {478 /**479 * Returns the json-serialized chainspec running the node, with a sync state.480 **/481 genSyncSpec: AugmentedRpc<(raw: bool | boolean | Uint8Array) => Observable<Json>>;482 };483 system: {484 /**485 * Retrieves the next accountIndex as available on the node486 **/487 accountNextIndex: AugmentedRpc<(accountId: AccountId | string | Uint8Array) => Observable<Index>>;488 /**489 * Adds the supplied directives to the current log filter490 **/491 addLogFilter: AugmentedRpc<(directives: Text | string) => Observable<Null>>;492 /**493 * Adds a reserved peer494 **/495 addReservedPeer: AugmentedRpc<(peer: Text | string) => Observable<Text>>;496 /**497 * Retrieves the chain498 **/499 chain: AugmentedRpc<() => Observable<Text>>;500 /**501 * Retrieves the chain type502 **/503 chainType: AugmentedRpc<() => Observable<ChainType>>;504 /**505 * Dry run an extrinsic at a given block506 **/507 dryRun: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ApplyExtrinsicResult>>;508 /**509 * Return health status of the node510 **/511 health: AugmentedRpc<() => Observable<Health>>;512 /**513 * 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 example514 **/515 localListenAddresses: AugmentedRpc<() => Observable<Vec<Text>>>;516 /**517 * Returns the base58-encoded PeerId of the node518 **/519 localPeerId: AugmentedRpc<() => Observable<Text>>;520 /**521 * Retrieves the node name522 **/523 name: AugmentedRpc<() => Observable<Text>>;524 /**525 * Returns current state of the network526 **/527 networkState: AugmentedRpc<() => Observable<NetworkState>>;528 /**529 * Returns the roles the node is running as530 **/531 nodeRoles: AugmentedRpc<() => Observable<Vec<NodeRole>>>;532 /**533 * Returns the currently connected peers534 **/535 peers: AugmentedRpc<() => Observable<Vec<PeerInfo>>>;536 /**537 * Get a custom set of properties as a JSON object, defined in the chain spec538 **/539 properties: AugmentedRpc<() => Observable<ChainProperties>>;540 /**541 * Remove a reserved peer542 **/543 removeReservedPeer: AugmentedRpc<(peerId: Text | string) => Observable<Text>>;544 /**545 * Returns the list of reserved peers546 **/547 reservedPeers: AugmentedRpc<() => Observable<Vec<Text>>>;548 /**549 * Resets the log filter to Substrate defaults550 **/551 resetLogFilter: AugmentedRpc<() => Observable<Null>>;552 /**553 * Returns the state of the syncing of the node554 **/555 syncState: AugmentedRpc<() => Observable<SyncState>>;556 /**557 * Retrieves the version of the node558 **/559 version: AugmentedRpc<() => Observable<Text>>;560 };561 unique: {562 /**563 * Get amount of different user tokens564 **/565 accountBalance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;566 /**567 * Get tokens owned by account568 **/569 accountTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;570 /**571 * Get admin list572 **/573 adminlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletCommonAccountBasicCrossAccountIdRepr>>>;574 /**575 * Get allowed amount576 **/577 allowance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, sender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, spender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;578 /**579 * Check if user is allowed to use collection580 **/581 allowed: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;582 /**583 * Get allowlist584 **/585 allowlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletCommonAccountBasicCrossAccountIdRepr>>>;586 /**587 * Get amount of specific account token588 **/589 balance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;590 /**591 * Get collection by specified id592 **/593 collectionById: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsCollection>>>;594 /**595 * Get collection stats596 **/597 collectionStats: AugmentedRpc<(at?: Hash | string | Uint8Array) => Observable<UpDataStructsCollectionStats>>;598 /**599 * Get tokens contained in collection600 **/601 collectionTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;602 /**603 * Get token constant metadata604 **/605 constMetadata: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Bytes>>;606 /**607 * Get effective collection limits608 **/609 effectiveCollectionLimits: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Option<UpDataStructsCollectionLimits>>>;610 /**611 * Get last token id612 **/613 lastTokenId: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;614 /**615 * Check if token exists616 **/617 tokenExists: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;618 /**619 * Get token owner620 **/621 tokenOwner: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<PalletCommonAccountBasicCrossAccountIdRepr>>;622 /**623 * Get token variable metadata624 **/625 variableMetadata: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Bytes>>;626 };627 web3: {628 /**629 * Returns current client version.630 **/631 clientVersion: AugmentedRpc<() => Observable<Text>>;632 /**633 * Returns sha3 of the given data634 **/635 sha3: AugmentedRpc<(data: Bytes | string | Uint8Array) => Observable<H256>>;636 };637 } // RpcInterface638} // declare moduletests/src/interfaces/augment-types.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-types.ts
+++ b/tests/src/interfaces/augment-types.ts
@@ -1,7 +1,7 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
-import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportPalletId, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletXcmCall, PalletXcmError, PalletXcmEvent, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1AbridgedHrmpChannel, PolkadotPrimitivesV1PersistedValidationData, PolkadotPrimitivesV1UpgradeRestriction, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpTrieStorageProof, SpVersionRuntimeVersion, UniqueRuntimeRuntime, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './unique';
+import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportPalletId, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletXcmCall, PalletXcmError, PalletXcmEvent, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1AbridgedHrmpChannel, PolkadotPrimitivesV1PersistedValidationData, PolkadotPrimitivesV1UpgradeRestriction, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './unique';
import type { Data, StorageKey } from '@polkadot/types';
import type { BitVec, Bool, Bytes, I128, I16, I256, I32, I64, I8, Json, Null, Raw, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types-codec';
import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';
@@ -18,7 +18,7 @@
import type { StatementKind } from '@polkadot/types/interfaces/claims';
import type { CollectiveOrigin, MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';
import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';
-import type { AliveContractInfo, CodeHash, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultErr, ContractExecResultErrModule, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateReturnValue, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
+import type { AliveContractInfo, CodeHash, CodeSource, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultErr, ContractExecResultErrModule, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractInstantiateResultTo299, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateRequestV1, InstantiateRequestV2, InstantiateReturnValue, InstantiateReturnValueOk, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';
import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';
import type { ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';
@@ -198,6 +198,7 @@
ClassMetadata: ClassMetadata;
CodecHash: CodecHash;
CodeHash: CodeHash;
+ CodeSource: CodeSource;
CodeUploadRequest: CodeUploadRequest;
CodeUploadResult: CodeUploadResult;
CodeUploadResultValue: CodeUploadResultValue;
@@ -250,6 +251,7 @@
ContractInfo: ContractInfo;
ContractInstantiateResult: ContractInstantiateResult;
ContractInstantiateResultTo267: ContractInstantiateResultTo267;
+ ContractInstantiateResultTo299: ContractInstantiateResultTo299;
ContractLayoutArray: ContractLayoutArray;
ContractLayoutCell: ContractLayoutCell;
ContractLayoutEnum: ContractLayoutEnum;
@@ -591,7 +593,10 @@
InstanceId: InstanceId;
InstanceMetadata: InstanceMetadata;
InstantiateRequest: InstantiateRequest;
+ InstantiateRequestV1: InstantiateRequestV1;
+ InstantiateRequestV2: InstantiateRequestV2;
InstantiateReturnValue: InstantiateReturnValue;
+ InstantiateReturnValueOk: InstantiateReturnValueOk;
InstantiateReturnValueTo267: InstantiateReturnValueTo267;
InstructionV2: InstructionV2;
InstructionWeights: InstructionWeights;
@@ -707,6 +712,7 @@
OffchainAccuracyCompact: OffchainAccuracyCompact;
OffenceDetails: OffenceDetails;
Offender: Offender;
+ OpalRuntimeRuntime: OpalRuntimeRuntime;
OpaqueCall: OpaqueCall;
OpaqueMultiaddr: OpaqueMultiaddr;
OpaqueNetworkState: OpaqueNetworkState;
@@ -1146,7 +1152,6 @@
UnappliedSlash: UnappliedSlash;
UnappliedSlashOther: UnappliedSlashOther;
UncleEntryItem: UncleEntryItem;
- UniqueRuntimeRuntime: UniqueRuntimeRuntime;
UnknownTransaction: UnknownTransaction;
UnlockChunk: UnlockChunk;
UnrewardedRelayer: UnrewardedRelayer;
tests/src/interfaces/lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/lookup.ts
+++ b/tests/src/interfaces/lookup.ts
@@ -1756,7 +1756,7 @@
}
},
/**
- * Lookup225: frame_system::EventRecord<unique_runtime::Event, primitive_types::H256>
+ * Lookup225: frame_system::EventRecord<opal_runtime::Event, primitive_types::H256>
**/
FrameSystemEventRecord: {
phase: 'FrameSystemPhase',
@@ -2240,7 +2240,7 @@
* Lookup297: pallet_common::pallet::Error<T>
**/
PalletCommonError: {
- _enum: ['CollectionNotFound', 'MustBeTokenOwner', 'NoPermission', 'PublicMintingNotAllowed', 'AddressNotInAllowlist', 'CollectionNameLimitExceeded', 'CollectionDescriptionLimitExceeded', 'CollectionTokenPrefixLimitExceeded', 'TotalCollectionsLimitExceeded', 'TokenVariableDataLimitExceeded', 'CollectionAdminCountExceeded', 'CollectionLimitBoundsExceeded', 'OwnerPermissionsCantBeReverted', 'TransferNotAllowed', 'AccountTokenLimitExceeded', 'CollectionTokenLimitExceeded', 'MetadataFlagFrozen', 'TokenNotFound', 'TokenValueTooLow', 'ApprovedValueTooLow', 'CantApproveMoreThanOwned', 'AddressIsZero', 'UnsupportedOperation']
+ _enum: ['CollectionNotFound', 'MustBeTokenOwner', 'NoPermission', 'PublicMintingNotAllowed', 'AddressNotInAllowlist', 'CollectionNameLimitExceeded', 'CollectionDescriptionLimitExceeded', 'CollectionTokenPrefixLimitExceeded', 'TotalCollectionsLimitExceeded', 'TokenVariableDataLimitExceeded', 'CollectionAdminCountExceeded', 'CollectionLimitBoundsExceeded', 'OwnerPermissionsCantBeReverted', 'TransferNotAllowed', 'AccountTokenLimitExceeded', 'CollectionTokenLimitExceeded', 'MetadataFlagFrozen', 'TokenNotFound', 'TokenValueTooLow', 'ApprovedValueTooLow', 'CantApproveMoreThanOwned', 'AddressIsZero', 'UnsupportedOperation', 'NotSufficientFounds']
},
/**
* Lookup299: pallet_fungible::pallet::Error<T>
@@ -2417,11 +2417,11 @@
**/
FrameSystemExtensionsCheckWeight: 'Null',
/**
- * Lookup345: pallet_template_transaction_payment::ChargeTransactionPayment<unique_runtime::Runtime>
+ * Lookup345: pallet_template_transaction_payment::ChargeTransactionPayment<opal_runtime::Runtime>
**/
PalletTemplateTransactionPaymentChargeTransactionPayment: 'Compact<u128>',
/**
- * Lookup346: unique_runtime::Runtime
+ * Lookup346: opal_runtime::Runtime
**/
- UniqueRuntimeRuntime: 'Null'
+ OpalRuntimeRuntime: 'Null'
};
tests/src/interfaces/types-lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/types-lookup.ts
+++ b/tests/src/interfaces/types-lookup.ts
@@ -2462,7 +2462,8 @@
readonly isCantApproveMoreThanOwned: boolean;
readonly isAddressIsZero: boolean;
readonly isUnsupportedOperation: boolean;
- readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'TokenVariableDataLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation';
+ readonly isNotSufficientFounds: boolean;
+ readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'TokenVariableDataLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds';
}
/** @name PalletFungibleError (299) */
@@ -2643,7 +2644,7 @@
/** @name PalletTemplateTransactionPaymentChargeTransactionPayment (345) */
export interface PalletTemplateTransactionPaymentChargeTransactionPayment extends Compact<u128> {}
- /** @name UniqueRuntimeRuntime (346) */
- export type UniqueRuntimeRuntime = Null;
+ /** @name OpalRuntimeRuntime (346) */
+ export type OpalRuntimeRuntime = Null;
} // declare module
tests/src/interfaces/unique/definitions.tsdiffbeforeafterboth--- a/tests/src/interfaces/unique/definitions.ts
+++ b/tests/src/interfaces/unique/definitions.ts
@@ -55,5 +55,6 @@
collectionById: fun('Get collection by specified id', [collectionParam], 'Option<UpDataStructsCollection>'),
collectionStats: fun('Get collection stats', [], 'UpDataStructsCollectionStats'),
allowed: fun('Check if user is allowed to use collection', [collectionParam, crossAccountParam()], 'bool'),
+ effectiveCollectionLimits: fun('Get effective collection limits', [collectionParam], 'Option<UpDataStructsCollectionLimits>'),
},
};
tests/src/interfaces/unique/types.tsdiffbeforeafterboth--- a/tests/src/interfaces/unique/types.ts
+++ b/tests/src/interfaces/unique/types.ts
@@ -654,6 +654,9 @@
readonly type: 'ApplyExtrinsic' | 'Finalization' | 'Initialization';
}
+/** @name OpalRuntimeRuntime */
+export interface OpalRuntimeRuntime extends Null {}
+
/** @name OrmlVestingModuleCall */
export interface OrmlVestingModuleCall extends Enum {
readonly isClaim: boolean;
@@ -892,7 +895,8 @@
readonly isCantApproveMoreThanOwned: boolean;
readonly isAddressIsZero: boolean;
readonly isUnsupportedOperation: boolean;
- readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'TokenVariableDataLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation';
+ readonly isNotSufficientFounds: boolean;
+ readonly type: 'CollectionNotFound' | 'MustBeTokenOwner' | 'NoPermission' | 'PublicMintingNotAllowed' | 'AddressNotInAllowlist' | 'CollectionNameLimitExceeded' | 'CollectionDescriptionLimitExceeded' | 'CollectionTokenPrefixLimitExceeded' | 'TotalCollectionsLimitExceeded' | 'TokenVariableDataLimitExceeded' | 'CollectionAdminCountExceeded' | 'CollectionLimitBoundsExceeded' | 'OwnerPermissionsCantBeReverted' | 'TransferNotAllowed' | 'AccountTokenLimitExceeded' | 'CollectionTokenLimitExceeded' | 'MetadataFlagFrozen' | 'TokenNotFound' | 'TokenValueTooLow' | 'ApprovedValueTooLow' | 'CantApproveMoreThanOwned' | 'AddressIsZero' | 'UnsupportedOperation' | 'NotSufficientFounds';
}
/** @name PalletCommonEvent */
@@ -1721,9 +1725,6 @@
readonly transactionVersion: u32;
readonly stateVersion: u8;
}
-
-/** @name UniqueRuntimeRuntime */
-export interface UniqueRuntimeRuntime extends Null {}
/** @name UpDataStructsAccessMode */
export interface UpDataStructsAccessMode extends Enum {
tests/src/limits.test.tsdiffbeforeafterboth--- a/tests/src/limits.test.ts
+++ b/tests/src/limits.test.ts
@@ -396,3 +396,51 @@
//expect(aliceBalanceAfterSponsoredTransaction1).to.be.lessThan(aliceBalanceBefore);
});
});
+
+describe.only('Effective collection limits', () => {
+ it('Test1', async () => {
+ await usingApi(async (api) => {
+ const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
+
+ {
+ const collection = await api.rpc.unique.collectionById(collectionId);
+ expect(collection.isSome).to.be.true;
+ const limits = collection.unwrap().limits;
+ expect(limits).to.be.any;
+
+ // Check that limits is undefined
+ expect(limits.accountTokenOwnershipLimit.isNone).to.be.true;
+ expect(limits.sponsoredDataSize.isNone).to.be.true;
+ expect(limits.sponsoredDataRateLimit.isNone).to.be.true;
+ expect(limits.tokenLimit.isNone).to.be.true;
+ expect(limits.sponsorTransferTimeout.isNone).to.be.true;
+ expect(limits.sponsorApproveTimeout.isNone).to.be.true;
+ expect(limits.ownerCanTransfer.isNone).to.be.true;
+ expect(limits.ownerCanDestroy.isNone).to.be.true;
+ expect(limits.transfersEnabled.isNone).to.be.true;
+ }
+
+ {
+ const limits = await api.rpc.unique.effectiveCollectionLimits(11111);
+ expect(limits.isNone).to.be.true;
+ }
+
+ {
+ const limitsOpt = await api.rpc.unique.effectiveCollectionLimits(collectionId);
+ expect(limitsOpt.isNone).to.be.false;
+ const limits = limitsOpt.unwrap();
+
+ console.log(limits);
+ expect(limits.accountTokenOwnershipLimit.isSome).to.be.true;
+ expect(limits.sponsoredDataSize.isSome).to.be.true;
+ expect(limits.sponsoredDataRateLimit.isSome).to.be.true;
+ expect(limits.tokenLimit.isSome).to.be.true;
+ expect(limits.sponsorTransferTimeout.isSome).to.be.true;
+ expect(limits.sponsorApproveTimeout.isSome).to.be.true;
+ expect(limits.ownerCanTransfer.isSome).to.be.true;
+ expect(limits.ownerCanDestroy.isSome).to.be.true;
+ expect(limits.transfersEnabled.isSome).to.be.true;
+ }
+ });
+ });
+});
\ No newline at end of file