Skip to content

Commit 13ce268

Browse files
Update Rust/TS bindings (#3424)
* Update Rust/TS bindings * trigger checks --------- Co-authored-by: RomarQ <[email protected]> Co-authored-by: Rodrigo Quelhas <[email protected]>
1 parent 9a4b53c commit 13ce268

21 files changed

+1688
-2852
lines changed

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,6 @@ export type __AugmentedError<ApiType extends ApiTypes> = AugmentedError<ApiType>
1111

1212
declare module "@polkadot/api-base/types/errors" {
1313
interface AugmentedErrors<ApiType extends ApiTypes> {
14-
assetManager: {
15-
AssetAlreadyExists: AugmentedError<ApiType>;
16-
AssetDoesNotExist: AugmentedError<ApiType>;
17-
ErrorCreatingAsset: AugmentedError<ApiType>;
18-
ErrorDestroyingAsset: AugmentedError<ApiType>;
19-
LocalAssetLimitReached: AugmentedError<ApiType>;
20-
NonExistentLocalAsset: AugmentedError<ApiType>;
21-
NotSufficientDeposit: AugmentedError<ApiType>;
22-
TooLowNumAssetsWeightHint: AugmentedError<ApiType>;
23-
/**
24-
* Generic error
25-
**/
26-
[key: string]: AugmentedError<ApiType>;
27-
};
2814
assets: {
2915
/**
3016
* The asset-account already exists.

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

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,9 @@ import type {
3232
FrameSupportTokensFungibleUnionOfNativeOrWithId,
3333
FrameSupportTokensMiscBalanceStatus,
3434
FrameSystemDispatchEventInfo,
35-
MoonbaseRuntimeAssetConfigAssetRegistrarMetadata,
3635
MoonbaseRuntimeProxyType,
3736
MoonbaseRuntimeRuntimeParamsRuntimeParametersKey,
3837
MoonbaseRuntimeRuntimeParamsRuntimeParametersValue,
39-
MoonbaseRuntimeXcmConfigAssetType,
4038
NimbusPrimitivesNimbusCryptoPublic,
4139
PalletConvictionVotingTally,
4240
PalletConvictionVotingVoteAccountVote,
@@ -66,68 +64,6 @@ export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>
6664

6765
declare module "@polkadot/api-base/types/events" {
6866
interface AugmentedEvents<ApiType extends ApiTypes> {
69-
assetManager: {
70-
/**
71-
* Removed all information related to an assetId and destroyed asset
72-
**/
73-
ForeignAssetDestroyed: AugmentedEvent<
74-
ApiType,
75-
[assetId: u128, assetType: MoonbaseRuntimeXcmConfigAssetType],
76-
{ assetId: u128; assetType: MoonbaseRuntimeXcmConfigAssetType }
77-
>;
78-
/**
79-
* New asset with the asset manager is registered
80-
**/
81-
ForeignAssetRegistered: AugmentedEvent<
82-
ApiType,
83-
[
84-
assetId: u128,
85-
asset: MoonbaseRuntimeXcmConfigAssetType,
86-
metadata: MoonbaseRuntimeAssetConfigAssetRegistrarMetadata
87-
],
88-
{
89-
assetId: u128;
90-
asset: MoonbaseRuntimeXcmConfigAssetType;
91-
metadata: MoonbaseRuntimeAssetConfigAssetRegistrarMetadata;
92-
}
93-
>;
94-
/**
95-
* Removed all information related to an assetId
96-
**/
97-
ForeignAssetRemoved: AugmentedEvent<
98-
ApiType,
99-
[assetId: u128, assetType: MoonbaseRuntimeXcmConfigAssetType],
100-
{ assetId: u128; assetType: MoonbaseRuntimeXcmConfigAssetType }
101-
>;
102-
/**
103-
* Changed the xcm type mapping for a given asset id
104-
**/
105-
ForeignAssetXcmLocationChanged: AugmentedEvent<
106-
ApiType,
107-
[assetId: u128, newAssetType: MoonbaseRuntimeXcmConfigAssetType],
108-
{ assetId: u128; newAssetType: MoonbaseRuntimeXcmConfigAssetType }
109-
>;
110-
/**
111-
* Removed all information related to an assetId and destroyed asset
112-
**/
113-
LocalAssetDestroyed: AugmentedEvent<ApiType, [assetId: u128], { assetId: u128 }>;
114-
/**
115-
* Supported asset type for fee payment removed
116-
**/
117-
SupportedAssetRemoved: AugmentedEvent<
118-
ApiType,
119-
[assetType: MoonbaseRuntimeXcmConfigAssetType],
120-
{ assetType: MoonbaseRuntimeXcmConfigAssetType }
121-
>;
122-
/**
123-
* Changed the amount of units we are charging per execution second for a given asset
124-
**/
125-
UnitsPerSecondChanged: AugmentedEvent<ApiType, []>;
126-
/**
127-
* Generic event
128-
**/
129-
[key: string]: AugmentedEvent<ApiType>;
130-
};
13167
assets: {
13268
/**
13369
* Accounts were destroyed for given asset.

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

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ import type {
5353
MoonbaseRuntimeRuntimeHoldReason,
5454
MoonbaseRuntimeRuntimeParamsRuntimeParametersKey,
5555
MoonbaseRuntimeRuntimeParamsRuntimeParametersValue,
56-
MoonbaseRuntimeXcmConfigAssetType,
5756
NimbusPrimitivesNimbusCryptoPublic,
5857
PalletAssetsApproval,
5958
PalletAssetsAssetAccount,
@@ -130,38 +129,6 @@ export type __QueryableStorageEntry<ApiType extends ApiTypes> = QueryableStorage
130129

131130
declare module "@polkadot/api-base/types/storage" {
132131
interface AugmentedQueries<ApiType extends ApiTypes> {
133-
assetManager: {
134-
/**
135-
* Mapping from an asset id to asset type.
136-
* This is mostly used when receiving transaction specifying an asset directly,
137-
* like transferring an asset from this chain to another.
138-
**/
139-
assetIdType: AugmentedQuery<
140-
ApiType,
141-
(
142-
arg: u128 | AnyNumber | Uint8Array
143-
) => Observable<Option<MoonbaseRuntimeXcmConfigAssetType>>,
144-
[u128]
145-
> &
146-
QueryableStorageEntry<ApiType, [u128]>;
147-
/**
148-
* Reverse mapping of AssetIdType. Mapping from an asset type to an asset id.
149-
* This is mostly used when receiving a multilocation XCM message to retrieve
150-
* the corresponding asset in which tokens should me minted.
151-
**/
152-
assetTypeId: AugmentedQuery<
153-
ApiType,
154-
(
155-
arg: MoonbaseRuntimeXcmConfigAssetType | { Xcm: any } | string | Uint8Array
156-
) => Observable<Option<u128>>,
157-
[MoonbaseRuntimeXcmConfigAssetType]
158-
> &
159-
QueryableStorageEntry<ApiType, [MoonbaseRuntimeXcmConfigAssetType]>;
160-
/**
161-
* Generic query
162-
**/
163-
[key: string]: QueryableStorageEntry<ApiType>;
164-
};
165132
assets: {
166133
/**
167134
* The holdings of a specific account for a specific asset.

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

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,9 @@ import type {
4545
FrameSupportPreimagesBounded,
4646
FrameSupportScheduleDispatchTime,
4747
FrameSupportTokensFungibleUnionOfNativeOrWithId,
48-
MoonbaseRuntimeAssetConfigAssetRegistrarMetadata,
4948
MoonbaseRuntimeOriginCaller,
5049
MoonbaseRuntimeProxyType,
5150
MoonbaseRuntimeRuntimeParamsRuntimeParameters,
52-
MoonbaseRuntimeXcmConfigAssetType,
5351
MoonbaseRuntimeXcmConfigTransactors,
5452
NimbusPrimitivesNimbusCryptoPublic,
5553
PalletBalancesAdjustmentDirection,
@@ -84,69 +82,6 @@ export type __SubmittableExtrinsicFunction<ApiType extends ApiTypes> =
8482

8583
declare module "@polkadot/api-base/types/submittable" {
8684
interface AugmentedSubmittables<ApiType extends ApiTypes> {
87-
assetManager: {
88-
/**
89-
* Change the xcm type mapping for a given assetId
90-
* We also change this if the previous units per second where pointing at the old
91-
* assetType
92-
**/
93-
changeExistingAssetType: AugmentedSubmittable<
94-
(
95-
assetId: u128 | AnyNumber | Uint8Array,
96-
newAssetType: MoonbaseRuntimeXcmConfigAssetType | { Xcm: any } | string | Uint8Array,
97-
numAssetsWeightHint: u32 | AnyNumber | Uint8Array
98-
) => SubmittableExtrinsic<ApiType>,
99-
[u128, MoonbaseRuntimeXcmConfigAssetType, u32]
100-
>;
101-
/**
102-
* Destroy a given foreign assetId
103-
* The weight in this case is the one returned by the trait
104-
* plus the db writes and reads from removing all the associated
105-
* data
106-
**/
107-
destroyForeignAsset: AugmentedSubmittable<
108-
(
109-
assetId: u128 | AnyNumber | Uint8Array,
110-
numAssetsWeightHint: u32 | AnyNumber | Uint8Array
111-
) => SubmittableExtrinsic<ApiType>,
112-
[u128, u32]
113-
>;
114-
/**
115-
* Register new asset with the asset manager
116-
**/
117-
registerForeignAsset: AugmentedSubmittable<
118-
(
119-
asset: MoonbaseRuntimeXcmConfigAssetType | { Xcm: any } | string | Uint8Array,
120-
metadata:
121-
| MoonbaseRuntimeAssetConfigAssetRegistrarMetadata
122-
| { name?: any; symbol?: any; decimals?: any; isFrozen?: any }
123-
| string
124-
| Uint8Array,
125-
minAmount: u128 | AnyNumber | Uint8Array,
126-
isSufficient: bool | boolean | Uint8Array
127-
) => SubmittableExtrinsic<ApiType>,
128-
[
129-
MoonbaseRuntimeXcmConfigAssetType,
130-
MoonbaseRuntimeAssetConfigAssetRegistrarMetadata,
131-
u128,
132-
bool
133-
]
134-
>;
135-
/**
136-
* Remove a given assetId -> assetType association
137-
**/
138-
removeExistingAssetType: AugmentedSubmittable<
139-
(
140-
assetId: u128 | AnyNumber | Uint8Array,
141-
numAssetsWeightHint: u32 | AnyNumber | Uint8Array
142-
) => SubmittableExtrinsic<ApiType>,
143-
[u128, u32]
144-
>;
145-
/**
146-
* Generic tx
147-
**/
148-
[key: string]: SubmittableExtrinsicFunction<ApiType>;
149-
};
15085
assets: {
15186
/**
15287
* Approve an amount of asset for transfer by a delegated third-party account.

0 commit comments

Comments
 (0)