Skip to content

Commit

Permalink
chore: update tangle substrate types to v0.5.10 (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
AtelyPham authored Aug 1, 2024
1 parent e9357ce commit f363748
Show file tree
Hide file tree
Showing 11 changed files with 374 additions and 309 deletions.
2 changes: 1 addition & 1 deletion types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@webb-tools/tangle-substrate-types",
"version": "0.5.9",
"version": "0.5.10",
"description": "Polkadot.js type definitions required for interacting with Webb's tangle network",
"main": "./build/index.js",
"types": "./build/index.d.ts",
Expand Down
10 changes: 5 additions & 5 deletions types/src/interfaces/augment-api-consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,11 @@ declare module '@polkadot/api-base/types/consts' {
};
multiAssetDelegation: {
/**
* The duration for which the bond is locked.
* The duration for which the stake is locked.
**/
bondDuration: u32 & AugmentedConst<ApiType>;
/**
* Number of rounds that delegation bond less requests must wait before being executable.
* Number of rounds that delegation unstake requests must wait before being executable.
**/
delegationBondLessDelay: u32 & AugmentedConst<ApiType>;
/**
Expand All @@ -561,15 +561,15 @@ declare module '@polkadot/api-base/types/consts' {
**/
leaveOperatorsDelay: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount of bond required for a delegate.
* The minimum amount of stake required for a delegate.
**/
minDelegateAmount: u128 & AugmentedConst<ApiType>;
/**
* The minimum amount of bond required for an operator.
* The minimum amount of stake required for an operator.
**/
minOperatorBondAmount: u128 & AugmentedConst<ApiType>;
/**
* Number of rounds operator requests to decrease self-bond must wait to be executable.
* Number of rounds operator requests to decrease self-stake must wait to be executable.
**/
operatorBondLessDelay: u32 & AugmentedConst<ApiType>;
/**
Expand Down
32 changes: 24 additions & 8 deletions types/src/interfaces/augment-api-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1170,10 +1170,18 @@ declare module '@polkadot/api-base/types/errors' {
* The account is already an operator.
**/
AlreadyOperator: AugmentedError<ApiType>;
/**
* Asset already exists in a reward pool
**/
AssetAlreadyInPool: AugmentedError<ApiType>;
/**
* The asset ID is not found
**/
AssetNotFound: AugmentedError<ApiType>;
/**
* Asset not found in reward pool
**/
AssetNotInPool: AugmentedError<ApiType>;
/**
* The asset is not whitelisted
**/
Expand All @@ -1183,19 +1191,19 @@ declare module '@polkadot/api-base/types/errors' {
**/
BlueprintAlreadyWhitelisted: AugmentedError<ApiType>;
/**
* The bond less request is not ready.
* The unstake request is not ready.
**/
BondLessNotReady: AugmentedError<ApiType>;
/**
* A bond less request already exists.
* A unstake request already exists.
**/
BondLessRequestAlreadyExists: AugmentedError<ApiType>;
/**
* The bond less request is not satisfied.
* The unstake request is not satisfied.
**/
BondLessRequestNotSatisfied: AugmentedError<ApiType>;
/**
* The bond amount is too low.
* The stake amount is too low.
**/
BondTooLow: AugmentedError<ApiType>;
/**
Expand All @@ -1211,11 +1219,15 @@ declare module '@polkadot/api-base/types/errors' {
**/
NoActiveDelegation: AugmentedError<ApiType>;
/**
* There is no bond less request.
* There is no unstake request.
**/
NoBondLessRequest: AugmentedError<ApiType>;
/**
* There is no scheduled bond less request.
* No matching withdraw reqests found
**/
NoMatchingwithdrawRequest: AugmentedError<ApiType>;
/**
* There is no scheduled unstake request.
**/
NoScheduledBondLess: AugmentedError<ApiType>;
/**
Expand Down Expand Up @@ -1251,9 +1263,13 @@ declare module '@polkadot/api-base/types/errors' {
**/
NoWithdrawRequest: AugmentedError<ApiType>;
/**
* The unstake is not ready.
* No withdraw requests found
**/
NowithdrawRequests: AugmentedError<ApiType>;
/**
* The reward pool does not exist
**/
UnstakeNotReady: AugmentedError<ApiType>;
PoolNotFound: AugmentedError<ApiType>;
/**
* A withdraw request already exists.
**/
Expand Down
46 changes: 23 additions & 23 deletions types/src/interfaces/augment-api-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import '@polkadot/api-base/types/events';
import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, U256, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, H160, H256, Perbill, Permill } from '@polkadot/types/interfaces/runtime';
import { FrameSupportTokensMiscBalanceStatus, PalletAirdropClaimsUtilsMultiAddress, SpRuntimeDispatchError, PalletDemocracyMetadataOwner, PalletDemocracyVoteThreshold, PalletDemocracyVoteAccountVote, PalletDkgFeeInfo, PalletElectionProviderMultiPhaseElectionCompute, SpNposElectionsElectionScore, PalletElectionProviderMultiPhasePhase, EvmCoreErrorExitReason, EthereumLog, SpConsensusGrandpaAppPublic, PalletImOnlineSr25519AppSr25519Public, SpStakingExposure, TanglePrimitivesRolesRoleType, TanglePrimitivesJobsJobInfo, TanglePrimitivesJobsJobSubmission, PalletMultisigTimepoint, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsPoolState, TangleTestnetRuntimeProxyType, PalletStakingForcing, PalletStakingRewardDestination, PalletStakingValidatorPrefs, StagingXcmV4AssetAssetId, SygmaTraitsTransferType, SygmaFeeHandlerRouterFeeHandlerType, FrameSupportDispatchDispatchInfo, PalletZksaasFeeInfo } from '@polkadot/types/lookup';
import type { AccountId32, H160, H256, Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
import { FrameSupportTokensMiscBalanceStatus, PalletAirdropClaimsUtilsMultiAddress, SpRuntimeDispatchError, PalletDemocracyMetadataOwner, PalletDemocracyVoteThreshold, PalletDemocracyVoteAccountVote, PalletDkgFeeInfo, PalletElectionProviderMultiPhaseElectionCompute, SpNposElectionsElectionScore, PalletElectionProviderMultiPhasePhase, EvmCoreErrorExitReason, EthereumLog, SpConsensusGrandpaAppPublic, PalletImOnlineSr25519AppSr25519Public, SpStakingExposure, TanglePrimitivesRolesRoleType, TanglePrimitivesJobsJobInfo, TanglePrimitivesJobsJobSubmission, PalletMultiAssetDelegationRewardsAssetAction, PalletMultisigTimepoint, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsPoolState, TangleTestnetRuntimeProxyType, PalletStakingForcing, PalletStakingRewardDestination, PalletStakingValidatorPrefs, StagingXcmV4AssetAssetId, SygmaTraitsTransferType, SygmaFeeHandlerRouterFeeHandlerType, FrameSupportDispatchDispatchInfo, PalletZksaasFeeInfo } from '@polkadot/types/lookup';

export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;

Expand Down Expand Up @@ -726,52 +726,56 @@ declare module '@polkadot/api-base/types/events' {
[key: string]: AugmentedEvent<ApiType>;
};
multiAssetDelegation: {
/**
* Asset has been updated to reward pool
**/
AssetUpdatedInPool: AugmentedEvent<ApiType, [who: AccountId32, poolId: u128, assetId: u128, action: PalletMultiAssetDelegationRewardsAssetAction], { who: AccountId32, poolId: u128, assetId: u128, action: PalletMultiAssetDelegationRewardsAssetAction }>;
/**
* Event emitted when a blueprint is whitelisted for rewards
**/
BlueprintWhitelisted: AugmentedEvent<ApiType, [blueprintId: u32], { blueprintId: u32 }>;
/**
* A delegator bond less request has been cancelled.
* A delegator unstake request has been cancelled.
**/
CancelledDelegatorBondLess: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;
/**
* An unstake has been cancelled.
* An withdraw has been cancelled.
**/
CancelledUnstake: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;
Cancelledwithdraw: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;
/**
* A delegation has been made.
**/
Delegated: AugmentedEvent<ApiType, [who: AccountId32, operator: AccountId32, amount: u128, assetId: u128], { who: AccountId32, operator: AccountId32, amount: u128, assetId: u128 }>;
/**
* A deposit has been made.
**/
Deposited: AugmentedEvent<ApiType, [who: AccountId32, amount: u128, assetId: Option<u128>], { who: AccountId32, amount: u128, assetId: Option<u128> }>;
Deposited: AugmentedEvent<ApiType, [who: AccountId32, amount: u128, assetId: u128], { who: AccountId32, amount: u128, assetId: u128 }>;
/**
* A delegator bond less request has been executed.
* A delegator unstake request has been executed.
**/
ExecutedDelegatorBondLess: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;
/**
* An unstake has been executed.
* An withdraw has been executed.
**/
ExecutedUnstake: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;
Executedwithdraw: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;
/**
* Event emitted when an incentive APY and cap are set for an asset
* Event emitted when an incentive APY and cap are set for a reward pool
**/
IncentiveAPYAndCapSet: AugmentedEvent<ApiType, [assetId: u128, apy: u128, cap: u128], { assetId: u128, apy: u128, cap: u128 }>;
IncentiveAPYAndCapSet: AugmentedEvent<ApiType, [poolId: u128, apy: Percent, cap: u128], { poolId: u128, apy: Percent, cap: u128 }>;
/**
* An operator has cancelled their bond decrease request.
* An operator has cancelled their stake decrease request.
**/
OperatorBondLessCancelled: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;
/**
* An operator has executed their bond decrease.
* An operator has executed their stake decrease.
**/
OperatorBondLessExecuted: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;
/**
* An operator has scheduled to decrease their bond.
* An operator has scheduled to decrease their stake.
**/
OperatorBondLessScheduled: AugmentedEvent<ApiType, [who: AccountId32, bondLessAmount: u128], { who: AccountId32, bondLessAmount: u128 }>;
OperatorBondLessScheduled: AugmentedEvent<ApiType, [who: AccountId32, unstakeAmount: u128], { who: AccountId32, unstakeAmount: u128 }>;
/**
* An operator has increased their bond.
* An operator has increased their stake.
**/
OperatorBondMore: AugmentedEvent<ApiType, [who: AccountId32, additionalBond: u128], { who: AccountId32, additionalBond: u128 }>;
/**
Expand Down Expand Up @@ -799,17 +803,13 @@ declare module '@polkadot/api-base/types/events' {
**/
OperatorWentOnline: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;
/**
* A delegator bond less request has been scheduled.
* A delegator unstake request has been scheduled.
**/
ScheduledDelegatorBondLess: AugmentedEvent<ApiType, [who: AccountId32, operator: AccountId32, amount: u128, assetId: u128], { who: AccountId32, operator: AccountId32, amount: u128, assetId: u128 }>;
/**
* An unstake has been scheduled.
**/
ScheduledUnstake: AugmentedEvent<ApiType, [who: AccountId32, amount: u128, assetId: Option<u128>], { who: AccountId32, amount: u128, assetId: Option<u128> }>;
/**
* New whitelisted assets set
* An withdraw has been scheduled.
**/
WhitelistedAssetsSet: AugmentedEvent<ApiType, [assets: Vec<u128>], { assets: Vec<u128> }>;
Scheduledwithdraw: AugmentedEvent<ApiType, [who: AccountId32, amount: u128, assetId: u128], { who: AccountId32, amount: u128, assetId: u128 }>;
/**
* Generic event
**/
Expand Down
8 changes: 6 additions & 2 deletions types/src/interfaces/augment-api-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,10 @@ declare module '@polkadot/api-base/types/storage' {
[key: string]: QueryableStorageEntry<ApiType>;
};
multiAssetDelegation: {
/**
* Storage for the reward pools
**/
assetLookupRewardPools: AugmentedQuery<ApiType, (arg: u128 | AnyNumber | Uint8Array) => Observable<Option<u128>>, [u128]> & QueryableStorageEntry<ApiType, [u128]>;
/**
* Snapshot of collator delegation stake at the start of the round.
**/
Expand All @@ -800,9 +804,9 @@ declare module '@polkadot/api-base/types/storage' {
**/
rewardConfigStorage: AugmentedQuery<ApiType, () => Observable<Option<PalletMultiAssetDelegationRewardsRewardConfig>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Whitelisted assets that are allowed to be deposited
* Storage for the reward pools
**/
whitelistedAssets: AugmentedQuery<ApiType, () => Observable<Vec<u128>>, []> & QueryableStorageEntry<ApiType, []>;
rewardPools: AugmentedQuery<ApiType, (arg: u128 | AnyNumber | Uint8Array) => Observable<Option<Vec<u128>>>, [u128]> & QueryableStorageEntry<ApiType, [u128]>;
/**
* Generic query
**/
Expand Down
Loading

0 comments on commit f363748

Please sign in to comment.