Skip to content

Commit c0c0cbe

Browse files
Update docs with 1.5.0 types (#492)
1 parent bbf0afa commit c0c0cbe

21 files changed

+1761
-744
lines changed

docs/derives/derives.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,6 +1423,46 @@ Retrieves the block information alongside its events at a given block hash
14231423
);
14241424
const { events, block } = await api.derive.tx.events(blockHash);
14251425
```
1426+
### [extrinsicInfo](#extrinsicInfo)
1427+
Retrieves the extrinsic information and its events.
1428+
- **interface**: `api.derive.tx.extrinsicInfo`
1429+
- **params**:
1430+
- at `Hash`: The block hash to query at.
1431+
- transactionHash `Uint8Array | string`: A transaction hash as U8 array or string.
1432+
1433+
- **example**:
1434+
```javascript
1435+
const blockHash = api.registry.createType(
1436+
'Hash',
1437+
'0xb772e4949d2f3eb5ba356aa43f885cc4f9097ee9812c5436543f3846a0491729'
1438+
);
1439+
const extrinsicInfo = await api.derive.tx.extrinsicInfo(
1440+
blockHash,
1441+
'0xcd96520b05e0c4648ea365f3f063f27c5cdd8be10d41a1c44566428c91f37dcb'
1442+
);
1443+
1444+
console.log(extrinsicInfo.extrinsic.toHuman());
1445+
```
1446+
### [accountExtrinsics](#accountExtrinsics)
1447+
Retrieves information about every extrinsic submitted by an account at a given block.
1448+
- **interface**: `api.derive.tx.accountExtrinsics`
1449+
- **params**:
1450+
- at `Hash`: The block hash to query at.
1451+
- accountId `Uint8Array | strings`: The account identifier to query.
1452+
1453+
- **example**:
1454+
```javascript
1455+
const blockHash = api.registry.createType(
1456+
'Hash',
1457+
'0xb772e4949d2f3eb5ba356aa43f885cc4f9097ee9812c5436543f3846a0491729'
1458+
);
1459+
const extrinsicsInfo = await api.derive.tx.accountExtrinsics(
1460+
blockHash,
1461+
'0x21895DdfD4640b4e0aDCa2865b907f2CE6e6B777'
1462+
);
1463+
1464+
console.log(extrinsicsInfo.extrinsics[0]).extrinsic.toHuman();
1465+
```
14261466
### [signingInfo](#signingInfo)
14271467
Retrieves signing-related information for an account, including the nonce, block header, and mortal length.
14281468
- **interface**: `api.derive.tx.signingInfo`

docs/kusama/constants.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ ___
265265
- **interface**: `api.consts.coretime.brokerId`
266266
- **summary**: The ParaId of the coretime chain.
267267

268-
### brokerPotLocation: `StagingXcmV4Junctions`
268+
### brokerPotLocation: `StagingXcmV5Junctions`
269269
- **interface**: `api.consts.coretime.brokerPotLocation`
270270
- **summary**: The coretime chain pot location.
271271

@@ -894,7 +894,9 @@ ___
894894

895895
### maxApprovals: `u32`
896896
- **interface**: `api.consts.treasury.maxApprovals`
897-
- **summary**: The maximum number of approvals that can wait in the spending queue.
897+
- **summary**: DEPRECATED: associated with `spend_local` call and will be removed in May 2025. Refer to <https://github.com/paritytech/polkadot-sdk/pull/5961> for migration to `spend`.
898+
899+
The maximum number of approvals that can wait in the spending queue.
898900

899901
NOTE: This parameter is also used within the Bounties Pallet extension if enabled.
900902

docs/kusama/errors.md

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -444,25 +444,9 @@ ___
444444
### AssignmentsEmpty
445445
- **interface**: `api.errors.coretimeAssignmentProvider.AssignmentsEmpty.is`
446446

447-
### AssignmentsNotSorted
448-
- **interface**: `api.errors.coretimeAssignmentProvider.AssignmentsNotSorted.is`
449-
- **summary**: Tried to add an unsorted set of assignments
450-
451447
### DisallowedInsert
452448
- **interface**: `api.errors.coretimeAssignmentProvider.DisallowedInsert.is`
453-
- **summary**: assign_core is only allowed to append new assignments at the end of already existing ones.
454-
455-
### DuplicateInsert
456-
- **interface**: `api.errors.coretimeAssignmentProvider.DuplicateInsert.is`
457-
- **summary**: Tried to insert a schedule for the same core and block number as an existing schedule
458-
459-
### OverScheduled
460-
- **interface**: `api.errors.coretimeAssignmentProvider.OverScheduled.is`
461-
- **summary**: Assignments together exceeded 57600.
462-
463-
### UnderScheduled
464-
- **interface**: `api.errors.coretimeAssignmentProvider.UnderScheduled.is`
465-
- **summary**: Assignments together less than 57600
449+
- **summary**: assign_core is only allowed to append new assignments at the end of already existing ones or update the last entry.
466450

467451
___
468452

@@ -1336,10 +1320,6 @@ ___
13361320
- **interface**: `api.errors.nominationPools.RewardPoolNotFound.is`
13371321
- **summary**: A reward pool does not exist. In all cases this is a system logic error.
13381322

1339-
### SlashTooLow
1340-
- **interface**: `api.errors.nominationPools.SlashTooLow.is`
1341-
- **summary**: The slash amount is too low to be applied.
1342-
13431323
### SubPoolsNotFound
13441324
- **interface**: `api.errors.nominationPools.SubPoolsNotFound.is`
13451325
- **summary**: A sub pool does not exist.
@@ -1435,13 +1415,9 @@ ___
14351415

14361416
## paraInherent
14371417

1438-
### CandidatesFilteredDuringExecution
1439-
- **interface**: `api.errors.paraInherent.CandidatesFilteredDuringExecution.is`
1440-
- **summary**: A candidate was filtered during inherent execution. This should have only been done during creation.
1441-
1442-
### InherentOverweight
1443-
- **interface**: `api.errors.paraInherent.InherentOverweight.is`
1444-
- **summary**: The data given to the inherent will result in an overweight block.
1418+
### InherentDataFilteredDuringExecution
1419+
- **interface**: `api.errors.paraInherent.InherentDataFilteredDuringExecution.is`
1420+
- **summary**: Inherent data was filtered during execution. This should have only been done during creation.
14451421

14461422
### InvalidParentHeader
14471423
- **interface**: `api.errors.paraInherent.InvalidParentHeader.is`

docs/kusama/events.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -921,15 +921,15 @@ ___
921921

922922
## paraInclusion
923923

924-
### CandidateBacked(`PolkadotPrimitivesV8CandidateReceipt`, `Bytes`, `u32`, `u32`)
924+
### CandidateBacked(`PolkadotPrimitivesVstagingCandidateReceiptV2`, `Bytes`, `u32`, `u32`)
925925
- **interface**: `api.events.paraInclusion.CandidateBacked.is`
926926
- **summary**: A candidate was backed. `[candidate, head_data]`
927927

928-
### CandidateIncluded(`PolkadotPrimitivesV8CandidateReceipt`, `Bytes`, `u32`, `u32`)
928+
### CandidateIncluded(`PolkadotPrimitivesVstagingCandidateReceiptV2`, `Bytes`, `u32`, `u32`)
929929
- **interface**: `api.events.paraInclusion.CandidateIncluded.is`
930930
- **summary**: A candidate was included. `[candidate, head_data]`
931931

932-
### CandidateTimedOut(`PolkadotPrimitivesV8CandidateReceipt`, `Bytes`, `u32`)
932+
### CandidateTimedOut(`PolkadotPrimitivesVstagingCandidateReceiptV2`, `Bytes`, `u32`)
933933
- **interface**: `api.events.paraInclusion.CandidateTimedOut.is`
934934
- **summary**: A candidate timed out. `[candidate, head_data]`
935935

@@ -1028,19 +1028,19 @@ ___
10281028
- **interface**: `api.events.proxy.Announced.is`
10291029
- **summary**: An announcement was placed to make a call in the future.
10301030

1031-
### ProxyAdded(`AccountId32`, `AccountId32`, `StagingKusamaRuntimeProxyType`, `u32`)
1031+
### ProxyAdded(`AccountId32`, `AccountId32`, `KusamaRuntimeConstantsProxyProxyType`, `u32`)
10321032
- **interface**: `api.events.proxy.ProxyAdded.is`
10331033
- **summary**: A proxy was added.
10341034

10351035
### ProxyExecuted(`Result<Null, SpRuntimeDispatchError>`)
10361036
- **interface**: `api.events.proxy.ProxyExecuted.is`
10371037
- **summary**: A proxy was executed correctly, with the given.
10381038

1039-
### ProxyRemoved(`AccountId32`, `AccountId32`, `StagingKusamaRuntimeProxyType`, `u32`)
1039+
### ProxyRemoved(`AccountId32`, `AccountId32`, `KusamaRuntimeConstantsProxyProxyType`, `u32`)
10401040
- **interface**: `api.events.proxy.ProxyRemoved.is`
10411041
- **summary**: A proxy was removed.
10421042

1043-
### PureCreated(`AccountId32`, `AccountId32`, `StagingKusamaRuntimeProxyType`, `u16`)
1043+
### PureCreated(`AccountId32`, `AccountId32`, `KusamaRuntimeConstantsProxyProxyType`, `u16`)
10441044
- **interface**: `api.events.proxy.PureCreated.is`
10451045
- **summary**: A pure account has been created by new proxy with given disambiguation index and proxy type.
10461046

@@ -1328,9 +1328,9 @@ ___
13281328
- **interface**: `api.events.staking.OldSlashingReportDiscarded.is`
13291329
- **summary**: An old slashing report from a prior era was discarded because it could not be processed.
13301330

1331-
### PayoutStarted(`u32`, `AccountId32`)
1331+
### PayoutStarted(`u32`, `AccountId32`, `u32`, `Option<u32>`)
13321332
- **interface**: `api.events.staking.PayoutStarted.is`
1333-
- **summary**: The stakers' rewards are getting paid.
1333+
- **summary**: A Page of stakers rewards are getting paid. `next` is `None` if all pages are claimed.
13341334

13351335
### Rewarded(`AccountId32`, `PalletStakingRewardDestination`, `u128`)
13361336
- **interface**: `api.events.staking.Rewarded.is`
@@ -1381,11 +1381,11 @@ ___
13811381
- **interface**: `api.events.system.CodeUpdated.is`
13821382
- **summary**: `:code` was updated.
13831383

1384-
### ExtrinsicFailed(`SpRuntimeDispatchError`, `FrameSupportDispatchDispatchInfo`)
1384+
### ExtrinsicFailed(`SpRuntimeDispatchError`, `FrameSystemDispatchEventInfo`)
13851385
- **interface**: `api.events.system.ExtrinsicFailed.is`
13861386
- **summary**: An extrinsic failed.
13871387

1388-
### ExtrinsicSuccess(`FrameSupportDispatchDispatchInfo`)
1388+
### ExtrinsicSuccess(`FrameSystemDispatchEventInfo`)
13891389
- **interface**: `api.events.system.ExtrinsicSuccess.is`
13901390
- **summary**: An extrinsic completed successfully.
13911391

@@ -1541,37 +1541,37 @@ ___
15411541

15421542
## xcmPallet
15431543

1544-
### AssetsClaimed(`H256`, `StagingXcmV4Location`, `XcmVersionedAssets`)
1544+
### AssetsClaimed(`H256`, `StagingXcmV5Location`, `XcmVersionedAssets`)
15451545
- **interface**: `api.events.xcmPallet.AssetsClaimed.is`
15461546
- **summary**: Some assets have been claimed from an asset trap
15471547

1548-
### AssetsTrapped(`H256`, `StagingXcmV4Location`, `XcmVersionedAssets`)
1548+
### AssetsTrapped(`H256`, `StagingXcmV5Location`, `XcmVersionedAssets`)
15491549
- **interface**: `api.events.xcmPallet.AssetsTrapped.is`
15501550
- **summary**: Some assets have been placed in an asset trap.
15511551

1552-
### Attempted(`StagingXcmV4TraitsOutcome`)
1552+
### Attempted(`StagingXcmV5TraitsOutcome`)
15531553
- **interface**: `api.events.xcmPallet.Attempted.is`
15541554
- **summary**: Execution of an XCM message was attempted.
15551555

1556-
### FeesPaid(`StagingXcmV4Location`, `StagingXcmV4AssetAssets`)
1556+
### FeesPaid(`StagingXcmV5Location`, `StagingXcmV5AssetAssets`)
15571557
- **interface**: `api.events.xcmPallet.FeesPaid.is`
15581558
- **summary**: Fees were paid from a location for an operation (often for using `SendXcm`).
15591559

1560-
### InvalidQuerier(`StagingXcmV4Location`, `u64`, `StagingXcmV4Location`, `Option<StagingXcmV4Location>`)
1560+
### InvalidQuerier(`StagingXcmV5Location`, `u64`, `StagingXcmV5Location`, `Option<StagingXcmV5Location>`)
15611561
- **interface**: `api.events.xcmPallet.InvalidQuerier.is`
15621562
- **summary**: Expected query response has been received but the querier location of the response does not match the expected. The query remains registered for a later, valid, response to be received and acted upon.
15631563

1564-
### InvalidQuerierVersion(`StagingXcmV4Location`, `u64`)
1564+
### InvalidQuerierVersion(`StagingXcmV5Location`, `u64`)
15651565
- **interface**: `api.events.xcmPallet.InvalidQuerierVersion.is`
15661566
- **summary**: Expected query response has been received but the expected querier location placed in storage by this runtime previously cannot be decoded. The query remains registered.
15671567

15681568
This is unexpected (since a location placed in storage in a previously executing runtime should be readable prior to query timeout) and dangerous since the possibly valid response will be dropped. Manual governance intervention is probably going to be needed.
15691569

1570-
### InvalidResponder(`StagingXcmV4Location`, `u64`, `Option<StagingXcmV4Location>`)
1570+
### InvalidResponder(`StagingXcmV5Location`, `u64`, `Option<StagingXcmV5Location>`)
15711571
- **interface**: `api.events.xcmPallet.InvalidResponder.is`
15721572
- **summary**: Expected query response has been received but the origin location of the response does not match that expected. The query remains registered for a later, valid, response to be received and acted upon.
15731573

1574-
### InvalidResponderVersion(`StagingXcmV4Location`, `u64`)
1574+
### InvalidResponderVersion(`StagingXcmV5Location`, `u64`)
15751575
- **interface**: `api.events.xcmPallet.InvalidResponderVersion.is`
15761576
- **summary**: Expected query response has been received but the expected origin location placed in storage by this runtime previously cannot be decoded. The query remains registered.
15771577

@@ -1597,31 +1597,31 @@ ___
15971597
- **interface**: `api.events.xcmPallet.NotifyTargetMigrationFail.is`
15981598
- **summary**: A given location which had a version change subscription was dropped owing to an error migrating the location to our new XCM format.
15991599

1600-
### NotifyTargetSendFail(`StagingXcmV4Location`, `u64`, `XcmV3TraitsError`)
1600+
### NotifyTargetSendFail(`StagingXcmV5Location`, `u64`, `XcmV5TraitsError`)
16011601
- **interface**: `api.events.xcmPallet.NotifyTargetSendFail.is`
16021602
- **summary**: A given location which had a version change subscription was dropped owing to an error sending the notification to it.
16031603

1604-
### ResponseReady(`u64`, `StagingXcmV4Response`)
1604+
### ResponseReady(`u64`, `StagingXcmV5Response`)
16051605
- **interface**: `api.events.xcmPallet.ResponseReady.is`
16061606
- **summary**: Query response has been received and is ready for taking with `take_response`. There is no registered notification call.
16071607

16081608
### ResponseTaken(`u64`)
16091609
- **interface**: `api.events.xcmPallet.ResponseTaken.is`
16101610
- **summary**: Received query response has been read and removed.
16111611

1612-
### Sent(`StagingXcmV4Location`, `StagingXcmV4Location`, `StagingXcmV4Xcm`, `[u8;32]`)
1612+
### Sent(`StagingXcmV5Location`, `StagingXcmV5Location`, `StagingXcmV5Xcm`, `[u8;32]`)
16131613
- **interface**: `api.events.xcmPallet.Sent.is`
16141614
- **summary**: A XCM message was sent.
16151615

1616-
### SupportedVersionChanged(`StagingXcmV4Location`, `u32`)
1616+
### SupportedVersionChanged(`StagingXcmV5Location`, `u32`)
16171617
- **interface**: `api.events.xcmPallet.SupportedVersionChanged.is`
16181618
- **summary**: The supported version of a location has been changed. This might be through an automatic notification or a manual intervention.
16191619

1620-
### UnexpectedResponse(`StagingXcmV4Location`, `u64`)
1620+
### UnexpectedResponse(`StagingXcmV5Location`, `u64`)
16211621
- **interface**: `api.events.xcmPallet.UnexpectedResponse.is`
16221622
- **summary**: Query response received which does not match a registered query. This may be because a matching query was never registered, it may be because it is a duplicate response, or because the query timed out.
16231623

1624-
### VersionChangeNotified(`StagingXcmV4Location`, `u32`, `StagingXcmV4AssetAssets`, `[u8;32]`)
1624+
### VersionChangeNotified(`StagingXcmV5Location`, `u32`, `StagingXcmV5AssetAssets`, `[u8;32]`)
16251625
- **interface**: `api.events.xcmPallet.VersionChangeNotified.is`
16261626
- **summary**: An XCM version change notification message has been attempted to be sent.
16271627

@@ -1631,14 +1631,14 @@ ___
16311631
- **interface**: `api.events.xcmPallet.VersionMigrationFinished.is`
16321632
- **summary**: A XCM version migration finished.
16331633

1634-
### VersionNotifyRequested(`StagingXcmV4Location`, `StagingXcmV4AssetAssets`, `[u8;32]`)
1634+
### VersionNotifyRequested(`StagingXcmV5Location`, `StagingXcmV5AssetAssets`, `[u8;32]`)
16351635
- **interface**: `api.events.xcmPallet.VersionNotifyRequested.is`
16361636
- **summary**: We have requested that a remote chain send us XCM version change notifications.
16371637

1638-
### VersionNotifyStarted(`StagingXcmV4Location`, `StagingXcmV4AssetAssets`, `[u8;32]`)
1638+
### VersionNotifyStarted(`StagingXcmV5Location`, `StagingXcmV5AssetAssets`, `[u8;32]`)
16391639
- **interface**: `api.events.xcmPallet.VersionNotifyStarted.is`
16401640
- **summary**: A remote has requested XCM version change notification from us and we have honored it. A version information message is sent to them and its cost is included.
16411641

1642-
### VersionNotifyUnrequested(`StagingXcmV4Location`, `StagingXcmV4AssetAssets`, `[u8;32]`)
1642+
### VersionNotifyUnrequested(`StagingXcmV5Location`, `StagingXcmV5AssetAssets`, `[u8;32]`)
16431643
- **interface**: `api.events.xcmPallet.VersionNotifyUnrequested.is`
16441644
- **summary**: We have requested that a remote chain stops sending us XCM version change notifications.

0 commit comments

Comments
 (0)