hasKey
Returns true if the keystore has private keys for the given public key and key type.
This method is only active with appropriate flags
Interface
JSON
hasSessionKeys
Returns true if the keystore has private keys for the given session public keys.
This method is only active with appropriate flags
Interface
JSON
insertKey
Insert a key into the keystore.
This method is only active with appropriate flags
Interface
JSON
pendingExtrinsics
Returns all pending extrinsics, potentially grouped by sender
Interface
JSON
removeExtrinsic
Remove given extrinsic from the pool and temporarily ban it to prevent reimporting
This method is only active with appropriate flags
Interface
JSON
rotateKeys
Generate new session keys and returns the corresponding public keys
This method is only active with appropriate flags
Interface
JSON
submitAndWatchExtrinsic
Submit and subscribe to watch an extrinsic until unsubscribed
Interface
JSON
submitExtrinsic
Submit a fully formatted extrinsic for block inclusion
Interface
JSON
epochAuthorship
Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore
This method is only active with appropriate flags
Interface
JSON
getBlock
Get header and body of a relay chain block
Interface
JSON
getBlockHash
Get the block hash for a specific block
Interface
JSON
getFinalizedHead
Get hash of the last finalized block in the canon chain
Interface
JSON
getHeader
Retrieves the header for a specific block
Interface
JSON
subscribeAllHeads
Retrieves the newest header via subscription
Interface
JSON
subscribeFinalizedHeads
Retrieves the best finalized header via subscription
Interface
JSON
subscribeNewHeads
Retrieves the best header via subscription
Interface
JSON
getKeys
Returns the keys with prefix from a child storage, leave empty to get all the keys
Interface
JSON
getKeysPaged
Returns the keys with prefix from a child storage with pagination support
Interface
JSON
getStorage
Returns a child storage entry at a specific block state
Interface
JSON
getStorageEntries
Returns child storage entries for multiple keys at a specific block state
Interface
JSON
getStorageHash
Returns the hash of a child storage entry at a block state
Interface
JSON
getStorageSize
Returns the size of a child storage entry at a block state
Interface
JSON
getAmountsIn
Given an array of AssetIds, return amounts in for an amount out
Interface
JSON
getAmountsOut
Given an array of AssetIds, return amounts out for an amount in
Interface
JSON
getLPTokenID
Given two AssetIds, return liquidity token created for the pair
Interface
JSON
getLiquidity
Given two AssetIds, return liquidity
Interface
JSON
getTradingPairStatus
Given two AssetIds, return whether trading pair is enabled or disabled
Interface
JSON
quote
Given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
Interface
JSON
accounts
Returns accounts list.
Interface
JSON
blockNumber
Returns the blockNumber
Interface
JSON
call
Call contract, returning the output data.
Interface
JSON
chainId
Returns the chain ID used for transaction signing at the current best block. None is returned if not available.
Interface
JSON
coinbase
Returns block author.
Interface
JSON
estimateGas
Estimate gas needed for execution of given contract.
Interface
JSON
feeHistory
Returns fee history for given block count & reward percentiles
Interface
JSON
gasPrice
Returns current gas price.
Interface
JSON
getBalance
Returns balance of the given account.
Interface
JSON
getBlockByHash
Returns block with given hash.
Interface
JSON
getBlockByNumber
Returns block with given number.
Interface
JSON
getBlockTransactionCountByHash
Returns the number of transactions in a block with given hash.
Interface
JSON
getBlockTransactionCountByNumber
Returns the number of transactions in a block with given block number.
Interface
JSON
getCode
Returns the code at given address at given time (block number).
Interface
JSON
getFilterChanges
Returns filter changes since last poll.
Interface
JSON
getFilterLogs
Returns all logs matching given filter (in a range 'from' - 'to').
Interface
JSON
getLogs
Returns logs matching given filter object.
Interface
JSON
getStorageAt
Returns content of the storage at given address.
Interface
JSON
getTransactionByBlockHashAndIndex
Returns transaction at given block hash and index.
Interface
JSON
getTransactionByBlockNumberAndIndex
Returns transaction by given block number and index.
Interface
JSON
getTransactionByHash
Get transaction by its hash.
Interface
JSON
getTransactionCount
Returns the number of transactions sent from given address at given time (block number).
Interface
JSON
getTransactionReceipt
Returns transaction receipt by transaction hash.
Interface
JSON
getUncleByBlockHashAndIndex
Returns an uncles at given block and index.
Interface
JSON
getUncleByBlockNumberAndIndex
Returns an uncles at given block and index.
Interface
JSON
getUncleCountByBlockHash
Returns the number of uncles in a block with given hash.
Interface
JSON
getUncleCountByBlockNumber
Returns the number of uncles in a block with given block number.
Interface
JSON
getWork
Returns the hash of the current block, the seedHash, and the boundary condition to be met.
Interface
JSON
hashrate
Returns the number of hashes per second that the node is mining with.
Interface
JSON
maxPriorityFeePerGas
Returns max priority fee per gas
Interface
JSON
mining
Returns true if client is actively mining new blocks.
Interface
JSON
newBlockFilter
Returns id of new block filter.
Interface
JSON
newFilter
Returns id of new filter.
Interface
JSON
newPendingTransactionFilter
Returns id of new block filter.
Interface
JSON
protocolVersion
Returns protocol version encoded as a string (quotes are necessary).
Interface
JSON
sendRawTransaction
Sends signed transaction, returning its hash.
Interface
JSON
sendTransaction
Sends transaction; will block waiting for signer to return the transaction hash
Interface
JSON
submitHashrate
Used for submitting mining hashrate.
Interface
JSON
submitWork
Used for submitting a proof-of-work solution.
Interface
JSON
subscribe
Subscribe to Eth subscription.
Interface
JSON
syncing
Returns an object with data about the sync status or false.
Interface
JSON
uninstallFilter
Uninstalls filter.
Interface
JSON
getEventProof
Get ETH event proof for event Id
Interface
JSON
getXrplTxProof
Get XRPL event proof for event Id
Interface
JSON
proveFinality
Prove finality for the given block number, returning the Justification for the last block in the set.
Interface
JSON
roundState
Returns the state of the current best round state as well as the ongoing background rounds
Interface
JSON
subscribeJustifications
Subscribes to grandpa justifications
Interface
JSON
listening
Returns true if client is actively listening for network connections. Otherwise false.
Interface
JSON
peerCount
Returns number of peers connected to node.
Interface
JSON
version
Returns protocol version.
Interface
JSON
ownedTokens
Get all NFTs owned by an account
Interface
JSON
tokenUri
Get the URI of a token
Interface
JSON
localStorageGet
Get offchain local storage under given key and prefix
This method is only active with appropriate flags
Interface
JSON
localStorageSet
Set offchain local storage under given key and prefix
This method is only active with appropriate flags
Interface
JSON
queryFeeDetails
Query the detailed fee of a given encoded extrinsic
Interface
JSON
Deprecated Use api.call.transactionPaymentApi.queryFeeDetails
instead
queryInfo
Retrieves the fee information for an encoded extrinsic
Interface
JSON
Deprecated Use api.call.transactionPaymentApi.queryInfo
instead
methods
Retrieves the list of RPC methods that are exposed by the node
Interface
JSON
call
Perform a call to a builtin on the chain
Interface
JSON
getChildReadProof
Returns proof of storage for child key entries at a specific block state.
Interface
JSON
getKeys
Retrieves the keys with a certain prefix
Interface
JSON
Deprecated Use api.rpc.state.getKeysPaged
to retrieve keys
getKeysPaged
Returns the keys with prefix with pagination support.
Interface
JSON
getMetadata
Returns the runtime metadata
Interface
JSON
getPairs
Returns the keys with prefix, leave empty to get all the keys (deprecated: Use getKeysPaged)
This method is only active with appropriate flags
Interface
JSON
Deprecated Use api.rpc.state.getKeysPaged
to retrieve keys
getReadProof
Returns proof of storage entries at a specific block state
Interface
JSON
getRuntimeVersion
Get the runtime version
Interface
JSON
getStorage
Retrieves the storage for a key
Interface
JSON
getStorageHash
Retrieves the storage hash
Interface
JSON
getStorageSize
Retrieves the storage size
Interface
JSON
queryStorage
Query historical storage entries (by key) starting from a start block.
Info: This method is only active with appropriate flags.
Interface
JSON
queryStorageAt
Query storage entries (by key) starting at block hash given as the second parameter
Interface
JSON
subscribeRuntimeVersion
Retrieves the runtime version via subscription
Interface
JSON
subscribeStorage
Subscribes to storage changes for the provided keys
Interface
JSON
traceBlock
Provides a way to trace the re-execution of a single block
Info: This method is only active with appropriate flags.
Interface
JSON
accountNextIndex
Retrieves the next accountIndex as available on the node
Interface
JSON
addLogFilter
Adds the supplied directives to the current log filter.
Info: This method is only active with appropriate flags.
Interface
JSON
addReservedPeer
Adds a reserved peer
Info: This method is only active with appropriate flags.
Interface
JSON
chain
Retrieves the chain
Interface
JSON
chainType
Retrieves the chain type
Interface
JSON
dryRun
Dry run an extrinsic at a given block.
Info: This method is only active with appropriate flags.
Interface
JSON
health
Return health status of the node
Interface
JSON
localListenAddresses
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 example
Interface
JSON
localPeerId
Returns the base58-encoded PeerId of the node
Interface
JSON
name
Retrieves the node name
Interface
JSON
nodeRoles
Returns the roles the node is running as
Interface
JSON
peers
Returns the currently connected peers.
Info: This method is only active with appropriate flags.
Interface
JSON
properties
Get a custom set of properties as a JSON object, defined in the chain spec
Interface
JSON
removeReservedPeer
Remove a reserved peer.
Info: This method is only active with appropriate flags.
Interface
JSON
reservedPeers
Returns the list of reserved peers
Interface
JSON
resetLogFilter
Resets the log filter to Substrate defaults
Info: This method is only active with appropriate flags.
Interface
JSON
syncState
Returns the state of the syncing of the node
Interface
JSON
version
Retrieves the version of the node
Interface
JSON
clientVersion
Returns current client version.
Interface
JSON
sha3
Returns sha3 of the given data
Interface
JSON
Loading...
Loading...
Loading...
Loading...
Exactly as transfer
, except the origin must be root and the source account may be specified.
Namespace
Type
Unreserve some balance from a user by force.
Can only be called by ROOT.
Namespace
Type
Set the balances of a given account.
This will alter FreeBalance
and ReservedBalance
in storage. it will also alter the total issuance of the system (TotalIssuance
) appropriately. If the new free or reserved balance is below the existential deposit, it will reset the account nonce (frame_system::AccountNonce
).
The dispatch origin for this call is root
.
Namespace
Type
Transfer some liquid-free balance to another account.
transfer
will set the FreeBalance
of the sender and receiver. If the sender's account is below the existential deposit as a result of the transfer, the account will be reaped.
The dispatch origin for this call must be Signed
by the transactor.
Namespace
Type
Transfer the entire transferable balance from the caller account.
NOTE: This function only attempts to transfer transferable balances. This means that any locked, reserved, or existential deposits (when keep_alive
is true
), will not be transferred by this function. To ensure that this function results in a killed account, you might need to prepare the account by removing any reference counters, storage deposits, etc.
The dispatch origin of this call must be Signed.
dest
: The recipient of the transfer.
keep_alive
: A boolean to determine if the transfer_all
operation should send all of the funds the account has, causing the sender account to be killed (false), or transfer everything except at least the existential deposit, which will guarantee to keep the sender account alive (true). #
Namespace
Type
Same as the transfer
call, but with a check that the transfer will not kill the origin account.
99% of the time you want transfer
instead.
Namespace
Type
The Balances pallet example of storing the balance of an account.
Example
nocompile impl pallet_balances::Config for Runtime { type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>> }
You can also store the balance of an account in the System
pallet.
Example
nocompile impl pallet_balances::Config for Runtime { type AccountStore = System }
But this comes with tradeoffs, storing account balances in the system pallet stores frame_system
data alongside the account data contrary to storing account balances in the Balances
pallet, which uses a StorageMap
to store balances data only. NOTE: This is only used in the case that this pallet is used to store balances.
Namespace
Type
Any liquidity locks on some account balances. NOTE: Should only be accessed when setting, changing and freeing a lock.
Namespace
Type
Named reserves on some account balances.
Namespace
Type
Storage version of the pallet.
This is set to v2.0.0 for new networks.
Namespace
Type
The total units issued in the system.
Namespace
Type
A balance was set by root.
Namespace
Type
Some amount was deposited (e.g. for transaction fees).
Namespace
Type
An account was removed whose balance was non-zero but below ExistentialDeposit, resulting in an outright loss.
Namespace
Type
An account was created with some free balance.
Namespace
Type
Some balance was reserved (moved from free to reserved).
Namespace
Type
Some balance was moved from the reserve of the first account to the second account. Final argument indicates the destination balance type.
Namespace
Type
Some amount was removed from the account (e.g. for misbehavior).
Namespace
Type
Transfer succeeded.
Namespace
Type
Some balance was unreserved (moved from reserved to free).
Namespace
Type
Some amount was withdrawn from the account (e.g. for transaction fees).
Namespace
Type
Beneficiary account must pre-exist
Namespace
Value too low to create account due to existential deposit
Namespace
A vesting schedule already exists for this account
Namespace
Balance too low to send value
Namespace
Transfer/payment would kill account
Namespace
Account liquidity restrictions prevent withdrawal
Namespace
Number of named reserves exceed MaxReserves
Namespace
Vesting balance too high to send value
Namespace
The minimum amount required to keep an account open.
Namespace
Type
The maximum number of locks that should exist on an account. Not strictly enforced, but used for weight estimation.
Namespace
Type
The maximum number of named reserves that can exist on an account.
Namespace
Type
Add liquidity to Enabled trading pair, or add provision to Provisioning trading pair.
Add liquidity success will issue shares in current price which decided by the liquidity scale. Shares are temporarily not allowed to transfer and trade, it represents the proportion of assets in liquidity pool.
Add provision success will record the provision, issue shares to caller in the initial price when trading pair convert to Enabled.
Creates and enables TradingPair LP token if it does not exist for trading pair.
Fails to add liquidity for NotEnabled
trading pair.
token_a
: Asset id A.
token_b
: Asset id B.
amount_a_desired
: amount a desired to add.
amount_b_desired
: amount b desired to add.
amount_a_min
: amount a minimum willing to add.
amount_b_min
: amount b minimum willing to add.
to
: The recipient of the LP token. The caller is the default recipient if it is set to None.
deadline
: The deadline of executing this extrinsic. The deadline won't be checked if it is set to None
Namespace
Type
Disable an Enabled
trading pair.
Requires LP token to be created and in the Enabled
status
Only root can disable trading pair
token_a
: Asset id A.
token_b
: Asset id B.
Namespace
Type
Re enable a NotEnabled
trading pair.
Requires LP token to be created and in the NotEnabled
status
Only root can enable a disabled trading pair
token_a
: Asset id A.
token_b
: Asset id B.
Namespace
Type
Remove liquidity from specific liquidity pool in the form of burning shares, and withdrawing currencies in trading pairs from liquidity pool in proportion, and withdraw liquidity incentive interest.
note: liquidity can still be withdrawn for NotEnabled
trading pairs.
token_a
: Asset id A.
token_b
: Asset id B.
liquidity
: liquidity amount to remove.
amount_a_min
: minimum amount of asset A to be withdrawn from LP token.
amount_b_min
: minimum amount of asset B to be withdrawn from LP token.
to
: The recipient of the withdrawn token assets. The caller is the default recipient if it is set to None.
deadline
: The deadline of executing this extrinsic. The deadline won't be checked if it is set to None
Namespace
Type
Set the FeeTo
account. This operation requires root access.
note: analogous to Uniswapv2 setFeeTo
fee_to
: the new account or None assigned to FeeTo.
Namespace
Type
Trading with DEX, swap with exact supply amount. Specify your input; retrieve variable output.
note: analogous to Uniswapv2 swapExactTokensForTokens
path
: trading path.
amount_in
: exact supply amount.
amount_out_min
: acceptable minimum target amount.
to
: The recipient of the swapped token asset. The caller is the default recipient if it is set to None.
deadline
: The deadline of executing this extrinsic. The deadline won't be checked if it is set to None
Namespace
Type
Trading with DEX, swap with exact target amount. Specify your output; supply variable input.
note: analogous to Uniswapv2 swapTokensForExactTokens
amount_out
: exact target amount.
amount_in_max
: acceptable maximum supply amount.
path
: trading path.
to
: The recipient of the swapped token asset. The caller is the default recipient if it is set to None.
deadline
: The deadline of executing this extrinsic. The deadline won't be checked if it is set to None
Namespace
Type
FeeTo account where network fees are deposited
Namespace
Type
Namespace
Type
Namespace
Type
Namespace
Type
Namespace
Type
Add liquidity success. [who, asset_id_0, reserve_0_increment, asset_id_1, reserve_1_increment, share_increment, to]
Namespace
Type
Add provision success. [who, asset_id_0, contribution_0, asset_id_1, contribution_1]
Namespace
Type
Disable trading pair. [trading_pair]
Namespace
Type
Enable trading pair. [trading_pair]
Namespace
Type
Set FeeTo account success. [fee_to]
Namespace
Type
Provisioning trading pair convert to Enabled. [trading_pair, pool_0_amount, pool_1_amount, total_share_amount]
Namespace
Type
Remove liquidity from the trading pool success. [who, asset_id_0, reserve_0_decrement, asset_id_1, reserve_1_decrement, share_decrement, to]
Namespace
Type
Use supply Asset to swap target Asset. [trader, trading_path, supply_Asset_amount, target_Asset_amount, to]
Namespace
Type
Supply amount is more than max_supply_amount
Namespace
The deadline has been missed
Namespace
Namespace
Insufficent amount
Namespace
Insufficient asset_a liquidity amount
Namespace
Insufficient asset_b liquidity amount
Namespace
Insufficient input amount
Namespace
Liquidity is not enough
Namespace
Insufficient liquidity burnt
Namespace
Insufficient output amount
Namespace
Target amount is less to min_target_amount
Namespace
Insufficient withdraw amount for token A
Namespace
Insufficient withdraw amount for token B
Namespace
Invalid Asset id
Namespace
Invalid constant product K
Namespace
Must provide non-zero amount of liquidity
Namespace
The increment of liquidity is invalid
Namespace
Invalid trading path length
Namespace
The Liquidity Provider token does not exist
Namespace
Trading pair must be in Enabled status
Namespace
Trading pair must be in NotEnabled status
Namespace
The supply amount is zero
Namespace
The target amount is zero
Namespace
The default FeeTo account
Namespace
Type
The DEX's burn id, to provide for a redundant, unredeemable minter/burner address.
Namespace
Type
Trading fee rate The first item of the tuple is the numerator of the fee rate, second item is the denominator, fee_rate = numerator / denominator, use (u32, u32) over Rate
type to minimize internal division operation.
Namespace
Type
Liquidity pair default token decimals
Namespace
Type
The limit for length of trading path
Namespace
Type
getAmountsIn
Given an array of AssetIds, return amounts in for an amount out
Interface
JSON
getAmountsOut
Given an array of AssetIds, return amounts out for an amount in
Interface
JSON
getLPTokenID
Given two AssetIds, return liquidity token created for the pair
Interface
JSON
getLiquidity
Given two AssetIds, return liquidity
Interface
JSON
getTradingPairStatus
Given two AssetIds, return whether trading pair is enabled or disabled
Interface
JSON
quote
Given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
Interface
JSON
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...