Skip to content

Commit

Permalink
Update types to 0.9.4 (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
yurixander authored Nov 29, 2024
1 parent 03954e9 commit 38e9751
Show file tree
Hide file tree
Showing 9 changed files with 735 additions and 479 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.9.3",
"version": "0.9.4",
"description": "Polkadot.js type definitions required for interacting with Webb's tangle network",
"author": "Webb Developers <[email protected]>",
"license": "Apache-2.0",
Expand Down
30 changes: 27 additions & 3 deletions types/src/interfaces/augment-api-consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import '@polkadot/api-base/types/consts';
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 type { H160, Perbill, Permill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';

export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
Expand Down Expand Up @@ -583,6 +583,26 @@ declare module '@polkadot/api-base/types/consts' {
* Number of rounds that operators remain bonded before the exit request is executable.
**/
leaveOperatorsDelay: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of delegations a delegator can have.
**/
maxDelegations: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of blueprints a delegator can have in Fixed mode.
**/
maxDelegatorBlueprints: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of blueprints an operator can support.
**/
maxOperatorBlueprints: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of unstake requests a delegator can have.
**/
maxUnstakeRequests: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of withdraw requests a delegator can have.
**/
maxWithdrawRequests: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount of stake required for a delegate.
**/
Expand Down Expand Up @@ -772,6 +792,10 @@ declare module '@polkadot/api-base/types/consts' {
* Maximum number of jobs per service.
**/
maxJobsPerService: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of versions of Master Blueprint Service Manager allowed.
**/
maxMasterBlueprintServiceManagerVersions: u32 & AugmentedConst<ApiType>;
/**
* Maximum length of metadata string length.
**/
Expand All @@ -797,9 +821,9 @@ declare module '@polkadot/api-base/types/consts' {
**/
maxSourcesPerGadget: u32 & AugmentedConst<ApiType>;
/**
* `PalletId` for the services pallet.
* `Pallet` EVM Address.
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
palletEVMAddress: H160 & AugmentedConst<ApiType>;
/**
* Number of eras that slashes are deferred by, after computation.
*
Expand Down
104 changes: 104 additions & 0 deletions types/src/interfaces/augment-api-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,10 @@ declare module '@polkadot/api-base/types/errors' {
* The account is already an operator.
**/
AlreadyOperator: AugmentedError<ApiType>;
/**
* APY exceeds maximum allowed by the extrinsic
**/
APYExceedsMaximum: AugmentedError<ApiType>;
/**
* Asset already exists in a reward vault
**/
Expand All @@ -1041,6 +1045,14 @@ declare module '@polkadot/api-base/types/errors' {
* The blueprint ID is already whitelisted
**/
BlueprintAlreadyWhitelisted: AugmentedError<ApiType>;
/**
* Error returned when trying to remove a blueprint ID that doesn't exist.
**/
BlueprintIdNotFound: AugmentedError<ApiType>;
/**
* The blueprint is not selected
**/
BlueprintNotSelected: AugmentedError<ApiType>;
/**
* The unstake request is not ready.
**/
Expand All @@ -1061,10 +1073,50 @@ declare module '@polkadot/api-base/types/errors' {
* The account cannot exit.
**/
CannotExit: AugmentedError<ApiType>;
/**
* Cap cannot be zero
**/
CapCannotBeZero: AugmentedError<ApiType>;
/**
* Cap exceeds total supply of asset
**/
CapExceedsTotalSupply: AugmentedError<ApiType>;
/**
* Deposit amount overflow
**/
DepositOverflow: AugmentedError<ApiType>;
/**
* Error returned when trying to add a blueprint ID that already exists.
**/
DuplicateBlueprintId: AugmentedError<ApiType>;
/**
* The account has insufficient balance.
**/
InsufficientBalance: AugmentedError<ApiType>;
/**
* Underflow while reducing stake
**/
InsufficientStakeRemaining: AugmentedError<ApiType>;
/**
* Leaving round not reached
**/
LeavingRoundNotReached: AugmentedError<ApiType>;
/**
* Maximum number of blueprints exceeded
**/
MaxBlueprintsExceeded: AugmentedError<ApiType>;
/**
* Error returned when the maximum number of delegations is exceeded.
**/
MaxDelegationsExceeded: AugmentedError<ApiType>;
/**
* Error returned when the maximum number of unstake requests is exceeded.
**/
MaxUnstakeRequestsExceeded: AugmentedError<ApiType>;
/**
* Error returned when the maximum number of withdraw requests is exceeded.
**/
MaxWithdrawRequestsExceeded: AugmentedError<ApiType>;
/**
* There is not active delegation
**/
Expand Down Expand Up @@ -1097,6 +1149,10 @@ declare module '@polkadot/api-base/types/errors' {
* The account is not a delegator.
**/
NotDelegator: AugmentedError<ApiType>;
/**
* Error returned when trying to add/remove blueprint IDs while not in Fixed mode.
**/
NotInFixedMode: AugmentedError<ApiType>;
/**
* The account is not leaving as an operator.
**/
Expand All @@ -1117,6 +1173,18 @@ declare module '@polkadot/api-base/types/errors' {
* No withdraw requests found
**/
NowithdrawRequests: AugmentedError<ApiType>;
/**
* An unstake request is already pending
**/
PendingUnstakeRequestExists: AugmentedError<ApiType>;
/**
* Overflow while adding stake
**/
StakeOverflow: AugmentedError<ApiType>;
/**
* Unstake underflow
**/
UnstakeAmountTooLarge: AugmentedError<ApiType>;
/**
* The reward vault does not exist
**/
Expand Down Expand Up @@ -1461,10 +1529,18 @@ declare module '@polkadot/api-base/types/errors' {
* The caller is already registered as a operator.
**/
AlreadyRegistered: AugmentedError<ApiType>;
/**
* Approval Process is interrupted.
**/
ApprovalInterrupted: AugmentedError<ApiType>;
/**
* The approval is not requested for the operator (the caller).
**/
ApprovalNotRequested: AugmentedError<ApiType>;
/**
* Blueprint creation is interrupted.
**/
BlueprintCreationInterrupted: AugmentedError<ApiType>;
/**
* The service blueprint was not found.
**/
Expand Down Expand Up @@ -1503,6 +1579,10 @@ declare module '@polkadot/api-base/types/errors' {
* blueprint.
**/
JobDefinitionNotFound: AugmentedError<ApiType>;
/**
* The Supplied Master Blueprint Service Manager Revision is not found.
**/
MasterBlueprintServiceManagerRevisionNotFound: AugmentedError<ApiType>;
/**
* The maximum number of assets per service has been exceeded.
**/
Expand All @@ -1511,6 +1591,10 @@ declare module '@polkadot/api-base/types/errors' {
* The maximum number of fields per request has been exceeded.
**/
MaxFieldsExceeded: AugmentedError<ApiType>;
/**
* Maximum number of Master Blueprint Service Manager revisions reached.
**/
MaxMasterBlueprintServiceManagerVersionsExceeded: AugmentedError<ApiType>;
/**
* The maximum number of permitted callers per service has been exceeded.
**/
Expand Down Expand Up @@ -1539,6 +1623,14 @@ declare module '@polkadot/api-base/types/errors' {
* The Service Blueprint did not return a slashing origin for this service.
**/
NoSlashingOrigin: AugmentedError<ApiType>;
/**
* The Operator is not allowed to unregister.
**/
NotAllowedToUnregister: AugmentedError<ApiType>;
/**
* The Operator is not allowed to update their price targets.
**/
NotAllowedToUpdatePriceTargets: AugmentedError<ApiType>;
/**
* The caller is not registered as a operator.
**/
Expand All @@ -1559,6 +1651,14 @@ declare module '@polkadot/api-base/types/errors' {
* Operator profile not found.
**/
OperatorProfileNotFound: AugmentedError<ApiType>;
/**
* Rejection Process is interrupted.
**/
RejectionInterrupted: AugmentedError<ApiType>;
/**
* Service Initialization interrupted.
**/
ServiceInitializationInterrupted: AugmentedError<ApiType>;
/**
* The service was not found.
**/
Expand All @@ -1571,6 +1671,10 @@ declare module '@polkadot/api-base/types/errors' {
* The service request was not found.
**/
ServiceRequestNotFound: AugmentedError<ApiType>;
/**
* The termination of the service was interrupted.
**/
TerminationInterrupted: AugmentedError<ApiType>;
/**
* An error occurred while type checking the provided input input.
**/
Expand Down
16 changes: 12 additions & 4 deletions types/src/interfaces/augment-api-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,10 @@ declare module '@polkadot/api-base/types/events' {
* A delegation has been made.
**/
Delegated: AugmentedEvent<ApiType, [who: AccountId32, operator: AccountId32, amount: u128, assetId: u128], { who: AccountId32, operator: AccountId32, amount: u128, assetId: u128 }>;
/**
* Delegator has been slashed
**/
DelegatorSlashed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
/**
* A deposit has been made.
**/
Expand Down Expand Up @@ -849,6 +853,10 @@ declare module '@polkadot/api-base/types/events' {
* An operator has scheduled to leave.
**/
OperatorLeavingScheduled: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;
/**
* Operator has been slashed
**/
OperatorSlashed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
/**
* An operator has gone offline.
**/
Expand Down Expand Up @@ -1093,10 +1101,6 @@ declare module '@polkadot/api-base/types/events' {
* A new service blueprint has been created.
**/
BlueprintCreated: AugmentedEvent<ApiType, [owner: AccountId32, blueprintId: u64], { owner: AccountId32, blueprintId: u64 }>;
/**
* An EVM log has been emitted during an execution.
**/
EvmLog: AugmentedEvent<ApiType, [address: H160, topics: Vec<H256>, data: Bytes], { address: H160, topics: Vec<H256>, data: Bytes }>;
/**
* EVM execution reverted with a reason.
**/
Expand All @@ -1109,6 +1113,10 @@ declare module '@polkadot/api-base/types/events' {
* A job result has been submitted.
**/
JobResultSubmitted: AugmentedEvent<ApiType, [operator: AccountId32, serviceId: u64, callId: u64, job: u8, result: Vec<TanglePrimitivesServicesField>], { operator: AccountId32, serviceId: u64, callId: u64, job: u8, result: Vec<TanglePrimitivesServicesField> }>;
/**
* The Master Blueprint Service Manager has been revised.
**/
MasterBlueprintServiceManagerRevised: AugmentedEvent<ApiType, [revision: u32, address: H160], { revision: u32, address: H160 }>;
/**
* An operator has pre-registered for a service blueprint.
**/
Expand Down
6 changes: 6 additions & 0 deletions types/src/interfaces/augment-api-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,12 @@ declare module '@polkadot/api-base/types/storage' {
* Service ID -> Call ID -> Job Call Result
**/
jobResults: AugmentedQuery<ApiType, (arg1: u64 | AnyNumber | Uint8Array, arg2: u64 | AnyNumber | Uint8Array) => Observable<Option<TanglePrimitivesServicesJobCallResult>>, [u64, u64]> & QueryableStorageEntry<ApiType, [u64, u64]>;
/**
* All the Master Blueprint Service Managers revisions.
*
* Where the index is the revision number.
**/
masterBlueprintServiceManagerRevisions: AugmentedQuery<ApiType, () => Observable<Vec<H160>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The next free ID for a service blueprint.
**/
Expand Down
Loading

0 comments on commit 38e9751

Please sign in to comment.