Skip to content

Commit 752aec7

Browse files
committed
update ts-api
1 parent 2471d5c commit 752aec7

26 files changed

+12463
-13324
lines changed

typescript-api/src/moonbase/interfaces/augment-api-consts.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import "@polkadot/api-base/types/consts";
77

88
import type { ApiTypes, AugmentedConst } from "@polkadot/api-base/types";
9-
import type { Bytes, Null, Option, Vec, u128, u16, u32, u64, u8 } from "@polkadot/types-codec";
9+
import type { Bytes, Option, Vec, u128, u16, u32, u64, u8 } from "@polkadot/types-codec";
1010
import type { Codec, ITuple } from "@polkadot/types-codec/types";
1111
import type { Perbill, Permill } from "@polkadot/types/interfaces/runtime";
1212
import type {
@@ -501,19 +501,5 @@ declare module "@polkadot/api-base/types/consts" {
501501
/** Generic const */
502502
[key: string]: Codec;
503503
};
504-
xTokens: {
505-
/**
506-
* Base XCM weight.
507-
*
508-
* The actually weight for an XCM message is `T::BaseXcmWeight + T::Weigher::weight(&msg)`.
509-
*/
510-
baseXcmWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
511-
/** The id of the RateLimiter. */
512-
rateLimiterId: Null & AugmentedConst<ApiType>;
513-
/** Self chain location. */
514-
selfLocation: StagingXcmV4Location & AugmentedConst<ApiType>;
515-
/** Generic const */
516-
[key: string]: Codec;
517-
};
518504
} // AugmentedConsts
519505
} // declare module

typescript-api/src/moonbase/interfaces/augment-api-errors.ts

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,12 @@ declare module "@polkadot/api-base/types/errors" {
732732
/** Generic error */
733733
[key: string]: AugmentedError<ApiType>;
734734
};
735+
sudo: {
736+
/** Sender must be the Sudo account. */
737+
RequireSudo: AugmentedError<ApiType>;
738+
/** Generic error */
739+
[key: string]: AugmentedError<ApiType>;
740+
};
735741
system: {
736742
/** The origin filter prevent the call to be dispatched. */
737743
CallFiltered: AugmentedError<ApiType>;
@@ -891,49 +897,5 @@ declare module "@polkadot/api-base/types/errors" {
891897
/** Generic error */
892898
[key: string]: AugmentedError<ApiType>;
893899
};
894-
xTokens: {
895-
/** Asset has no reserve location. */
896-
AssetHasNoReserve: AugmentedError<ApiType>;
897-
/** The specified index does not exist in a Assets struct. */
898-
AssetIndexNonExistent: AugmentedError<ApiType>;
899-
/** The version of the `Versioned` value used is not able to be interpreted. */
900-
BadVersion: AugmentedError<ApiType>;
901-
/** Could not re-anchor the assets to declare the fees for the destination chain. */
902-
CannotReanchor: AugmentedError<ApiType>;
903-
/** The destination `Location` provided cannot be inverted. */
904-
DestinationNotInvertible: AugmentedError<ApiType>;
905-
/** We tried sending distinct asset and fee but they have different reserve chains. */
906-
DistinctReserveForAssetAndFee: AugmentedError<ApiType>;
907-
/** Fee is not enough. */
908-
FeeNotEnough: AugmentedError<ApiType>;
909-
/** Could not get ancestry of asset reserve location. */
910-
InvalidAncestry: AugmentedError<ApiType>;
911-
/** The Asset is invalid. */
912-
InvalidAsset: AugmentedError<ApiType>;
913-
/** Invalid transfer destination. */
914-
InvalidDest: AugmentedError<ApiType>;
915-
/** MinXcmFee not registered for certain reserve location */
916-
MinXcmFeeNotDefined: AugmentedError<ApiType>;
917-
/** Not cross-chain transfer. */
918-
NotCrossChainTransfer: AugmentedError<ApiType>;
919-
/** Currency is not cross-chain transferable. */
920-
NotCrossChainTransferableCurrency: AugmentedError<ApiType>;
921-
/** Not supported Location */
922-
NotSupportedLocation: AugmentedError<ApiType>;
923-
/** Asset transfer is limited by RateLimiter. */
924-
RateLimited: AugmentedError<ApiType>;
925-
/** The number of assets to be sent is over the maximum. */
926-
TooManyAssetsBeingSent: AugmentedError<ApiType>;
927-
/** The message's weight could not be determined. */
928-
UnweighableMessage: AugmentedError<ApiType>;
929-
/** XCM execution failed. */
930-
XcmExecutionFailed: AugmentedError<ApiType>;
931-
/** The transfering asset amount is zero. */
932-
ZeroAmount: AugmentedError<ApiType>;
933-
/** The fee is zero. */
934-
ZeroFee: AugmentedError<ApiType>;
935-
/** Generic error */
936-
[key: string]: AugmentedError<ApiType>;
937-
};
938900
} // AugmentedErrors
939901
} // declare module

typescript-api/src/moonbase/interfaces/augment-api-events.ts

Lines changed: 53 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ import type {
3030
FrameSupportMessagesProcessMessageError,
3131
FrameSupportPreimagesBounded,
3232
FrameSupportTokensMiscBalanceStatus,
33-
MoonriverRuntimeAssetConfigAssetRegistrarMetadata,
34-
MoonriverRuntimeProxyType,
35-
MoonriverRuntimeRuntimeParamsRuntimeParametersKey,
36-
MoonriverRuntimeRuntimeParamsRuntimeParametersValue,
37-
MoonriverRuntimeXcmConfigAssetType,
33+
MoonbaseRuntimeAssetConfigAssetRegistrarMetadata,
34+
MoonbaseRuntimeProxyType,
35+
MoonbaseRuntimeRuntimeParamsRuntimeParametersKey,
36+
MoonbaseRuntimeRuntimeParamsRuntimeParametersValue,
37+
MoonbaseRuntimeXcmConfigAssetType,
3838
NimbusPrimitivesNimbusCryptoPublic,
3939
PalletConvictionVotingTally,
4040
PalletMultisigTimepoint,
@@ -47,7 +47,6 @@ import type {
4747
SpRuntimeDispatchError,
4848
SpRuntimeDispatchErrorWithPostInfo,
4949
SpWeightsWeightV2Weight,
50-
StagingXcmV4Asset,
5150
StagingXcmV4AssetAssets,
5251
StagingXcmV4Location,
5352
StagingXcmV4Response,
@@ -66,42 +65,42 @@ declare module "@polkadot/api-base/types/events" {
6665
/** Removed all information related to an assetId and destroyed asset */
6766
ForeignAssetDestroyed: AugmentedEvent<
6867
ApiType,
69-
[assetId: u128, assetType: MoonriverRuntimeXcmConfigAssetType],
70-
{ assetId: u128; assetType: MoonriverRuntimeXcmConfigAssetType }
68+
[assetId: u128, assetType: MoonbaseRuntimeXcmConfigAssetType],
69+
{ assetId: u128; assetType: MoonbaseRuntimeXcmConfigAssetType }
7170
>;
7271
/** New asset with the asset manager is registered */
7372
ForeignAssetRegistered: AugmentedEvent<
7473
ApiType,
7574
[
7675
assetId: u128,
77-
asset: MoonriverRuntimeXcmConfigAssetType,
78-
metadata: MoonriverRuntimeAssetConfigAssetRegistrarMetadata
76+
asset: MoonbaseRuntimeXcmConfigAssetType,
77+
metadata: MoonbaseRuntimeAssetConfigAssetRegistrarMetadata
7978
],
8079
{
8180
assetId: u128;
82-
asset: MoonriverRuntimeXcmConfigAssetType;
83-
metadata: MoonriverRuntimeAssetConfigAssetRegistrarMetadata;
81+
asset: MoonbaseRuntimeXcmConfigAssetType;
82+
metadata: MoonbaseRuntimeAssetConfigAssetRegistrarMetadata;
8483
}
8584
>;
8685
/** Removed all information related to an assetId */
8786
ForeignAssetRemoved: AugmentedEvent<
8887
ApiType,
89-
[assetId: u128, assetType: MoonriverRuntimeXcmConfigAssetType],
90-
{ assetId: u128; assetType: MoonriverRuntimeXcmConfigAssetType }
88+
[assetId: u128, assetType: MoonbaseRuntimeXcmConfigAssetType],
89+
{ assetId: u128; assetType: MoonbaseRuntimeXcmConfigAssetType }
9190
>;
9291
/** Changed the xcm type mapping for a given asset id */
9392
ForeignAssetXcmLocationChanged: AugmentedEvent<
9493
ApiType,
95-
[assetId: u128, newAssetType: MoonriverRuntimeXcmConfigAssetType],
96-
{ assetId: u128; newAssetType: MoonriverRuntimeXcmConfigAssetType }
94+
[assetId: u128, newAssetType: MoonbaseRuntimeXcmConfigAssetType],
95+
{ assetId: u128; newAssetType: MoonbaseRuntimeXcmConfigAssetType }
9796
>;
9897
/** Removed all information related to an assetId and destroyed asset */
9998
LocalAssetDestroyed: AugmentedEvent<ApiType, [assetId: u128], { assetId: u128 }>;
10099
/** Supported asset type for fee payment removed */
101100
SupportedAssetRemoved: AugmentedEvent<
102101
ApiType,
103-
[assetType: MoonriverRuntimeXcmConfigAssetType],
104-
{ assetType: MoonriverRuntimeXcmConfigAssetType }
102+
[assetType: MoonbaseRuntimeXcmConfigAssetType],
103+
{ assetType: MoonbaseRuntimeXcmConfigAssetType }
105104
>;
106105
/** Changed the amount of units we are charging per execution second for a given asset */
107106
UnitsPerSecondChanged: AugmentedEvent<ApiType, []>;
@@ -1227,14 +1226,14 @@ declare module "@polkadot/api-base/types/events" {
12271226
Updated: AugmentedEvent<
12281227
ApiType,
12291228
[
1230-
key: MoonriverRuntimeRuntimeParamsRuntimeParametersKey,
1231-
oldValue: Option<MoonriverRuntimeRuntimeParamsRuntimeParametersValue>,
1232-
newValue: Option<MoonriverRuntimeRuntimeParamsRuntimeParametersValue>
1229+
key: MoonbaseRuntimeRuntimeParamsRuntimeParametersKey,
1230+
oldValue: Option<MoonbaseRuntimeRuntimeParamsRuntimeParametersValue>,
1231+
newValue: Option<MoonbaseRuntimeRuntimeParamsRuntimeParametersValue>
12331232
],
12341233
{
1235-
key: MoonriverRuntimeRuntimeParamsRuntimeParametersKey;
1236-
oldValue: Option<MoonriverRuntimeRuntimeParamsRuntimeParametersValue>;
1237-
newValue: Option<MoonriverRuntimeRuntimeParamsRuntimeParametersValue>;
1234+
key: MoonbaseRuntimeRuntimeParamsRuntimeParametersKey;
1235+
oldValue: Option<MoonbaseRuntimeRuntimeParamsRuntimeParametersValue>;
1236+
newValue: Option<MoonbaseRuntimeRuntimeParamsRuntimeParametersValue>;
12381237
}
12391238
>;
12401239
/** Generic event */
@@ -1512,13 +1511,13 @@ declare module "@polkadot/api-base/types/events" {
15121511
[
15131512
delegator: AccountId20,
15141513
delegatee: AccountId20,
1515-
proxyType: MoonriverRuntimeProxyType,
1514+
proxyType: MoonbaseRuntimeProxyType,
15161515
delay: u32
15171516
],
15181517
{
15191518
delegator: AccountId20;
15201519
delegatee: AccountId20;
1521-
proxyType: MoonriverRuntimeProxyType;
1520+
proxyType: MoonbaseRuntimeProxyType;
15221521
delay: u32;
15231522
}
15241523
>;
@@ -1534,13 +1533,13 @@ declare module "@polkadot/api-base/types/events" {
15341533
[
15351534
delegator: AccountId20,
15361535
delegatee: AccountId20,
1537-
proxyType: MoonriverRuntimeProxyType,
1536+
proxyType: MoonbaseRuntimeProxyType,
15381537
delay: u32
15391538
],
15401539
{
15411540
delegator: AccountId20;
15421541
delegatee: AccountId20;
1543-
proxyType: MoonriverRuntimeProxyType;
1542+
proxyType: MoonbaseRuntimeProxyType;
15441543
delay: u32;
15451544
}
15461545
>;
@@ -1550,13 +1549,13 @@ declare module "@polkadot/api-base/types/events" {
15501549
[
15511550
pure: AccountId20,
15521551
who: AccountId20,
1553-
proxyType: MoonriverRuntimeProxyType,
1552+
proxyType: MoonbaseRuntimeProxyType,
15541553
disambiguationIndex: u16
15551554
],
15561555
{
15571556
pure: AccountId20;
15581557
who: AccountId20;
1559-
proxyType: MoonriverRuntimeProxyType;
1558+
proxyType: MoonbaseRuntimeProxyType;
15601559
disambiguationIndex: u16;
15611560
}
15621561
>;
@@ -1779,6 +1778,30 @@ declare module "@polkadot/api-base/types/events" {
17791778
/** Generic event */
17801779
[key: string]: AugmentedEvent<ApiType>;
17811780
};
1781+
sudo: {
1782+
/** The sudo key has been updated. */
1783+
KeyChanged: AugmentedEvent<
1784+
ApiType,
1785+
[old: Option<AccountId20>, new_: AccountId20],
1786+
{ old: Option<AccountId20>; new_: AccountId20 }
1787+
>;
1788+
/** The key was permanently removed. */
1789+
KeyRemoved: AugmentedEvent<ApiType, []>;
1790+
/** A sudo call just took place. */
1791+
Sudid: AugmentedEvent<
1792+
ApiType,
1793+
[sudoResult: Result<Null, SpRuntimeDispatchError>],
1794+
{ sudoResult: Result<Null, SpRuntimeDispatchError> }
1795+
>;
1796+
/** A [sudo_as](Pallet::sudo_as) call just took place. */
1797+
SudoAsDone: AugmentedEvent<
1798+
ApiType,
1799+
[sudoResult: Result<Null, SpRuntimeDispatchError>],
1800+
{ sudoResult: Result<Null, SpRuntimeDispatchError> }
1801+
>;
1802+
/** Generic event */
1803+
[key: string]: AugmentedEvent<ApiType>;
1804+
};
17821805
system: {
17831806
/** `:code` was updated. */
17841807
CodeUpdated: AugmentedEvent<ApiType, []>;
@@ -2091,25 +2114,5 @@ declare module "@polkadot/api-base/types/events" {
20912114
/** Generic event */
20922115
[key: string]: AugmentedEvent<ApiType>;
20932116
};
2094-
xTokens: {
2095-
/** Transferred `Asset` with fee. */
2096-
TransferredAssets: AugmentedEvent<
2097-
ApiType,
2098-
[
2099-
sender: AccountId20,
2100-
assets: StagingXcmV4AssetAssets,
2101-
fee: StagingXcmV4Asset,
2102-
dest: StagingXcmV4Location
2103-
],
2104-
{
2105-
sender: AccountId20;
2106-
assets: StagingXcmV4AssetAssets;
2107-
fee: StagingXcmV4Asset;
2108-
dest: StagingXcmV4Location;
2109-
}
2110-
>;
2111-
/** Generic event */
2112-
[key: string]: AugmentedEvent<ApiType>;
2113-
};
21142117
} // AugmentedEvents
21152118
} // declare module

typescript-api/src/moonbase/interfaces/augment-api-query.ts

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ import type {
5050
FrameSystemEventRecord,
5151
FrameSystemLastRuntimeUpgradeInfo,
5252
FrameSystemPhase,
53-
MoonriverRuntimeRuntimeHoldReason,
54-
MoonriverRuntimeRuntimeParamsRuntimeParametersKey,
55-
MoonriverRuntimeRuntimeParamsRuntimeParametersValue,
56-
MoonriverRuntimeXcmConfigAssetType,
53+
MoonbaseRuntimeRuntimeHoldReason,
54+
MoonbaseRuntimeRuntimeParamsRuntimeParametersKey,
55+
MoonbaseRuntimeRuntimeParamsRuntimeParametersValue,
56+
MoonbaseRuntimeXcmConfigAssetType,
5757
NimbusPrimitivesNimbusCryptoPublic,
5858
PalletAssetsApproval,
5959
PalletAssetsAssetAccount,
@@ -138,7 +138,7 @@ declare module "@polkadot/api-base/types/storage" {
138138
ApiType,
139139
(
140140
arg: u128 | AnyNumber | Uint8Array
141-
) => Observable<Option<MoonriverRuntimeXcmConfigAssetType>>,
141+
) => Observable<Option<MoonbaseRuntimeXcmConfigAssetType>>,
142142
[u128]
143143
> &
144144
QueryableStorageEntry<ApiType, [u128]>;
@@ -150,11 +150,11 @@ declare module "@polkadot/api-base/types/storage" {
150150
assetTypeId: AugmentedQuery<
151151
ApiType,
152152
(
153-
arg: MoonriverRuntimeXcmConfigAssetType | { Xcm: any } | string | Uint8Array
153+
arg: MoonbaseRuntimeXcmConfigAssetType | { Xcm: any } | string | Uint8Array
154154
) => Observable<Option<u128>>,
155-
[MoonriverRuntimeXcmConfigAssetType]
155+
[MoonbaseRuntimeXcmConfigAssetType]
156156
> &
157-
QueryableStorageEntry<ApiType, [MoonriverRuntimeXcmConfigAssetType]>;
157+
QueryableStorageEntry<ApiType, [MoonbaseRuntimeXcmConfigAssetType]>;
158158
/** Generic query */
159159
[key: string]: QueryableStorageEntry<ApiType>;
160160
};
@@ -312,7 +312,7 @@ declare module "@polkadot/api-base/types/storage" {
312312
(arg: AccountId20 | string | Uint8Array) => Observable<
313313
Vec<
314314
{
315-
readonly id: MoonriverRuntimeRuntimeHoldReason;
315+
readonly id: MoonbaseRuntimeRuntimeHoldReason;
316316
readonly amount: u128;
317317
} & Struct
318318
>
@@ -1188,15 +1188,15 @@ declare module "@polkadot/api-base/types/storage" {
11881188
ApiType,
11891189
(
11901190
arg:
1191-
| MoonriverRuntimeRuntimeParamsRuntimeParametersKey
1191+
| MoonbaseRuntimeRuntimeParamsRuntimeParametersKey
11921192
| { RuntimeConfig: any }
11931193
| { PalletRandomness: any }
11941194
| string
11951195
| Uint8Array
1196-
) => Observable<Option<MoonriverRuntimeRuntimeParamsRuntimeParametersValue>>,
1197-
[MoonriverRuntimeRuntimeParamsRuntimeParametersKey]
1196+
) => Observable<Option<MoonbaseRuntimeRuntimeParamsRuntimeParametersValue>>,
1197+
[MoonbaseRuntimeRuntimeParamsRuntimeParametersKey]
11981198
> &
1199-
QueryableStorageEntry<ApiType, [MoonriverRuntimeRuntimeParamsRuntimeParametersKey]>;
1199+
QueryableStorageEntry<ApiType, [MoonbaseRuntimeRuntimeParamsRuntimeParametersKey]>;
12001200
/** Generic query */
12011201
[key: string]: QueryableStorageEntry<ApiType>;
12021202
};
@@ -1526,6 +1526,13 @@ declare module "@polkadot/api-base/types/storage" {
15261526
/** Generic query */
15271527
[key: string]: QueryableStorageEntry<ApiType>;
15281528
};
1529+
sudo: {
1530+
/** The `AccountId` of the sudo key. */
1531+
key: AugmentedQuery<ApiType, () => Observable<Option<AccountId20>>, []> &
1532+
QueryableStorageEntry<ApiType, []>;
1533+
/** Generic query */
1534+
[key: string]: QueryableStorageEntry<ApiType>;
1535+
};
15291536
system: {
15301537
/** The full account information for a particular account ID. */
15311538
account: AugmentedQuery<
@@ -1857,9 +1864,5 @@ declare module "@polkadot/api-base/types/storage" {
18571864
/** Generic query */
18581865
[key: string]: QueryableStorageEntry<ApiType>;
18591866
};
1860-
xTokens: {
1861-
/** Generic query */
1862-
[key: string]: QueryableStorageEntry<ApiType>;
1863-
};
18641867
} // AugmentedQueries
18651868
} // declare module

0 commit comments

Comments
 (0)