Skip to content

Commit e82f96f

Browse files
authored
feat: update docs with latest types for Polkadot and Kusama (#497)
1 parent acf3608 commit e82f96f

File tree

25 files changed

+16416
-3721
lines changed

25 files changed

+16416
-3721
lines changed

docs/asset-hub-kusama/constants.md

Lines changed: 538 additions & 1 deletion
Large diffs are not rendered by default.

docs/asset-hub-kusama/errors.md

Lines changed: 1252 additions & 18 deletions
Large diffs are not rendered by default.

docs/asset-hub-kusama/events.md

Lines changed: 1041 additions & 33 deletions
Large diffs are not rendered by default.

docs/asset-hub-kusama/extrinsics.md

Lines changed: 3935 additions & 1556 deletions
Large diffs are not rendered by default.

docs/asset-hub-kusama/rpc.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ The following sections contain known RPC methods that may be available on specif
1212

1313
- **[dev](#dev)**
1414

15-
- **[engine](#engine)**
16-
1715
- **[offchain](#offchain)**
1816

1917
- **[payment](#payment)**
@@ -164,21 +162,6 @@ ___
164162
___
165163

166164

167-
## engine
168-
169-
### createBlock(createEmpty: `bool`, finalize: `bool`, parentHash?: `BlockHash`): `CreatedBlock`
170-
- **interface**: `api.rpc.engine.createBlock`
171-
- **jsonrpc**: `engine_createBlock`
172-
- **summary**: Instructs the manual-seal authorship task to create a new block
173-
174-
### finalizeBlock(hash: `BlockHash`, justification?: `Justification`): `bool`
175-
- **interface**: `api.rpc.engine.finalizeBlock`
176-
- **jsonrpc**: `engine_finalizeBlock`
177-
- **summary**: Instructs the manual-seal authorship task to finalize a block
178-
179-
___
180-
181-
182165
## offchain
183166

184167
### localStorageClear(kind: `StorageKind`, key: `Bytes`): `Null`

docs/asset-hub-kusama/runtime.md

Lines changed: 178 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ The following section contains known runtime calls that may be available on spec
1212

1313
- **[auraUnincludedSegmentApi](#auraunincludedsegmentapi)**
1414

15+
- **[authorizedAliasersApi](#authorizedaliasersapi)**
16+
1517
- **[blockBuilder](#blockbuilder)**
1618

1719
- **[collectCollationInfo](#collectcollationinfo)**
@@ -24,22 +26,34 @@ The following section contains known runtime calls that may be available on spec
2426

2527
- **[genesisBuilder](#genesisbuilder)**
2628

29+
- **[getParachainInfo](#getparachaininfo)**
30+
2731
- **[locationToAccountApi](#locationtoaccountapi)**
2832

2933
- **[metadata](#metadata)**
3034

35+
- **[nominationPoolsApi](#nominationpoolsapi)**
36+
3137
- **[offchainWorkerApi](#offchainworkerapi)**
3238

39+
- **[relayParentOffsetApi](#relayparentoffsetapi)**
40+
3341
- **[reviveApi](#reviveapi)**
3442

43+
- **[runtimeViewFunction](#runtimeviewfunction)**
44+
3545
- **[sessionKeys](#sessionkeys)**
3646

47+
- **[stakingApi](#stakingapi)**
48+
3749
- **[taggedTransactionQueue](#taggedtransactionqueue)**
3850

3951
- **[transactionPaymentApi](#transactionpaymentapi)**
4052

4153
- **[transactionPaymentCallApi](#transactionpaymentcallapi)**
4254

55+
- **[trustedQueryApi](#trustedqueryapi)**
56+
4357
- **[xcmPaymentApi](#xcmpaymentapi)**
4458

4559

@@ -58,17 +72,17 @@ ___
5872

5973
## assetConversionApi
6074

61-
### getReserves(asset1: `StagingXcmV4Location`, asset2: `StagingXcmV4Location`): `Option<(u128,u128)>`
75+
### getReserves(asset1: `StagingXcmV5Location`, asset2: `StagingXcmV5Location`): `Option<(u128,u128)>`
6276
- **interface**: `api.call.assetConversionApi.getReserves`
6377
- **runtime**: `assetConversionApi_get_reserves`
6478
- **summary**: Returns the size of the liquidity pool for the given asset pair.
6579

66-
### quotePriceExactTokensForTokens(asset1: `StagingXcmV4Location`, asset2: `StagingXcmV4Location`, amount: `u128`, include_fee: `bool`): `Option<u128>`
80+
### quotePriceExactTokensForTokens(asset1: `StagingXcmV5Location`, asset2: `StagingXcmV5Location`, amount: `u128`, include_fee: `bool`): `Option<u128>`
6781
- **interface**: `api.call.assetConversionApi.quotePriceExactTokensForTokens`
6882
- **runtime**: `assetConversionApi_quote_price_exact_tokens_for_tokens`
6983
- **summary**: Provides a quote for [`Pallet::swap_exact_tokens_for_tokens`].,, Note that the price may have changed by the time the transaction is executed., (Use `amount_out_min` to control slippage.)
7084

71-
### quotePriceTokensForExactTokens(asset1: `StagingXcmV4Location`, asset2: `StagingXcmV4Location`, amount: `u128`, include_fee: `bool`): `Option<u128>`
85+
### quotePriceTokensForExactTokens(asset1: `StagingXcmV5Location`, asset2: `StagingXcmV5Location`, amount: `u128`, include_fee: `bool`): `Option<u128>`
7286
- **interface**: `api.call.assetConversionApi.quotePriceTokensForExactTokens`
7387
- **runtime**: `assetConversionApi_quote_price_tokens_for_exact_tokens`
7488
- **summary**: Provides a quote for [`Pallet::swap_tokens_for_exact_tokens`].,, Note that the price may have changed by the time the transaction is executed., (Use `amount_in_max` to control slippage.)
@@ -101,6 +115,21 @@ ___
101115
___
102116

103117

118+
## authorizedAliasersApi
119+
120+
### authorizedAliasers(target: `XcmVersionedLocation`): `Result<Vec<XcmRuntimeApisAuthorizedAliasesOriginAliaser>, XcmRuntimeApisAuthorizedAliasesError>`
121+
- **interface**: `api.call.authorizedAliasersApi.authorizedAliasers`
122+
- **runtime**: `authorizedAliasersApi_authorized_aliasers`
123+
- **summary**: Returns locations allowed to alias into and act as `target`.
124+
125+
### isAuthorizedAlias(origin: `XcmVersionedLocation`, target: `XcmVersionedLocation`): `Result<bool, XcmRuntimeApisAuthorizedAliasesError>`
126+
- **interface**: `api.call.authorizedAliasersApi.isAuthorizedAlias`
127+
- **runtime**: `authorizedAliasersApi_is_authorized_alias`
128+
- **summary**: Returns whether `origin` is allowed to alias into and act as `target`.
129+
130+
___
131+
132+
104133
## blockBuilder
105134

106135
### applyExtrinsic(extrinsic: `SpRuntimeUncheckedExtrinsic`): `Result<Result<Null, SpRuntimeDispatchError>, SpRuntimeTransactionValidityTransactionValidityError>`
@@ -201,6 +230,16 @@ ___
201230
___
202231

203232

233+
## getParachainInfo
234+
235+
### parachainId(): `PolkadotParachainPrimitivesPrimitivesId`
236+
- **interface**: `api.call.getParachainInfo.parachainId`
237+
- **runtime**: `getParachainInfo_parachain_id`
238+
- **summary**: Retrieve the parachain id used for runtime.
239+
240+
___
241+
242+
204243
## locationToAccountApi
205244

206245
### convertLocation(location: `XcmVersionedLocation`): `Result<AccountId32, XcmRuntimeApisConversionsError>`
@@ -231,6 +270,61 @@ ___
231270
___
232271

233272

273+
## nominationPoolsApi
274+
275+
### balanceToPoints(pool_id: `u32`, new_funds: `u128`): `u128`
276+
- **interface**: `api.call.nominationPoolsApi.balanceToPoints`
277+
- **runtime**: `nominationPoolsApi_balance_to_points`
278+
- **summary**: Returns the equivalent points of `new_funds` for a given pool.
279+
280+
### memberNeedsDelegateMigration(member: `SpCoreCryptoAccountId32`): `bool`
281+
- **interface**: `api.call.nominationPoolsApi.memberNeedsDelegateMigration`
282+
- **runtime**: `nominationPoolsApi_member_needs_delegate_migration`
283+
- **summary**: Returns true if the delegated funds of the pool `member` needs migration.,, Once a pool has successfully migrated to the strategy, [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake), the funds of the, member can be migrated from pool account to the member's account. Use, [`migrate_delegation`](pallet_nomination_pools::Call::migrate_delegation), to migrate the funds of the pool member.
284+
285+
### memberPendingSlash(member: `SpCoreCryptoAccountId32`): `u128`
286+
- **interface**: `api.call.nominationPoolsApi.memberPendingSlash`
287+
- **runtime**: `nominationPoolsApi_member_pending_slash`
288+
- **summary**: Returns the pending slash for a given pool member.,, If pending slash of the member exceeds `ExistentialDeposit`, it can be reported on, chain.
289+
290+
### memberTotalBalance(who: `SpCoreCryptoAccountId32`): `u128`
291+
- **interface**: `api.call.nominationPoolsApi.memberTotalBalance`
292+
- **runtime**: `nominationPoolsApi_member_total_balance`
293+
- **summary**: Returns the total contribution of a pool member including any balance that is unbonding.
294+
295+
### pendingRewards(who: `SpCoreCryptoAccountId32`): `u128`
296+
- **interface**: `api.call.nominationPoolsApi.pendingRewards`
297+
- **runtime**: `nominationPoolsApi_pending_rewards`
298+
- **summary**: Returns the pending rewards for the member that the AccountId was given for.
299+
300+
### pointsToBalance(pool_id: `u32`, points: `u128`): `u128`
301+
- **interface**: `api.call.nominationPoolsApi.pointsToBalance`
302+
- **runtime**: `nominationPoolsApi_points_to_balance`
303+
- **summary**: Returns the equivalent balance of `points` for a given pool.
304+
305+
### poolAccounts(pool_id: `u32`): `(AccountId32,AccountId32)`
306+
- **interface**: `api.call.nominationPoolsApi.poolAccounts`
307+
- **runtime**: `nominationPoolsApi_pool_accounts`
308+
- **summary**: Returns the bonded account and reward account associated with the pool_id.
309+
310+
### poolBalance(pool_id: `u32`): `u128`
311+
- **interface**: `api.call.nominationPoolsApi.poolBalance`
312+
- **runtime**: `nominationPoolsApi_pool_balance`
313+
- **summary**: Total balance contributed to the pool.
314+
315+
### poolNeedsDelegateMigration(pool_id: `u32`): `bool`
316+
- **interface**: `api.call.nominationPoolsApi.poolNeedsDelegateMigration`
317+
- **runtime**: `nominationPoolsApi_pool_needs_delegate_migration`
318+
- **summary**: Returns true if the pool with `pool_id` needs migration.,, This can happen when the `pallet-nomination-pools` has switched to using strategy, [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake) but the pool, still has funds that were staked using the older strategy, [TransferStake](pallet_nomination_pools::adapter::TransferStake). Use, [`migrate_pool_to_delegate_stake`](pallet_nomination_pools::Call::migrate_pool_to_delegate_stake), to migrate the pool.
319+
320+
### poolPendingSlash(pool_id: `u32`): `u128`
321+
- **interface**: `api.call.nominationPoolsApi.poolPendingSlash`
322+
- **runtime**: `nominationPoolsApi_pool_pending_slash`
323+
- **summary**: Returns the pending slash for a given pool.
324+
325+
___
326+
327+
234328
## offchainWorkerApi
235329

236330
### offchainWorker(header: `SpRuntimeHeader`): `Null`
@@ -241,13 +335,33 @@ ___
241335
___
242336

243337

338+
## relayParentOffsetApi
339+
340+
### relayParentOffset(): `u32`
341+
- **interface**: `api.call.relayParentOffsetApi.relayParentOffset`
342+
- **runtime**: `relayParentOffsetApi_relay_parent_offset`
343+
- **summary**: Fetch the slot offset that is expected from the relay chain.
344+
345+
___
346+
347+
244348
## reviveApi
245349

350+
### address(account_id: `SpCoreCryptoAccountId32`): `PrimitiveTypesH160`
351+
- **interface**: `api.call.reviveApi.address`
352+
- **runtime**: `reviveApi_address`
353+
- **summary**: Get the H160 address associated to this account id
354+
246355
### balance(address: `PrimitiveTypesH160`): `PrimitiveTypesU256`
247356
- **interface**: `api.call.reviveApi.balance`
248357
- **runtime**: `reviveApi_balance`
249358
- **summary**: Returns the free balance of the given `[H160]` address, using EVM decimals.
250359

360+
### blockAuthor(): `Option<H160>`
361+
- **interface**: `api.call.reviveApi.blockAuthor`
362+
- **runtime**: `reviveApi_block_author`
363+
- **summary**: The address of the validator that produced the current block.
364+
251365
### blockGasLimit(): `PrimitiveTypesU256`
252366
- **interface**: `api.call.reviveApi.blockGasLimit`
253367
- **runtime**: `reviveApi_block_gas_limit`
@@ -258,10 +372,15 @@ ___
258372
- **runtime**: `reviveApi_call`
259373
- **summary**: Perform a call from a specified account to a given contract.,, See [`crate::Pallet::bare_call`].
260374

375+
### code(address: `PrimitiveTypesH160`): `Bytes`
376+
- **interface**: `api.call.reviveApi.code`
377+
- **runtime**: `reviveApi_code`
378+
- **summary**: The code at the specified address taking pre-compiles into account.
379+
261380
### ethTransact(tx: `PalletReviveEvmApiRpcTypesGenGenericTransaction`): `Result<PalletRevivePrimitivesEthTransactInfo, PalletRevivePrimitivesEthTransactError>`
262381
- **interface**: `api.call.reviveApi.ethTransact`
263382
- **runtime**: `reviveApi_eth_transact`
264-
- **summary**: Perform an Ethereum call.,, See [`crate::Pallet::bare_eth_transact`]
383+
- **summary**: Perform an Ethereum call.,, See [`crate::Pallet::dry_run_eth_transact`]
265384

266385
### gasPrice(): `PrimitiveTypesU256`
267386
- **interface**: `api.call.reviveApi.gasPrice`
@@ -273,6 +392,11 @@ ___
273392
- **runtime**: `reviveApi_get_storage`
274393
- **summary**: Query a given storage key in a given contract.,, Returns `Ok(Some(Vec<u8>))` if the storage value exists under the given key in the, specified account and `Ok(None)` if it doesn't. If the account specified by the address, doesn't exist, or doesn't have a contract then `Err` is returned.
275394

395+
### getStorageVarKey(address: `PrimitiveTypesH160`, key: `Bytes`): `Result<Option<Bytes>, PalletRevivePrimitivesContractAccessError>`
396+
- **interface**: `api.call.reviveApi.getStorageVarKey`
397+
- **runtime**: `reviveApi_get_storage_var_key`
398+
- **summary**: Query a given variable-sized storage key in a given contract.,, Returns `Ok(Some(Vec<u8>))` if the storage value exists under the given key in the, specified account and `Ok(None)` if it doesn't. If the account specified by the address, doesn't exist, or doesn't have a contract then `Err` is returned.
399+
276400
### instantiate(origin: `SpCoreCryptoAccountId32`, value: `u128`, gas_limit: `Option<SpWeightsWeightV2Weight>`, storage_deposit_limit: `Option<u128>`, code: `PalletRevivePrimitivesCode`, data: `Bytes`, salt: `Option<[u8;32]>`): `PalletRevivePrimitivesContractResultInstantiateReturnValue`
277401
- **interface**: `api.call.reviveApi.instantiate`
278402
- **runtime**: `reviveApi_instantiate`
@@ -283,6 +407,11 @@ ___
283407
- **runtime**: `reviveApi_nonce`
284408
- **summary**: Returns the nonce of the given `[H160]` address.
285409

410+
### runtimePalletsAddress(): `PrimitiveTypesH160`
411+
- **interface**: `api.call.reviveApi.runtimePalletsAddress`
412+
- **runtime**: `reviveApi_runtime_pallets_address`
413+
- **summary**: The address used to call the runtime's pallets dispatchables
414+
286415
### traceBlock(block: `SpRuntimeBlock`, config: `PalletReviveEvmApiDebugRpcTypesTracerType`): `Vec<(u32,PalletReviveEvmApiDebugRpcTypesTrace)>`
287416
- **interface**: `api.call.reviveApi.traceBlock`
288417
- **runtime**: `reviveApi_trace_block`
@@ -306,6 +435,16 @@ ___
306435
___
307436

308437

438+
## runtimeViewFunction
439+
440+
### executeViewFunction(query_id: `FrameSupportViewFunctionsViewFunctionId`, input: `Bytes`): `Result<Bytes, FrameSupportViewFunctionsViewFunctionDispatchError>`
441+
- **interface**: `api.call.runtimeViewFunction.executeViewFunction`
442+
- **runtime**: `runtimeViewFunction_execute_view_function`
443+
- **summary**: Execute a view function query.
444+
445+
___
446+
447+
309448
## sessionKeys
310449

311450
### decodeSessionKeys(encoded: `Bytes`): `Option<Vec<(Bytes,SpCoreCryptoKeyTypeId)>>`
@@ -321,6 +460,26 @@ ___
321460
___
322461

323462

463+
## stakingApi
464+
465+
### erasStakersPageCount(era: `u32`, account: `SpCoreCryptoAccountId32`): `u32`
466+
- **interface**: `api.call.stakingApi.erasStakersPageCount`
467+
- **runtime**: `stakingApi_eras_stakers_page_count`
468+
- **summary**: Returns the page count of exposures for a validator `account` in a given era.
469+
470+
### nominationsQuota(balance: `u128`): `u32`
471+
- **interface**: `api.call.stakingApi.nominationsQuota`
472+
- **runtime**: `stakingApi_nominations_quota`
473+
- **summary**: Returns the nominations quota for a nominator with a given balance.
474+
475+
### pendingRewards(era: `u32`, account: `SpCoreCryptoAccountId32`): `bool`
476+
- **interface**: `api.call.stakingApi.pendingRewards`
477+
- **runtime**: `stakingApi_pending_rewards`
478+
- **summary**: Returns true if validator `account` has pages to be claimed for the given era.
479+
480+
___
481+
482+
324483
## taggedTransactionQueue
325484

326485
### validateTransaction(source: `SpRuntimeTransactionValidityTransactionSource`, tx: `SpRuntimeUncheckedExtrinsic`, block_hash: `PrimitiveTypesH256`): `Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>`
@@ -381,6 +540,21 @@ ___
381540
___
382541

383542

543+
## trustedQueryApi
544+
545+
### isTrustedReserve(asset: `XcmVersionedAsset`, location: `XcmVersionedLocation`): `Result<bool, XcmRuntimeApisTrustedQueryError>`
546+
- **interface**: `api.call.trustedQueryApi.isTrustedReserve`
547+
- **runtime**: `trustedQueryApi_is_trusted_reserve`
548+
- **summary**: Returns if the location is a trusted reserve for the asset.,, # Arguments, * `asset`: `VersionedAsset`., * `location`: `VersionedLocation`.
549+
550+
### isTrustedTeleporter(asset: `XcmVersionedAsset`, location: `XcmVersionedLocation`): `Result<bool, XcmRuntimeApisTrustedQueryError>`
551+
- **interface**: `api.call.trustedQueryApi.isTrustedTeleporter`
552+
- **runtime**: `trustedQueryApi_is_trusted_teleporter`
553+
- **summary**: Returns if the asset can be teleported to the location.,, # Arguments, * `asset`: `VersionedAsset`., * `location`: `VersionedLocation`.
554+
555+
___
556+
557+
384558
## xcmPaymentApi
385559

386560
### queryAcceptablePaymentAssets(xcm_version: `u32`): `Result<Vec<XcmVersionedAssetId>, XcmRuntimeApisFeesError>`

0 commit comments

Comments
 (0)