Skip to content

Commit bfd1d51

Browse files
authored
Update Substrate types to 1160002 (#6034)
1 parent 75a5702 commit bfd1d51

File tree

13 files changed

+7104
-3259
lines changed

13 files changed

+7104
-3259
lines changed

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

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ declare module '@polkadot/api-base/types/consts' {
256256
[key: string]: Codec;
257257
};
258258
broker: {
259+
maxAutoRenewals: u32 & AugmentedConst<ApiType>;
259260
/**
260261
* Maximum number of legacy leases.
261262
**/
@@ -1235,6 +1236,56 @@ declare module '@polkadot/api-base/types/consts' {
12351236
**/
12361237
[key: string]: Codec;
12371238
};
1239+
revive: {
1240+
apiVersion: u16 & AugmentedConst<ApiType>;
1241+
/**
1242+
* The percentage of the storage deposit that should be held for using a code hash.
1243+
* Instantiating a contract, or calling [`chain_extension::Ext::lock_delegate_dependency`]
1244+
* protects the code from being removed. In order to prevent abuse these actions are
1245+
* protected with a percentage of the code deposit.
1246+
**/
1247+
codeHashLockupDepositPercent: Perbill & AugmentedConst<ApiType>;
1248+
/**
1249+
* The amount of balance a caller has to pay for each byte of storage.
1250+
*
1251+
* # Note
1252+
*
1253+
* It is safe to chage this value on a live chain as all refunds are pro rata.
1254+
**/
1255+
depositPerByte: u128 & AugmentedConst<ApiType>;
1256+
/**
1257+
* The amount of balance a caller has to pay for each storage item.
1258+
*
1259+
* # Note
1260+
*
1261+
* It is safe to chage this value on a live chain as all refunds are pro rata.
1262+
**/
1263+
depositPerItem: u128 & AugmentedConst<ApiType>;
1264+
/**
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`].
1270+
**/
1271+
maxCodeLen: u32 & AugmentedConst<ApiType>;
1272+
/**
1273+
* Make contract callable functions marked as `#[unstable]` available.
1274+
*
1275+
* Contracts that use `#[unstable]` functions won't be able to be uploaded unless
1276+
* this is set to `true`. This is only meant for testnets and dev nodes in order to
1277+
* experiment with new features.
1278+
*
1279+
* # Warning
1280+
*
1281+
* Do **not** set to `true` on productions chains.
1282+
**/
1283+
unsafeUnstableInterface: bool & AugmentedConst<ApiType>;
1284+
/**
1285+
* Generic const
1286+
**/
1287+
[key: string]: Codec;
1288+
};
12381289
safeMode: {
12391290
/**
12401291
* The amount that will be reserved upon calling [`Pallet::enter`].

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

Lines changed: 196 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,10 @@ declare module '@polkadot/api-base/types/errors' {
564564
* The lease expiry time has already passed.
565565
**/
566566
AlreadyExpired: AugmentedError<ApiType>;
567+
/**
568+
* Attempted to disable auto-renewal for a core that didn't have it enabled.
569+
**/
570+
AutoRenewalNotEnabled: AugmentedError<ApiType>;
567571
/**
568572
* The pivot mask for the interlacing is complete (and therefore not a strict subset).
569573
**/
@@ -593,6 +597,14 @@ declare module '@polkadot/api-base/types/errors' {
593597
* The history item does not exist.
594598
**/
595599
NoHistory: AugmentedError<ApiType>;
600+
/**
601+
* Only cores which are assigned to a task can be auto-renewed.
602+
**/
603+
NonTaskAutoRenewal: AugmentedError<ApiType>;
604+
/**
605+
* The caller doesn't have the permission to enable or disable auto-renewal.
606+
**/
607+
NoPermission: AugmentedError<ApiType>;
596608
/**
597609
* There is no sale happening currently.
598610
**/
@@ -625,6 +637,10 @@ declare module '@polkadot/api-base/types/errors' {
625637
* The sale limit has been reached.
626638
**/
627639
SoldOut: AugmentedError<ApiType>;
640+
/**
641+
* Failed to get the sovereign account of a task.
642+
**/
643+
SovereignAccountNotFound: AugmentedError<ApiType>;
628644
/**
629645
* An item cannot be dropped because it is still valid.
630646
**/
@@ -633,6 +649,10 @@ declare module '@polkadot/api-base/types/errors' {
633649
* The purchase cannot happen yet as the sale period is yet to begin.
634650
**/
635651
TooEarly: AugmentedError<ApiType>;
652+
/**
653+
* We reached the limit for auto-renewals.
654+
**/
655+
TooManyAutoRenewals: AugmentedError<ApiType>;
636656
/**
637657
* The maximum amount of leases has already been reached.
638658
**/
@@ -2188,10 +2208,6 @@ declare module '@polkadot/api-base/types/errors' {
21882208
* Preimage has already been noted on-chain.
21892209
**/
21902210
AlreadyNoted: AugmentedError<ApiType>;
2191-
/**
2192-
* No ticket with a cost was returned by [`Config::Consideration`] to store the preimage.
2193-
**/
2194-
NoCost: AugmentedError<ApiType>;
21952211
/**
21962212
* The user is not authorized to perform this action.
21972213
**/
@@ -2521,6 +2537,182 @@ declare module '@polkadot/api-base/types/errors' {
25212537
**/
25222538
[key: string]: AugmentedError<ApiType>;
25232539
};
2540+
revive: {
2541+
/**
2542+
* Can not add a delegate dependency to the code hash of the contract itself.
2543+
**/
2544+
CannotAddSelfAsDelegateDependency: AugmentedError<ApiType>;
2545+
/**
2546+
* No code info could be found at the supplied code hash.
2547+
**/
2548+
CodeInfoNotFound: AugmentedError<ApiType>;
2549+
/**
2550+
* Code removal was denied because the code is still in use by at least one contract.
2551+
**/
2552+
CodeInUse: AugmentedError<ApiType>;
2553+
/**
2554+
* No code could be found at the supplied code hash.
2555+
**/
2556+
CodeNotFound: AugmentedError<ApiType>;
2557+
/**
2558+
* The contract failed to compile or is missing the correct entry points.
2559+
*
2560+
* A more detailed error can be found on the node console if debug messages are enabled
2561+
* by supplying `-lruntime::revive=debug`.
2562+
**/
2563+
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>;
2569+
/**
2570+
* No contract was found at the specified address.
2571+
**/
2572+
ContractNotFound: AugmentedError<ApiType>;
2573+
/**
2574+
* The contract ran to completion but decided to revert its storage changes.
2575+
* Please note that this error is only returned from extrinsics. When called directly
2576+
* or via RPC an `Ok` will be returned. In this case the caller needs to inspect the flags
2577+
* to determine whether a reversion has taken place.
2578+
**/
2579+
ContractReverted: AugmentedError<ApiType>;
2580+
/**
2581+
* Contract trapped during execution.
2582+
**/
2583+
ContractTrapped: AugmentedError<ApiType>;
2584+
/**
2585+
* Input passed to a contract API function failed to decode as expected type.
2586+
**/
2587+
DecodingFailed: AugmentedError<ApiType>;
2588+
/**
2589+
* The contract already depends on the given delegate dependency.
2590+
**/
2591+
DelegateDependencyAlreadyExists: AugmentedError<ApiType>;
2592+
/**
2593+
* The dependency was not found in the contract's delegate dependencies.
2594+
**/
2595+
DelegateDependencyNotFound: AugmentedError<ApiType>;
2596+
/**
2597+
* A contract with the same AccountId already exists.
2598+
**/
2599+
DuplicateContract: AugmentedError<ApiType>;
2600+
/**
2601+
* PolkaVM failed during code execution. Probably due to a malformed program.
2602+
**/
2603+
ExecutionFailed: AugmentedError<ApiType>;
2604+
/**
2605+
* `seal_call` forwarded this contracts input. It therefore is no longer available.
2606+
**/
2607+
InputForwarded: AugmentedError<ApiType>;
2608+
/**
2609+
* Invalid combination of flags supplied to `seal_call` or `seal_delegate_call`.
2610+
**/
2611+
InvalidCallFlags: AugmentedError<ApiType>;
2612+
/**
2613+
* Invalid schedule supplied, e.g. with zero weight of a basic operation.
2614+
**/
2615+
InvalidSchedule: AugmentedError<ApiType>;
2616+
/**
2617+
* Invalid storage flags were passed to one of the storage syscalls.
2618+
**/
2619+
InvalidStorageFlags: AugmentedError<ApiType>;
2620+
/**
2621+
* The contract tried to call a syscall which does not exist (at its current api level).
2622+
**/
2623+
InvalidSyscall: AugmentedError<ApiType>;
2624+
/**
2625+
* Performing a call was denied because the calling depth reached the limit
2626+
* of what is specified in the schedule.
2627+
**/
2628+
MaxCallDepthReached: AugmentedError<ApiType>;
2629+
/**
2630+
* The contract has reached its maximum number of delegate dependencies.
2631+
**/
2632+
MaxDelegateDependenciesReached: AugmentedError<ApiType>;
2633+
/**
2634+
* A pending migration needs to complete before the extrinsic can be called.
2635+
**/
2636+
MigrationInProgress: AugmentedError<ApiType>;
2637+
/**
2638+
* The chain does not provide a chain extension. Calling the chain extension results
2639+
* in this error. Note that this usually shouldn't happen as deploying such contracts
2640+
* is rejected.
2641+
**/
2642+
NoChainExtension: AugmentedError<ApiType>;
2643+
/**
2644+
* Migrate dispatch call was attempted but no migration was performed.
2645+
**/
2646+
NoMigrationPerformed: AugmentedError<ApiType>;
2647+
/**
2648+
* A buffer outside of sandbox memory was passed to a contract API function.
2649+
**/
2650+
OutOfBounds: AugmentedError<ApiType>;
2651+
/**
2652+
* The executed contract exhausted its gas limit.
2653+
**/
2654+
OutOfGas: AugmentedError<ApiType>;
2655+
/**
2656+
* Can not add more data to transient storage.
2657+
**/
2658+
OutOfTransientStorage: AugmentedError<ApiType>;
2659+
/**
2660+
* The output buffer supplied to a contract API call was too small.
2661+
**/
2662+
OutputBufferTooSmall: AugmentedError<ApiType>;
2663+
/**
2664+
* A contract called into the runtime which then called back into this pallet.
2665+
**/
2666+
ReenteredPallet: AugmentedError<ApiType>;
2667+
/**
2668+
* A call tried to invoke a contract that is flagged as non-reentrant.
2669+
**/
2670+
ReentranceDenied: AugmentedError<ApiType>;
2671+
/**
2672+
* A contract attempted to invoke a state modifying API while being in read-only mode.
2673+
**/
2674+
StateChangeDenied: AugmentedError<ApiType>;
2675+
/**
2676+
* More storage was created than allowed by the storage deposit limit.
2677+
**/
2678+
StorageDepositLimitExhausted: AugmentedError<ApiType>;
2679+
/**
2680+
* Origin doesn't have enough balance to pay the required storage deposits.
2681+
**/
2682+
StorageDepositNotEnoughFunds: AugmentedError<ApiType>;
2683+
/**
2684+
* A contract self destructed in its constructor.
2685+
*
2686+
* This can be triggered by a call to `seal_terminate`.
2687+
**/
2688+
TerminatedInConstructor: AugmentedError<ApiType>;
2689+
/**
2690+
* Termination of a contract is not allowed while the contract is already
2691+
* on the call stack. Can be triggered by `seal_terminate`.
2692+
**/
2693+
TerminatedWhileReentrant: AugmentedError<ApiType>;
2694+
/**
2695+
* The amount of topics passed to `seal_deposit_events` exceeds the limit.
2696+
**/
2697+
TooManyTopics: AugmentedError<ApiType>;
2698+
/**
2699+
* Performing the requested transfer failed. Probably because there isn't enough
2700+
* free balance in the sender's account.
2701+
**/
2702+
TransferFailed: AugmentedError<ApiType>;
2703+
/**
2704+
* The size defined in `T::MaxValueSize` was exceeded.
2705+
**/
2706+
ValueTooLarge: AugmentedError<ApiType>;
2707+
/**
2708+
* Failed to decode the XCM program.
2709+
**/
2710+
XCMDecodeFailed: AugmentedError<ApiType>;
2711+
/**
2712+
* Generic error
2713+
**/
2714+
[key: string]: AugmentedError<ApiType>;
2715+
};
25242716
safeMode: {
25252717
/**
25262718
* The account already has a deposit reserved and can therefore not enter or extend again.

0 commit comments

Comments
 (0)