Skip to content

Commit

Permalink
chore: update tangle-substrate-types (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
AtelyPham authored Apr 4, 2024
1 parent 1ee4dfc commit 0b1597f
Show file tree
Hide file tree
Showing 11 changed files with 965 additions and 705 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.4",
"version": "0.5.5",
"description": "Polkadot.js type definitions required for interacting with Webb's tangle network",
"main": "./build/index.js",
"types": "./build/index.d.ts",
Expand Down
52 changes: 44 additions & 8 deletions types/src/interfaces/augment-api-consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,7 @@ import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec } from '@polkadot/types-codec/types';
import type { Perbill, Permill } from '@polkadot/types/interfaces/runtime';
import {
FrameSupportPalletId,
FrameSystemLimitsBlockLength,
FrameSystemLimitsBlockWeights,
SpVersionRuntimeVersion,
SpWeightsRuntimeDbWeight,
SpWeightsWeightV2Weight,
} from '@polkadot/types/lookup'
import { SpWeightsWeightV2Weight, FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpWeightsRuntimeDbWeight, SpVersionRuntimeVersion } from '@polkadot/types/lookup';

export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;

Expand Down Expand Up @@ -566,6 +559,49 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
proxy: {
/**
* The base amount of currency needed to reserve for creating an announcement.
*
* This is held when a new storage item holding a `Balance` is created (typically 16
* bytes).
**/
announcementDepositBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of currency needed per announcement made.
*
* This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)
* into a pre-existing storage value.
**/
announcementDepositFactor: u128 & AugmentedConst<ApiType>;
/**
* The maximum amount of time-delayed announcements that are allowed to be pending.
**/
maxPending: u32 & AugmentedConst<ApiType>;
/**
* The maximum amount of proxies allowed for a single account.
**/
maxProxies: u32 & AugmentedConst<ApiType>;
/**
* The base amount of currency needed to reserve for creating a proxy.
*
* This is held for an additional storage item whose value size is
* `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes.
**/
proxyDepositBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of currency needed per proxy added.
*
* This is held for adding 32 bytes plus an instance of `ProxyType` more into a
* pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take
* into account `32 + proxy_type.encode().len()` bytes of data.
**/
proxyDepositFactor: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
roles: {
/**
* Max roles per account.
Expand Down
38 changes: 38 additions & 0 deletions types/src/interfaces/augment-api-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1306,6 +1306,44 @@ declare module '@polkadot/api-base/types/errors' {
**/
[key: string]: AugmentedError<ApiType>;
};
proxy: {
/**
* Account is already a proxy.
**/
Duplicate: AugmentedError<ApiType>;
/**
* Call may not be made by proxy because it may escalate its privileges.
**/
NoPermission: AugmentedError<ApiType>;
/**
* Cannot add self as proxy.
**/
NoSelfProxy: AugmentedError<ApiType>;
/**
* Proxy registration not found.
**/
NotFound: AugmentedError<ApiType>;
/**
* Sender is not a proxy of the account to be proxied.
**/
NotProxy: AugmentedError<ApiType>;
/**
* There are too many proxies registered or too many announcements pending.
**/
TooMany: AugmentedError<ApiType>;
/**
* Announcement, if made at all, was made too recently.
**/
Unannounced: AugmentedError<ApiType>;
/**
* A call which is incompatible with the proxy type's filter was attempted.
**/
Unproxyable: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
roles: {
/**
* Rewards already claimed
Expand Down
59 changes: 29 additions & 30 deletions types/src/interfaces/augment-api-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,10 @@
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, u32, u64 } from '@polkadot/types-codec';
import type { Bytes, Null, Option, Result, U256, U8aFixed, Vec, bool, u128, u16, u32, u64 } 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 {
EthereumLog,
EvmCoreErrorExitReason,
FrameSupportDispatchDispatchInfo,
FrameSupportTokensMiscBalanceStatus,
PalletAirdropClaimsUtilsMultiAddress,
PalletDemocracyMetadataOwner,
PalletDemocracyVoteAccountVote,
PalletDemocracyVoteThreshold,
PalletDkgFeeInfo,
PalletElectionProviderMultiPhaseElectionCompute,
PalletElectionProviderMultiPhasePhase,
PalletImOnlineSr25519AppSr25519Public,
PalletMultisigTimepoint,
PalletNominationPoolsCommissionChangeRate,
PalletNominationPoolsCommissionClaimPermission,
PalletNominationPoolsPoolState,
PalletStakingForcing,
PalletStakingRewardDestination,
PalletStakingValidatorPrefs,
PalletZksaasFeeInfo,
SpConsensusGrandpaAppPublic,
SpNposElectionsElectionScore,
SpRuntimeDispatchError,
SpStakingExposure,
TanglePrimitivesJobsJobInfo,
TanglePrimitivesJobsJobSubmission,
TanglePrimitivesRolesRoleType,
} from '@polkadot/types/lookup'
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, FrameSupportDispatchDispatchInfo, PalletZksaasFeeInfo } from '@polkadot/types/lookup';

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

Expand Down Expand Up @@ -798,6 +770,33 @@ declare module '@polkadot/api-base/types/events' {
**/
[key: string]: AugmentedEvent<ApiType>;
};
proxy: {
/**
* An announcement was placed to make a call in the future.
**/
Announced: AugmentedEvent<ApiType, [real: AccountId32, proxy: AccountId32, callHash: H256], { real: AccountId32, proxy: AccountId32, callHash: H256 }>;
/**
* A proxy was added.
**/
ProxyAdded: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: TangleTestnetRuntimeProxyType, delay: u64], { delegator: AccountId32, delegatee: AccountId32, proxyType: TangleTestnetRuntimeProxyType, delay: u64 }>;
/**
* A proxy was executed correctly, with the given.
**/
ProxyExecuted: AugmentedEvent<ApiType, [result: Result<Null, SpRuntimeDispatchError>], { result: Result<Null, SpRuntimeDispatchError> }>;
/**
* A proxy was removed.
**/
ProxyRemoved: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: TangleTestnetRuntimeProxyType, delay: u64], { delegator: AccountId32, delegatee: AccountId32, proxyType: TangleTestnetRuntimeProxyType, delay: u64 }>;
/**
* A pure account has been created by new proxy with given
* disambiguation index and proxy type.
**/
PureCreated: AugmentedEvent<ApiType, [pure: AccountId32, who: AccountId32, proxyType: TangleTestnetRuntimeProxyType, disambiguationIndex: u16], { pure: AccountId32, who: AccountId32, proxyType: TangleTestnetRuntimeProxyType, disambiguationIndex: u16 }>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
roles: {
/**
* The min restaking bond amount has been updated
Expand Down
106 changes: 20 additions & 86 deletions types/src/interfaces/augment-api-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,92 +11,7 @@ import type { BTreeMap, Bytes, Null, Option, U256, U8aFixed, Vec, bool, u128, u3
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H160, H256, Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
import type { Observable } from '@polkadot/types/types';
import {
EthereumBlock,
EthereumReceiptReceiptV3,
EthereumTransactionTransactionV2,
FpRpcTransactionStatus,
FrameSupportDispatchPerDispatchClassWeight,
FrameSupportPreimagesBounded,
FrameSystemAccountInfo,
FrameSystemCodeUpgradeAuthorization,
FrameSystemEventRecord,
FrameSystemLastRuntimeUpgradeInfo,
FrameSystemPhase,
PalletAirdropClaimsStatementKind,
PalletAirdropClaimsUtilsMultiAddress,
PalletBagsListListBag,
PalletBagsListListNode,
PalletBalancesAccountData,
PalletBalancesBalanceLock,
PalletBalancesIdAmountRuntimeFreezeReason,
PalletBalancesIdAmountRuntimeHoldReason,
PalletBalancesReserveData,
PalletBountiesBounty,
PalletChildBountiesChildBounty,
PalletCollectiveVotes,
PalletDemocracyMetadataOwner,
PalletDemocracyReferendumInfo,
PalletDemocracyVoteThreshold,
PalletDemocracyVoteVoting,
PalletDkgFeeInfo,
PalletElectionProviderMultiPhasePhase,
PalletElectionProviderMultiPhaseReadySolution,
PalletElectionProviderMultiPhaseRoundSnapshot,
PalletElectionProviderMultiPhaseSignedSignedSubmission,
PalletElectionProviderMultiPhaseSolutionOrSnapshotSize,
PalletElectionsPhragmenSeatHolder,
PalletElectionsPhragmenVoter,
PalletEvmCodeMetadata,
PalletGrandpaStoredPendingChange,
PalletGrandpaStoredState,
PalletIdentityAuthorityProperties,
PalletIdentityRegistrarInfo,
PalletIdentityRegistration,
PalletImOnlineSr25519AppSr25519Public,
PalletMultisigMultisig,
PalletNominationPoolsBondedPoolInner,
PalletNominationPoolsClaimPermission,
PalletNominationPoolsPoolMember,
PalletNominationPoolsRewardPool,
PalletNominationPoolsSubPools,
PalletPreimageOldRequestStatus,
PalletPreimageRequestStatus,
PalletRolesRestakingLedger,
PalletSchedulerScheduled,
PalletStakingActiveEraInfo,
PalletStakingEraRewardPoints,
PalletStakingForcing,
PalletStakingNominations,
PalletStakingRewardDestination,
PalletStakingSlashingSlashingSpans,
PalletStakingSlashingSpanRecord,
PalletStakingStakingLedger,
PalletStakingUnappliedSlash,
PalletStakingValidatorPrefs,
PalletTransactionPaymentReleases,
PalletTreasuryProposal,
PalletTreasurySpendStatus,
PalletVestingReleases,
PalletVestingVestingInfo,
PalletZksaasFeeInfo,
SpConsensusBabeAppPublic,
SpConsensusBabeBabeEpochConfiguration,
SpConsensusBabeDigestsNextConfigDescriptor,
SpConsensusBabeDigestsPreDigest,
SpConsensusGrandpaAppPublic,
SpCoreCryptoKeyTypeId,
SpNposElectionsElectionScore,
SpRuntimeDigest,
SpStakingExposure,
SpStakingExposurePage,
SpStakingOffenceOffenceDetails,
SpStakingPagedExposureMetadata,
TanglePrimitivesJobsJobInfo,
TanglePrimitivesJobsPhaseResult,
TanglePrimitivesRolesRoleType,
TangleTestnetRuntimeOpaqueSessionKeys,
} from '@polkadot/types/lookup'
import { SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsPreDigest, SpConsensusBabeDigestsNextConfigDescriptor, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesIdAmountRuntimeFreezeReason, PalletBalancesIdAmountRuntimeHoldReason, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletAirdropClaimsUtilsMultiAddress, PalletAirdropClaimsStatementKind, PalletCollectiveVotes, PalletDemocracyMetadataOwner, FrameSupportPreimagesBounded, PalletDemocracyVoteThreshold, PalletDemocracyReferendumInfo, PalletDemocracyVoteVoting, PalletDkgFeeInfo, PalletElectionProviderMultiPhasePhase, SpNposElectionsElectionScore, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, EthereumBlock, EthereumReceiptReceiptV3, FpRpcTransactionStatus, EthereumTransactionTransactionV2, PalletEvmCodeMetadata, SpConsensusGrandpaAppPublic, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistration, PalletIdentityRegistrarInfo, PalletIdentityAuthorityProperties, PalletImOnlineSr25519AppSr25519Public, TanglePrimitivesRolesRoleType, TanglePrimitivesJobsPhaseResult, TanglePrimitivesJobsJobInfo, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, SpStakingOffenceOffenceDetails, PalletPreimageRequestStatus, PalletPreimageOldRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletRolesRestakingLedger, PalletSchedulerScheduled, SpCoreCryptoKeyTypeId, TangleTestnetRuntimeOpaqueSessionKeys, SpStakingExposure, SpStakingPagedExposureMetadata, SpStakingExposurePage, PalletStakingValidatorPrefs, PalletStakingForcing, PalletStakingStakingLedger, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingUnappliedSlash, FrameSystemAccountInfo, FrameSystemCodeUpgradeAuthorization, FrameSupportDispatchPerDispatchClassWeight, SpRuntimeDigest, FrameSystemEventRecord, FrameSystemPhase, FrameSystemLastRuntimeUpgradeInfo, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletTreasurySpendStatus, PalletVestingReleases, PalletVestingVestingInfo, PalletZksaasFeeInfo } from '@polkadot/types/lookup';

export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
export type __QueryableStorageEntry<ApiType extends ApiTypes> = QueryableStorageEntry<ApiType>;
Expand Down Expand Up @@ -990,6 +905,21 @@ declare module '@polkadot/api-base/types/storage' {
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
proxy: {
/**
* The announcements made by the proxy (key).
**/
announcements: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<ITuple<[Vec<PalletProxyAnnouncement>, u128]>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* The set of account proxies. Maps the account which has delegated to the accounts
* which are being delegated to, together with the amount held on deposit.
**/
proxies: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<ITuple<[Vec<PalletProxyProxyDefinition>, u128]>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
randomnessCollectiveFlip: {
/**
* Series of block headers from the last 81 blocks that acts as random seed material. This
Expand Down Expand Up @@ -1026,6 +956,10 @@ declare module '@polkadot/api-base/types/storage' {
* The minimum re staking bond to become and maintain the role.
**/
minRestakingBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The total restake amount in the system
**/
totalRestake: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The number of jobs completed by a validator in era
**/
Expand Down
Loading

0 comments on commit 0b1597f

Please sign in to comment.