Skip to content

Commit 3fe6c6c

Browse files
authored
Update Substrate types with polkadot-stable2412 (#6048)
* Update Substrate types with polkadot-stable2412 * Fix h160 alias
1 parent 029c209 commit 3fe6c6c

File tree

17 files changed

+7852
-5637
lines changed

17 files changed

+7852
-5637
lines changed

packages/api-augment/src/substrate/consts.ts

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,16 @@ declare module '@polkadot/api-base/types/consts' {
693693
* be another trie item whose value is the size of an account ID plus 32 bytes.
694694
**/
695695
subAccountDeposit: u128 & AugmentedConst<ApiType>;
696+
/**
697+
* The amount held on deposit per registered username. This value should change only in
698+
* runtime upgrades with proper migration of existing deposits.
699+
**/
700+
usernameDeposit: u128 & AugmentedConst<ApiType>;
701+
/**
702+
* The number of blocks that must pass to enable the permanent deletion of a username by
703+
* its respective authority.
704+
**/
705+
usernameGracePeriod: u32 & AugmentedConst<ApiType>;
696706
/**
697707
* Generic const
698708
**/
@@ -1238,6 +1248,13 @@ declare module '@polkadot/api-base/types/consts' {
12381248
};
12391249
revive: {
12401250
apiVersion: u16 & AugmentedConst<ApiType>;
1251+
/**
1252+
* The [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID.
1253+
*
1254+
* This is a unique identifier assigned to each blockchain network,
1255+
* preventing replay attacks.
1256+
**/
1257+
chainId: u64 & AugmentedConst<ApiType>;
12411258
/**
12421259
* The percentage of the storage deposit that should be held for using a code hash.
12431260
* Instantiating a contract, or calling [`chain_extension::Ext::lock_delegate_dependency`]
@@ -1250,25 +1267,21 @@ declare module '@polkadot/api-base/types/consts' {
12501267
*
12511268
* # Note
12521269
*
1253-
* It is safe to chage this value on a live chain as all refunds are pro rata.
1270+
* It is safe to change this value on a live chain as all refunds are pro rata.
12541271
**/
12551272
depositPerByte: u128 & AugmentedConst<ApiType>;
12561273
/**
12571274
* The amount of balance a caller has to pay for each storage item.
12581275
*
12591276
* # Note
12601277
*
1261-
* It is safe to chage this value on a live chain as all refunds are pro rata.
1278+
* It is safe to change this value on a live chain as all refunds are pro rata.
12621279
**/
12631280
depositPerItem: u128 & AugmentedConst<ApiType>;
12641281
/**
1265-
* The maximum length of a contract code in bytes.
1266-
*
1267-
* This value hugely affects the memory requirements of this pallet since all the code of
1268-
* all contracts on the call stack will need to be held in memory. Setting of a correct
1269-
* value will be enforced in [`Pallet::integrity_test`].
1282+
* The ratio between the decimal representation of the native token and the ETH token.
12701283
**/
1271-
maxCodeLen: u32 & AugmentedConst<ApiType>;
1284+
nativeToEthRatio: u32 & AugmentedConst<ApiType>;
12721285
/**
12731286
* Make contract callable functions marked as `#[unstable]` available.
12741287
*
@@ -1672,6 +1685,9 @@ declare module '@polkadot/api-base/types/consts' {
16721685
**/
16731686
burn: Permill & AugmentedConst<ApiType>;
16741687
/**
1688+
* DEPRECATED: associated with `spend_local` call and will be removed in May 2025.
1689+
* Refer to <https://github.com/paritytech/polkadot-sdk/pull/5961> for migration to `spend`.
1690+
*
16751691
* The maximum number of approvals that can wait in the spending queue.
16761692
*
16771693
* NOTE: This parameter is also used within the Bounties Pallet extension if enabled.

packages/api-augment/src/substrate/errors.ts

Lines changed: 65 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ declare module '@polkadot/api-base/types/errors' {
135135
* Prime account is not a member
136136
**/
137137
PrimeAccountNotMember: AugmentedError<ApiType>;
138+
/**
139+
* Proposal is still active.
140+
**/
141+
ProposalActive: AugmentedError<ApiType>;
138142
/**
139143
* Proposal must exist
140144
**/
@@ -1017,6 +1021,10 @@ declare module '@polkadot/api-base/types/errors' {
10171021
* Prime account is not a member
10181022
**/
10191023
PrimeAccountNotMember: AugmentedError<ApiType>;
1024+
/**
1025+
* Proposal is still active.
1026+
**/
1027+
ProposalActive: AugmentedError<ApiType>;
10201028
/**
10211029
* Proposal must exist
10221030
**/
@@ -1378,6 +1386,10 @@ declare module '@polkadot/api-base/types/errors' {
13781386
* Account ID is already named.
13791387
**/
13801388
AlreadyClaimed: AugmentedError<ApiType>;
1389+
/**
1390+
* The username cannot be unbound because it is already unbinding.
1391+
**/
1392+
AlreadyUnbinding: AugmentedError<ApiType>;
13811393
/**
13821394
* Empty index.
13831395
**/
@@ -1386,6 +1398,11 @@ declare module '@polkadot/api-base/types/errors' {
13861398
* Fee is changed.
13871399
**/
13881400
FeeChanged: AugmentedError<ApiType>;
1401+
/**
1402+
* The action cannot be performed because of insufficient privileges (e.g. authority
1403+
* trying to unbind a username provided by the system).
1404+
**/
1405+
InsufficientPrivileges: AugmentedError<ApiType>;
13891406
/**
13901407
* The index is invalid.
13911408
**/
@@ -1450,6 +1467,10 @@ declare module '@polkadot/api-base/types/errors' {
14501467
* Sender is not a sub-account.
14511468
**/
14521469
NotSub: AugmentedError<ApiType>;
1470+
/**
1471+
* The username cannot be removed because it is not unbinding.
1472+
**/
1473+
NotUnbinding: AugmentedError<ApiType>;
14531474
/**
14541475
* The sender does not have permission to issue a username.
14551476
**/
@@ -1466,6 +1487,10 @@ declare module '@polkadot/api-base/types/errors' {
14661487
* Sticky judgement.
14671488
**/
14681489
StickyJudgement: AugmentedError<ApiType>;
1490+
/**
1491+
* The username cannot be removed because it's still in the grace period.
1492+
**/
1493+
TooEarly: AugmentedError<ApiType>;
14691494
/**
14701495
* Maximum amount of registrars reached. Cannot add any more.
14711496
**/
@@ -2538,6 +2563,28 @@ declare module '@polkadot/api-base/types/errors' {
25382563
[key: string]: AugmentedError<ApiType>;
25392564
};
25402565
revive: {
2566+
/**
2567+
* Tried to map an account that is already mapped.
2568+
**/
2569+
AccountAlreadyMapped: AugmentedError<ApiType>;
2570+
/**
2571+
* An `AccountID32` account tried to interact with the pallet without having a mapping.
2572+
*
2573+
* Call [`Pallet::map_account`] in order to create a mapping for the account.
2574+
**/
2575+
AccountUnmapped: AugmentedError<ApiType>;
2576+
/**
2577+
* Failed to convert a U256 to a Balance.
2578+
**/
2579+
BalanceConversionFailed: AugmentedError<ApiType>;
2580+
/**
2581+
* The program contains a basic block that is larger than allowed.
2582+
**/
2583+
BasicBlockTooLarge: AugmentedError<ApiType>;
2584+
/**
2585+
* The code blob supplied is larger than [`limits::code::BLOB_BYTES`].
2586+
**/
2587+
BlobTooLarge: AugmentedError<ApiType>;
25412588
/**
25422589
* Can not add a delegate dependency to the code hash of the contract itself.
25432590
**/
@@ -2561,11 +2608,6 @@ declare module '@polkadot/api-base/types/errors' {
25612608
* by supplying `-lruntime::revive=debug`.
25622609
**/
25632610
CodeRejected: AugmentedError<ApiType>;
2564-
/**
2565-
* The code supplied to `instantiate_with_code` exceeds the limit specified in the
2566-
* current schedule.
2567-
**/
2568-
CodeTooLarge: AugmentedError<ApiType>;
25692611
/**
25702612
* No contract was found at the specified address.
25712613
**/
@@ -2609,6 +2651,15 @@ declare module '@polkadot/api-base/types/errors' {
26092651
* Invalid combination of flags supplied to `seal_call` or `seal_delegate_call`.
26102652
**/
26112653
InvalidCallFlags: AugmentedError<ApiType>;
2654+
/**
2655+
* Immutable data can only be set during deploys and only be read during calls.
2656+
* Additionally, it is only valid to set the data once and it must not be empty.
2657+
**/
2658+
InvalidImmutableAccess: AugmentedError<ApiType>;
2659+
/**
2660+
* The program contains an invalid instruction.
2661+
**/
2662+
InvalidInstruction: AugmentedError<ApiType>;
26122663
/**
26132664
* Invalid schedule supplied, e.g. with zero weight of a basic operation.
26142665
**/
@@ -2630,20 +2681,12 @@ declare module '@polkadot/api-base/types/errors' {
26302681
* The contract has reached its maximum number of delegate dependencies.
26312682
**/
26322683
MaxDelegateDependenciesReached: AugmentedError<ApiType>;
2633-
/**
2634-
* A pending migration needs to complete before the extrinsic can be called.
2635-
**/
2636-
MigrationInProgress: AugmentedError<ApiType>;
26372684
/**
26382685
* The chain does not provide a chain extension. Calling the chain extension results
26392686
* in this error. Note that this usually shouldn't happen as deploying such contracts
26402687
* is rejected.
26412688
**/
26422689
NoChainExtension: AugmentedError<ApiType>;
2643-
/**
2644-
* Migrate dispatch call was attempted but no migration was performed.
2645-
**/
2646-
NoMigrationPerformed: AugmentedError<ApiType>;
26472690
/**
26482691
* A buffer outside of sandbox memory was passed to a contract API function.
26492692
**/
@@ -2656,10 +2699,6 @@ declare module '@polkadot/api-base/types/errors' {
26562699
* Can not add more data to transient storage.
26572700
**/
26582701
OutOfTransientStorage: AugmentedError<ApiType>;
2659-
/**
2660-
* The output buffer supplied to a contract API call was too small.
2661-
**/
2662-
OutputBufferTooSmall: AugmentedError<ApiType>;
26632702
/**
26642703
* A contract called into the runtime which then called back into this pallet.
26652704
**/
@@ -2672,6 +2711,11 @@ declare module '@polkadot/api-base/types/errors' {
26722711
* A contract attempted to invoke a state modifying API while being in read-only mode.
26732712
**/
26742713
StateChangeDenied: AugmentedError<ApiType>;
2714+
/**
2715+
* The static memory consumption of the blob will be larger than
2716+
* [`limits::code::STATIC_MEMORY_BYTES`].
2717+
**/
2718+
StaticMemoryTooLarge: AugmentedError<ApiType>;
26752719
/**
26762720
* More storage was created than allowed by the storage deposit limit.
26772721
**/
@@ -3249,6 +3293,10 @@ declare module '@polkadot/api-base/types/errors' {
32493293
* Prime account is not a member
32503294
**/
32513295
PrimeAccountNotMember: AugmentedError<ApiType>;
3296+
/**
3297+
* Proposal is still active.
3298+
**/
3299+
ProposalActive: AugmentedError<ApiType>;
32523300
/**
32533301
* Proposal must exist
32543302
**/

0 commit comments

Comments
 (0)