Skip to content

Commit

Permalink
Update Rust/TS bindings (#3149)
Browse files Browse the repository at this point in the history
* Update Rust/TS bindings

---------

Co-authored-by: RomarQ <[email protected]>
  • Loading branch information
github-actions[bot] and RomarQ authored Jan 22, 2025
1 parent b2b1bde commit 8545c94
Show file tree
Hide file tree
Showing 21 changed files with 984 additions and 930 deletions.
8 changes: 0 additions & 8 deletions typescript-api/src/moonbase/interfaces/augment-api-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -681,10 +681,6 @@ declare module "@polkadot/api-base/types/errors" {
* Contract not exist
**/
ContractNotExist: AugmentedError<ApiType>;
/**
* The key lengths exceeds the maximum allowed
**/
KeyTooLong: AugmentedError<ApiType>;
/**
* The limit cannot be zero
**/
Expand Down Expand Up @@ -1091,10 +1087,6 @@ declare module "@polkadot/api-base/types/errors" {
* Preimage has already been noted on-chain.
**/
AlreadyNoted: AugmentedError<ApiType>;
/**
* No ticket with a cost was returned by [`Config::Consideration`] to store the preimage.
**/
NoCost: AugmentedError<ApiType>;
/**
* The user is not authorized to perform this action.
**/
Expand Down
17 changes: 17 additions & 0 deletions typescript-api/src/moonbase/interfaces/augment-api-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import type {
MoonbaseRuntimeXcmConfigAssetType,
NimbusPrimitivesNimbusCryptoPublic,
PalletConvictionVotingTally,
PalletConvictionVotingVoteAccountVote,
PalletMultisigTimepoint,
PalletParachainStakingDelegationRequestsCancelledScheduledRequest,
PalletParachainStakingDelegatorAdded,
Expand Down Expand Up @@ -581,6 +582,22 @@ declare module "@polkadot/api-base/types/events" {
* An \[account\] has cancelled a previous delegation operation.
**/
Undelegated: AugmentedEvent<ApiType, [AccountId20]>;
/**
* An account that has voted
**/
Voted: AugmentedEvent<
ApiType,
[who: AccountId20, vote: PalletConvictionVotingVoteAccountVote],
{ who: AccountId20; vote: PalletConvictionVotingVoteAccountVote }
>;
/**
* A vote that been removed
**/
VoteRemoved: AugmentedEvent<
ApiType,
[who: AccountId20, vote: PalletConvictionVotingVoteAccountVote],
{ who: AccountId20; vote: PalletConvictionVotingVoteAccountVote }
>;
/**
* Generic event
**/
Expand Down
29 changes: 21 additions & 8 deletions typescript-api/src/moonbase/interfaces/augment-api-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ import type {
PalletXcmTransactorRemoteTransactInfoWithMaxWeight,
PalletXcmVersionMigrationStage,
PolkadotCorePrimitivesOutboundHrmpMessage,
PolkadotPrimitivesV7AbridgedHostConfiguration,
PolkadotPrimitivesV7PersistedValidationData,
PolkadotPrimitivesV7UpgradeGoAhead,
PolkadotPrimitivesV7UpgradeRestriction,
PolkadotPrimitivesV8AbridgedHostConfiguration,
PolkadotPrimitivesV8PersistedValidationData,
PolkadotPrimitivesV8UpgradeGoAhead,
PolkadotPrimitivesV8UpgradeRestriction,
SpRuntimeDigest,
SpTrieStorageProof,
SpWeightsWeightV2Weight,
Expand Down Expand Up @@ -1142,6 +1142,19 @@ declare module "@polkadot/api-base/types/storage" {
**/
totalSelected: AugmentedQuery<ApiType, () => Observable<u32>, []> &
QueryableStorageEntry<ApiType, []>;
/**
* Records collators' inactivity.
* Data persists for MaxOfflineRounds + 1 rounds before being pruned.
**/
wasInactive: AugmentedQuery<
ApiType,
(
arg1: u32 | AnyNumber | Uint8Array,
arg2: AccountId20 | string | Uint8Array
) => Observable<Option<Null>>,
[u32, AccountId20]
> &
QueryableStorageEntry<ApiType, [u32, AccountId20]>;
/**
* Generic query
**/
Expand Down Expand Up @@ -1187,7 +1200,7 @@ declare module "@polkadot/api-base/types/storage" {
**/
hostConfiguration: AugmentedQuery<
ApiType,
() => Observable<Option<PolkadotPrimitivesV7AbridgedHostConfiguration>>,
() => Observable<Option<PolkadotPrimitivesV8AbridgedHostConfiguration>>,
[]
> &
QueryableStorageEntry<ApiType, []>;
Expand Down Expand Up @@ -1333,7 +1346,7 @@ declare module "@polkadot/api-base/types/storage" {
**/
upgradeGoAhead: AugmentedQuery<
ApiType,
() => Observable<Option<PolkadotPrimitivesV7UpgradeGoAhead>>,
() => Observable<Option<PolkadotPrimitivesV8UpgradeGoAhead>>,
[]
> &
QueryableStorageEntry<ApiType, []>;
Expand All @@ -1348,7 +1361,7 @@ declare module "@polkadot/api-base/types/storage" {
**/
upgradeRestrictionSignal: AugmentedQuery<
ApiType,
() => Observable<Option<PolkadotPrimitivesV7UpgradeRestriction>>,
() => Observable<Option<PolkadotPrimitivesV8UpgradeRestriction>>,
[]
> &
QueryableStorageEntry<ApiType, []>;
Expand All @@ -1371,7 +1384,7 @@ declare module "@polkadot/api-base/types/storage" {
**/
validationData: AugmentedQuery<
ApiType,
() => Observable<Option<PolkadotPrimitivesV7PersistedValidationData>>,
() => Observable<Option<PolkadotPrimitivesV8PersistedValidationData>>,
[]
> &
QueryableStorageEntry<ApiType, []>;
Expand Down
62 changes: 27 additions & 35 deletions typescript-api/src/moonbase/interfaces/augment-api-tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,6 @@ declare module "@polkadot/api-base/types/submittable" {
*
* - `id`: The identifier of the asset to be destroyed. This must identify an existing
* asset.
*
* The asset class must be frozen before calling `start_destroy`.
**/
startDestroy: AugmentedSubmittable<
(id: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
Expand Down Expand Up @@ -791,6 +789,32 @@ declare module "@polkadot/api-base/types/submittable" {
) => SubmittableExtrinsic<ApiType>,
[Compact<u128>, AccountId20, Compact<u128>]
>;
/**
* Transfer the entire transferable balance from the caller asset account.
*
* NOTE: This function only attempts to transfer _transferable_ balances. This means that
* any held, frozen, or minimum balance (when `keep_alive` is `true`), will not be
* transferred by this function. To ensure that this function results in a killed account,
* you might need to prepare the account by removing any reference counters, storage
* deposits, etc...
*
* The dispatch origin of this call must be Signed.
*
* - `id`: The identifier of the asset for the account holding a deposit.
* - `dest`: The recipient of the transfer.
* - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all
* of the funds the asset account has, causing the sender asset account to be killed
* (false), or transfer everything except at least the minimum balance, which will
* guarantee to keep the sender asset account alive (true).
**/
transferAll: AugmentedSubmittable<
(
id: Compact<u128> | AnyNumber | Uint8Array,
dest: AccountId20 | string | Uint8Array,
keepAlive: bool | boolean | Uint8Array
) => SubmittableExtrinsic<ApiType>,
[Compact<u128>, AccountId20, bool]
>;
/**
* Transfer some asset balance from a previously delegated account to some third-party
* account.
Expand Down Expand Up @@ -1855,7 +1879,7 @@ declare module "@polkadot/api-base/types/submittable" {
* - `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:
*
* ```nocompile
* Self::registrars().get(reg_index).unwrap().fee
* Registrars::<T>::get().get(reg_index).unwrap().fee
* ```
*
* Emits `JudgementRequested` if successful.
Expand Down Expand Up @@ -2814,38 +2838,6 @@ declare module "@polkadot/api-base/types/submittable" {
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
parachainSystem: {
/**
* Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied
* later.
*
* The `check_version` parameter sets a boolean flag for whether or not the runtime's spec
* version and name should be verified on upgrade. Since the authorization only has a hash,
* it cannot actually perform the verification.
*
* This call requires Root origin.
**/
authorizeUpgrade: AugmentedSubmittable<
(
codeHash: H256 | string | Uint8Array,
checkVersion: bool | boolean | Uint8Array
) => SubmittableExtrinsic<ApiType>,
[H256, bool]
>;
/**
* Provide the preimage (runtime binary) `code` for an upgrade that has been authorized.
*
* If the authorization required a version check, this call will ensure the spec name
* remains unchanged and that the spec version has increased.
*
* Note that this function will not apply the new `code`, but only attempt to schedule the
* upgrade with the Relay Chain.
*
* All origins are allowed.
**/
enactAuthorizedUpgrade: AugmentedSubmittable<
(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
[Bytes]
>;
/**
* Set the current validation data.
*
Expand Down
Loading

0 comments on commit 8545c94

Please sign in to comment.