@dedot/chaintypes 0.135.0 → 0.136.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/astar/consts.d.ts +63 -0
- package/astar/errors.d.ts +74 -0
- package/astar/events.d.ts +73 -0
- package/astar/index.d.ts +1 -1
- package/astar/query.d.ts +48 -0
- package/astar/tx.d.ts +316 -0
- package/astar/types.d.ts +371 -3
- package/package.json +2 -2
package/astar/consts.d.ts
CHANGED
|
@@ -1162,6 +1162,69 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
|
|
|
1162
1162
|
**/
|
|
1163
1163
|
[name: string]: any;
|
|
1164
1164
|
};
|
|
1165
|
+
/**
|
|
1166
|
+
* Pallet `SafeMode`'s constants
|
|
1167
|
+
**/
|
|
1168
|
+
safeMode: {
|
|
1169
|
+
/**
|
|
1170
|
+
* For how many blocks the safe-mode will be entered by [`Pallet::enter`].
|
|
1171
|
+
**/
|
|
1172
|
+
enterDuration: number;
|
|
1173
|
+
|
|
1174
|
+
/**
|
|
1175
|
+
* For how many blocks the safe-mode can be extended by each [`Pallet::extend`] call.
|
|
1176
|
+
*
|
|
1177
|
+
* This does not impose a hard limit as the safe-mode can be extended multiple times.
|
|
1178
|
+
**/
|
|
1179
|
+
extendDuration: number;
|
|
1180
|
+
|
|
1181
|
+
/**
|
|
1182
|
+
* The amount that will be reserved upon calling [`Pallet::enter`].
|
|
1183
|
+
*
|
|
1184
|
+
* `None` disallows permissionlessly enabling the safe-mode and is a sane default.
|
|
1185
|
+
**/
|
|
1186
|
+
enterDepositAmount: bigint | undefined;
|
|
1187
|
+
|
|
1188
|
+
/**
|
|
1189
|
+
* The amount that will be reserved upon calling [`Pallet::extend`].
|
|
1190
|
+
*
|
|
1191
|
+
* `None` disallows permissionlessly extending the safe-mode and is a sane default.
|
|
1192
|
+
**/
|
|
1193
|
+
extendDepositAmount: bigint | undefined;
|
|
1194
|
+
|
|
1195
|
+
/**
|
|
1196
|
+
* The minimal duration a deposit will remain reserved after safe-mode is entered or
|
|
1197
|
+
* extended, unless [`Pallet::force_release_deposit`] is successfully called sooner.
|
|
1198
|
+
*
|
|
1199
|
+
* Every deposit is tied to a specific activation or extension, thus each deposit can be
|
|
1200
|
+
* released independently after the delay for it has passed.
|
|
1201
|
+
*
|
|
1202
|
+
* `None` disallows permissionlessly releasing the safe-mode deposits and is a sane
|
|
1203
|
+
* default.
|
|
1204
|
+
**/
|
|
1205
|
+
releaseDelay: number | undefined;
|
|
1206
|
+
|
|
1207
|
+
/**
|
|
1208
|
+
* Generic pallet constant
|
|
1209
|
+
**/
|
|
1210
|
+
[name: string]: any;
|
|
1211
|
+
};
|
|
1212
|
+
/**
|
|
1213
|
+
* Pallet `TxPause`'s constants
|
|
1214
|
+
**/
|
|
1215
|
+
txPause: {
|
|
1216
|
+
/**
|
|
1217
|
+
* Maximum length for pallet name and call name SCALE encoded string names.
|
|
1218
|
+
*
|
|
1219
|
+
* TOO LONG NAMES WILL BE TREATED AS PAUSED.
|
|
1220
|
+
**/
|
|
1221
|
+
maxNameLen: number;
|
|
1222
|
+
|
|
1223
|
+
/**
|
|
1224
|
+
* Generic pallet constant
|
|
1225
|
+
**/
|
|
1226
|
+
[name: string]: any;
|
|
1227
|
+
};
|
|
1165
1228
|
/**
|
|
1166
1229
|
* Pallet `MultiBlockMigrations`'s constants
|
|
1167
1230
|
**/
|
package/astar/errors.d.ts
CHANGED
|
@@ -960,6 +960,11 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
|
|
|
960
960
|
**/
|
|
961
961
|
AlreadyInvulnerable: GenericPalletError<Rv>;
|
|
962
962
|
|
|
963
|
+
/**
|
|
964
|
+
* User is not an Invulnerable
|
|
965
|
+
**/
|
|
966
|
+
NotInvulnerable: GenericPalletError<Rv>;
|
|
967
|
+
|
|
963
968
|
/**
|
|
964
969
|
* Account has no associated validator ID
|
|
965
970
|
**/
|
|
@@ -2250,6 +2255,75 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
|
|
|
2250
2255
|
**/
|
|
2251
2256
|
[error: string]: GenericPalletError<Rv>;
|
|
2252
2257
|
};
|
|
2258
|
+
/**
|
|
2259
|
+
* Pallet `SafeMode`'s errors
|
|
2260
|
+
**/
|
|
2261
|
+
safeMode: {
|
|
2262
|
+
/**
|
|
2263
|
+
* The safe-mode is (already or still) entered.
|
|
2264
|
+
**/
|
|
2265
|
+
Entered: GenericPalletError<Rv>;
|
|
2266
|
+
|
|
2267
|
+
/**
|
|
2268
|
+
* The safe-mode is (already or still) exited.
|
|
2269
|
+
**/
|
|
2270
|
+
Exited: GenericPalletError<Rv>;
|
|
2271
|
+
|
|
2272
|
+
/**
|
|
2273
|
+
* This functionality of the pallet is disabled by the configuration.
|
|
2274
|
+
**/
|
|
2275
|
+
NotConfigured: GenericPalletError<Rv>;
|
|
2276
|
+
|
|
2277
|
+
/**
|
|
2278
|
+
* There is no balance reserved.
|
|
2279
|
+
**/
|
|
2280
|
+
NoDeposit: GenericPalletError<Rv>;
|
|
2281
|
+
|
|
2282
|
+
/**
|
|
2283
|
+
* The account already has a deposit reserved and can therefore not enter or extend again.
|
|
2284
|
+
**/
|
|
2285
|
+
AlreadyDeposited: GenericPalletError<Rv>;
|
|
2286
|
+
|
|
2287
|
+
/**
|
|
2288
|
+
* This deposit cannot be released yet.
|
|
2289
|
+
**/
|
|
2290
|
+
CannotReleaseYet: GenericPalletError<Rv>;
|
|
2291
|
+
|
|
2292
|
+
/**
|
|
2293
|
+
* An error from the underlying `Currency`.
|
|
2294
|
+
**/
|
|
2295
|
+
CurrencyError: GenericPalletError<Rv>;
|
|
2296
|
+
|
|
2297
|
+
/**
|
|
2298
|
+
* Generic pallet error
|
|
2299
|
+
**/
|
|
2300
|
+
[error: string]: GenericPalletError<Rv>;
|
|
2301
|
+
};
|
|
2302
|
+
/**
|
|
2303
|
+
* Pallet `TxPause`'s errors
|
|
2304
|
+
**/
|
|
2305
|
+
txPause: {
|
|
2306
|
+
/**
|
|
2307
|
+
* The call is paused.
|
|
2308
|
+
**/
|
|
2309
|
+
IsPaused: GenericPalletError<Rv>;
|
|
2310
|
+
|
|
2311
|
+
/**
|
|
2312
|
+
* The call is unpaused.
|
|
2313
|
+
**/
|
|
2314
|
+
IsUnpaused: GenericPalletError<Rv>;
|
|
2315
|
+
|
|
2316
|
+
/**
|
|
2317
|
+
* The call is whitelisted and cannot be paused.
|
|
2318
|
+
**/
|
|
2319
|
+
Unpausable: GenericPalletError<Rv>;
|
|
2320
|
+
NotFound: GenericPalletError<Rv>;
|
|
2321
|
+
|
|
2322
|
+
/**
|
|
2323
|
+
* Generic pallet error
|
|
2324
|
+
**/
|
|
2325
|
+
[error: string]: GenericPalletError<Rv>;
|
|
2326
|
+
};
|
|
2253
2327
|
/**
|
|
2254
2328
|
* Pallet `MultiBlockMigrations`'s errors
|
|
2255
2329
|
**/
|
package/astar/events.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ import type {
|
|
|
31
31
|
PalletDemocracyVoteThreshold,
|
|
32
32
|
PalletDemocracyVoteAccountVote,
|
|
33
33
|
PalletDemocracyMetadataOwner,
|
|
34
|
+
PalletSafeModeExitReason,
|
|
34
35
|
} from './types.js';
|
|
35
36
|
|
|
36
37
|
export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<Rv> {
|
|
@@ -2789,6 +2790,78 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
|
|
|
2789
2790
|
**/
|
|
2790
2791
|
[prop: string]: GenericPalletEvent<Rv>;
|
|
2791
2792
|
};
|
|
2793
|
+
/**
|
|
2794
|
+
* Pallet `SafeMode`'s events
|
|
2795
|
+
**/
|
|
2796
|
+
safeMode: {
|
|
2797
|
+
/**
|
|
2798
|
+
* The safe-mode was entered until inclusively this block.
|
|
2799
|
+
**/
|
|
2800
|
+
Entered: GenericPalletEvent<Rv, 'SafeMode', 'Entered', { until: number }>;
|
|
2801
|
+
|
|
2802
|
+
/**
|
|
2803
|
+
* The safe-mode was extended until inclusively this block.
|
|
2804
|
+
**/
|
|
2805
|
+
Extended: GenericPalletEvent<Rv, 'SafeMode', 'Extended', { until: number }>;
|
|
2806
|
+
|
|
2807
|
+
/**
|
|
2808
|
+
* Exited the safe-mode for a specific reason.
|
|
2809
|
+
**/
|
|
2810
|
+
Exited: GenericPalletEvent<Rv, 'SafeMode', 'Exited', { reason: PalletSafeModeExitReason }>;
|
|
2811
|
+
|
|
2812
|
+
/**
|
|
2813
|
+
* An account reserved funds for either entering or extending the safe-mode.
|
|
2814
|
+
**/
|
|
2815
|
+
DepositPlaced: GenericPalletEvent<Rv, 'SafeMode', 'DepositPlaced', { account: AccountId32; amount: bigint }>;
|
|
2816
|
+
|
|
2817
|
+
/**
|
|
2818
|
+
* An account had a reserve released that was reserved.
|
|
2819
|
+
**/
|
|
2820
|
+
DepositReleased: GenericPalletEvent<Rv, 'SafeMode', 'DepositReleased', { account: AccountId32; amount: bigint }>;
|
|
2821
|
+
|
|
2822
|
+
/**
|
|
2823
|
+
* An account had reserve slashed that was reserved.
|
|
2824
|
+
**/
|
|
2825
|
+
DepositSlashed: GenericPalletEvent<Rv, 'SafeMode', 'DepositSlashed', { account: AccountId32; amount: bigint }>;
|
|
2826
|
+
|
|
2827
|
+
/**
|
|
2828
|
+
* Could not hold funds for entering or extending the safe-mode.
|
|
2829
|
+
*
|
|
2830
|
+
* This error comes from the underlying `Currency`.
|
|
2831
|
+
**/
|
|
2832
|
+
CannotDeposit: GenericPalletEvent<Rv, 'SafeMode', 'CannotDeposit', null>;
|
|
2833
|
+
|
|
2834
|
+
/**
|
|
2835
|
+
* Could not release funds for entering or extending the safe-mode.
|
|
2836
|
+
*
|
|
2837
|
+
* This error comes from the underlying `Currency`.
|
|
2838
|
+
**/
|
|
2839
|
+
CannotRelease: GenericPalletEvent<Rv, 'SafeMode', 'CannotRelease', null>;
|
|
2840
|
+
|
|
2841
|
+
/**
|
|
2842
|
+
* Generic pallet event
|
|
2843
|
+
**/
|
|
2844
|
+
[prop: string]: GenericPalletEvent<Rv>;
|
|
2845
|
+
};
|
|
2846
|
+
/**
|
|
2847
|
+
* Pallet `TxPause`'s events
|
|
2848
|
+
**/
|
|
2849
|
+
txPause: {
|
|
2850
|
+
/**
|
|
2851
|
+
* This pallet, or a specific call is now paused.
|
|
2852
|
+
**/
|
|
2853
|
+
CallPaused: GenericPalletEvent<Rv, 'TxPause', 'CallPaused', { fullName: [Bytes, Bytes] }>;
|
|
2854
|
+
|
|
2855
|
+
/**
|
|
2856
|
+
* This pallet, or a specific call is now unpaused.
|
|
2857
|
+
**/
|
|
2858
|
+
CallUnpaused: GenericPalletEvent<Rv, 'TxPause', 'CallUnpaused', { fullName: [Bytes, Bytes] }>;
|
|
2859
|
+
|
|
2860
|
+
/**
|
|
2861
|
+
* Generic pallet event
|
|
2862
|
+
**/
|
|
2863
|
+
[prop: string]: GenericPalletEvent<Rv>;
|
|
2864
|
+
};
|
|
2792
2865
|
/**
|
|
2793
2866
|
* Pallet `MultiBlockMigrations`'s events
|
|
2794
2867
|
**/
|
package/astar/index.d.ts
CHANGED
package/astar/query.d.ts
CHANGED
|
@@ -2478,6 +2478,54 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
2478
2478
|
**/
|
|
2479
2479
|
[storage: string]: GenericStorageQuery<Rv>;
|
|
2480
2480
|
};
|
|
2481
|
+
/**
|
|
2482
|
+
* Pallet `SafeMode`'s storage queries
|
|
2483
|
+
**/
|
|
2484
|
+
safeMode: {
|
|
2485
|
+
/**
|
|
2486
|
+
* Contains the last block number that the safe-mode will remain entered in.
|
|
2487
|
+
*
|
|
2488
|
+
* Set to `None` when safe-mode is exited.
|
|
2489
|
+
*
|
|
2490
|
+
* Safe-mode is automatically exited when the current block number exceeds this value.
|
|
2491
|
+
*
|
|
2492
|
+
* @param {Callback<number | undefined> =} callback
|
|
2493
|
+
**/
|
|
2494
|
+
enteredUntil: GenericStorageQuery<Rv, () => number | undefined>;
|
|
2495
|
+
|
|
2496
|
+
/**
|
|
2497
|
+
* Holds the reserve that was taken from an account at a specific block number.
|
|
2498
|
+
*
|
|
2499
|
+
* This helps governance to have an overview of outstanding deposits that should be returned or
|
|
2500
|
+
* slashed.
|
|
2501
|
+
*
|
|
2502
|
+
* @param {[AccountId32Like, number]} arg
|
|
2503
|
+
* @param {Callback<bigint | undefined> =} callback
|
|
2504
|
+
**/
|
|
2505
|
+
deposits: GenericStorageQuery<Rv, (arg: [AccountId32Like, number]) => bigint | undefined, [AccountId32, number]>;
|
|
2506
|
+
|
|
2507
|
+
/**
|
|
2508
|
+
* Generic pallet storage query
|
|
2509
|
+
**/
|
|
2510
|
+
[storage: string]: GenericStorageQuery<Rv>;
|
|
2511
|
+
};
|
|
2512
|
+
/**
|
|
2513
|
+
* Pallet `TxPause`'s storage queries
|
|
2514
|
+
**/
|
|
2515
|
+
txPause: {
|
|
2516
|
+
/**
|
|
2517
|
+
* The set of calls that are explicitly paused.
|
|
2518
|
+
*
|
|
2519
|
+
* @param {[BytesLike, BytesLike]} arg
|
|
2520
|
+
* @param {Callback<[] | undefined> =} callback
|
|
2521
|
+
**/
|
|
2522
|
+
pausedCalls: GenericStorageQuery<Rv, (arg: [BytesLike, BytesLike]) => [] | undefined, [Bytes, Bytes]>;
|
|
2523
|
+
|
|
2524
|
+
/**
|
|
2525
|
+
* Generic pallet storage query
|
|
2526
|
+
**/
|
|
2527
|
+
[storage: string]: GenericStorageQuery<Rv>;
|
|
2528
|
+
};
|
|
2481
2529
|
/**
|
|
2482
2530
|
* Pallet `MultiBlockMigrations`'s storage queries
|
|
2483
2531
|
**/
|
package/astar/tx.d.ts
CHANGED
|
@@ -4815,6 +4815,44 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
4815
4815
|
>
|
|
4816
4816
|
>;
|
|
4817
4817
|
|
|
4818
|
+
/**
|
|
4819
|
+
* Add an invulnerable collator.
|
|
4820
|
+
*
|
|
4821
|
+
* @param {AccountId32Like} who
|
|
4822
|
+
**/
|
|
4823
|
+
addInvulnerable: GenericTxCall<
|
|
4824
|
+
Rv,
|
|
4825
|
+
(who: AccountId32Like) => ChainSubmittableExtrinsic<
|
|
4826
|
+
Rv,
|
|
4827
|
+
{
|
|
4828
|
+
pallet: 'CollatorSelection';
|
|
4829
|
+
palletCall: {
|
|
4830
|
+
name: 'AddInvulnerable';
|
|
4831
|
+
params: { who: AccountId32Like };
|
|
4832
|
+
};
|
|
4833
|
+
}
|
|
4834
|
+
>
|
|
4835
|
+
>;
|
|
4836
|
+
|
|
4837
|
+
/**
|
|
4838
|
+
* Remove an invulnerable collator.
|
|
4839
|
+
*
|
|
4840
|
+
* @param {AccountId32Like} who
|
|
4841
|
+
**/
|
|
4842
|
+
removeInvulnerable: GenericTxCall<
|
|
4843
|
+
Rv,
|
|
4844
|
+
(who: AccountId32Like) => ChainSubmittableExtrinsic<
|
|
4845
|
+
Rv,
|
|
4846
|
+
{
|
|
4847
|
+
pallet: 'CollatorSelection';
|
|
4848
|
+
palletCall: {
|
|
4849
|
+
name: 'RemoveInvulnerable';
|
|
4850
|
+
params: { who: AccountId32Like };
|
|
4851
|
+
};
|
|
4852
|
+
}
|
|
4853
|
+
>
|
|
4854
|
+
>;
|
|
4855
|
+
|
|
4818
4856
|
/**
|
|
4819
4857
|
* Generic pallet tx call
|
|
4820
4858
|
**/
|
|
@@ -9182,6 +9220,284 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
9182
9220
|
**/
|
|
9183
9221
|
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
9184
9222
|
};
|
|
9223
|
+
/**
|
|
9224
|
+
* Pallet `SafeMode`'s transaction calls
|
|
9225
|
+
**/
|
|
9226
|
+
safeMode: {
|
|
9227
|
+
/**
|
|
9228
|
+
* Enter safe-mode permissionlessly for [`Config::EnterDuration`] blocks.
|
|
9229
|
+
*
|
|
9230
|
+
* Reserves [`Config::EnterDepositAmount`] from the caller's account.
|
|
9231
|
+
* Emits an [`Event::Entered`] event on success.
|
|
9232
|
+
* Errors with [`Error::Entered`] if the safe-mode is already entered.
|
|
9233
|
+
* Errors with [`Error::NotConfigured`] if the deposit amount is `None`.
|
|
9234
|
+
*
|
|
9235
|
+
**/
|
|
9236
|
+
enter: GenericTxCall<
|
|
9237
|
+
Rv,
|
|
9238
|
+
() => ChainSubmittableExtrinsic<
|
|
9239
|
+
Rv,
|
|
9240
|
+
{
|
|
9241
|
+
pallet: 'SafeMode';
|
|
9242
|
+
palletCall: {
|
|
9243
|
+
name: 'Enter';
|
|
9244
|
+
};
|
|
9245
|
+
}
|
|
9246
|
+
>
|
|
9247
|
+
>;
|
|
9248
|
+
|
|
9249
|
+
/**
|
|
9250
|
+
* Enter safe-mode by force for a per-origin configured number of blocks.
|
|
9251
|
+
*
|
|
9252
|
+
* Emits an [`Event::Entered`] event on success.
|
|
9253
|
+
* Errors with [`Error::Entered`] if the safe-mode is already entered.
|
|
9254
|
+
*
|
|
9255
|
+
* Can only be called by the [`Config::ForceEnterOrigin`] origin.
|
|
9256
|
+
*
|
|
9257
|
+
**/
|
|
9258
|
+
forceEnter: GenericTxCall<
|
|
9259
|
+
Rv,
|
|
9260
|
+
() => ChainSubmittableExtrinsic<
|
|
9261
|
+
Rv,
|
|
9262
|
+
{
|
|
9263
|
+
pallet: 'SafeMode';
|
|
9264
|
+
palletCall: {
|
|
9265
|
+
name: 'ForceEnter';
|
|
9266
|
+
};
|
|
9267
|
+
}
|
|
9268
|
+
>
|
|
9269
|
+
>;
|
|
9270
|
+
|
|
9271
|
+
/**
|
|
9272
|
+
* Extend the safe-mode permissionlessly for [`Config::ExtendDuration`] blocks.
|
|
9273
|
+
*
|
|
9274
|
+
* This accumulates on top of the current remaining duration.
|
|
9275
|
+
* Reserves [`Config::ExtendDepositAmount`] from the caller's account.
|
|
9276
|
+
* Emits an [`Event::Extended`] event on success.
|
|
9277
|
+
* Errors with [`Error::Exited`] if the safe-mode is entered.
|
|
9278
|
+
* Errors with [`Error::NotConfigured`] if the deposit amount is `None`.
|
|
9279
|
+
*
|
|
9280
|
+
* This may be called by any signed origin with [`Config::ExtendDepositAmount`] free
|
|
9281
|
+
* currency to reserve. This call can be disabled for all origins by configuring
|
|
9282
|
+
* [`Config::ExtendDepositAmount`] to `None`.
|
|
9283
|
+
*
|
|
9284
|
+
**/
|
|
9285
|
+
extend: GenericTxCall<
|
|
9286
|
+
Rv,
|
|
9287
|
+
() => ChainSubmittableExtrinsic<
|
|
9288
|
+
Rv,
|
|
9289
|
+
{
|
|
9290
|
+
pallet: 'SafeMode';
|
|
9291
|
+
palletCall: {
|
|
9292
|
+
name: 'Extend';
|
|
9293
|
+
};
|
|
9294
|
+
}
|
|
9295
|
+
>
|
|
9296
|
+
>;
|
|
9297
|
+
|
|
9298
|
+
/**
|
|
9299
|
+
* Extend the safe-mode by force for a per-origin configured number of blocks.
|
|
9300
|
+
*
|
|
9301
|
+
* Emits an [`Event::Extended`] event on success.
|
|
9302
|
+
* Errors with [`Error::Exited`] if the safe-mode is inactive.
|
|
9303
|
+
*
|
|
9304
|
+
* Can only be called by the [`Config::ForceExtendOrigin`] origin.
|
|
9305
|
+
*
|
|
9306
|
+
**/
|
|
9307
|
+
forceExtend: GenericTxCall<
|
|
9308
|
+
Rv,
|
|
9309
|
+
() => ChainSubmittableExtrinsic<
|
|
9310
|
+
Rv,
|
|
9311
|
+
{
|
|
9312
|
+
pallet: 'SafeMode';
|
|
9313
|
+
palletCall: {
|
|
9314
|
+
name: 'ForceExtend';
|
|
9315
|
+
};
|
|
9316
|
+
}
|
|
9317
|
+
>
|
|
9318
|
+
>;
|
|
9319
|
+
|
|
9320
|
+
/**
|
|
9321
|
+
* Exit safe-mode by force.
|
|
9322
|
+
*
|
|
9323
|
+
* Emits an [`Event::Exited`] with [`ExitReason::Force`] event on success.
|
|
9324
|
+
* Errors with [`Error::Exited`] if the safe-mode is inactive.
|
|
9325
|
+
*
|
|
9326
|
+
* Note: `safe-mode` will be automatically deactivated by [`Pallet::on_initialize`] hook
|
|
9327
|
+
* after the block height is greater than the [`EnteredUntil`] storage item.
|
|
9328
|
+
* Emits an [`Event::Exited`] with [`ExitReason::Timeout`] event when deactivated in the
|
|
9329
|
+
* hook.
|
|
9330
|
+
*
|
|
9331
|
+
**/
|
|
9332
|
+
forceExit: GenericTxCall<
|
|
9333
|
+
Rv,
|
|
9334
|
+
() => ChainSubmittableExtrinsic<
|
|
9335
|
+
Rv,
|
|
9336
|
+
{
|
|
9337
|
+
pallet: 'SafeMode';
|
|
9338
|
+
palletCall: {
|
|
9339
|
+
name: 'ForceExit';
|
|
9340
|
+
};
|
|
9341
|
+
}
|
|
9342
|
+
>
|
|
9343
|
+
>;
|
|
9344
|
+
|
|
9345
|
+
/**
|
|
9346
|
+
* Slash a deposit for an account that entered or extended safe-mode at a given
|
|
9347
|
+
* historical block.
|
|
9348
|
+
*
|
|
9349
|
+
* This can only be called while safe-mode is entered.
|
|
9350
|
+
*
|
|
9351
|
+
* Emits a [`Event::DepositSlashed`] event on success.
|
|
9352
|
+
* Errors with [`Error::Entered`] if safe-mode is entered.
|
|
9353
|
+
*
|
|
9354
|
+
* Can only be called by the [`Config::ForceDepositOrigin`] origin.
|
|
9355
|
+
*
|
|
9356
|
+
* @param {AccountId32Like} account
|
|
9357
|
+
* @param {number} block
|
|
9358
|
+
**/
|
|
9359
|
+
forceSlashDeposit: GenericTxCall<
|
|
9360
|
+
Rv,
|
|
9361
|
+
(
|
|
9362
|
+
account: AccountId32Like,
|
|
9363
|
+
block: number,
|
|
9364
|
+
) => ChainSubmittableExtrinsic<
|
|
9365
|
+
Rv,
|
|
9366
|
+
{
|
|
9367
|
+
pallet: 'SafeMode';
|
|
9368
|
+
palletCall: {
|
|
9369
|
+
name: 'ForceSlashDeposit';
|
|
9370
|
+
params: { account: AccountId32Like; block: number };
|
|
9371
|
+
};
|
|
9372
|
+
}
|
|
9373
|
+
>
|
|
9374
|
+
>;
|
|
9375
|
+
|
|
9376
|
+
/**
|
|
9377
|
+
* Permissionlessly release a deposit for an account that entered safe-mode at a
|
|
9378
|
+
* given historical block.
|
|
9379
|
+
*
|
|
9380
|
+
* The call can be completely disabled by setting [`Config::ReleaseDelay`] to `None`.
|
|
9381
|
+
* This cannot be called while safe-mode is entered and not until
|
|
9382
|
+
* [`Config::ReleaseDelay`] blocks have passed since safe-mode was entered.
|
|
9383
|
+
*
|
|
9384
|
+
* Emits a [`Event::DepositReleased`] event on success.
|
|
9385
|
+
* Errors with [`Error::Entered`] if the safe-mode is entered.
|
|
9386
|
+
* Errors with [`Error::CannotReleaseYet`] if [`Config::ReleaseDelay`] block have not
|
|
9387
|
+
* passed since safe-mode was entered. Errors with [`Error::NoDeposit`] if the payee has no
|
|
9388
|
+
* reserved currency at the block specified.
|
|
9389
|
+
*
|
|
9390
|
+
* @param {AccountId32Like} account
|
|
9391
|
+
* @param {number} block
|
|
9392
|
+
**/
|
|
9393
|
+
releaseDeposit: GenericTxCall<
|
|
9394
|
+
Rv,
|
|
9395
|
+
(
|
|
9396
|
+
account: AccountId32Like,
|
|
9397
|
+
block: number,
|
|
9398
|
+
) => ChainSubmittableExtrinsic<
|
|
9399
|
+
Rv,
|
|
9400
|
+
{
|
|
9401
|
+
pallet: 'SafeMode';
|
|
9402
|
+
palletCall: {
|
|
9403
|
+
name: 'ReleaseDeposit';
|
|
9404
|
+
params: { account: AccountId32Like; block: number };
|
|
9405
|
+
};
|
|
9406
|
+
}
|
|
9407
|
+
>
|
|
9408
|
+
>;
|
|
9409
|
+
|
|
9410
|
+
/**
|
|
9411
|
+
* Force to release a deposit for an account that entered safe-mode at a given
|
|
9412
|
+
* historical block.
|
|
9413
|
+
*
|
|
9414
|
+
* This can be called while safe-mode is still entered.
|
|
9415
|
+
*
|
|
9416
|
+
* Emits a [`Event::DepositReleased`] event on success.
|
|
9417
|
+
* Errors with [`Error::Entered`] if safe-mode is entered.
|
|
9418
|
+
* Errors with [`Error::NoDeposit`] if the payee has no reserved currency at the
|
|
9419
|
+
* specified block.
|
|
9420
|
+
*
|
|
9421
|
+
* Can only be called by the [`Config::ForceDepositOrigin`] origin.
|
|
9422
|
+
*
|
|
9423
|
+
* @param {AccountId32Like} account
|
|
9424
|
+
* @param {number} block
|
|
9425
|
+
**/
|
|
9426
|
+
forceReleaseDeposit: GenericTxCall<
|
|
9427
|
+
Rv,
|
|
9428
|
+
(
|
|
9429
|
+
account: AccountId32Like,
|
|
9430
|
+
block: number,
|
|
9431
|
+
) => ChainSubmittableExtrinsic<
|
|
9432
|
+
Rv,
|
|
9433
|
+
{
|
|
9434
|
+
pallet: 'SafeMode';
|
|
9435
|
+
palletCall: {
|
|
9436
|
+
name: 'ForceReleaseDeposit';
|
|
9437
|
+
params: { account: AccountId32Like; block: number };
|
|
9438
|
+
};
|
|
9439
|
+
}
|
|
9440
|
+
>
|
|
9441
|
+
>;
|
|
9442
|
+
|
|
9443
|
+
/**
|
|
9444
|
+
* Generic pallet tx call
|
|
9445
|
+
**/
|
|
9446
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
9447
|
+
};
|
|
9448
|
+
/**
|
|
9449
|
+
* Pallet `TxPause`'s transaction calls
|
|
9450
|
+
**/
|
|
9451
|
+
txPause: {
|
|
9452
|
+
/**
|
|
9453
|
+
* Pause a call.
|
|
9454
|
+
*
|
|
9455
|
+
* Can only be called by [`Config::PauseOrigin`].
|
|
9456
|
+
* Emits an [`Event::CallPaused`] event on success.
|
|
9457
|
+
*
|
|
9458
|
+
* @param {[BytesLike, BytesLike]} fullName
|
|
9459
|
+
**/
|
|
9460
|
+
pause: GenericTxCall<
|
|
9461
|
+
Rv,
|
|
9462
|
+
(fullName: [BytesLike, BytesLike]) => ChainSubmittableExtrinsic<
|
|
9463
|
+
Rv,
|
|
9464
|
+
{
|
|
9465
|
+
pallet: 'TxPause';
|
|
9466
|
+
palletCall: {
|
|
9467
|
+
name: 'Pause';
|
|
9468
|
+
params: { fullName: [BytesLike, BytesLike] };
|
|
9469
|
+
};
|
|
9470
|
+
}
|
|
9471
|
+
>
|
|
9472
|
+
>;
|
|
9473
|
+
|
|
9474
|
+
/**
|
|
9475
|
+
* Un-pause a call.
|
|
9476
|
+
*
|
|
9477
|
+
* Can only be called by [`Config::UnpauseOrigin`].
|
|
9478
|
+
* Emits an [`Event::CallUnpaused`] event on success.
|
|
9479
|
+
*
|
|
9480
|
+
* @param {[BytesLike, BytesLike]} ident
|
|
9481
|
+
**/
|
|
9482
|
+
unpause: GenericTxCall<
|
|
9483
|
+
Rv,
|
|
9484
|
+
(ident: [BytesLike, BytesLike]) => ChainSubmittableExtrinsic<
|
|
9485
|
+
Rv,
|
|
9486
|
+
{
|
|
9487
|
+
pallet: 'TxPause';
|
|
9488
|
+
palletCall: {
|
|
9489
|
+
name: 'Unpause';
|
|
9490
|
+
params: { ident: [BytesLike, BytesLike] };
|
|
9491
|
+
};
|
|
9492
|
+
}
|
|
9493
|
+
>
|
|
9494
|
+
>;
|
|
9495
|
+
|
|
9496
|
+
/**
|
|
9497
|
+
* Generic pallet tx call
|
|
9498
|
+
**/
|
|
9499
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
9500
|
+
};
|
|
9185
9501
|
/**
|
|
9186
9502
|
* Pallet `MultiBlockMigrations`'s transaction calls
|
|
9187
9503
|
**/
|
package/astar/types.d.ts
CHANGED
|
@@ -93,6 +93,8 @@ export type AstarRuntimeRuntimeEvent =
|
|
|
93
93
|
| { pallet: 'Treasury'; palletEvent: PalletTreasuryEvent }
|
|
94
94
|
| { pallet: 'CommunityTreasury'; palletEvent: PalletTreasuryEvent }
|
|
95
95
|
| { pallet: 'CollectiveProxy'; palletEvent: PalletCollectiveProxyEvent }
|
|
96
|
+
| { pallet: 'SafeMode'; palletEvent: PalletSafeModeEvent }
|
|
97
|
+
| { pallet: 'TxPause'; palletEvent: PalletTxPauseEvent }
|
|
96
98
|
| { pallet: 'MultiBlockMigrations'; palletEvent: PalletMigrationsEvent };
|
|
97
99
|
|
|
98
100
|
/**
|
|
@@ -2267,6 +2269,62 @@ export type PalletCollectiveProxyEvent =
|
|
|
2267
2269
|
**/
|
|
2268
2270
|
{ name: 'CollectiveProxyExecuted'; data: { result: Result<[], DispatchError> } };
|
|
2269
2271
|
|
|
2272
|
+
/**
|
|
2273
|
+
* The `Event` enum of this pallet
|
|
2274
|
+
**/
|
|
2275
|
+
export type PalletSafeModeEvent =
|
|
2276
|
+
/**
|
|
2277
|
+
* The safe-mode was entered until inclusively this block.
|
|
2278
|
+
**/
|
|
2279
|
+
| { name: 'Entered'; data: { until: number } }
|
|
2280
|
+
/**
|
|
2281
|
+
* The safe-mode was extended until inclusively this block.
|
|
2282
|
+
**/
|
|
2283
|
+
| { name: 'Extended'; data: { until: number } }
|
|
2284
|
+
/**
|
|
2285
|
+
* Exited the safe-mode for a specific reason.
|
|
2286
|
+
**/
|
|
2287
|
+
| { name: 'Exited'; data: { reason: PalletSafeModeExitReason } }
|
|
2288
|
+
/**
|
|
2289
|
+
* An account reserved funds for either entering or extending the safe-mode.
|
|
2290
|
+
**/
|
|
2291
|
+
| { name: 'DepositPlaced'; data: { account: AccountId32; amount: bigint } }
|
|
2292
|
+
/**
|
|
2293
|
+
* An account had a reserve released that was reserved.
|
|
2294
|
+
**/
|
|
2295
|
+
| { name: 'DepositReleased'; data: { account: AccountId32; amount: bigint } }
|
|
2296
|
+
/**
|
|
2297
|
+
* An account had reserve slashed that was reserved.
|
|
2298
|
+
**/
|
|
2299
|
+
| { name: 'DepositSlashed'; data: { account: AccountId32; amount: bigint } }
|
|
2300
|
+
/**
|
|
2301
|
+
* Could not hold funds for entering or extending the safe-mode.
|
|
2302
|
+
*
|
|
2303
|
+
* This error comes from the underlying `Currency`.
|
|
2304
|
+
**/
|
|
2305
|
+
| { name: 'CannotDeposit' }
|
|
2306
|
+
/**
|
|
2307
|
+
* Could not release funds for entering or extending the safe-mode.
|
|
2308
|
+
*
|
|
2309
|
+
* This error comes from the underlying `Currency`.
|
|
2310
|
+
**/
|
|
2311
|
+
| { name: 'CannotRelease' };
|
|
2312
|
+
|
|
2313
|
+
export type PalletSafeModeExitReason = 'Timeout' | 'Force';
|
|
2314
|
+
|
|
2315
|
+
/**
|
|
2316
|
+
* The `Event` enum of this pallet
|
|
2317
|
+
**/
|
|
2318
|
+
export type PalletTxPauseEvent =
|
|
2319
|
+
/**
|
|
2320
|
+
* This pallet, or a specific call is now paused.
|
|
2321
|
+
**/
|
|
2322
|
+
| { name: 'CallPaused'; data: { fullName: [Bytes, Bytes] } }
|
|
2323
|
+
/**
|
|
2324
|
+
* This pallet, or a specific call is now unpaused.
|
|
2325
|
+
**/
|
|
2326
|
+
| { name: 'CallUnpaused'; data: { fullName: [Bytes, Bytes] } };
|
|
2327
|
+
|
|
2270
2328
|
/**
|
|
2271
2329
|
* The `Event` enum of this pallet
|
|
2272
2330
|
**/
|
|
@@ -2821,6 +2879,8 @@ export type AstarRuntimeRuntimeCall =
|
|
|
2821
2879
|
| { pallet: 'Treasury'; palletCall: PalletTreasuryCall }
|
|
2822
2880
|
| { pallet: 'CommunityTreasury'; palletCall: PalletTreasuryCall }
|
|
2823
2881
|
| { pallet: 'CollectiveProxy'; palletCall: PalletCollectiveProxyCall }
|
|
2882
|
+
| { pallet: 'SafeMode'; palletCall: PalletSafeModeCall }
|
|
2883
|
+
| { pallet: 'TxPause'; palletCall: PalletTxPauseCall }
|
|
2824
2884
|
| { pallet: 'MultiBlockMigrations'; palletCall: PalletMigrationsCall };
|
|
2825
2885
|
|
|
2826
2886
|
export type AstarRuntimeRuntimeCallLike =
|
|
@@ -2864,6 +2924,8 @@ export type AstarRuntimeRuntimeCallLike =
|
|
|
2864
2924
|
| { pallet: 'Treasury'; palletCall: PalletTreasuryCallLike }
|
|
2865
2925
|
| { pallet: 'CommunityTreasury'; palletCall: PalletTreasuryCallLike }
|
|
2866
2926
|
| { pallet: 'CollectiveProxy'; palletCall: PalletCollectiveProxyCallLike }
|
|
2927
|
+
| { pallet: 'SafeMode'; palletCall: PalletSafeModeCallLike }
|
|
2928
|
+
| { pallet: 'TxPause'; palletCall: PalletTxPauseCallLike }
|
|
2867
2929
|
| { pallet: 'MultiBlockMigrations'; palletCall: PalletMigrationsCallLike };
|
|
2868
2930
|
|
|
2869
2931
|
/**
|
|
@@ -6420,7 +6482,15 @@ export type PalletCollatorSelectionCall =
|
|
|
6420
6482
|
* Set slash destination.
|
|
6421
6483
|
* Use `Some` to deposit slashed balance into destination or `None` to burn it.
|
|
6422
6484
|
**/
|
|
6423
|
-
| { name: 'SetSlashDestination'; params: { destination?: AccountId32 | undefined } }
|
|
6485
|
+
| { name: 'SetSlashDestination'; params: { destination?: AccountId32 | undefined } }
|
|
6486
|
+
/**
|
|
6487
|
+
* Add an invulnerable collator.
|
|
6488
|
+
**/
|
|
6489
|
+
| { name: 'AddInvulnerable'; params: { who: AccountId32 } }
|
|
6490
|
+
/**
|
|
6491
|
+
* Remove an invulnerable collator.
|
|
6492
|
+
**/
|
|
6493
|
+
| { name: 'RemoveInvulnerable'; params: { who: AccountId32 } };
|
|
6424
6494
|
|
|
6425
6495
|
export type PalletCollatorSelectionCallLike =
|
|
6426
6496
|
/**
|
|
@@ -6462,7 +6532,15 @@ export type PalletCollatorSelectionCallLike =
|
|
|
6462
6532
|
* Set slash destination.
|
|
6463
6533
|
* Use `Some` to deposit slashed balance into destination or `None` to burn it.
|
|
6464
6534
|
**/
|
|
6465
|
-
| { name: 'SetSlashDestination'; params: { destination?: AccountId32Like | undefined } }
|
|
6535
|
+
| { name: 'SetSlashDestination'; params: { destination?: AccountId32Like | undefined } }
|
|
6536
|
+
/**
|
|
6537
|
+
* Add an invulnerable collator.
|
|
6538
|
+
**/
|
|
6539
|
+
| { name: 'AddInvulnerable'; params: { who: AccountId32Like } }
|
|
6540
|
+
/**
|
|
6541
|
+
* Remove an invulnerable collator.
|
|
6542
|
+
**/
|
|
6543
|
+
| { name: 'RemoveInvulnerable'; params: { who: AccountId32Like } };
|
|
6466
6544
|
|
|
6467
6545
|
/**
|
|
6468
6546
|
* Contains a variant per dispatchable extrinsic that this pallet has.
|
|
@@ -9720,6 +9798,236 @@ export type PalletCollectiveProxyCallLike =
|
|
|
9720
9798
|
**/
|
|
9721
9799
|
{ name: 'ExecuteCall'; params: { call: AstarRuntimeRuntimeCallLike } };
|
|
9722
9800
|
|
|
9801
|
+
/**
|
|
9802
|
+
* Contains a variant per dispatchable extrinsic that this pallet has.
|
|
9803
|
+
**/
|
|
9804
|
+
export type PalletSafeModeCall =
|
|
9805
|
+
/**
|
|
9806
|
+
* Enter safe-mode permissionlessly for [`Config::EnterDuration`] blocks.
|
|
9807
|
+
*
|
|
9808
|
+
* Reserves [`Config::EnterDepositAmount`] from the caller's account.
|
|
9809
|
+
* Emits an [`Event::Entered`] event on success.
|
|
9810
|
+
* Errors with [`Error::Entered`] if the safe-mode is already entered.
|
|
9811
|
+
* Errors with [`Error::NotConfigured`] if the deposit amount is `None`.
|
|
9812
|
+
**/
|
|
9813
|
+
| { name: 'Enter' }
|
|
9814
|
+
/**
|
|
9815
|
+
* Enter safe-mode by force for a per-origin configured number of blocks.
|
|
9816
|
+
*
|
|
9817
|
+
* Emits an [`Event::Entered`] event on success.
|
|
9818
|
+
* Errors with [`Error::Entered`] if the safe-mode is already entered.
|
|
9819
|
+
*
|
|
9820
|
+
* Can only be called by the [`Config::ForceEnterOrigin`] origin.
|
|
9821
|
+
**/
|
|
9822
|
+
| { name: 'ForceEnter' }
|
|
9823
|
+
/**
|
|
9824
|
+
* Extend the safe-mode permissionlessly for [`Config::ExtendDuration`] blocks.
|
|
9825
|
+
*
|
|
9826
|
+
* This accumulates on top of the current remaining duration.
|
|
9827
|
+
* Reserves [`Config::ExtendDepositAmount`] from the caller's account.
|
|
9828
|
+
* Emits an [`Event::Extended`] event on success.
|
|
9829
|
+
* Errors with [`Error::Exited`] if the safe-mode is entered.
|
|
9830
|
+
* Errors with [`Error::NotConfigured`] if the deposit amount is `None`.
|
|
9831
|
+
*
|
|
9832
|
+
* This may be called by any signed origin with [`Config::ExtendDepositAmount`] free
|
|
9833
|
+
* currency to reserve. This call can be disabled for all origins by configuring
|
|
9834
|
+
* [`Config::ExtendDepositAmount`] to `None`.
|
|
9835
|
+
**/
|
|
9836
|
+
| { name: 'Extend' }
|
|
9837
|
+
/**
|
|
9838
|
+
* Extend the safe-mode by force for a per-origin configured number of blocks.
|
|
9839
|
+
*
|
|
9840
|
+
* Emits an [`Event::Extended`] event on success.
|
|
9841
|
+
* Errors with [`Error::Exited`] if the safe-mode is inactive.
|
|
9842
|
+
*
|
|
9843
|
+
* Can only be called by the [`Config::ForceExtendOrigin`] origin.
|
|
9844
|
+
**/
|
|
9845
|
+
| { name: 'ForceExtend' }
|
|
9846
|
+
/**
|
|
9847
|
+
* Exit safe-mode by force.
|
|
9848
|
+
*
|
|
9849
|
+
* Emits an [`Event::Exited`] with [`ExitReason::Force`] event on success.
|
|
9850
|
+
* Errors with [`Error::Exited`] if the safe-mode is inactive.
|
|
9851
|
+
*
|
|
9852
|
+
* Note: `safe-mode` will be automatically deactivated by [`Pallet::on_initialize`] hook
|
|
9853
|
+
* after the block height is greater than the [`EnteredUntil`] storage item.
|
|
9854
|
+
* Emits an [`Event::Exited`] with [`ExitReason::Timeout`] event when deactivated in the
|
|
9855
|
+
* hook.
|
|
9856
|
+
**/
|
|
9857
|
+
| { name: 'ForceExit' }
|
|
9858
|
+
/**
|
|
9859
|
+
* Slash a deposit for an account that entered or extended safe-mode at a given
|
|
9860
|
+
* historical block.
|
|
9861
|
+
*
|
|
9862
|
+
* This can only be called while safe-mode is entered.
|
|
9863
|
+
*
|
|
9864
|
+
* Emits a [`Event::DepositSlashed`] event on success.
|
|
9865
|
+
* Errors with [`Error::Entered`] if safe-mode is entered.
|
|
9866
|
+
*
|
|
9867
|
+
* Can only be called by the [`Config::ForceDepositOrigin`] origin.
|
|
9868
|
+
**/
|
|
9869
|
+
| { name: 'ForceSlashDeposit'; params: { account: AccountId32; block: number } }
|
|
9870
|
+
/**
|
|
9871
|
+
* Permissionlessly release a deposit for an account that entered safe-mode at a
|
|
9872
|
+
* given historical block.
|
|
9873
|
+
*
|
|
9874
|
+
* The call can be completely disabled by setting [`Config::ReleaseDelay`] to `None`.
|
|
9875
|
+
* This cannot be called while safe-mode is entered and not until
|
|
9876
|
+
* [`Config::ReleaseDelay`] blocks have passed since safe-mode was entered.
|
|
9877
|
+
*
|
|
9878
|
+
* Emits a [`Event::DepositReleased`] event on success.
|
|
9879
|
+
* Errors with [`Error::Entered`] if the safe-mode is entered.
|
|
9880
|
+
* Errors with [`Error::CannotReleaseYet`] if [`Config::ReleaseDelay`] block have not
|
|
9881
|
+
* passed since safe-mode was entered. Errors with [`Error::NoDeposit`] if the payee has no
|
|
9882
|
+
* reserved currency at the block specified.
|
|
9883
|
+
**/
|
|
9884
|
+
| { name: 'ReleaseDeposit'; params: { account: AccountId32; block: number } }
|
|
9885
|
+
/**
|
|
9886
|
+
* Force to release a deposit for an account that entered safe-mode at a given
|
|
9887
|
+
* historical block.
|
|
9888
|
+
*
|
|
9889
|
+
* This can be called while safe-mode is still entered.
|
|
9890
|
+
*
|
|
9891
|
+
* Emits a [`Event::DepositReleased`] event on success.
|
|
9892
|
+
* Errors with [`Error::Entered`] if safe-mode is entered.
|
|
9893
|
+
* Errors with [`Error::NoDeposit`] if the payee has no reserved currency at the
|
|
9894
|
+
* specified block.
|
|
9895
|
+
*
|
|
9896
|
+
* Can only be called by the [`Config::ForceDepositOrigin`] origin.
|
|
9897
|
+
**/
|
|
9898
|
+
| { name: 'ForceReleaseDeposit'; params: { account: AccountId32; block: number } };
|
|
9899
|
+
|
|
9900
|
+
export type PalletSafeModeCallLike =
|
|
9901
|
+
/**
|
|
9902
|
+
* Enter safe-mode permissionlessly for [`Config::EnterDuration`] blocks.
|
|
9903
|
+
*
|
|
9904
|
+
* Reserves [`Config::EnterDepositAmount`] from the caller's account.
|
|
9905
|
+
* Emits an [`Event::Entered`] event on success.
|
|
9906
|
+
* Errors with [`Error::Entered`] if the safe-mode is already entered.
|
|
9907
|
+
* Errors with [`Error::NotConfigured`] if the deposit amount is `None`.
|
|
9908
|
+
**/
|
|
9909
|
+
| { name: 'Enter' }
|
|
9910
|
+
/**
|
|
9911
|
+
* Enter safe-mode by force for a per-origin configured number of blocks.
|
|
9912
|
+
*
|
|
9913
|
+
* Emits an [`Event::Entered`] event on success.
|
|
9914
|
+
* Errors with [`Error::Entered`] if the safe-mode is already entered.
|
|
9915
|
+
*
|
|
9916
|
+
* Can only be called by the [`Config::ForceEnterOrigin`] origin.
|
|
9917
|
+
**/
|
|
9918
|
+
| { name: 'ForceEnter' }
|
|
9919
|
+
/**
|
|
9920
|
+
* Extend the safe-mode permissionlessly for [`Config::ExtendDuration`] blocks.
|
|
9921
|
+
*
|
|
9922
|
+
* This accumulates on top of the current remaining duration.
|
|
9923
|
+
* Reserves [`Config::ExtendDepositAmount`] from the caller's account.
|
|
9924
|
+
* Emits an [`Event::Extended`] event on success.
|
|
9925
|
+
* Errors with [`Error::Exited`] if the safe-mode is entered.
|
|
9926
|
+
* Errors with [`Error::NotConfigured`] if the deposit amount is `None`.
|
|
9927
|
+
*
|
|
9928
|
+
* This may be called by any signed origin with [`Config::ExtendDepositAmount`] free
|
|
9929
|
+
* currency to reserve. This call can be disabled for all origins by configuring
|
|
9930
|
+
* [`Config::ExtendDepositAmount`] to `None`.
|
|
9931
|
+
**/
|
|
9932
|
+
| { name: 'Extend' }
|
|
9933
|
+
/**
|
|
9934
|
+
* Extend the safe-mode by force for a per-origin configured number of blocks.
|
|
9935
|
+
*
|
|
9936
|
+
* Emits an [`Event::Extended`] event on success.
|
|
9937
|
+
* Errors with [`Error::Exited`] if the safe-mode is inactive.
|
|
9938
|
+
*
|
|
9939
|
+
* Can only be called by the [`Config::ForceExtendOrigin`] origin.
|
|
9940
|
+
**/
|
|
9941
|
+
| { name: 'ForceExtend' }
|
|
9942
|
+
/**
|
|
9943
|
+
* Exit safe-mode by force.
|
|
9944
|
+
*
|
|
9945
|
+
* Emits an [`Event::Exited`] with [`ExitReason::Force`] event on success.
|
|
9946
|
+
* Errors with [`Error::Exited`] if the safe-mode is inactive.
|
|
9947
|
+
*
|
|
9948
|
+
* Note: `safe-mode` will be automatically deactivated by [`Pallet::on_initialize`] hook
|
|
9949
|
+
* after the block height is greater than the [`EnteredUntil`] storage item.
|
|
9950
|
+
* Emits an [`Event::Exited`] with [`ExitReason::Timeout`] event when deactivated in the
|
|
9951
|
+
* hook.
|
|
9952
|
+
**/
|
|
9953
|
+
| { name: 'ForceExit' }
|
|
9954
|
+
/**
|
|
9955
|
+
* Slash a deposit for an account that entered or extended safe-mode at a given
|
|
9956
|
+
* historical block.
|
|
9957
|
+
*
|
|
9958
|
+
* This can only be called while safe-mode is entered.
|
|
9959
|
+
*
|
|
9960
|
+
* Emits a [`Event::DepositSlashed`] event on success.
|
|
9961
|
+
* Errors with [`Error::Entered`] if safe-mode is entered.
|
|
9962
|
+
*
|
|
9963
|
+
* Can only be called by the [`Config::ForceDepositOrigin`] origin.
|
|
9964
|
+
**/
|
|
9965
|
+
| { name: 'ForceSlashDeposit'; params: { account: AccountId32Like; block: number } }
|
|
9966
|
+
/**
|
|
9967
|
+
* Permissionlessly release a deposit for an account that entered safe-mode at a
|
|
9968
|
+
* given historical block.
|
|
9969
|
+
*
|
|
9970
|
+
* The call can be completely disabled by setting [`Config::ReleaseDelay`] to `None`.
|
|
9971
|
+
* This cannot be called while safe-mode is entered and not until
|
|
9972
|
+
* [`Config::ReleaseDelay`] blocks have passed since safe-mode was entered.
|
|
9973
|
+
*
|
|
9974
|
+
* Emits a [`Event::DepositReleased`] event on success.
|
|
9975
|
+
* Errors with [`Error::Entered`] if the safe-mode is entered.
|
|
9976
|
+
* Errors with [`Error::CannotReleaseYet`] if [`Config::ReleaseDelay`] block have not
|
|
9977
|
+
* passed since safe-mode was entered. Errors with [`Error::NoDeposit`] if the payee has no
|
|
9978
|
+
* reserved currency at the block specified.
|
|
9979
|
+
**/
|
|
9980
|
+
| { name: 'ReleaseDeposit'; params: { account: AccountId32Like; block: number } }
|
|
9981
|
+
/**
|
|
9982
|
+
* Force to release a deposit for an account that entered safe-mode at a given
|
|
9983
|
+
* historical block.
|
|
9984
|
+
*
|
|
9985
|
+
* This can be called while safe-mode is still entered.
|
|
9986
|
+
*
|
|
9987
|
+
* Emits a [`Event::DepositReleased`] event on success.
|
|
9988
|
+
* Errors with [`Error::Entered`] if safe-mode is entered.
|
|
9989
|
+
* Errors with [`Error::NoDeposit`] if the payee has no reserved currency at the
|
|
9990
|
+
* specified block.
|
|
9991
|
+
*
|
|
9992
|
+
* Can only be called by the [`Config::ForceDepositOrigin`] origin.
|
|
9993
|
+
**/
|
|
9994
|
+
| { name: 'ForceReleaseDeposit'; params: { account: AccountId32Like; block: number } };
|
|
9995
|
+
|
|
9996
|
+
/**
|
|
9997
|
+
* Contains a variant per dispatchable extrinsic that this pallet has.
|
|
9998
|
+
**/
|
|
9999
|
+
export type PalletTxPauseCall =
|
|
10000
|
+
/**
|
|
10001
|
+
* Pause a call.
|
|
10002
|
+
*
|
|
10003
|
+
* Can only be called by [`Config::PauseOrigin`].
|
|
10004
|
+
* Emits an [`Event::CallPaused`] event on success.
|
|
10005
|
+
**/
|
|
10006
|
+
| { name: 'Pause'; params: { fullName: [Bytes, Bytes] } }
|
|
10007
|
+
/**
|
|
10008
|
+
* Un-pause a call.
|
|
10009
|
+
*
|
|
10010
|
+
* Can only be called by [`Config::UnpauseOrigin`].
|
|
10011
|
+
* Emits an [`Event::CallUnpaused`] event on success.
|
|
10012
|
+
**/
|
|
10013
|
+
| { name: 'Unpause'; params: { ident: [Bytes, Bytes] } };
|
|
10014
|
+
|
|
10015
|
+
export type PalletTxPauseCallLike =
|
|
10016
|
+
/**
|
|
10017
|
+
* Pause a call.
|
|
10018
|
+
*
|
|
10019
|
+
* Can only be called by [`Config::PauseOrigin`].
|
|
10020
|
+
* Emits an [`Event::CallPaused`] event on success.
|
|
10021
|
+
**/
|
|
10022
|
+
| { name: 'Pause'; params: { fullName: [BytesLike, BytesLike] } }
|
|
10023
|
+
/**
|
|
10024
|
+
* Un-pause a call.
|
|
10025
|
+
*
|
|
10026
|
+
* Can only be called by [`Config::UnpauseOrigin`].
|
|
10027
|
+
* Emits an [`Event::CallUnpaused`] event on success.
|
|
10028
|
+
**/
|
|
10029
|
+
| { name: 'Unpause'; params: { ident: [BytesLike, BytesLike] } };
|
|
10030
|
+
|
|
9723
10031
|
/**
|
|
9724
10032
|
* Contains a variant per dispatchable extrinsic that this pallet has.
|
|
9725
10033
|
**/
|
|
@@ -10257,7 +10565,8 @@ export type AstarRuntimeRuntimeHoldReason =
|
|
|
10257
10565
|
| { type: 'Preimage'; value: PalletPreimageHoldReason }
|
|
10258
10566
|
| { type: 'Council'; value: PalletCollectiveHoldReason }
|
|
10259
10567
|
| { type: 'TechnicalCommittee'; value: PalletCollectiveHoldReason }
|
|
10260
|
-
| { type: 'CommunityCouncil'; value: PalletCollectiveHoldReason }
|
|
10568
|
+
| { type: 'CommunityCouncil'; value: PalletCollectiveHoldReason }
|
|
10569
|
+
| { type: 'SafeMode'; value: PalletSafeModeHoldReason };
|
|
10261
10570
|
|
|
10262
10571
|
export type PalletContractsHoldReason = 'CodeUploadDepositReserve' | 'StorageDepositReserve';
|
|
10263
10572
|
|
|
@@ -10265,6 +10574,8 @@ export type PalletPreimageHoldReason = 'Preimage';
|
|
|
10265
10574
|
|
|
10266
10575
|
export type PalletCollectiveHoldReason = 'ProposalSubmission';
|
|
10267
10576
|
|
|
10577
|
+
export type PalletSafeModeHoldReason = 'EnterOrExtend';
|
|
10578
|
+
|
|
10268
10579
|
export type FrameSupportTokensMiscIdAmountRuntimeFreezeReason = { id: AstarRuntimeRuntimeFreezeReason; amount: bigint };
|
|
10269
10580
|
|
|
10270
10581
|
export type AstarRuntimeRuntimeFreezeReason = { type: 'DappStaking'; value: PalletDappStakingFreezeReason };
|
|
@@ -10795,6 +11106,10 @@ export type PalletCollatorSelectionError =
|
|
|
10795
11106
|
* User is already an Invulnerable
|
|
10796
11107
|
**/
|
|
10797
11108
|
| 'AlreadyInvulnerable'
|
|
11109
|
+
/**
|
|
11110
|
+
* User is not an Invulnerable
|
|
11111
|
+
**/
|
|
11112
|
+
| 'NotInvulnerable'
|
|
10798
11113
|
/**
|
|
10799
11114
|
* Account has no associated validator ID
|
|
10800
11115
|
**/
|
|
@@ -11859,6 +12174,57 @@ export type PalletTreasuryError =
|
|
|
11859
12174
|
**/
|
|
11860
12175
|
| 'ProposalNotApproved';
|
|
11861
12176
|
|
|
12177
|
+
/**
|
|
12178
|
+
* The `Error` enum of this pallet.
|
|
12179
|
+
**/
|
|
12180
|
+
export type PalletSafeModeError =
|
|
12181
|
+
/**
|
|
12182
|
+
* The safe-mode is (already or still) entered.
|
|
12183
|
+
**/
|
|
12184
|
+
| 'Entered'
|
|
12185
|
+
/**
|
|
12186
|
+
* The safe-mode is (already or still) exited.
|
|
12187
|
+
**/
|
|
12188
|
+
| 'Exited'
|
|
12189
|
+
/**
|
|
12190
|
+
* This functionality of the pallet is disabled by the configuration.
|
|
12191
|
+
**/
|
|
12192
|
+
| 'NotConfigured'
|
|
12193
|
+
/**
|
|
12194
|
+
* There is no balance reserved.
|
|
12195
|
+
**/
|
|
12196
|
+
| 'NoDeposit'
|
|
12197
|
+
/**
|
|
12198
|
+
* The account already has a deposit reserved and can therefore not enter or extend again.
|
|
12199
|
+
**/
|
|
12200
|
+
| 'AlreadyDeposited'
|
|
12201
|
+
/**
|
|
12202
|
+
* This deposit cannot be released yet.
|
|
12203
|
+
**/
|
|
12204
|
+
| 'CannotReleaseYet'
|
|
12205
|
+
/**
|
|
12206
|
+
* An error from the underlying `Currency`.
|
|
12207
|
+
**/
|
|
12208
|
+
| 'CurrencyError';
|
|
12209
|
+
|
|
12210
|
+
/**
|
|
12211
|
+
* The `Error` enum of this pallet.
|
|
12212
|
+
**/
|
|
12213
|
+
export type PalletTxPauseError =
|
|
12214
|
+
/**
|
|
12215
|
+
* The call is paused.
|
|
12216
|
+
**/
|
|
12217
|
+
| 'IsPaused'
|
|
12218
|
+
/**
|
|
12219
|
+
* The call is unpaused.
|
|
12220
|
+
**/
|
|
12221
|
+
| 'IsUnpaused'
|
|
12222
|
+
/**
|
|
12223
|
+
* The call is whitelisted and cannot be paused.
|
|
12224
|
+
**/
|
|
12225
|
+
| 'Unpausable'
|
|
12226
|
+
| 'NotFound';
|
|
12227
|
+
|
|
11862
12228
|
/**
|
|
11863
12229
|
* The `Error` enum of this pallet.
|
|
11864
12230
|
**/
|
|
@@ -12094,4 +12460,6 @@ export type AstarRuntimeRuntimeError =
|
|
|
12094
12460
|
| { pallet: 'Democracy'; palletError: PalletDemocracyError }
|
|
12095
12461
|
| { pallet: 'Treasury'; palletError: PalletTreasuryError }
|
|
12096
12462
|
| { pallet: 'CommunityTreasury'; palletError: PalletTreasuryError }
|
|
12463
|
+
| { pallet: 'SafeMode'; palletError: PalletSafeModeError }
|
|
12464
|
+
| { pallet: 'TxPause'; palletError: PalletTxPauseError }
|
|
12097
12465
|
| { pallet: 'MultiBlockMigrations'; palletError: PalletMigrationsError };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dedot/chaintypes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.136.0",
|
|
4
4
|
"description": "Types for substrate-based chains",
|
|
5
5
|
"author": "Thang X. Vu <thang@dedot.dev>",
|
|
6
6
|
"homepage": "https://dedot.dev",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"directory": "dist"
|
|
26
26
|
},
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "6a42607c56509d00cb6ce88bbe9a25ad76b734b8",
|
|
29
29
|
"module": "./index.js",
|
|
30
30
|
"types": "./index.d.ts",
|
|
31
31
|
"exports": {
|