From 8670d378e150cdb850272b638f09d634de8836fb Mon Sep 17 00:00:00 2001 From: Leszek Wiesner Date: Fri, 16 Apr 2021 11:00:12 +0200 Subject: [PATCH 1/2] @joystream/types initial updates --- types/augment-codec/all.ts | 10 +- types/augment-codec/augment-api-consts.ts | 128 ++-- types/augment-codec/augment-api-query.ts | 78 ++- types/augment-codec/augment-api-tx.ts | 708 ++++++++++++++++++++-- types/augment-codec/augment-types.ts | 72 ++- types/augment/all/defs.json | 179 ++++-- types/augment/all/types.ts | 289 +++++++-- types/augment/augment-api-consts.ts | 128 ++-- types/augment/augment-api-query.ts | 78 ++- types/augment/augment-api-tx.ts | 708 ++++++++++++++++++++-- types/augment/augment-types.ts | 72 ++- types/package.json | 2 +- types/src/blog.ts | 23 + types/src/bounty.ts | 75 +++ types/src/common.ts | 6 + types/src/forum.ts | 2 + types/src/index.ts | 6 +- types/src/members.ts | 16 +- types/src/proposals.ts | 66 +- types/src/scripts/generateAugmentCodec.ts | 4 + types/src/working-group/index.ts | 28 +- 21 files changed, 2313 insertions(+), 365 deletions(-) create mode 100644 types/src/blog.ts create mode 100644 types/src/bounty.ts diff --git a/types/augment-codec/all.ts b/types/augment-codec/all.ts index e9f65bb2ce..f540439a57 100644 --- a/types/augment-codec/all.ts +++ b/types/augment-codec/all.ts @@ -1,14 +1,16 @@ // This file was automatically generated via generate:augment-codec -import { ActorId, MemberId, BlockAndTime, ThreadId, PostId, InputValidationLengthConstraint, WorkingGroup, MemoText, Address, LookupSource } from '../common'; +import { ActorId, MemberId, BlockAndTime, ThreadId, PostId, InputValidationLengthConstraint, WorkingGroup, MemoText, BalanceKind, Address, LookupSource } from '../common'; import { Membership, StakingAccountMemberBinding, BuyMembershipParameters, InviteMembershipParameters } from '../members'; import { CouncilStageAnnouncing, CouncilStageElection, CouncilStageUpdate, CouncilStage, Candidate, CouncilMemberOf, CastVoteOf } from '../council'; -import { ForumUserId, ModeratorId, CategoryId, PostReactionId, Category, Thread, Post, PollAlternative, Poll, PrivilegedActor } from '../forum'; +import { ForumUserId, ModeratorId, CategoryId, PostReactionId, Category, Thread, Post, PollAlternative, Poll, PrivilegedActor, Thread as ThreadOf } from '../forum'; import { ApplicationId, Application, ApplicationInfo, ApplicationIdSet, ApplicationIdToWorkerIdMap, WorkerId, Worker, WorkerInfo, Opening, OpeningId, StakePolicy, StakeParameters, StorageProviderId, OpeningType, ApplyOnOpeningParameters, Penalty } from '../working-group'; import { Url, IPNSIdentity, ServiceProviderRecord } from '../discovery'; import { ContentId, LiaisonJudgement, DataObject, DataObjectStorageRelationshipId, DataObjectStorageRelationship, DataObjectTypeId, DataObjectType, DataObjectsMap } from '../media'; -import { ProposalId, ProposalStatus, Proposal as ProposalOf, ProposalDetails, ProposalDetails as ProposalDetailsOf, VotingResults, ProposalParameters, GeneralProposalParameters, VoteKind, DiscussionThread, DiscussionPost, AddOpeningParameters, FillOpeningParameters, TerminateRoleParameters, ProposalDecision, ExecutionFailed, Approved, SetLeadParams, ThreadMode, ExecutionStatus } from '../proposals'; +import { ProposalId, ProposalStatus, Proposal as ProposalOf, ProposalDetails, ProposalDetails as ProposalDetailsOf, VotingResults, ProposalParameters, GeneralProposalParameters, VoteKind, DiscussionThread, DiscussionPost, CreateOpeningParameters, FillOpeningParameters, TerminateRoleParameters, ProposalDecision, ExecutionFailed, Approved, SetLeadParams, ThreadMode, ExecutionStatus, FundingRequestParameters } from '../proposals'; import { Nonce, EntityId, ClassId, CuratorId, CuratorGroupId, VecMaxLength, TextMaxLength, HashedTextMaxLength, PropertyId, SchemaId, SameController, ClassPermissions, PropertyTypeSingle, PropertyTypeVector, PropertyType, PropertyLockingPolicy, Property, Schema, Class, Class as ClassOf, EntityController, EntityPermissions, StoredValue, VecStoredValue, VecStoredPropertyValue, StoredPropertyValue, InboundReferenceCounter, Entity, Entity as EntityOf, CuratorGroup, EntityCreationVoucher, Actor, EntityReferenceCounterSideEffect, ReferenceCounterSideEffects, SideEffects, SideEffect, Status, InputValue, VecInputValue, InputPropertyValue, ParameterizedEntity, ParametrizedPropertyValue, ParametrizedClassPropertyValue, CreateEntityOperation, UpdatePropertyValuesOperation, AddSchemaSupportToEntityOperation, OperationType, InputEntityValuesMap, FailedAt } from '../content-directory'; import { ReferendumStageVoting, ReferendumStageRevealing, ReferendumStage, OptionResult, VotePower } from '../referendum'; import { ConstitutionInfo } from '../constitution'; +import { ParticipantId, Title, UpdatedTitle, UpdatedBody, ReplyId, Reply } from '../blog'; +import { BountyId, EntryId, BountyActor, AssuranceContractType, FundingType_Limited, FundingType_Perpetual, FundingType, BountyCreationParameters, OracleJudgment_Winner, OracleJudgment, Entry } from '../bounty'; -export { ActorId, MemberId, BlockAndTime, ThreadId, PostId, InputValidationLengthConstraint, WorkingGroup, MemoText, Address, LookupSource, Membership, StakingAccountMemberBinding, BuyMembershipParameters, InviteMembershipParameters, CouncilStageAnnouncing, CouncilStageElection, CouncilStageUpdate, CouncilStage, Candidate, CouncilMemberOf, CastVoteOf, ForumUserId, ModeratorId, CategoryId, PostReactionId, Category, Thread, Post, PollAlternative, Poll, PrivilegedActor, ApplicationId, Application, ApplicationInfo, ApplicationIdSet, ApplicationIdToWorkerIdMap, WorkerId, Worker, WorkerInfo, Opening, OpeningId, StakePolicy, StakeParameters, StorageProviderId, OpeningType, ApplyOnOpeningParameters, Penalty, Url, IPNSIdentity, ServiceProviderRecord, ContentId, LiaisonJudgement, DataObject, DataObjectStorageRelationshipId, DataObjectStorageRelationship, DataObjectTypeId, DataObjectType, DataObjectsMap, ProposalId, ProposalStatus, ProposalOf, ProposalDetails, ProposalDetailsOf, VotingResults, ProposalParameters, GeneralProposalParameters, VoteKind, DiscussionThread, DiscussionPost, AddOpeningParameters, FillOpeningParameters, TerminateRoleParameters, ProposalDecision, ExecutionFailed, Approved, SetLeadParams, ThreadMode, ExecutionStatus, Nonce, EntityId, ClassId, CuratorId, CuratorGroupId, VecMaxLength, TextMaxLength, HashedTextMaxLength, PropertyId, SchemaId, SameController, ClassPermissions, PropertyTypeSingle, PropertyTypeVector, PropertyType, PropertyLockingPolicy, Property, Schema, Class, ClassOf, EntityController, EntityPermissions, StoredValue, VecStoredValue, VecStoredPropertyValue, StoredPropertyValue, InboundReferenceCounter, Entity, EntityOf, CuratorGroup, EntityCreationVoucher, Actor, EntityReferenceCounterSideEffect, ReferenceCounterSideEffects, SideEffects, SideEffect, Status, InputValue, VecInputValue, InputPropertyValue, ParameterizedEntity, ParametrizedPropertyValue, ParametrizedClassPropertyValue, CreateEntityOperation, UpdatePropertyValuesOperation, AddSchemaSupportToEntityOperation, OperationType, InputEntityValuesMap, FailedAt, ReferendumStageVoting, ReferendumStageRevealing, ReferendumStage, OptionResult, VotePower, ConstitutionInfo }; \ No newline at end of file +export { ActorId, MemberId, BlockAndTime, ThreadId, PostId, InputValidationLengthConstraint, WorkingGroup, MemoText, BalanceKind, Address, LookupSource, Membership, StakingAccountMemberBinding, BuyMembershipParameters, InviteMembershipParameters, CouncilStageAnnouncing, CouncilStageElection, CouncilStageUpdate, CouncilStage, Candidate, CouncilMemberOf, CastVoteOf, ForumUserId, ModeratorId, CategoryId, PostReactionId, Category, Thread, Post, PollAlternative, Poll, PrivilegedActor, ThreadOf, ApplicationId, Application, ApplicationInfo, ApplicationIdSet, ApplicationIdToWorkerIdMap, WorkerId, Worker, WorkerInfo, Opening, OpeningId, StakePolicy, StakeParameters, StorageProviderId, OpeningType, ApplyOnOpeningParameters, Penalty, Url, IPNSIdentity, ServiceProviderRecord, ContentId, LiaisonJudgement, DataObject, DataObjectStorageRelationshipId, DataObjectStorageRelationship, DataObjectTypeId, DataObjectType, DataObjectsMap, ProposalId, ProposalStatus, ProposalOf, ProposalDetails, ProposalDetailsOf, VotingResults, ProposalParameters, GeneralProposalParameters, VoteKind, DiscussionThread, DiscussionPost, CreateOpeningParameters, FillOpeningParameters, TerminateRoleParameters, ProposalDecision, ExecutionFailed, Approved, SetLeadParams, ThreadMode, ExecutionStatus, FundingRequestParameters, Nonce, EntityId, ClassId, CuratorId, CuratorGroupId, VecMaxLength, TextMaxLength, HashedTextMaxLength, PropertyId, SchemaId, SameController, ClassPermissions, PropertyTypeSingle, PropertyTypeVector, PropertyType, PropertyLockingPolicy, Property, Schema, Class, ClassOf, EntityController, EntityPermissions, StoredValue, VecStoredValue, VecStoredPropertyValue, StoredPropertyValue, InboundReferenceCounter, Entity, EntityOf, CuratorGroup, EntityCreationVoucher, Actor, EntityReferenceCounterSideEffect, ReferenceCounterSideEffects, SideEffects, SideEffect, Status, InputValue, VecInputValue, InputPropertyValue, ParameterizedEntity, ParametrizedPropertyValue, ParametrizedClassPropertyValue, CreateEntityOperation, UpdatePropertyValuesOperation, AddSchemaSupportToEntityOperation, OperationType, InputEntityValuesMap, FailedAt, ReferendumStageVoting, ReferendumStageRevealing, ReferendumStage, OptionResult, VotePower, ConstitutionInfo, ParticipantId, Title, UpdatedTitle, UpdatedBody, ReplyId, Reply, BountyId, EntryId, BountyActor, AssuranceContractType, FundingType_Limited, FundingType_Perpetual, FundingType, BountyCreationParameters, OracleJudgment_Winner, OracleJudgment, Entry }; \ No newline at end of file diff --git a/types/augment-codec/augment-api-consts.ts b/types/augment-codec/augment-api-consts.ts index c5c36c798e..1c5e138756 100644 --- a/types/augment-codec/augment-api-consts.ts +++ b/types/augment-codec/augment-api-consts.ts @@ -2,9 +2,9 @@ /* eslint-disable */ import { Vec } from '@polkadot/types/codec'; -import { u32, u64 } from '@polkadot/types/primitive'; +import { u32, u64, u8 } from '@polkadot/types/primitive'; import { ProposalParameters } from './all'; -import { Balance, BalanceOf, BlockNumber, LockIdentifier, Moment, Perbill, RuntimeDbWeight, Weight } from '@polkadot/types/interfaces/runtime'; +import { Balance, BalanceOf, BlockNumber, Moment, Perbill, RuntimeDbWeight, Weight } from '@polkadot/types/interfaces/runtime'; import { SessionIndex } from '@polkadot/types/interfaces/session'; import { EraIndex } from '@polkadot/types/interfaces/staking'; import { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support'; @@ -33,6 +33,24 @@ declare module '@polkadot/api/types/consts' { **/ existentialDeposit: Balance & AugmentedConst; }; + bounty: { + /** + * Exports const - max work entry number for a closed assurance type contract bounty. + **/ + closedContractSizeLimit: u32 & AugmentedConst; + /** + * Exports const - min cherry value limit for a bounty. + **/ + minCherryLimit: BalanceOf & AugmentedConst; + /** + * Exports const - min funding amount limit for a bounty. + **/ + minFundingLimit: BalanceOf & AugmentedConst; + /** + * Exports const - min work entrant stake for a bounty. + **/ + minWorkEntrantStake: BalanceOf & AugmentedConst; + }; contentDirectoryWorkingGroup: { /** * Exports const - max simultaneous active worker number. @@ -44,10 +62,6 @@ declare module '@polkadot/api/types/consts' { * Duration of annoncing period **/ announcingPeriodDuration: BlockNumber & AugmentedConst; - /** - * Amount that will be added to the budget balance on every refill. - **/ - budgetRefillAmount: Balance & AugmentedConst; /** * Interval between automatic budget refills. **/ @@ -56,10 +70,6 @@ declare module '@polkadot/api/types/consts' { * Council member count **/ councilSize: u64 & AugmentedConst; - /** - * The value elected members will be awarded each block of their reign. - **/ - electedMemberRewardPerBlock: Balance & AugmentedConst; /** * Interval for automatic reward payments. **/ @@ -100,6 +110,20 @@ declare module '@polkadot/api/types/consts' { **/ maxWorkerNumberLimit: u32 & AugmentedConst; }; + members: { + /** + * Exports const - default balance for the invited member. + **/ + defaultInitialInvitationBalance: BalanceOf & AugmentedConst; + /** + * Exports const - default membership fee. + **/ + defaultMembershipPrice: BalanceOf & AugmentedConst; + /** + * Exports const - maximum percent value of the membership fee for the referral cut. + **/ + referralCutMaximumPercent: u8 & AugmentedConst; + }; membershipWorkingGroup: { /** * Exports const - max simultaneous active worker number. @@ -108,53 +132,81 @@ declare module '@polkadot/api/types/consts' { }; proposalsCodex: { /** - * Exports 'Add working group opening' proposal parameters. + * Exports 'Amend Constitution' proposal parameters. **/ - addWorkingGroupOpeningProposalParameters: ProposalParameters & AugmentedConst; + amendConstitutionProposalParameters: ProposalParameters & AugmentedConst; /** - * Exports 'Amend constitution' proposal parameters. + * Exports 'Cancel Working Group Lead Opening' proposal parameters. **/ - amendConstitutionProposalParameters: ProposalParameters & AugmentedConst; + cancelWorkingGroupLeadOpeningProposalParameters: ProposalParameters & AugmentedConst; + createBlogPostProposalParameters: ProposalParameters & AugmentedConst; /** - * Exports 'Decrease working group leader stake' proposal parameters. + * Exports 'Create Working Group Lead Opening' proposal parameters. **/ - decreaseWorkingGroupLeaderStakeProposalParameters: ProposalParameters & AugmentedConst; + createWorkingGroupLeadOpeningProposalParameters: ProposalParameters & AugmentedConst; /** - * Exports 'Fill working group opening' proposal parameters. + * Exports 'Decrease Working Group Lead Stake' proposal parameters. + **/ + decreaseWorkingGroupLeadStakeProposalParameters: ProposalParameters & AugmentedConst; + editBlogPostProoposalParamters: ProposalParameters & AugmentedConst; + /** + * Exports 'Fill Working Group Lead Opening' proposal parameters. **/ fillWorkingGroupOpeningProposalParameters: ProposalParameters & AugmentedConst; /** - * Exports 'Runtime upgrade' proposal parameters. + * Exports 'Funding Request' proposal parameters. + **/ + fundingRequestProposalParameters: ProposalParameters & AugmentedConst; + lockBlogPostProposalParameters: ProposalParameters & AugmentedConst; + /** + * Exports 'Runtime Upgrade' proposal parameters. **/ runtimeUpgradeProposalParameters: ProposalParameters & AugmentedConst; /** - * Exports 'Set validator count' proposal parameters. + * Exports `Set Council Budget Increment` proposal parameters. **/ - setValidatorCountProposalParameters: ProposalParameters & AugmentedConst; + setCouncilBudgetIncrementProposalParameters: ProposalParameters & AugmentedConst; /** - * Exports 'Set working group budget capacity' proposal parameters. + * Exports `Set Councilor Reward Proposal Parameters` proposal parameters. **/ - setWorkingGroupBudgetCapacityProposalParameters: ProposalParameters & AugmentedConst; + setCouncilorRewardProposalParameters: ProposalParameters & AugmentedConst; /** - * Exports 'Set working group leader reward' proposal parameters. + * Exports `Set Initial Invitation Balance` proposal parameters. **/ - setWorkingGroupLeaderRewardProposalParameters: ProposalParameters & AugmentedConst; + setInitialInvitationBalanceProposalParameters: ProposalParameters & AugmentedConst; + setInvitationCountProposalParameters: ProposalParameters & AugmentedConst; /** - * Exports 'Slash working group leader stake' proposal parameters. + * Exports 'Set Max Validator Count' proposal parameters. **/ - slashWorkingGroupLeaderStakeProposalParameters: ProposalParameters & AugmentedConst; + setMaxValidatorCountProposalParameters: ProposalParameters & AugmentedConst; + setMembershipLeadInvitationQuotaProposalParameters: ProposalParameters & AugmentedConst; /** - * Exports 'Spending' proposal parameters. + * Exports 'Set Membership Price' proposal parameters. **/ - spendingProposalParameters: ProposalParameters & AugmentedConst; + setMembershipPriceProposalParameters: ProposalParameters & AugmentedConst; + setReferralCutProposalParameters: ProposalParameters & AugmentedConst; /** - * Exports 'Terminate working group leader role' proposal parameters. + * Exports 'Set Working Group Lead Reward' proposal parameters. **/ - terminateWorkingGroupLeaderRoleProposalParameters: ProposalParameters & AugmentedConst; + setWorkingGroupLeadRewardProposalParameters: ProposalParameters & AugmentedConst; /** - * Exports 'Text' proposal parameters. + * Exports 'Signal' proposal parameters. **/ - textProposalParameters: ProposalParameters & AugmentedConst; + signalProposalParameters: ProposalParameters & AugmentedConst; + /** + * Exports 'Slash Working Group Lead' proposal parameters. + **/ + slashWorkingGroupLeadProposalParameters: ProposalParameters & AugmentedConst; + /** + * Exports 'Terminate Working Group Lead' proposal parameters. + **/ + terminateWorkingGroupLeadProposalParameters: ProposalParameters & AugmentedConst; + unlockBlogPostProposalParameters: ProposalParameters & AugmentedConst; + /** + * Exports 'Update Working Group Budget' proposal parameters. + **/ + updateWorkingGroupBudgetProposalParameters: ProposalParameters & AugmentedConst; + vetoProposalProposalParameters: ProposalParameters & AugmentedConst; }; proposalsEngine: { /** @@ -170,7 +222,8 @@ declare module '@polkadot/api/types/consts' { **/ maxActiveProposalLimit: u32 & AugmentedConst; /** - * Exports const - the fee is applied when the proposal gets rejected. A fee would be slashed (burned). + * Exports const - the fee is applied when the proposal gets rejected. A fee would + * be slashed (burned). **/ rejectionFee: BalanceOf & AugmentedConst; /** @@ -180,17 +233,14 @@ declare module '@polkadot/api/types/consts' { }; referendum: { /** - * Identifier for currency locks used for staking. - **/ - lockId: LockIdentifier & AugmentedConst; - /** - * Maximum length of vote commitment salt. Use length that ensures uniqueness for hashing e.g. std::u64::MAX. + * Maximum length of vote commitment salt. Use length that ensures uniqueness for hashing + * e.g. std::u64::MAX. **/ maxSaltLength: u64 & AugmentedConst; /** * Minimum stake needed for voting **/ - minimumStake: Balance & AugmentedConst; + minimumStake: BalanceOf & AugmentedConst; /** * Duration of revealing stage (number of blocks) **/ diff --git a/types/augment-codec/augment-api-query.ts b/types/augment-codec/augment-api-query.ts index 4d14015e20..5adbdb4982 100644 --- a/types/augment-codec/augment-api-query.ts +++ b/types/augment-codec/augment-api-query.ts @@ -3,8 +3,8 @@ import { AnyNumber, ITuple, Observable } from '@polkadot/types/types'; import { Option, Vec } from '@polkadot/types/codec'; -import { Bytes, bool, u32, u64 } from '@polkadot/types/primitive'; -import { Application, ApplicationId, Candidate, CastVoteOf, Category, CategoryId, ClassId, ClassOf, ConstitutionInfo, ContentId, CouncilMemberOf, CouncilStageUpdate, CuratorGroup, CuratorGroupId, DataObject, DataObjectStorageRelationship, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DiscussionPost, DiscussionThread, EntityController, EntityCreationVoucher, EntityId, EntityOf, MemberId, Membership, MemoText, ModeratorId, Opening, OpeningId, Post, PostId, PropertyId, ProposalDetailsOf, ProposalId, ProposalOf, ReferendumStage, ServiceProviderRecord, StakingAccountMemberBinding, StorageProviderId, Thread, ThreadId, Url, VoteKind, Worker, WorkerId } from './all'; +import { Bytes, bool, u32, u64, u8 } from '@polkadot/types/primitive'; +import { Application, ApplicationId, BountyActor, BountyId, Candidate, CastVoteOf, Category, CategoryId, ClassId, ClassOf, ConstitutionInfo, ContentId, CouncilMemberOf, CouncilStageUpdate, CuratorGroup, CuratorGroupId, DataObject, DataObjectStorageRelationship, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DiscussionPost, DiscussionThread, EntityController, EntityCreationVoucher, EntityId, EntityOf, Entry, EntryId, ForumUserId, MemberId, Membership, MemoText, ModeratorId, Opening, OpeningId, Post, PostId, PropertyId, ProposalId, ProposalOf, ReferendumStage, Reply, ReplyId, ServiceProviderRecord, StakingAccountMemberBinding, StorageProviderId, ThreadId, ThreadOf, Url, VoteKind, Worker, WorkerId } from './all'; import { UncleEntryItem } from '@polkadot/types/interfaces/authorship'; import { BabeAuthorityWeight, MaybeRandomness, NextConfigDescriptor, Randomness } from '@polkadot/types/interfaces/babe'; import { AccountData, BalanceLock } from '@polkadot/types/interfaces/balances'; @@ -16,6 +16,7 @@ import { AccountId, Balance, BalanceOf, BlockNumber, ExtrinsicsWeight, Hash, Key import { Keys, SessionIndex } from '@polkadot/types/interfaces/session'; import { ActiveEraInfo, ElectionResult, ElectionScore, ElectionStatus, EraIndex, EraRewardPoints, Exposure, Forcing, Nominations, RewardDestination, SlashingSpans, SpanIndex, SpanRecord, StakingLedger, UnappliedSlash, ValidatorPrefs } from '@polkadot/types/interfaces/staking'; import { AccountInfo, DigestOf, EventIndex, EventRecord, LastRuntimeUpgradeInfo, Phase } from '@polkadot/types/interfaces/system'; +import { Bounty } from '@polkadot/types/interfaces/treasury'; import { Multiplier } from '@polkadot/types/interfaces/txpayment'; import { ApiTypes } from '@polkadot/api/types'; @@ -127,6 +128,43 @@ declare module '@polkadot/api/types/storage' { **/ totalIssuance: AugmentedQuery Observable>; }; + blog: { + /** + * Post by unique blog and post identificators + **/ + postById: AugmentedQuery Observable>; + /** + * Maps, representing id => item relationship for blogs, posts and replies related structures + * Post count + **/ + postCount: AugmentedQuery Observable>; + /** + * Reply by unique blog, post and reply identificators + **/ + replyById: AugmentedQueryDoubleMap Observable>; + }; + bounty: { + /** + * Bounty storage. + **/ + bounties: AugmentedQuery Observable>; + /** + * Double map for bounty funding. It stores a member or council funding for bounties. + **/ + bountyContributions: AugmentedQueryDoubleMap Observable>; + /** + * Count of all bounties that have been created. + **/ + bountyCount: AugmentedQuery Observable>; + /** + * Work entry storage map. + **/ + entries: AugmentedQuery Observable>; + /** + * Count of all work entries that have been created. + **/ + entryCount: AugmentedQuery Observable>; + }; constitution: { constitution: AugmentedQuery Observable>; }; @@ -207,6 +245,10 @@ declare module '@polkadot/api/types/storage' { * Budget for the council's elected members rewards. **/ budget: AugmentedQuery Observable>; + /** + * Amount of balance to be refilled every budget period + **/ + budgetIncrement: AugmentedQuery Observable>; /** * Map of all candidates that ever candidated and haven't unstake yet. **/ @@ -215,6 +257,10 @@ declare module '@polkadot/api/types/storage' { * Current council members **/ councilMembers: AugmentedQuery Observable>>; + /** + * Councilor reward per block + **/ + councilorReward: AugmentedQuery Observable>; /** * The next block in which the budget will be increased. **/ @@ -313,6 +359,10 @@ declare module '@polkadot/api/types/storage' { * Thread identifier value to be used for next Thread in threadById. **/ nextThreadId: AugmentedQuery Observable>; + /** + * Unique thread poll voters. This private double map prevents double voting. + **/ + pollVotes: AugmentedQueryDoubleMap Observable>; /** * Map post identifier to corresponding post. **/ @@ -320,7 +370,7 @@ declare module '@polkadot/api/types/storage' { /** * Map thread identifier to corresponding thread. **/ - threadById: AugmentedQueryDoubleMap Observable>; + threadById: AugmentedQueryDoubleMap Observable>; }; forumWorkingGroup: { /** @@ -432,14 +482,6 @@ declare module '@polkadot/api/types/storage' { * Registered unique handles hash and their mapping to their owner. **/ memberIdByHandleHash: AugmentedQuery Observable>; - /** - * Mapping of a controller account id to vector of member ids it controls. - **/ - memberIdsByControllerAccountId: AugmentedQuery Observable>>; - /** - * Mapping of a root account id to vector of member ids it controls. - **/ - memberIdsByRootAccountId: AugmentedQuery Observable>>; /** * Mapping of member's id to their membership profile. **/ @@ -454,9 +496,9 @@ declare module '@polkadot/api/types/storage' { **/ nextMemberId: AugmentedQuery Observable>; /** - * Referral cut to receive during on buying the membership. + * Referral cut percent of the membership fee to receive on buying the membership. **/ - referralCut: AugmentedQuery Observable>; + referralCut: AugmentedQuery Observable>; /** * Double of a staking account id and member id to the confirmation status. **/ @@ -533,10 +575,6 @@ declare module '@polkadot/api/types/storage' { reportsByKindIndex: AugmentedQuery Observable>; }; proposalsCodex: { - /** - * Map proposal id to proposal details - **/ - proposalDetailsByProposalId: AugmentedQuery Observable>; /** * Map proposal id to its discussion thread id **/ @@ -596,9 +634,11 @@ declare module '@polkadot/api/types/storage' { **/ stage: AugmentedQuery Observable>; /** - * Votes cast in the referendum. A new record is added to this map when a user casts a sealed vote. + * Votes cast in the referendum. A new record is added to this map when a user casts a + * sealed vote. * It is modified when a user reveals the vote's commitment proof. - * A record is finally removed when the user unstakes, which can happen during a voting stage or after the current cycle ends. + * A record is finally removed when the user unstakes, which can happen during a voting + * stage or after the current cycle ends. * A stake for a vote can be reused in future referendum cycles. **/ votes: AugmentedQuery Observable>; diff --git a/types/augment-codec/augment-api-tx.ts b/types/augment-codec/augment-api-tx.ts index 22d4d6d81a..b804ee6b23 100644 --- a/types/augment-codec/augment-api-tx.ts +++ b/types/augment-codec/augment-api-tx.ts @@ -1,10 +1,10 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -import { AnyNumber } from '@polkadot/types/types'; +import { AnyNumber, ITuple } from '@polkadot/types/types'; import { BTreeMap, BTreeSet, Compact, Option, Vec } from '@polkadot/types/codec'; -import { Bytes, bool, u16, u32, u64 } from '@polkadot/types/primitive'; -import { Actor, ActorId, ApplicationId, ApplyOnOpeningParameters, BuyMembershipParameters, CategoryId, ClassId, ClassPermissions, ContentId, CuratorGroupId, CuratorId, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DataObjectsMap, EntityController, EntityId, ForumUserId, GeneralProposalParameters, InputPropertyValue, InputValue, InviteMembershipParameters, MemberId, MemoText, ModeratorId, Nonce, OpeningId, OpeningType, OperationType, Penalty, Poll, PostId, PostReactionId, PrivilegedActor, Property, PropertyId, ProposalDetailsOf, ProposalId, SchemaId, StakePolicy, StorageProviderId, ThreadId, ThreadMode, Url, VecMaxLength, VoteKind, WorkerId } from './all'; +import { Bytes, bool, u16, u32, u64, u8 } from '@polkadot/types/primitive'; +import { Actor, ActorId, ApplicationId, ApplyOnOpeningParameters, BalanceKind, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, CategoryId, ClassId, ClassPermissions, ContentId, CuratorGroupId, CuratorId, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DataObjectsMap, EntityController, EntityId, EntryId, ForumUserId, FundingRequestParameters, GeneralProposalParameters, InputPropertyValue, InputValue, InviteMembershipParameters, MemberId, MemoText, ModeratorId, Nonce, OpeningId, OpeningType, OperationType, OracleJudgment, ParticipantId, Poll, PostId, PostReactionId, PrivilegedActor, Property, PropertyId, ProposalDetailsOf, ProposalId, ReplyId, SchemaId, StakePolicy, StorageProviderId, ThreadId, ThreadMode, Url, VecMaxLength, VoteKind, WorkerId, WorkingGroup } from './all'; import { BabeEquivocationProof } from '@polkadot/types/interfaces/babe'; import { Extrinsic, Signature } from '@polkadot/types/interfaces/extrinsics'; import { GrandpaEquivocationProof, KeyOwnerProof } from '@polkadot/types/interfaces/grandpa'; @@ -119,6 +119,209 @@ declare module '@polkadot/api/types/submittable' { **/ transferKeepAlive: AugmentedSubmittable<(dest: LookupSource | string | Uint8Array, value: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic>; }; + blog: { + /** + * Blog owner can create posts, related to a given blog, if related blog is unlocked + * + * + * + * ## Weight + * `O (T + B)` where: + * - `T` is the length of the title + * - `B` is the length of the body + * - DB: + * - O(1) doesn't depend on the state or parameters + * # + **/ + createPost: AugmentedSubmittable<(title: Bytes | string | Uint8Array, body: Bytes | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Create either root post reply or direct reply to reply + * (Only accessible, if related blog and post are unlocked) + * + * + * ## Weight + * `O (T)` where: + * - `T` is the length of the `text` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # + **/ + createReply: AugmentedSubmittable<(participantId: ParticipantId | AnyNumber | Uint8Array, postId: PostId | AnyNumber | Uint8Array, replyId: Option | null | object | string | Uint8Array, text: Bytes | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Blog owner can edit post, related to a given blog (if unlocked) + * with a new title and/or body + * + * + * ## Weight + * `O (T + B)` where: + * - `T` is the length of the `new_title` + * - `B` is the length of the `new_body` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # + **/ + editPost: AugmentedSubmittable<(postId: PostId | AnyNumber | Uint8Array, newTitle: Option | null | object | string | Uint8Array, newBody: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Reply owner can edit reply with a new text + * (Only accessible, if related blog and post are unlocked) + * + * + * + * ## Weight + * `O (T)` where: + * - `T` is the length of the `new_text` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # + **/ + editReply: AugmentedSubmittable<(participantId: ParticipantId | AnyNumber | Uint8Array, postId: PostId | AnyNumber | Uint8Array, replyId: ReplyId | AnyNumber | Uint8Array, newText: Bytes | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Blog owner can lock posts, related to a given blog, + * making post immutable to any actions (replies creation, post editing, etc.) + * + * + * + * ## Weight + * `O (1)` doesn't depends on the state or parameters + * - DB: + * - O(1) doesn't depend on the state or parameters + * # + **/ + lockPost: AugmentedSubmittable<(postId: PostId | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + /** + * Blog owner can unlock posts, related to a given blog, + * making post accesible to previously forbidden actions + * + * + * + * ## Weight + * `O (1)` doesn't depends on the state or parameters + * - DB: + * - O(1) doesn't depend on the state or parameters + * # + **/ + unlockPost: AugmentedSubmittable<(postId: PostId | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + }; + bounty: { + /** + * Announce work entry for a successful bounty. + * # + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # + **/ + announceWorkEntry: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, bountyId: BountyId | AnyNumber | Uint8Array, stakingAccountId: AccountId | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Cancels a bounty. + * It returns a cherry to creator and removes bounty. + * # + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # + **/ + cancelBounty: AugmentedSubmittable<(creator: BountyActor | { Council: any } | { Member: any } | string | Uint8Array, bountyId: BountyId | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + /** + * Creates a bounty. Metadata stored in the transaction log but discarded after that. + * + * + * ## Weight + * `O (W)` where: + * - `W` is the _metadata length. + * - `M` is closed contract member list length. + * - DB: + * - O(M) (O(1) on open contract) + * # + **/ + createBounty: AugmentedSubmittable<(params: BountyCreationParameters | { oracle?: any; contract_type?: any; creator?: any; cherry?: any; entrant_stake?: any; funding_type?: any; work_period?: any; judging_period?: any } | string | Uint8Array, metadata: Bytes | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Provides bounty funding. + * # + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # + **/ + fundBounty: AugmentedSubmittable<(funder: BountyActor | { Council: any } | { Member: any } | string | Uint8Array, bountyId: BountyId | AnyNumber | Uint8Array, amount: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + /** + * Submits an oracle judgment for a bounty. + * # + * + * ## weight + * `O (N)` + * - `N` is the work_data length, + * - db: + * - `O(N)` + * # + **/ + submitOracleJudgment: AugmentedSubmittable<(oracle: BountyActor | { Council: any } | { Member: any } | string | Uint8Array, bountyId: BountyId | AnyNumber | Uint8Array, judgment: OracleJudgment | { Winner: any } | { Rejected: any } | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Submit work for a bounty. + * # + * + * ## weight + * `O (N)` + * - `N` is the work_data length, + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # + **/ + submitWork: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, bountyId: BountyId | AnyNumber | Uint8Array, entryId: EntryId | AnyNumber | Uint8Array, workData: Bytes | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Vetoes a bounty. + * It returns a cherry to creator and removes bounty. + * # + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # + **/ + vetoBounty: AugmentedSubmittable<(bountyId: BountyId | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + /** + * Withdraw bounty funding by a member or a council. + * # + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # + **/ + withdrawFunding: AugmentedSubmittable<(funder: BountyActor | { Council: any } | { Member: any } | string | Uint8Array, bountyId: BountyId | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + /** + * Withdraw work entrant funds. + * Both legitimate participants and winners get their stake unlocked. Winners also get a + * bounty reward. + * # + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # + **/ + withdrawWorkEntrantFunds: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, bountyId: BountyId | AnyNumber | Uint8Array, entryId: EntryId | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + /** + * Withdraw work entry for a bounty. Existing stake could be partially slashed. + * # + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # + **/ + withdrawWorkEntry: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, bountyId: BountyId | AnyNumber | Uint8Array, entryId: EntryId | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + }; constitution: { /** * Sets the current constitution hash. Requires root origin. @@ -239,7 +442,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # **/ - addOpening: AugmentedSubmittable<(description: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Regular' | number | Uint8Array, stakePolicy: Option | null | object | string | Uint8Array, rewardPerBlock: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; + addOpening: AugmentedSubmittable<(description: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Regular' | number | Uint8Array, stakePolicy: StakePolicy | { stake_amount?: any; leaving_unstaking_period?: any } | string | Uint8Array, rewardPerBlock: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Apply on a worker opening. * @@ -317,7 +520,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # **/ - leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, rationale: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Sets a new budget for the working group. * Requires root origin. @@ -359,7 +562,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # **/ - slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Penalty | { slashing_text?: any; slashing_amount?: any } | string | Uint8Array) => SubmittableExtrinsic>; + slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: BalanceOf | AnyNumber | Uint8Array, rationale: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Transfers specified amount to any account. * Requires leader origin. @@ -385,7 +588,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # **/ - terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; + terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Option | null | object | string | Uint8Array, rationale: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Update the reward account associated with a set reward relationship for the active worker. * @@ -449,6 +652,19 @@ declare module '@polkadot/api/types/submittable' { * # **/ announceCandidacy: AugmentedSubmittable<(membershipId: MemberId | AnyNumber | Uint8Array, stakingAccountId: AccountId | string | Uint8Array, rewardAccountId: AccountId | string | Uint8Array, stake: Balance | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + /** + * Transfers funds from council budget to account + * + * # + * + * ## weight + * `O (F)` where: + * `F` is the length of `funding_requests` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # + **/ + fundingRequest: AugmentedSubmittable<(fundingRequests: Vec | (FundingRequestParameters | { account?: any; amount?: any } | string | Uint8Array)[]) => SubmittableExtrinsic>; /** * Plan the next budget refill. * @@ -485,6 +701,18 @@ declare module '@polkadot/api/types/submittable' { * # **/ setBudget: AugmentedSubmittable<(balance: Balance | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + /** + * Sets the budget refill amount + * + * # + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # + **/ + setBudgetIncrement: AugmentedSubmittable<(budgetIncrement: Balance | AnyNumber | Uint8Array) => SubmittableExtrinsic>; /** * Set short description for the user's candidacy. Can be called anytime during user's candidacy. * @@ -498,6 +726,18 @@ declare module '@polkadot/api/types/submittable' { * # **/ setCandidacyNote: AugmentedSubmittable<(membershipId: MemberId | AnyNumber | Uint8Array, note: Bytes | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Sets the councilor reward per block + * + * # + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # + **/ + setCouncilorReward: AugmentedSubmittable<(councilorReward: Balance | AnyNumber | Uint8Array) => SubmittableExtrinsic>; /** * Withdraw candidacy and release candidacy stake. * @@ -607,51 +847,238 @@ declare module '@polkadot/api/types/submittable' { forum: { /** * Add post + * + * + * + * ## Weight + * `O (W + V)` where: + * - `W` is the category depth, + * - `V` is the length of the text + * - DB: + * - O(W) + * # **/ - addPost: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, text: Bytes | string | Uint8Array) => SubmittableExtrinsic>; + addPost: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, text: Bytes | string | Uint8Array, editable: bool | boolean | Uint8Array) => SubmittableExtrinsic>; /** * Add a new category. + * + * + * + * ## Weight + * `O (W + V + X)` where: + * - `W` is the category depth + * - `V` is the length of the category title. + * - `X` is the length of the category description. + * - DB: + * - O(W) + * # **/ createCategory: AugmentedSubmittable<(parentCategoryId: Option | null | object | string | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array) => SubmittableExtrinsic>; /** * Create new thread in category with poll + * + * + * + * ## Weight + * `O (W + V + X + Y)` where: + * - `W` is the category depth + * - `V` is the length of the thread title. + * - `X` is the length of the thread text. + * - `Y` is the number of poll alternatives. + * - DB: + * - O(W) + * # **/ createThread: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, text: Bytes | string | Uint8Array, poll: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Delete category + * + * + * + * ## Weight + * `O (W)` where: + * - `W` is the category depth + * - DB: + * - O(W) + * # + **/ deleteCategory: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array) => SubmittableExtrinsic>; - deleteThread: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + /** + * Delete post from storage. + * You need to provide a vector of posts to delete in the form + * (T::CategoryId, T::ThreadId, T::PostId, bool) + * where the last bool is whether you want to hide it apart from deleting it + * + * ## Weight + * `O (W + V + P)` where: + * - `W` is the category depth, + * - `V` is the length of the rationale + * - `P` is the number of posts to delete + * - DB: + * - O(W + P) + * # + **/ + deletePosts: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, posts: Vec> | ([CategoryId | AnyNumber | Uint8Array, ThreadId | AnyNumber | Uint8Array, PostId | AnyNumber | Uint8Array, bool | boolean | Uint8Array])[], rationale: Bytes | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Delete thread + * + * + * + * ## Weight + * `O (W)` where: + * - `W` is the category depth + * - DB: + * - O(W) + * # + **/ + deleteThread: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, hide: bool | boolean | Uint8Array) => SubmittableExtrinsic>; /** * Edit post text + * + * + * + * ## Weight + * `O (W + V)` where: + * - `W` is the category depth, + * - `V` is the length of the new text + * - DB: + * - O(W) + * # **/ editPostText: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, postId: PostId | AnyNumber | Uint8Array, newText: Bytes | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Edit thread title + * + * + * + * ## Weight + * `O (W + V)` where: + * - `W` is the category depth + * - `V` is the length of the thread title. + * - DB: + * - O(W) + * # + **/ editThreadTitle: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, newTitle: Bytes | string | Uint8Array) => SubmittableExtrinsic>; /** * Moderate post + * + * + * + * ## Weight + * `O (W + V)` where: + * - `W` is the category depth, + * - `V` is the length of the rationale + * - DB: + * - O(W) + * # **/ moderatePost: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, postId: PostId | AnyNumber | Uint8Array, rationale: Bytes | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Moderate thread + * + * + * + * ## Weight + * `O (W + V + X)` where: + * - `W` is the category depth, + * - `V` is the number of thread posts, + * - `X` is the length of the rationale + * - DB: + * - O(W + V) + * # + **/ moderateThread: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, rationale: Bytes | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Move thread to another category + * + * + * + * ## Weight + * `O (W)` where: + * - `W` is the category depth + * - DB: + * - O(W) + * # + **/ moveThreadToCategory: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, newCategoryId: CategoryId | AnyNumber | Uint8Array) => SubmittableExtrinsic>; /** - * like or unlike a post. + * Like or unlike a post. + * + * + * + * ## Weight + * `O (W)` where: + * - `W` is the category depth, + * - DB: + * - O(W) + * # **/ reactPost: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, postId: PostId | AnyNumber | Uint8Array, react: PostReactionId | AnyNumber | Uint8Array) => SubmittableExtrinsic>; /** * Set stickied threads for category + * + * + * + * ## Weight + * `O (W + V)` where: + * - `W` is the category depth, + * - `V` is the length of the stickied_ids + * - DB: + * - O(W + V) + * # **/ setStickiedThreads: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, stickiedIds: Vec | (ThreadId | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic>; /** - * Update category + * Update archival status + * + * + * + * ## Weight + * `O (W)` where: + * - `W` is the category depth + * - DB: + * - O(W) + * # **/ updateCategoryArchivalStatus: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, newArchivalStatus: bool | boolean | Uint8Array) => SubmittableExtrinsic>; /** * Enable a moderator can moderate a category and its sub categories. + * + * + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # **/ updateCategoryMembershipOfModerator: AugmentedSubmittable<(moderatorId: ModeratorId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, newValue: bool | boolean | Uint8Array) => SubmittableExtrinsic>; /** - * Update category + * Update thread archival status + * + * + * + * ## Weight + * `O (W)` where: + * - `W` is the category depth + * - DB: + * - O(W) + * # **/ updateThreadArchivalStatus: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, newArchivalStatus: bool | boolean | Uint8Array) => SubmittableExtrinsic>; /** - * submit a poll + * Submit a poll + * + * + * + * ## Weight + * `O (W + V)` where: + * - `W` is the category depth, + * - `V` is the number of poll alternatives. + * - DB: + * - O(W) + * # **/ voteOnPoll: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic>; }; @@ -669,7 +1096,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # **/ - addOpening: AugmentedSubmittable<(description: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Regular' | number | Uint8Array, stakePolicy: Option | null | object | string | Uint8Array, rewardPerBlock: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; + addOpening: AugmentedSubmittable<(description: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Regular' | number | Uint8Array, stakePolicy: StakePolicy | { stake_amount?: any; leaving_unstaking_period?: any } | string | Uint8Array, rewardPerBlock: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Apply on a worker opening. * @@ -747,7 +1174,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # **/ - leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, rationale: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Sets a new budget for the working group. * Requires root origin. @@ -789,7 +1216,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # **/ - slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Penalty | { slashing_text?: any; slashing_amount?: any } | string | Uint8Array) => SubmittableExtrinsic>; + slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: BalanceOf | AnyNumber | Uint8Array, rationale: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Transfers specified amount to any account. * Requires leader origin. @@ -815,7 +1242,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # **/ - terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; + terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Option | null | object | string | Uint8Array, rationale: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Update the reward account associated with a set reward relationship for the active worker. * @@ -911,63 +1338,235 @@ declare module '@polkadot/api/types/submittable' { **/ heartbeat: AugmentedSubmittable<(heartbeat: Heartbeat | { blockNumber?: any; networkState?: any; sessionIndex?: any; authorityIndex?: any; validatorsLen?: any } | string | Uint8Array, signature: Signature | string | Uint8Array) => SubmittableExtrinsic>; }; + joystreamUtility: { + /** + * Burns token for caller account + * + * + * ## Weight + * `O (1)` Doesn't depend on the state or parameters + * - DB: + * - O(1) doesn't depend on the state or parameters + * # + **/ + burnAccountTokens: AugmentedSubmittable<(amount: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + /** + * Runtime upgrade proposal extrinsic. + * Should be used as callable object to pass to the `engine` module. + * + * + * ## Weight + * `O (C)` where: + * - `C` is the length of `wasm` + * However, we treat this as a full block as `frame_system::Module::set_code` does + * # + **/ + executeRuntimeUpgradeProposal: AugmentedSubmittable<(wasm: Bytes | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Signal proposal extrinsic. Should be used as callable object to pass to the `engine` module. + * + * + * + * ## Weight + * `O (S)` where: + * - `S` is the length of the signal + * - DB: + * - O(1) doesn't depend on the state or parameters + * # + **/ + executeSignalProposal: AugmentedSubmittable<(signal: Bytes | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Update working group budget + * + * + * ## Weight + * `O (1)` Doesn't depend on the state or parameters + * - DB: + * - O(1) doesn't depend on the state or parameters + * # + **/ + updateWorkingGroupBudget: AugmentedSubmittable<(workingGroup: WorkingGroup | 'Forum'|'Storage'|'Content'|'Membership' | number | Uint8Array, amount: BalanceOf | AnyNumber | Uint8Array, balanceKind: BalanceKind | 'Positive'|'Negative' | number | Uint8Array) => SubmittableExtrinsic>; + }; members: { /** * Add staking account candidate for a member. * The membership must be confirmed before usage. + * + * + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # **/ addStakingAccountCandidate: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array) => SubmittableExtrinsic>; /** * Non-members can buy membership. + * + * + * + * ## Weight + * `O (W + V + X + Y)` where: + * - `W` is the member name + * - `V` is the member handle + * - `X` is the member avatar uri + * - `Y` is the member about + * - DB: + * - O(V) + * # **/ - buyMembership: AugmentedSubmittable<(params: BuyMembershipParameters | { root_account?: any; controller_account?: any; name?: any; handle?: any; avatar_uri?: any; about?: any; referrer_id?: any } | string | Uint8Array) => SubmittableExtrinsic>; + buyMembership: AugmentedSubmittable<(params: BuyMembershipParameters | { root_account?: any; controller_account?: any; handle?: any; metadata?: any; referrer_id?: any } | string | Uint8Array) => SubmittableExtrinsic>; /** * Confirm staking account candidate for a member. + * + * + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # **/ confirmStakingAccount: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, stakingAccountId: AccountId | string | Uint8Array) => SubmittableExtrinsic>; /** * Invite a new member. + * + * + * + * ## Weight + * `O (W + V + X + Y)` where: + * - `W` is the member name + * - `V` is the member handle + * - `X` is the member avatar uri + * - `Y` is the member about + * - DB: + * - O(V) + * # **/ - inviteMember: AugmentedSubmittable<(params: InviteMembershipParameters | { inviting_member_id?: any; root_account?: any; controller_account?: any; name?: any; handle?: any; avatar_uri?: any; about?: any } | string | Uint8Array) => SubmittableExtrinsic>; + inviteMember: AugmentedSubmittable<(params: InviteMembershipParameters | { inviting_member_id?: any; root_account?: any; controller_account?: any; handle?: any; metadata?: any } | string | Uint8Array) => SubmittableExtrinsic>; /** * Remove staking account for a member. + * + * + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # **/ removeStakingAccount: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array) => SubmittableExtrinsic>; /** * Updates initial invitation balance for a invited member. Requires root origin. + * + * + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # **/ setInitialInvitationBalance: AugmentedSubmittable<(newInitialBalance: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic>; /** * Updates initial invitation count for a member. Requires root origin. + * + * + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # **/ setInitialInvitationCount: AugmentedSubmittable<(newInvitationCount: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic>; /** * Updates leader invitation quota. Requires root origin. + * + * + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # **/ setLeaderInvitationQuota: AugmentedSubmittable<(invitationQuota: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic>; /** * Updates membership price. Requires root origin. + * + * + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # **/ setMembershipPrice: AugmentedSubmittable<(newPrice: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic>; /** - * Updates membership referral cut. Requires root origin. + * Updates membership referral cut percent value. Requires root origin. + * + * + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # **/ - setReferralCut: AugmentedSubmittable<(value: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + setReferralCut: AugmentedSubmittable<(percentValue: u8 | AnyNumber | Uint8Array) => SubmittableExtrinsic>; /** * Transfers invites from one member to another. + * + * + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # **/ transferInvites: AugmentedSubmittable<(sourceMemberId: MemberId | AnyNumber | Uint8Array, targetMemberId: MemberId | AnyNumber | Uint8Array, numberOfInvites: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic>; /** * Updates member root or controller accounts. No effect if both new accounts are empty. + * + * + * + * + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # **/ updateAccounts: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, newRootAccount: Option | null | object | string | Uint8Array, newControllerAccount: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Update member's all or some of name, handle, avatar and about text. * No effect if no changed fields. + * + * + * + * ## Weight + * `O (W)` where: + * - `W` is the handle length + * - DB: + * - O(W) + * # **/ - updateProfile: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, name: Option | null | object | string | Uint8Array, handle: Option | null | object | string | Uint8Array, avatarUri: Option | null | object | string | Uint8Array, about: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; + updateProfile: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, handle: Option | null | object | string | Uint8Array, metadata: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Updates member profile verification status. Requires working group member origin. + * + * + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # **/ updateProfileVerification: AugmentedSubmittable<(workerId: ActorId | AnyNumber | Uint8Array, targetMemberId: MemberId | AnyNumber | Uint8Array, isVerified: bool | boolean | Uint8Array) => SubmittableExtrinsic>; }; @@ -985,7 +1584,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # **/ - addOpening: AugmentedSubmittable<(description: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Regular' | number | Uint8Array, stakePolicy: Option | null | object | string | Uint8Array, rewardPerBlock: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; + addOpening: AugmentedSubmittable<(description: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Regular' | number | Uint8Array, stakePolicy: StakePolicy | { stake_amount?: any; leaving_unstaking_period?: any } | string | Uint8Array, rewardPerBlock: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Apply on a worker opening. * @@ -1063,7 +1662,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # **/ - leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, rationale: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Sets a new budget for the working group. * Requires root origin. @@ -1105,7 +1704,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # **/ - slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Penalty | { slashing_text?: any; slashing_amount?: any } | string | Uint8Array) => SubmittableExtrinsic>; + slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: BalanceOf | AnyNumber | Uint8Array, rationale: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Transfers specified amount to any account. * Requires leader origin. @@ -1131,7 +1730,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # **/ - terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; + terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Option | null | object | string | Uint8Array, rationale: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Update the reward account associated with a set reward relationship for the active worker. * @@ -1188,17 +1787,19 @@ declare module '@polkadot/api/types/submittable' { proposalsCodex: { /** * Create a proposal, the type of proposal depends on the `proposal_details` variant + * + * + * + * ## Weight + * `O (T + D + I)` where: + * - `T` is the length of the title + * - `D` is the length of the description + * - `I` is the length of any parameter in `proposal_details` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # **/ - createProposal: AugmentedSubmittable<(generalProposalParameters: GeneralProposalParameters | { member_id?: any; title?: any; description?: any; staking_account_id?: any; exact_execution_block?: any } | string | Uint8Array, proposalDetails: ProposalDetailsOf | { Text: any } | { RuntimeUpgrade: any } | { Spending: any } | { SetValidatorCount: any } | { AddWorkingGroupLeaderOpening: any } | { FillWorkingGroupLeaderOpening: any } | { SetWorkingGroupBudgetCapacity: any } | { DecreaseWorkingGroupLeaderStake: any } | { SlashWorkingGroupLeaderStake: any } | { SetWorkingGroupLeaderReward: any } | { TerminateWorkingGroupLeaderRole: any } | { AmendConstitution: any } | string | Uint8Array) => SubmittableExtrinsic>; - /** - * Runtime upgrade proposal extrinsic. - * Should be used as callable object to pass to the `engine` module. - **/ - executeRuntimeUpgradeProposal: AugmentedSubmittable<(wasm: Bytes | string | Uint8Array) => SubmittableExtrinsic>; - /** - * Text proposal extrinsic. Should be used as callable object to pass to the `engine` module. - **/ - executeTextProposal: AugmentedSubmittable<(text: Bytes | string | Uint8Array) => SubmittableExtrinsic>; + createProposal: AugmentedSubmittable<(generalProposalParameters: GeneralProposalParameters | { member_id?: any; title?: any; description?: any; staking_account_id?: any; exact_execution_block?: any } | string | Uint8Array, proposalDetails: ProposalDetailsOf | { Signal: any } | { RuntimeUpgrade: any } | { FundingRequest: any } | { SetMaxValidatorCount: any } | { CreateWorkingGroupLeadOpening: any } | { FillWorkingGroupLeadOpening: any } | { UpdateWorkingGroupBudget: any } | { DecreaseWorkingGroupLeadStake: any } | { SlashWorkingGroupLead: any } | { SetWorkingGroupLeadReward: any } | { TerminateWorkingGroupLead: any } | { AmendConstitution: any } | { CancelWorkingGroupLeadOpening: any } | { SetMembershipPrice: any } | { SetCouncilBudgetIncrement: any } | { SetCouncilorReward: any } | { SetInitialInvitationBalance: any } | { SetInitialInvitationCount: any } | { SetMembershipLeadInvitationQuota: any } | { SetReferralCut: any } | { CreateBlogPost: any } | { EditBlogPost: any } | { LockBlogPost: any } | { UnlockBlogPost: any } | { VetoProposal: any } | string | Uint8Array) => SubmittableExtrinsic>; }; proposalsDiscussion: { /** @@ -1207,13 +1808,13 @@ declare module '@polkadot/api/types/submittable' { * * * ## Weight - * `O (W)` where: - * - `W` is the number of whitelisted members for `thread_id` + * `O (L)` where: + * - `L` is the length of `text` * - DB: * - O(1) doesn't depend on the state or parameters * # **/ - addPost: AugmentedSubmittable<(postAuthorId: MemberId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, text: Bytes | string | Uint8Array) => SubmittableExtrinsic>; + addPost: AugmentedSubmittable<(postAuthorId: MemberId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, text: Bytes | string | Uint8Array, editable: bool | boolean | Uint8Array) => SubmittableExtrinsic>; /** * Changes thread permission mode. * @@ -1227,13 +1828,27 @@ declare module '@polkadot/api/types/submittable' { * # **/ changeThreadMode: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, mode: ThreadMode | { Open: any } | { Closed: any } | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Remove post from storage, with the last parameter indicating whether to also hide it + * in the UI. + * + * + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # + **/ + deletePost: AugmentedSubmittable<(deleterId: MemberId | AnyNumber | Uint8Array, postId: PostId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, hide: bool | boolean | Uint8Array) => SubmittableExtrinsic>; /** * Updates a post with author origin check. Update attempts number is limited. * * * * ## Weight - * `O (1)` doesn't depend on the state or parameters + * `O (L)` where: + * - `L` is the length of `text` * - DB: * - O(1) doesn't depend on the state or parameters * # @@ -1299,7 +1914,8 @@ declare module '@polkadot/api/types/submittable' { * * ## Weight * `O (W)` where: - * - `W` is the number of `intermediate_winners` stored in the current `Stage::::get()` + * - `W` is the number of `intermediate_winners` stored in the current + * `Stage::::get()` * - DB: * - `O(1)` doesn't depend on the state or parameters * # @@ -1316,7 +1932,7 @@ declare module '@polkadot/api/types/submittable' { * - `O(1)` doesn't depend on the state or parameters * # **/ - vote: AugmentedSubmittable<(commitment: Hash | string | Uint8Array, stake: Balance | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + vote: AugmentedSubmittable<(commitment: Hash | string | Uint8Array, stake: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic>; }; session: { /** @@ -1847,7 +2463,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # **/ - addOpening: AugmentedSubmittable<(description: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Regular' | number | Uint8Array, stakePolicy: Option | null | object | string | Uint8Array, rewardPerBlock: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; + addOpening: AugmentedSubmittable<(description: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Regular' | number | Uint8Array, stakePolicy: StakePolicy | { stake_amount?: any; leaving_unstaking_period?: any } | string | Uint8Array, rewardPerBlock: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Apply on a worker opening. * @@ -1925,7 +2541,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # **/ - leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, rationale: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Sets a new budget for the working group. * Requires root origin. @@ -1967,7 +2583,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # **/ - slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Penalty | { slashing_text?: any; slashing_amount?: any } | string | Uint8Array) => SubmittableExtrinsic>; + slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: BalanceOf | AnyNumber | Uint8Array, rationale: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Transfers specified amount to any account. * Requires leader origin. @@ -1993,7 +2609,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # **/ - terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; + terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Option | null | object | string | Uint8Array, rationale: Option | null | object | string | Uint8Array) => SubmittableExtrinsic>; /** * Update the reward account associated with a set reward relationship for the active worker. * diff --git a/types/augment-codec/augment-types.ts b/types/augment-codec/augment-types.ts index 24e6e60378..ea556607e1 100644 --- a/types/augment-codec/augment-types.ts +++ b/types/augment-codec/augment-types.ts @@ -3,7 +3,7 @@ import { Compact, Option, Raw, Vec } from '@polkadot/types/codec'; import { BitVec, Bytes, Data, DoNotConstruct, Null, StorageKey, Text, Type, U256, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types/primitive'; -import { Actor, ActorId, AddOpeningParameters, AddSchemaSupportToEntityOperation, Application, ApplicationId, ApplicationIdSet, ApplicationIdToWorkerIdMap, ApplicationInfo, ApplyOnOpeningParameters, Approved, BlockAndTime, BuyMembershipParameters, Candidate, CastVoteOf, Category, CategoryId, Class, ClassId, ClassOf, ClassPermissions, ConstitutionInfo, ContentId, CouncilMemberOf, CouncilStage, CouncilStageAnnouncing, CouncilStageElection, CouncilStageUpdate, CreateEntityOperation, CuratorGroup, CuratorGroupId, CuratorId, DataObject, DataObjectStorageRelationship, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DataObjectsMap, DiscussionPost, DiscussionThread, Entity, EntityController, EntityCreationVoucher, EntityId, EntityOf, EntityPermissions, EntityReferenceCounterSideEffect, ExecutionFailed, ExecutionStatus, FailedAt, FillOpeningParameters, ForumUserId, GeneralProposalParameters, HashedTextMaxLength, IPNSIdentity, InboundReferenceCounter, InputEntityValuesMap, InputPropertyValue, InputValidationLengthConstraint, InputValue, InviteMembershipParameters, LiaisonJudgement, MemberId, Membership, MemoText, ModeratorId, Nonce, Opening, OpeningId, OpeningType, OperationType, OptionResult, ParameterizedEntity, ParametrizedClassPropertyValue, ParametrizedPropertyValue, Penalty, Poll, PollAlternative, Post, PostId, PostReactionId, PrivilegedActor, Property, PropertyId, PropertyLockingPolicy, PropertyType, PropertyTypeSingle, PropertyTypeVector, ProposalDecision, ProposalDetails, ProposalDetailsOf, ProposalId, ProposalOf, ProposalParameters, ProposalStatus, ReferenceCounterSideEffects, ReferendumStage, ReferendumStageRevealing, ReferendumStageVoting, SameController, Schema, SchemaId, ServiceProviderRecord, SetLeadParams, SideEffect, SideEffects, StakeParameters, StakePolicy, StakingAccountMemberBinding, Status, StorageProviderId, StoredPropertyValue, StoredValue, TerminateRoleParameters, TextMaxLength, Thread, ThreadId, ThreadMode, UpdatePropertyValuesOperation, Url, VecInputValue, VecMaxLength, VecStoredPropertyValue, VecStoredValue, VoteKind, VotePower, VotingResults, Worker, WorkerId, WorkerInfo, WorkingGroup } from './all'; +import { Actor, ActorId, AddSchemaSupportToEntityOperation, Application, ApplicationId, ApplicationIdSet, ApplicationIdToWorkerIdMap, ApplicationInfo, ApplyOnOpeningParameters, Approved, AssuranceContractType, BalanceKind, BlockAndTime, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, Candidate, CastVoteOf, Category, CategoryId, Class, ClassId, ClassOf, ClassPermissions, ConstitutionInfo, ContentId, CouncilMemberOf, CouncilStage, CouncilStageAnnouncing, CouncilStageElection, CouncilStageUpdate, CreateEntityOperation, CreateOpeningParameters, CuratorGroup, CuratorGroupId, CuratorId, DataObject, DataObjectStorageRelationship, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DataObjectsMap, DiscussionPost, DiscussionThread, Entity, EntityController, EntityCreationVoucher, EntityId, EntityOf, EntityPermissions, EntityReferenceCounterSideEffect, Entry, EntryId, ExecutionFailed, ExecutionStatus, FailedAt, FillOpeningParameters, ForumUserId, FundingRequestParameters, FundingType, FundingType_Limited, FundingType_Perpetual, GeneralProposalParameters, HashedTextMaxLength, IPNSIdentity, InboundReferenceCounter, InputEntityValuesMap, InputPropertyValue, InputValidationLengthConstraint, InputValue, InviteMembershipParameters, LiaisonJudgement, MemberId, Membership, MemoText, ModeratorId, Nonce, Opening, OpeningId, OpeningType, OperationType, OptionResult, OracleJudgment, OracleJudgment_Winner, ParameterizedEntity, ParametrizedClassPropertyValue, ParametrizedPropertyValue, ParticipantId, Penalty, Poll, PollAlternative, Post, PostId, PostReactionId, PrivilegedActor, Property, PropertyId, PropertyLockingPolicy, PropertyType, PropertyTypeSingle, PropertyTypeVector, ProposalDecision, ProposalDetails, ProposalDetailsOf, ProposalId, ProposalOf, ProposalParameters, ProposalStatus, ReferenceCounterSideEffects, ReferendumStage, ReferendumStageRevealing, ReferendumStageVoting, Reply, ReplyId, SameController, Schema, SchemaId, ServiceProviderRecord, SetLeadParams, SideEffect, SideEffects, StakeParameters, StakePolicy, StakingAccountMemberBinding, Status, StorageProviderId, StoredPropertyValue, StoredValue, TerminateRoleParameters, TextMaxLength, Thread, ThreadId, ThreadMode, ThreadOf, Title, UpdatePropertyValuesOperation, UpdatedBody, UpdatedTitle, Url, VecInputValue, VecMaxLength, VecStoredPropertyValue, VecStoredValue, VoteKind, VotePower, VotingResults, Worker, WorkerId, WorkerInfo, WorkingGroup } from './all'; import { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/types/interfaces/attestations'; import { RawAuraPreDigest } from '@polkadot/types/interfaces/aura'; import { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author'; @@ -1800,6 +1800,9 @@ declare module '@polkadot/types/types/registry' { MemoText: MemoText; 'Option': Option; 'Vec': Vec; + BalanceKind: BalanceKind; + 'Option': Option; + 'Vec': Vec; Membership: Membership; 'Option': Option; 'Vec': Vec; @@ -1867,6 +1870,9 @@ declare module '@polkadot/types/types/registry' { PrivilegedActor: PrivilegedActor; 'Option': Option; 'Vec': Vec; + ThreadOf: ThreadOf; + 'Option': Option; + 'Vec': Vec; ApplicationId: ApplicationId; 'Compact': Compact; 'Option': Option; @@ -1954,6 +1960,26 @@ declare module '@polkadot/types/types/registry' { DataObjectsMap: DataObjectsMap; 'Option': Option; 'Vec': Vec; + ParticipantId: ParticipantId; + 'Compact': Compact; + 'Option': Option; + 'Vec': Vec; + Title: Title; + 'Option': Option<Title>; + 'Vec<Title>': Vec<Title>; + UpdatedTitle: UpdatedTitle; + 'Option<UpdatedTitle>': Option<UpdatedTitle>; + 'Vec<UpdatedTitle>': Vec<UpdatedTitle>; + UpdatedBody: UpdatedBody; + 'Option<UpdatedBody>': Option<UpdatedBody>; + 'Vec<UpdatedBody>': Vec<UpdatedBody>; + ReplyId: ReplyId; + 'Compact<ReplyId>': Compact<ReplyId>; + 'Option<ReplyId>': Option<ReplyId>; + 'Vec<ReplyId>': Vec<ReplyId>; + Reply: Reply; + 'Option<Reply>': Option<Reply>; + 'Vec<Reply>': Vec<Reply>; ProposalId: ProposalId; 'Compact<ProposalId>': Compact<ProposalId>; 'Option<ProposalId>': Option<ProposalId>; @@ -1988,9 +2014,9 @@ declare module '@polkadot/types/types/registry' { DiscussionPost: DiscussionPost; 'Option<DiscussionPost>': Option<DiscussionPost>; 'Vec<DiscussionPost>': Vec<DiscussionPost>; - AddOpeningParameters: AddOpeningParameters; - 'Option<AddOpeningParameters>': Option<AddOpeningParameters>; - 'Vec<AddOpeningParameters>': Vec<AddOpeningParameters>; + CreateOpeningParameters: CreateOpeningParameters; + 'Option<CreateOpeningParameters>': Option<CreateOpeningParameters>; + 'Vec<CreateOpeningParameters>': Vec<CreateOpeningParameters>; FillOpeningParameters: FillOpeningParameters; 'Option<FillOpeningParameters>': Option<FillOpeningParameters>; 'Vec<FillOpeningParameters>': Vec<FillOpeningParameters>; @@ -2015,6 +2041,9 @@ declare module '@polkadot/types/types/registry' { ExecutionStatus: ExecutionStatus; 'Option<ExecutionStatus>': Option<ExecutionStatus>; 'Vec<ExecutionStatus>': Vec<ExecutionStatus>; + FundingRequestParameters: FundingRequestParameters; + 'Option<FundingRequestParameters>': Option<FundingRequestParameters>; + 'Vec<FundingRequestParameters>': Vec<FundingRequestParameters>; Nonce: Nonce; 'Compact<Nonce>': Compact<Nonce>; 'Option<Nonce>': Option<Nonce>; @@ -2191,5 +2220,40 @@ declare module '@polkadot/types/types/registry' { ConstitutionInfo: ConstitutionInfo; 'Option<ConstitutionInfo>': Option<ConstitutionInfo>; 'Vec<ConstitutionInfo>': Vec<ConstitutionInfo>; + BountyId: BountyId; + 'Compact<BountyId>': Compact<BountyId>; + 'Option<BountyId>': Option<BountyId>; + 'Vec<BountyId>': Vec<BountyId>; + EntryId: EntryId; + 'Compact<EntryId>': Compact<EntryId>; + 'Option<EntryId>': Option<EntryId>; + 'Vec<EntryId>': Vec<EntryId>; + BountyActor: BountyActor; + 'Option<BountyActor>': Option<BountyActor>; + 'Vec<BountyActor>': Vec<BountyActor>; + AssuranceContractType: AssuranceContractType; + 'Option<AssuranceContractType>': Option<AssuranceContractType>; + 'Vec<AssuranceContractType>': Vec<AssuranceContractType>; + FundingType_Limited: FundingType_Limited; + 'Option<FundingType_Limited>': Option<FundingType_Limited>; + 'Vec<FundingType_Limited>': Vec<FundingType_Limited>; + FundingType_Perpetual: FundingType_Perpetual; + 'Option<FundingType_Perpetual>': Option<FundingType_Perpetual>; + 'Vec<FundingType_Perpetual>': Vec<FundingType_Perpetual>; + FundingType: FundingType; + 'Option<FundingType>': Option<FundingType>; + 'Vec<FundingType>': Vec<FundingType>; + BountyCreationParameters: BountyCreationParameters; + 'Option<BountyCreationParameters>': Option<BountyCreationParameters>; + 'Vec<BountyCreationParameters>': Vec<BountyCreationParameters>; + OracleJudgment_Winner: OracleJudgment_Winner; + 'Option<OracleJudgment_Winner>': Option<OracleJudgment_Winner>; + 'Vec<OracleJudgment_Winner>': Vec<OracleJudgment_Winner>; + OracleJudgment: OracleJudgment; + 'Option<OracleJudgment>': Option<OracleJudgment>; + 'Vec<OracleJudgment>': Vec<OracleJudgment>; + Entry: Entry; + 'Option<Entry>': Option<Entry>; + 'Vec<Entry>': Vec<Entry>; } } diff --git a/types/augment/all/defs.json b/types/augment/all/defs.json index c3ac80bd37..35c21ea0d7 100644 --- a/types/augment/all/defs.json +++ b/types/augment/all/defs.json @@ -20,6 +20,12 @@ ] }, "MemoText": "Text", + "BalanceKind": { + "_enum": [ + "Positive", + "Negative" + ] + }, "Address": "AccountId", "LookupSource": "AccountId", "Membership": { @@ -36,20 +42,16 @@ "BuyMembershipParameters": { "root_account": "AccountId", "controller_account": "AccountId", - "name": "Option<Text>", "handle": "Option<Text>", - "avatar_uri": "Option<Text>", - "about": "Option<Text>", + "metadata": "Bytes", "referrer_id": "Option<MemberId>" }, "InviteMembershipParameters": { "inviting_member_id": "MemberId", "root_account": "AccountId", "controller_account": "AccountId", - "name": "Option<Text>", "handle": "Option<Text>", - "avatar_uri": "Option<Text>", - "about": "Option<Text>" + "metadata": "Bytes" }, "CouncilStageAnnouncing": { "candidatesCount": "u64" @@ -132,13 +134,22 @@ "Moderator": "ModeratorId" } }, + "ThreadOf": { + "title_hash": "Hash", + "category_id": "CategoryId", + "author_id": "ForumUserId", + "archived": "bool", + "poll": "Option<Poll>", + "num_direct_posts": "u32" + }, "ApplicationId": "u64", "Application": { "role_account_id": "AccountId", "reward_account_id": "AccountId", "staking_account_id": "AccountId", "member_id": "MemberId", - "description_hash": "Text" + "description_hash": "Bytes", + "opening_id": "OpeningId" }, "ApplicationInfo": { "application_id": "ApplicationId", @@ -150,7 +161,7 @@ "Worker": { "member_id": "MemberId", "role_account_id": "AccountId", - "staking_account_id": "Option<AccountId>", + "staking_account_id": "AccountId", "reward_account_id": "AccountId", "started_leaving_at": "Option<u32>", "job_unstaking_period": "u32", @@ -165,8 +176,8 @@ "Opening": { "opening_type": "OpeningType", "created": "u32", - "description_hash": "Text", - "stake_policy": "Option<StakePolicy>", + "description_hash": "Bytes", + "stake_policy": "StakePolicy", "reward_per_block": "Option<u128>" }, "OpeningId": "u64", @@ -190,8 +201,8 @@ "opening_id": "OpeningId", "role_account_id": "AccountId", "reward_account_id": "AccountId", - "description": "Text", - "stake_parameters": "Option<StakeParameters>" + "description": "Bytes", + "stake_parameters": "StakeParameters" }, "Penalty": { "slashing_text": "Text", @@ -232,6 +243,16 @@ "active": "bool" }, "DataObjectsMap": "BTreeMap<ContentId,DataObject>", + "ParticipantId": "u64", + "Title": "Text", + "UpdatedTitle": "Option<Text>", + "UpdatedBody": "Option<Text>", + "ReplyId": "u64", + "Reply": { + "text_hash": "Hash", + "owner": "ParticipantId", + "parent_id": "PostId" + }, "ProposalId": "u32", "ProposalStatus": { "_enum": { @@ -252,34 +273,60 @@ }, "ProposalDetails": { "_enum": { - "Text": "Text", + "Signal": "Text", "RuntimeUpgrade": "Bytes", - "Spending": "(Balance,AccountId)", - "SetValidatorCount": "u32", - "AddWorkingGroupLeaderOpening": "AddOpeningParameters", - "FillWorkingGroupLeaderOpening": "FillOpeningParameters", - "SetWorkingGroupBudgetCapacity": "(Balance,WorkingGroup)", - "DecreaseWorkingGroupLeaderStake": "(WorkerId,Balance,WorkingGroup)", - "SlashWorkingGroupLeaderStake": "(WorkerId,Balance,WorkingGroup)", - "SetWorkingGroupLeaderReward": "(WorkerId,Balance,WorkingGroup)", - "TerminateWorkingGroupLeaderRole": "TerminateRoleParameters", - "AmendConstitution": "Text" + "FundingRequest": "Vec<FundingRequestParameters>", + "SetMaxValidatorCount": "u32", + "CreateWorkingGroupLeadOpening": "CreateOpeningParameters", + "FillWorkingGroupLeadOpening": "FillOpeningParameters", + "UpdateWorkingGroupBudget": "(Balance,WorkingGroup,BalanceKind)", + "DecreaseWorkingGroupLeadStake": "(WorkerId,Balance,WorkingGroup)", + "SlashWorkingGroupLead": "(WorkerId,Balance,WorkingGroup)", + "SetWorkingGroupLeadReward": "(WorkerId,Option<Balance>,WorkingGroup)", + "TerminateWorkingGroupLead": "TerminateRoleParameters", + "AmendConstitution": "Text", + "CancelWorkingGroupLeadOpening": "(OpeningId,WorkingGroup)", + "SetMembershipPrice": "u128", + "SetCouncilBudgetIncrement": "u128", + "SetCouncilorReward": "u128", + "SetInitialInvitationBalance": "u128", + "SetInitialInvitationCount": "u32", + "SetMembershipLeadInvitationQuota": "u32", + "SetReferralCut": "u128", + "CreateBlogPost": "(Text,Text)", + "EditBlogPost": "(PostId,Option<Text>,Option<Text>)", + "LockBlogPost": "PostId", + "UnlockBlogPost": "PostId", + "VetoProposal": "ProposalId" } }, "ProposalDetailsOf": { "_enum": { - "Text": "Text", + "Signal": "Text", "RuntimeUpgrade": "Bytes", - "Spending": "(Balance,AccountId)", - "SetValidatorCount": "u32", - "AddWorkingGroupLeaderOpening": "AddOpeningParameters", - "FillWorkingGroupLeaderOpening": "FillOpeningParameters", - "SetWorkingGroupBudgetCapacity": "(Balance,WorkingGroup)", - "DecreaseWorkingGroupLeaderStake": "(WorkerId,Balance,WorkingGroup)", - "SlashWorkingGroupLeaderStake": "(WorkerId,Balance,WorkingGroup)", - "SetWorkingGroupLeaderReward": "(WorkerId,Balance,WorkingGroup)", - "TerminateWorkingGroupLeaderRole": "TerminateRoleParameters", - "AmendConstitution": "Text" + "FundingRequest": "Vec<FundingRequestParameters>", + "SetMaxValidatorCount": "u32", + "CreateWorkingGroupLeadOpening": "CreateOpeningParameters", + "FillWorkingGroupLeadOpening": "FillOpeningParameters", + "UpdateWorkingGroupBudget": "(Balance,WorkingGroup,BalanceKind)", + "DecreaseWorkingGroupLeadStake": "(WorkerId,Balance,WorkingGroup)", + "SlashWorkingGroupLead": "(WorkerId,Balance,WorkingGroup)", + "SetWorkingGroupLeadReward": "(WorkerId,Option<Balance>,WorkingGroup)", + "TerminateWorkingGroupLead": "TerminateRoleParameters", + "AmendConstitution": "Text", + "CancelWorkingGroupLeadOpening": "(OpeningId,WorkingGroup)", + "SetMembershipPrice": "u128", + "SetCouncilBudgetIncrement": "u128", + "SetCouncilorReward": "u128", + "SetInitialInvitationBalance": "u128", + "SetInitialInvitationCount": "u32", + "SetMembershipLeadInvitationQuota": "u32", + "SetReferralCut": "u128", + "CreateBlogPost": "(Text,Text)", + "EditBlogPost": "(PostId,Option<Text>,Option<Text>)", + "LockBlogPost": "PostId", + "UnlockBlogPost": "PostId", + "VetoProposal": "ProposalId" } }, "VotingResults": { @@ -321,9 +368,9 @@ "DiscussionPost": { "author_id": "u64" }, - "AddOpeningParameters": { + "CreateOpeningParameters": { "description": "Text", - "stake_policy": "Option<StakePolicy>", + "stake_policy": "StakePolicy", "reward_per_block": "Option<u128>", "working_group": "WorkingGroup" }, @@ -334,7 +381,7 @@ }, "TerminateRoleParameters": { "worker_id": "WorkerId", - "penalty": "Option<Penalty>", + "slashing_amount": "Option<u128>", "working_group": "WorkingGroup" }, "ProposalDecision": { @@ -369,6 +416,10 @@ "ExecutionFailed": "ExecutionFailed" } }, + "FundingRequestParameters": { + "account": "AccountId", + "amount": "u128" + }, "Nonce": "u64", "EntityId": "u64", "ClassId": "u64", @@ -635,5 +686,59 @@ "VotePower": "u128", "ConstitutionInfo": { "text_hash": "Hash" + }, + "BountyId": "u32", + "EntryId": "u32", + "BountyActor": { + "_enum": { + "Council": "Null", + "Member": "MemberId" + } + }, + "AssuranceContractType": { + "_enum": { + "Open": "Null", + "Closed": "Vec<MemberId>" + } + }, + "FundingType_Limited": { + "min_funding_amount": "u128", + "max_funding_amount": "u128", + "funding_period": "u32" + }, + "FundingType_Perpetual": { + "target": "u128" + }, + "FundingType": { + "_enum": { + "Perpetual": "FundingType_Perpetual", + "Limited": "FundingType_Limited" + } + }, + "BountyCreationParameters": { + "oracle": "BountyActor", + "contract_type": "AssuranceContractType", + "creator": "BountyActor", + "cherry": "u128", + "entrant_stake": "u128", + "funding_type": "FundingType", + "work_period": "u32", + "judging_period": "u32" + }, + "OracleJudgment_Winner": { + "reward": "u128" + }, + "OracleJudgment": { + "_enum": { + "Winner": "OracleJudgment_Winner", + "Rejected": "Null" + } + }, + "Entry": { + "member_id": "MemberId", + "staking_account_id": "GenericAccountId", + "submitted_at": "u32", + "work_submitted": "bool", + "oracle_judgment_result": "Option<OracleJudgment>" } } \ No newline at end of file diff --git a/types/augment/all/types.ts b/types/augment/all/types.ts index fd3ee38048..c2fc5e5753 100644 --- a/types/augment/all/types.ts +++ b/types/augment/all/types.ts @@ -3,6 +3,7 @@ import { ITuple } from '@polkadot/types/types'; import { BTreeMap, BTreeSet, Enum, Option, Struct, U8aFixed, Vec } from '@polkadot/types/codec'; +import { GenericAccountId } from '@polkadot/types/generic'; import { Bytes, Text, bool, i16, i32, i64, u128, u16, u32, u64 } from '@polkadot/types/primitive'; import { AccountId, Balance, Hash } from '@polkadot/types/interfaces/runtime'; @@ -18,14 +19,6 @@ export interface Actor extends Enum { /** @name ActorId */ export interface ActorId extends u64 {} -/** @name AddOpeningParameters */ -export interface AddOpeningParameters extends Struct { - readonly description: Text; - readonly stake_policy: Option<StakePolicy>; - readonly reward_per_block: Option<u128>; - readonly working_group: WorkingGroup; -} - /** @name Address */ export interface Address extends AccountId {} @@ -42,7 +35,8 @@ export interface Application extends Struct { readonly reward_account_id: AccountId; readonly staking_account_id: AccountId; readonly member_id: MemberId; - readonly description_hash: Text; + readonly description_hash: Bytes; + readonly opening_id: OpeningId; } /** @name ApplicationId */ @@ -66,8 +60,8 @@ export interface ApplyOnOpeningParameters extends Struct { readonly opening_id: OpeningId; readonly role_account_id: AccountId; readonly reward_account_id: AccountId; - readonly description: Text; - readonly stake_parameters: Option<StakeParameters>; + readonly description: Bytes; + readonly stake_parameters: StakeParameters; } /** @name Approved */ @@ -76,20 +70,53 @@ export interface Approved extends Enum { readonly isPendingConstitutionality: boolean; } +/** @name AssuranceContractType */ +export interface AssuranceContractType extends Enum { + readonly isOpen: boolean; + readonly isClosed: boolean; + readonly asClosed: Vec<MemberId>; +} + +/** @name BalanceKind */ +export interface BalanceKind extends Enum { + readonly isPositive: boolean; + readonly isNegative: boolean; +} + /** @name BlockAndTime */ export interface BlockAndTime extends Struct { readonly block: u32; readonly time: u64; } +/** @name BountyActor */ +export interface BountyActor extends Enum { + readonly isCouncil: boolean; + readonly isMember: boolean; + readonly asMember: MemberId; +} + +/** @name BountyCreationParameters */ +export interface BountyCreationParameters extends Struct { + readonly oracle: BountyActor; + readonly contract_type: AssuranceContractType; + readonly creator: BountyActor; + readonly cherry: u128; + readonly entrant_stake: u128; + readonly funding_type: FundingType; + readonly work_period: u32; + readonly judging_period: u32; +} + +/** @name BountyId */ +export interface BountyId extends u32 {} + /** @name BuyMembershipParameters */ export interface BuyMembershipParameters extends Struct { readonly root_account: AccountId; readonly controller_account: AccountId; - readonly name: Option<Text>; readonly handle: Option<Text>; - readonly avatar_uri: Option<Text>; - readonly about: Option<Text>; + readonly metadata: Bytes; readonly referrer_id: Option<MemberId>; } @@ -210,6 +237,14 @@ export interface CreateEntityOperation extends Struct { readonly class_id: ClassId; } +/** @name CreateOpeningParameters */ +export interface CreateOpeningParameters extends Struct { + readonly description: Text; + readonly stake_policy: StakePolicy; + readonly reward_per_block: Option<u128>; + readonly working_group: WorkingGroup; +} + /** @name CuratorGroup */ export interface CuratorGroup extends Struct { readonly curators: Vec<CuratorId>; @@ -313,6 +348,18 @@ export interface EntityReferenceCounterSideEffect extends Struct { readonly same_owner: i32; } +/** @name Entry */ +export interface Entry extends Struct { + readonly member_id: MemberId; + readonly staking_account_id: GenericAccountId; + readonly submitted_at: u32; + readonly work_submitted: bool; + readonly oracle_judgment_result: Option<OracleJudgment>; +} + +/** @name EntryId */ +export interface EntryId extends u32 {} + /** @name ExecutionFailed */ export interface ExecutionFailed extends Struct { readonly error: Text; @@ -338,6 +385,32 @@ export interface FillOpeningParameters extends Struct { /** @name ForumUserId */ export interface ForumUserId extends u64 {} +/** @name FundingRequestParameters */ +export interface FundingRequestParameters extends Struct { + readonly account: AccountId; + readonly amount: u128; +} + +/** @name FundingType */ +export interface FundingType extends Enum { + readonly isPerpetual: boolean; + readonly asPerpetual: FundingType_Perpetual; + readonly isLimited: boolean; + readonly asLimited: FundingType_Limited; +} + +/** @name FundingType_Limited */ +export interface FundingType_Limited extends Struct { + readonly min_funding_amount: u128; + readonly max_funding_amount: u128; + readonly funding_period: u32; +} + +/** @name FundingType_Perpetual */ +export interface FundingType_Perpetual extends Struct { + readonly target: u128; +} + /** @name GeneralProposalParameters */ export interface GeneralProposalParameters extends Struct { readonly member_id: MemberId; @@ -402,10 +475,8 @@ export interface InviteMembershipParameters extends Struct { readonly inviting_member_id: MemberId; readonly root_account: AccountId; readonly controller_account: AccountId; - readonly name: Option<Text>; readonly handle: Option<Text>; - readonly avatar_uri: Option<Text>; - readonly about: Option<Text>; + readonly metadata: Bytes; } /** @name IPNSIdentity */ @@ -446,8 +517,8 @@ export interface Nonce extends u64 {} export interface Opening extends Struct { readonly opening_type: OpeningType; readonly created: u32; - readonly description_hash: Text; - readonly stake_policy: Option<StakePolicy>; + readonly description_hash: Bytes; + readonly stake_policy: StakePolicy; readonly reward_per_block: Option<u128>; } @@ -476,6 +547,18 @@ export interface OptionResult extends Struct { readonly vote_power: VotePower; } +/** @name OracleJudgment */ +export interface OracleJudgment extends Enum { + readonly isWinner: boolean; + readonly asWinner: OracleJudgment_Winner; + readonly isRejected: boolean; +} + +/** @name OracleJudgment_Winner */ +export interface OracleJudgment_Winner extends Struct { + readonly reward: u128; +} + /** @name ParameterizedEntity */ export interface ParameterizedEntity extends Enum { readonly isInternalEntityJustAdded: boolean; @@ -500,6 +583,9 @@ export interface ParametrizedPropertyValue extends Enum { readonly asInternalEntityVec: Vec<ParameterizedEntity>; } +/** @name ParticipantId */ +export interface ParticipantId extends u64 {} + /** @name Penalty */ export interface Penalty extends Struct { readonly slashing_text: Text; @@ -602,58 +688,110 @@ export interface ProposalDecision extends Enum { /** @name ProposalDetails */ export interface ProposalDetails extends Enum { - readonly isText: boolean; - readonly asText: Text; + readonly isSignal: boolean; + readonly asSignal: Text; readonly isRuntimeUpgrade: boolean; readonly asRuntimeUpgrade: Bytes; - readonly isSpending: boolean; - readonly asSpending: ITuple<[Balance, AccountId]>; - readonly isSetValidatorCount: boolean; - readonly asSetValidatorCount: u32; - readonly isAddWorkingGroupLeaderOpening: boolean; - readonly asAddWorkingGroupLeaderOpening: AddOpeningParameters; - readonly isFillWorkingGroupLeaderOpening: boolean; - readonly asFillWorkingGroupLeaderOpening: FillOpeningParameters; - readonly isSetWorkingGroupBudgetCapacity: boolean; - readonly asSetWorkingGroupBudgetCapacity: ITuple<[Balance, WorkingGroup]>; - readonly isDecreaseWorkingGroupLeaderStake: boolean; - readonly asDecreaseWorkingGroupLeaderStake: ITuple<[WorkerId, Balance, WorkingGroup]>; - readonly isSlashWorkingGroupLeaderStake: boolean; - readonly asSlashWorkingGroupLeaderStake: ITuple<[WorkerId, Balance, WorkingGroup]>; - readonly isSetWorkingGroupLeaderReward: boolean; - readonly asSetWorkingGroupLeaderReward: ITuple<[WorkerId, Balance, WorkingGroup]>; - readonly isTerminateWorkingGroupLeaderRole: boolean; - readonly asTerminateWorkingGroupLeaderRole: TerminateRoleParameters; + readonly isFundingRequest: boolean; + readonly asFundingRequest: Vec<FundingRequestParameters>; + readonly isSetMaxValidatorCount: boolean; + readonly asSetMaxValidatorCount: u32; + readonly isCreateWorkingGroupLeadOpening: boolean; + readonly asCreateWorkingGroupLeadOpening: CreateOpeningParameters; + readonly isFillWorkingGroupLeadOpening: boolean; + readonly asFillWorkingGroupLeadOpening: FillOpeningParameters; + readonly isUpdateWorkingGroupBudget: boolean; + readonly asUpdateWorkingGroupBudget: ITuple<[Balance, WorkingGroup, BalanceKind]>; + readonly isDecreaseWorkingGroupLeadStake: boolean; + readonly asDecreaseWorkingGroupLeadStake: ITuple<[WorkerId, Balance, WorkingGroup]>; + readonly isSlashWorkingGroupLead: boolean; + readonly asSlashWorkingGroupLead: ITuple<[WorkerId, Balance, WorkingGroup]>; + readonly isSetWorkingGroupLeadReward: boolean; + readonly asSetWorkingGroupLeadReward: ITuple<[WorkerId, Option<Balance>, WorkingGroup]>; + readonly isTerminateWorkingGroupLead: boolean; + readonly asTerminateWorkingGroupLead: TerminateRoleParameters; readonly isAmendConstitution: boolean; readonly asAmendConstitution: Text; + readonly isCancelWorkingGroupLeadOpening: boolean; + readonly asCancelWorkingGroupLeadOpening: ITuple<[OpeningId, WorkingGroup]>; + readonly isSetMembershipPrice: boolean; + readonly asSetMembershipPrice: u128; + readonly isSetCouncilBudgetIncrement: boolean; + readonly asSetCouncilBudgetIncrement: u128; + readonly isSetCouncilorReward: boolean; + readonly asSetCouncilorReward: u128; + readonly isSetInitialInvitationBalance: boolean; + readonly asSetInitialInvitationBalance: u128; + readonly isSetInitialInvitationCount: boolean; + readonly asSetInitialInvitationCount: u32; + readonly isSetMembershipLeadInvitationQuota: boolean; + readonly asSetMembershipLeadInvitationQuota: u32; + readonly isSetReferralCut: boolean; + readonly asSetReferralCut: u128; + readonly isCreateBlogPost: boolean; + readonly asCreateBlogPost: ITuple<[Text, Text]>; + readonly isEditBlogPost: boolean; + readonly asEditBlogPost: ITuple<[PostId, Option<Text>, Option<Text>]>; + readonly isLockBlogPost: boolean; + readonly asLockBlogPost: PostId; + readonly isUnlockBlogPost: boolean; + readonly asUnlockBlogPost: PostId; + readonly isVetoProposal: boolean; + readonly asVetoProposal: ProposalId; } /** @name ProposalDetailsOf */ export interface ProposalDetailsOf extends Enum { - readonly isText: boolean; - readonly asText: Text; + readonly isSignal: boolean; + readonly asSignal: Text; readonly isRuntimeUpgrade: boolean; readonly asRuntimeUpgrade: Bytes; - readonly isSpending: boolean; - readonly asSpending: ITuple<[Balance, AccountId]>; - readonly isSetValidatorCount: boolean; - readonly asSetValidatorCount: u32; - readonly isAddWorkingGroupLeaderOpening: boolean; - readonly asAddWorkingGroupLeaderOpening: AddOpeningParameters; - readonly isFillWorkingGroupLeaderOpening: boolean; - readonly asFillWorkingGroupLeaderOpening: FillOpeningParameters; - readonly isSetWorkingGroupBudgetCapacity: boolean; - readonly asSetWorkingGroupBudgetCapacity: ITuple<[Balance, WorkingGroup]>; - readonly isDecreaseWorkingGroupLeaderStake: boolean; - readonly asDecreaseWorkingGroupLeaderStake: ITuple<[WorkerId, Balance, WorkingGroup]>; - readonly isSlashWorkingGroupLeaderStake: boolean; - readonly asSlashWorkingGroupLeaderStake: ITuple<[WorkerId, Balance, WorkingGroup]>; - readonly isSetWorkingGroupLeaderReward: boolean; - readonly asSetWorkingGroupLeaderReward: ITuple<[WorkerId, Balance, WorkingGroup]>; - readonly isTerminateWorkingGroupLeaderRole: boolean; - readonly asTerminateWorkingGroupLeaderRole: TerminateRoleParameters; + readonly isFundingRequest: boolean; + readonly asFundingRequest: Vec<FundingRequestParameters>; + readonly isSetMaxValidatorCount: boolean; + readonly asSetMaxValidatorCount: u32; + readonly isCreateWorkingGroupLeadOpening: boolean; + readonly asCreateWorkingGroupLeadOpening: CreateOpeningParameters; + readonly isFillWorkingGroupLeadOpening: boolean; + readonly asFillWorkingGroupLeadOpening: FillOpeningParameters; + readonly isUpdateWorkingGroupBudget: boolean; + readonly asUpdateWorkingGroupBudget: ITuple<[Balance, WorkingGroup, BalanceKind]>; + readonly isDecreaseWorkingGroupLeadStake: boolean; + readonly asDecreaseWorkingGroupLeadStake: ITuple<[WorkerId, Balance, WorkingGroup]>; + readonly isSlashWorkingGroupLead: boolean; + readonly asSlashWorkingGroupLead: ITuple<[WorkerId, Balance, WorkingGroup]>; + readonly isSetWorkingGroupLeadReward: boolean; + readonly asSetWorkingGroupLeadReward: ITuple<[WorkerId, Option<Balance>, WorkingGroup]>; + readonly isTerminateWorkingGroupLead: boolean; + readonly asTerminateWorkingGroupLead: TerminateRoleParameters; readonly isAmendConstitution: boolean; readonly asAmendConstitution: Text; + readonly isCancelWorkingGroupLeadOpening: boolean; + readonly asCancelWorkingGroupLeadOpening: ITuple<[OpeningId, WorkingGroup]>; + readonly isSetMembershipPrice: boolean; + readonly asSetMembershipPrice: u128; + readonly isSetCouncilBudgetIncrement: boolean; + readonly asSetCouncilBudgetIncrement: u128; + readonly isSetCouncilorReward: boolean; + readonly asSetCouncilorReward: u128; + readonly isSetInitialInvitationBalance: boolean; + readonly asSetInitialInvitationBalance: u128; + readonly isSetInitialInvitationCount: boolean; + readonly asSetInitialInvitationCount: u32; + readonly isSetMembershipLeadInvitationQuota: boolean; + readonly asSetMembershipLeadInvitationQuota: u32; + readonly isSetReferralCut: boolean; + readonly asSetReferralCut: u128; + readonly isCreateBlogPost: boolean; + readonly asCreateBlogPost: ITuple<[Text, Text]>; + readonly isEditBlogPost: boolean; + readonly asEditBlogPost: ITuple<[PostId, Option<Text>, Option<Text>]>; + readonly isLockBlogPost: boolean; + readonly asLockBlogPost: PostId; + readonly isUnlockBlogPost: boolean; + readonly asUnlockBlogPost: PostId; + readonly isVetoProposal: boolean; + readonly asVetoProposal: ProposalId; } /** @name ProposalId */ @@ -718,6 +856,16 @@ export interface ReferendumStageVoting extends Struct { readonly current_cycle_id: u64; } +/** @name Reply */ +export interface Reply extends Struct { + readonly text_hash: Hash; + readonly owner: ParticipantId; + readonly parent_id: PostId; +} + +/** @name ReplyId */ +export interface ReplyId extends u64 {} + /** @name SameController */ export interface SameController extends bool {} @@ -804,7 +952,7 @@ export interface StoredValue extends Enum { /** @name TerminateRoleParameters */ export interface TerminateRoleParameters extends Struct { readonly worker_id: WorkerId; - readonly penalty: Option<Penalty>; + readonly slashing_amount: Option<u128>; readonly working_group: WorkingGroup; } @@ -831,6 +979,25 @@ export interface ThreadMode extends Enum { readonly asClosed: Vec<MemberId>; } +/** @name ThreadOf */ +export interface ThreadOf extends Struct { + readonly title_hash: Hash; + readonly category_id: CategoryId; + readonly author_id: ForumUserId; + readonly archived: bool; + readonly poll: Option<Poll>; + readonly num_direct_posts: u32; +} + +/** @name Title */ +export interface Title extends Text {} + +/** @name UpdatedBody */ +export interface UpdatedBody extends Option<Text> {} + +/** @name UpdatedTitle */ +export interface UpdatedTitle extends Option<Text> {} + /** @name UpdatePropertyValuesOperation */ export interface UpdatePropertyValuesOperation extends Struct { readonly entity_id: ParameterizedEntity; @@ -920,7 +1087,7 @@ export interface VotingResults extends Struct { export interface Worker extends Struct { readonly member_id: MemberId; readonly role_account_id: AccountId; - readonly staking_account_id: Option<AccountId>; + readonly staking_account_id: AccountId; readonly reward_account_id: AccountId; readonly started_leaving_at: Option<u32>; readonly job_unstaking_period: u32; diff --git a/types/augment/augment-api-consts.ts b/types/augment/augment-api-consts.ts index c5c36c798e..1c5e138756 100644 --- a/types/augment/augment-api-consts.ts +++ b/types/augment/augment-api-consts.ts @@ -2,9 +2,9 @@ /* eslint-disable */ import { Vec } from '@polkadot/types/codec'; -import { u32, u64 } from '@polkadot/types/primitive'; +import { u32, u64, u8 } from '@polkadot/types/primitive'; import { ProposalParameters } from './all'; -import { Balance, BalanceOf, BlockNumber, LockIdentifier, Moment, Perbill, RuntimeDbWeight, Weight } from '@polkadot/types/interfaces/runtime'; +import { Balance, BalanceOf, BlockNumber, Moment, Perbill, RuntimeDbWeight, Weight } from '@polkadot/types/interfaces/runtime'; import { SessionIndex } from '@polkadot/types/interfaces/session'; import { EraIndex } from '@polkadot/types/interfaces/staking'; import { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support'; @@ -33,6 +33,24 @@ declare module '@polkadot/api/types/consts' { **/ existentialDeposit: Balance & AugmentedConst<ApiType>; }; + bounty: { + /** + * Exports const - max work entry number for a closed assurance type contract bounty. + **/ + closedContractSizeLimit: u32 & AugmentedConst<ApiType>; + /** + * Exports const - min cherry value limit for a bounty. + **/ + minCherryLimit: BalanceOf & AugmentedConst<ApiType>; + /** + * Exports const - min funding amount limit for a bounty. + **/ + minFundingLimit: BalanceOf & AugmentedConst<ApiType>; + /** + * Exports const - min work entrant stake for a bounty. + **/ + minWorkEntrantStake: BalanceOf & AugmentedConst<ApiType>; + }; contentDirectoryWorkingGroup: { /** * Exports const - max simultaneous active worker number. @@ -44,10 +62,6 @@ declare module '@polkadot/api/types/consts' { * Duration of annoncing period **/ announcingPeriodDuration: BlockNumber & AugmentedConst<ApiType>; - /** - * Amount that will be added to the budget balance on every refill. - **/ - budgetRefillAmount: Balance & AugmentedConst<ApiType>; /** * Interval between automatic budget refills. **/ @@ -56,10 +70,6 @@ declare module '@polkadot/api/types/consts' { * Council member count **/ councilSize: u64 & AugmentedConst<ApiType>; - /** - * The value elected members will be awarded each block of their reign. - **/ - electedMemberRewardPerBlock: Balance & AugmentedConst<ApiType>; /** * Interval for automatic reward payments. **/ @@ -100,6 +110,20 @@ declare module '@polkadot/api/types/consts' { **/ maxWorkerNumberLimit: u32 & AugmentedConst<ApiType>; }; + members: { + /** + * Exports const - default balance for the invited member. + **/ + defaultInitialInvitationBalance: BalanceOf & AugmentedConst<ApiType>; + /** + * Exports const - default membership fee. + **/ + defaultMembershipPrice: BalanceOf & AugmentedConst<ApiType>; + /** + * Exports const - maximum percent value of the membership fee for the referral cut. + **/ + referralCutMaximumPercent: u8 & AugmentedConst<ApiType>; + }; membershipWorkingGroup: { /** * Exports const - max simultaneous active worker number. @@ -108,53 +132,81 @@ declare module '@polkadot/api/types/consts' { }; proposalsCodex: { /** - * Exports 'Add working group opening' proposal parameters. + * Exports 'Amend Constitution' proposal parameters. **/ - addWorkingGroupOpeningProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + amendConstitutionProposalParameters: ProposalParameters & AugmentedConst<ApiType>; /** - * Exports 'Amend constitution' proposal parameters. + * Exports 'Cancel Working Group Lead Opening' proposal parameters. **/ - amendConstitutionProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + cancelWorkingGroupLeadOpeningProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + createBlogPostProposalParameters: ProposalParameters & AugmentedConst<ApiType>; /** - * Exports 'Decrease working group leader stake' proposal parameters. + * Exports 'Create Working Group Lead Opening' proposal parameters. **/ - decreaseWorkingGroupLeaderStakeProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + createWorkingGroupLeadOpeningProposalParameters: ProposalParameters & AugmentedConst<ApiType>; /** - * Exports 'Fill working group opening' proposal parameters. + * Exports 'Decrease Working Group Lead Stake' proposal parameters. + **/ + decreaseWorkingGroupLeadStakeProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + editBlogPostProoposalParamters: ProposalParameters & AugmentedConst<ApiType>; + /** + * Exports 'Fill Working Group Lead Opening' proposal parameters. **/ fillWorkingGroupOpeningProposalParameters: ProposalParameters & AugmentedConst<ApiType>; /** - * Exports 'Runtime upgrade' proposal parameters. + * Exports 'Funding Request' proposal parameters. + **/ + fundingRequestProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + lockBlogPostProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + /** + * Exports 'Runtime Upgrade' proposal parameters. **/ runtimeUpgradeProposalParameters: ProposalParameters & AugmentedConst<ApiType>; /** - * Exports 'Set validator count' proposal parameters. + * Exports `Set Council Budget Increment` proposal parameters. **/ - setValidatorCountProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + setCouncilBudgetIncrementProposalParameters: ProposalParameters & AugmentedConst<ApiType>; /** - * Exports 'Set working group budget capacity' proposal parameters. + * Exports `Set Councilor Reward Proposal Parameters` proposal parameters. **/ - setWorkingGroupBudgetCapacityProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + setCouncilorRewardProposalParameters: ProposalParameters & AugmentedConst<ApiType>; /** - * Exports 'Set working group leader reward' proposal parameters. + * Exports `Set Initial Invitation Balance` proposal parameters. **/ - setWorkingGroupLeaderRewardProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + setInitialInvitationBalanceProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + setInvitationCountProposalParameters: ProposalParameters & AugmentedConst<ApiType>; /** - * Exports 'Slash working group leader stake' proposal parameters. + * Exports 'Set Max Validator Count' proposal parameters. **/ - slashWorkingGroupLeaderStakeProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + setMaxValidatorCountProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + setMembershipLeadInvitationQuotaProposalParameters: ProposalParameters & AugmentedConst<ApiType>; /** - * Exports 'Spending' proposal parameters. + * Exports 'Set Membership Price' proposal parameters. **/ - spendingProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + setMembershipPriceProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + setReferralCutProposalParameters: ProposalParameters & AugmentedConst<ApiType>; /** - * Exports 'Terminate working group leader role' proposal parameters. + * Exports 'Set Working Group Lead Reward' proposal parameters. **/ - terminateWorkingGroupLeaderRoleProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + setWorkingGroupLeadRewardProposalParameters: ProposalParameters & AugmentedConst<ApiType>; /** - * Exports 'Text' proposal parameters. + * Exports 'Signal' proposal parameters. **/ - textProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + signalProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + /** + * Exports 'Slash Working Group Lead' proposal parameters. + **/ + slashWorkingGroupLeadProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + /** + * Exports 'Terminate Working Group Lead' proposal parameters. + **/ + terminateWorkingGroupLeadProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + unlockBlogPostProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + /** + * Exports 'Update Working Group Budget' proposal parameters. + **/ + updateWorkingGroupBudgetProposalParameters: ProposalParameters & AugmentedConst<ApiType>; + vetoProposalProposalParameters: ProposalParameters & AugmentedConst<ApiType>; }; proposalsEngine: { /** @@ -170,7 +222,8 @@ declare module '@polkadot/api/types/consts' { **/ maxActiveProposalLimit: u32 & AugmentedConst<ApiType>; /** - * Exports const - the fee is applied when the proposal gets rejected. A fee would be slashed (burned). + * Exports const - the fee is applied when the proposal gets rejected. A fee would + * be slashed (burned). **/ rejectionFee: BalanceOf & AugmentedConst<ApiType>; /** @@ -180,17 +233,14 @@ declare module '@polkadot/api/types/consts' { }; referendum: { /** - * Identifier for currency locks used for staking. - **/ - lockId: LockIdentifier & AugmentedConst<ApiType>; - /** - * Maximum length of vote commitment salt. Use length that ensures uniqueness for hashing e.g. std::u64::MAX. + * Maximum length of vote commitment salt. Use length that ensures uniqueness for hashing + * e.g. std::u64::MAX. **/ maxSaltLength: u64 & AugmentedConst<ApiType>; /** * Minimum stake needed for voting **/ - minimumStake: Balance & AugmentedConst<ApiType>; + minimumStake: BalanceOf & AugmentedConst<ApiType>; /** * Duration of revealing stage (number of blocks) **/ diff --git a/types/augment/augment-api-query.ts b/types/augment/augment-api-query.ts index 4d14015e20..5adbdb4982 100644 --- a/types/augment/augment-api-query.ts +++ b/types/augment/augment-api-query.ts @@ -3,8 +3,8 @@ import { AnyNumber, ITuple, Observable } from '@polkadot/types/types'; import { Option, Vec } from '@polkadot/types/codec'; -import { Bytes, bool, u32, u64 } from '@polkadot/types/primitive'; -import { Application, ApplicationId, Candidate, CastVoteOf, Category, CategoryId, ClassId, ClassOf, ConstitutionInfo, ContentId, CouncilMemberOf, CouncilStageUpdate, CuratorGroup, CuratorGroupId, DataObject, DataObjectStorageRelationship, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DiscussionPost, DiscussionThread, EntityController, EntityCreationVoucher, EntityId, EntityOf, MemberId, Membership, MemoText, ModeratorId, Opening, OpeningId, Post, PostId, PropertyId, ProposalDetailsOf, ProposalId, ProposalOf, ReferendumStage, ServiceProviderRecord, StakingAccountMemberBinding, StorageProviderId, Thread, ThreadId, Url, VoteKind, Worker, WorkerId } from './all'; +import { Bytes, bool, u32, u64, u8 } from '@polkadot/types/primitive'; +import { Application, ApplicationId, BountyActor, BountyId, Candidate, CastVoteOf, Category, CategoryId, ClassId, ClassOf, ConstitutionInfo, ContentId, CouncilMemberOf, CouncilStageUpdate, CuratorGroup, CuratorGroupId, DataObject, DataObjectStorageRelationship, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DiscussionPost, DiscussionThread, EntityController, EntityCreationVoucher, EntityId, EntityOf, Entry, EntryId, ForumUserId, MemberId, Membership, MemoText, ModeratorId, Opening, OpeningId, Post, PostId, PropertyId, ProposalId, ProposalOf, ReferendumStage, Reply, ReplyId, ServiceProviderRecord, StakingAccountMemberBinding, StorageProviderId, ThreadId, ThreadOf, Url, VoteKind, Worker, WorkerId } from './all'; import { UncleEntryItem } from '@polkadot/types/interfaces/authorship'; import { BabeAuthorityWeight, MaybeRandomness, NextConfigDescriptor, Randomness } from '@polkadot/types/interfaces/babe'; import { AccountData, BalanceLock } from '@polkadot/types/interfaces/balances'; @@ -16,6 +16,7 @@ import { AccountId, Balance, BalanceOf, BlockNumber, ExtrinsicsWeight, Hash, Key import { Keys, SessionIndex } from '@polkadot/types/interfaces/session'; import { ActiveEraInfo, ElectionResult, ElectionScore, ElectionStatus, EraIndex, EraRewardPoints, Exposure, Forcing, Nominations, RewardDestination, SlashingSpans, SpanIndex, SpanRecord, StakingLedger, UnappliedSlash, ValidatorPrefs } from '@polkadot/types/interfaces/staking'; import { AccountInfo, DigestOf, EventIndex, EventRecord, LastRuntimeUpgradeInfo, Phase } from '@polkadot/types/interfaces/system'; +import { Bounty } from '@polkadot/types/interfaces/treasury'; import { Multiplier } from '@polkadot/types/interfaces/txpayment'; import { ApiTypes } from '@polkadot/api/types'; @@ -127,6 +128,43 @@ declare module '@polkadot/api/types/storage' { **/ totalIssuance: AugmentedQuery<ApiType, () => Observable<Balance>>; }; + blog: { + /** + * Post by unique blog and post identificators + **/ + postById: AugmentedQuery<ApiType, (arg: PostId | AnyNumber | Uint8Array) => Observable<Post>>; + /** + * Maps, representing id => item relationship for blogs, posts and replies related structures + * Post count + **/ + postCount: AugmentedQuery<ApiType, () => Observable<PostId>>; + /** + * Reply by unique blog, post and reply identificators + **/ + replyById: AugmentedQueryDoubleMap<ApiType, (key1: PostId | AnyNumber | Uint8Array, key2: ReplyId | AnyNumber | Uint8Array) => Observable<Reply>>; + }; + bounty: { + /** + * Bounty storage. + **/ + bounties: AugmentedQuery<ApiType, (arg: BountyId | AnyNumber | Uint8Array) => Observable<Bounty>>; + /** + * Double map for bounty funding. It stores a member or council funding for bounties. + **/ + bountyContributions: AugmentedQueryDoubleMap<ApiType, (key1: BountyId | AnyNumber | Uint8Array, key2: BountyActor | { Council: any } | { Member: any } | string | Uint8Array) => Observable<BalanceOf>>; + /** + * Count of all bounties that have been created. + **/ + bountyCount: AugmentedQuery<ApiType, () => Observable<u32>>; + /** + * Work entry storage map. + **/ + entries: AugmentedQuery<ApiType, (arg: EntryId | AnyNumber | Uint8Array) => Observable<Entry>>; + /** + * Count of all work entries that have been created. + **/ + entryCount: AugmentedQuery<ApiType, () => Observable<u32>>; + }; constitution: { constitution: AugmentedQuery<ApiType, () => Observable<ConstitutionInfo>>; }; @@ -207,6 +245,10 @@ declare module '@polkadot/api/types/storage' { * Budget for the council's elected members rewards. **/ budget: AugmentedQuery<ApiType, () => Observable<Balance>>; + /** + * Amount of balance to be refilled every budget period + **/ + budgetIncrement: AugmentedQuery<ApiType, () => Observable<Balance>>; /** * Map of all candidates that ever candidated and haven't unstake yet. **/ @@ -215,6 +257,10 @@ declare module '@polkadot/api/types/storage' { * Current council members **/ councilMembers: AugmentedQuery<ApiType, () => Observable<Vec<CouncilMemberOf>>>; + /** + * Councilor reward per block + **/ + councilorReward: AugmentedQuery<ApiType, () => Observable<Balance>>; /** * The next block in which the budget will be increased. **/ @@ -313,6 +359,10 @@ declare module '@polkadot/api/types/storage' { * Thread identifier value to be used for next Thread in threadById. **/ nextThreadId: AugmentedQuery<ApiType, () => Observable<ThreadId>>; + /** + * Unique thread poll voters. This private double map prevents double voting. + **/ + pollVotes: AugmentedQueryDoubleMap<ApiType, (key1: ThreadId | AnyNumber | Uint8Array, key2: ForumUserId | AnyNumber | Uint8Array) => Observable<bool>>; /** * Map post identifier to corresponding post. **/ @@ -320,7 +370,7 @@ declare module '@polkadot/api/types/storage' { /** * Map thread identifier to corresponding thread. **/ - threadById: AugmentedQueryDoubleMap<ApiType, (key1: CategoryId | AnyNumber | Uint8Array, key2: ThreadId | AnyNumber | Uint8Array) => Observable<Thread>>; + threadById: AugmentedQueryDoubleMap<ApiType, (key1: CategoryId | AnyNumber | Uint8Array, key2: ThreadId | AnyNumber | Uint8Array) => Observable<ThreadOf>>; }; forumWorkingGroup: { /** @@ -432,14 +482,6 @@ declare module '@polkadot/api/types/storage' { * Registered unique handles hash and their mapping to their owner. **/ memberIdByHandleHash: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<MemberId>>; - /** - * Mapping of a controller account id to vector of member ids it controls. - **/ - memberIdsByControllerAccountId: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Vec<MemberId>>>; - /** - * Mapping of a root account id to vector of member ids it controls. - **/ - memberIdsByRootAccountId: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Vec<MemberId>>>; /** * Mapping of member's id to their membership profile. **/ @@ -454,9 +496,9 @@ declare module '@polkadot/api/types/storage' { **/ nextMemberId: AugmentedQuery<ApiType, () => Observable<MemberId>>; /** - * Referral cut to receive during on buying the membership. + * Referral cut percent of the membership fee to receive on buying the membership. **/ - referralCut: AugmentedQuery<ApiType, () => Observable<BalanceOf>>; + referralCut: AugmentedQuery<ApiType, () => Observable<u8>>; /** * Double of a staking account id and member id to the confirmation status. **/ @@ -533,10 +575,6 @@ declare module '@polkadot/api/types/storage' { reportsByKindIndex: AugmentedQuery<ApiType, (arg: Kind | string | Uint8Array) => Observable<Bytes>>; }; proposalsCodex: { - /** - * Map proposal id to proposal details - **/ - proposalDetailsByProposalId: AugmentedQuery<ApiType, (arg: ProposalId | AnyNumber | Uint8Array) => Observable<ProposalDetailsOf>>; /** * Map proposal id to its discussion thread id **/ @@ -596,9 +634,11 @@ declare module '@polkadot/api/types/storage' { **/ stage: AugmentedQuery<ApiType, () => Observable<ReferendumStage>>; /** - * Votes cast in the referendum. A new record is added to this map when a user casts a sealed vote. + * Votes cast in the referendum. A new record is added to this map when a user casts a + * sealed vote. * It is modified when a user reveals the vote's commitment proof. - * A record is finally removed when the user unstakes, which can happen during a voting stage or after the current cycle ends. + * A record is finally removed when the user unstakes, which can happen during a voting + * stage or after the current cycle ends. * A stake for a vote can be reused in future referendum cycles. **/ votes: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<CastVoteOf>>; diff --git a/types/augment/augment-api-tx.ts b/types/augment/augment-api-tx.ts index 22d4d6d81a..b804ee6b23 100644 --- a/types/augment/augment-api-tx.ts +++ b/types/augment/augment-api-tx.ts @@ -1,10 +1,10 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -import { AnyNumber } from '@polkadot/types/types'; +import { AnyNumber, ITuple } from '@polkadot/types/types'; import { BTreeMap, BTreeSet, Compact, Option, Vec } from '@polkadot/types/codec'; -import { Bytes, bool, u16, u32, u64 } from '@polkadot/types/primitive'; -import { Actor, ActorId, ApplicationId, ApplyOnOpeningParameters, BuyMembershipParameters, CategoryId, ClassId, ClassPermissions, ContentId, CuratorGroupId, CuratorId, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DataObjectsMap, EntityController, EntityId, ForumUserId, GeneralProposalParameters, InputPropertyValue, InputValue, InviteMembershipParameters, MemberId, MemoText, ModeratorId, Nonce, OpeningId, OpeningType, OperationType, Penalty, Poll, PostId, PostReactionId, PrivilegedActor, Property, PropertyId, ProposalDetailsOf, ProposalId, SchemaId, StakePolicy, StorageProviderId, ThreadId, ThreadMode, Url, VecMaxLength, VoteKind, WorkerId } from './all'; +import { Bytes, bool, u16, u32, u64, u8 } from '@polkadot/types/primitive'; +import { Actor, ActorId, ApplicationId, ApplyOnOpeningParameters, BalanceKind, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, CategoryId, ClassId, ClassPermissions, ContentId, CuratorGroupId, CuratorId, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DataObjectsMap, EntityController, EntityId, EntryId, ForumUserId, FundingRequestParameters, GeneralProposalParameters, InputPropertyValue, InputValue, InviteMembershipParameters, MemberId, MemoText, ModeratorId, Nonce, OpeningId, OpeningType, OperationType, OracleJudgment, ParticipantId, Poll, PostId, PostReactionId, PrivilegedActor, Property, PropertyId, ProposalDetailsOf, ProposalId, ReplyId, SchemaId, StakePolicy, StorageProviderId, ThreadId, ThreadMode, Url, VecMaxLength, VoteKind, WorkerId, WorkingGroup } from './all'; import { BabeEquivocationProof } from '@polkadot/types/interfaces/babe'; import { Extrinsic, Signature } from '@polkadot/types/interfaces/extrinsics'; import { GrandpaEquivocationProof, KeyOwnerProof } from '@polkadot/types/interfaces/grandpa'; @@ -119,6 +119,209 @@ declare module '@polkadot/api/types/submittable' { **/ transferKeepAlive: AugmentedSubmittable<(dest: LookupSource | string | Uint8Array, value: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; }; + blog: { + /** + * Blog owner can create posts, related to a given blog, if related blog is unlocked + * + * <weight> + * + * ## Weight + * `O (T + B)` where: + * - `T` is the length of the title + * - `B` is the length of the body + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> + **/ + createPost: AugmentedSubmittable<(title: Bytes | string | Uint8Array, body: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Create either root post reply or direct reply to reply + * (Only accessible, if related blog and post are unlocked) + * <weight> + * + * ## Weight + * `O (T)` where: + * - `T` is the length of the `text` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> + **/ + createReply: AugmentedSubmittable<(participantId: ParticipantId | AnyNumber | Uint8Array, postId: PostId | AnyNumber | Uint8Array, replyId: Option<ReplyId> | null | object | string | Uint8Array, text: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Blog owner can edit post, related to a given blog (if unlocked) + * with a new title and/or body + * <weight> + * + * ## Weight + * `O (T + B)` where: + * - `T` is the length of the `new_title` + * - `B` is the length of the `new_body` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> + **/ + editPost: AugmentedSubmittable<(postId: PostId | AnyNumber | Uint8Array, newTitle: Option<Bytes> | null | object | string | Uint8Array, newBody: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Reply owner can edit reply with a new text + * (Only accessible, if related blog and post are unlocked) + * + * <weight> + * + * ## Weight + * `O (T)` where: + * - `T` is the length of the `new_text` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> + **/ + editReply: AugmentedSubmittable<(participantId: ParticipantId | AnyNumber | Uint8Array, postId: PostId | AnyNumber | Uint8Array, replyId: ReplyId | AnyNumber | Uint8Array, newText: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Blog owner can lock posts, related to a given blog, + * making post immutable to any actions (replies creation, post editing, etc.) + * + * <weight> + * + * ## Weight + * `O (1)` doesn't depends on the state or parameters + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> + **/ + lockPost: AugmentedSubmittable<(postId: PostId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Blog owner can unlock posts, related to a given blog, + * making post accesible to previously forbidden actions + * + * <weight> + * + * ## Weight + * `O (1)` doesn't depends on the state or parameters + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> + **/ + unlockPost: AugmentedSubmittable<(postId: PostId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + }; + bounty: { + /** + * Announce work entry for a successful bounty. + * # <weight> + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # </weight> + **/ + announceWorkEntry: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, bountyId: BountyId | AnyNumber | Uint8Array, stakingAccountId: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Cancels a bounty. + * It returns a cherry to creator and removes bounty. + * # <weight> + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # </weight> + **/ + cancelBounty: AugmentedSubmittable<(creator: BountyActor | { Council: any } | { Member: any } | string | Uint8Array, bountyId: BountyId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Creates a bounty. Metadata stored in the transaction log but discarded after that. + * <weight> + * + * ## Weight + * `O (W)` where: + * - `W` is the _metadata length. + * - `M` is closed contract member list length. + * - DB: + * - O(M) (O(1) on open contract) + * # </weight> + **/ + createBounty: AugmentedSubmittable<(params: BountyCreationParameters | { oracle?: any; contract_type?: any; creator?: any; cherry?: any; entrant_stake?: any; funding_type?: any; work_period?: any; judging_period?: any } | string | Uint8Array, metadata: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Provides bounty funding. + * # <weight> + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # </weight> + **/ + fundBounty: AugmentedSubmittable<(funder: BountyActor | { Council: any } | { Member: any } | string | Uint8Array, bountyId: BountyId | AnyNumber | Uint8Array, amount: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Submits an oracle judgment for a bounty. + * # <weight> + * + * ## weight + * `O (N)` + * - `N` is the work_data length, + * - db: + * - `O(N)` + * # </weight> + **/ + submitOracleJudgment: AugmentedSubmittable<(oracle: BountyActor | { Council: any } | { Member: any } | string | Uint8Array, bountyId: BountyId | AnyNumber | Uint8Array, judgment: OracleJudgment | { Winner: any } | { Rejected: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Submit work for a bounty. + * # <weight> + * + * ## weight + * `O (N)` + * - `N` is the work_data length, + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # </weight> + **/ + submitWork: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, bountyId: BountyId | AnyNumber | Uint8Array, entryId: EntryId | AnyNumber | Uint8Array, workData: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Vetoes a bounty. + * It returns a cherry to creator and removes bounty. + * # <weight> + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # </weight> + **/ + vetoBounty: AugmentedSubmittable<(bountyId: BountyId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Withdraw bounty funding by a member or a council. + * # <weight> + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # </weight> + **/ + withdrawFunding: AugmentedSubmittable<(funder: BountyActor | { Council: any } | { Member: any } | string | Uint8Array, bountyId: BountyId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Withdraw work entrant funds. + * Both legitimate participants and winners get their stake unlocked. Winners also get a + * bounty reward. + * # <weight> + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # </weight> + **/ + withdrawWorkEntrantFunds: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, bountyId: BountyId | AnyNumber | Uint8Array, entryId: EntryId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Withdraw work entry for a bounty. Existing stake could be partially slashed. + * # <weight> + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # </weight> + **/ + withdrawWorkEntry: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, bountyId: BountyId | AnyNumber | Uint8Array, entryId: EntryId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + }; constitution: { /** * Sets the current constitution hash. Requires root origin. @@ -239,7 +442,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - addOpening: AugmentedSubmittable<(description: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Regular' | number | Uint8Array, stakePolicy: Option<StakePolicy> | null | object | string | Uint8Array, rewardPerBlock: Option<BalanceOf> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + addOpening: AugmentedSubmittable<(description: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Regular' | number | Uint8Array, stakePolicy: StakePolicy | { stake_amount?: any; leaving_unstaking_period?: any } | string | Uint8Array, rewardPerBlock: Option<BalanceOf> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Apply on a worker opening. * @@ -317,7 +520,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, rationale: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Sets a new budget for the working group. * Requires root origin. @@ -359,7 +562,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Penalty | { slashing_text?: any; slashing_amount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: BalanceOf | AnyNumber | Uint8Array, rationale: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Transfers specified amount to any account. * Requires leader origin. @@ -385,7 +588,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Option<Penalty> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Option<BalanceOf> | null | object | string | Uint8Array, rationale: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Update the reward account associated with a set reward relationship for the active worker. * @@ -449,6 +652,19 @@ declare module '@polkadot/api/types/submittable' { * # </weight> **/ announceCandidacy: AugmentedSubmittable<(membershipId: MemberId | AnyNumber | Uint8Array, stakingAccountId: AccountId | string | Uint8Array, rewardAccountId: AccountId | string | Uint8Array, stake: Balance | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Transfers funds from council budget to account + * + * # <weight> + * + * ## weight + * `O (F)` where: + * `F` is the length of `funding_requests` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # </weight> + **/ + fundingRequest: AugmentedSubmittable<(fundingRequests: Vec<FundingRequestParameters> | (FundingRequestParameters | { account?: any; amount?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>; /** * Plan the next budget refill. * @@ -485,6 +701,18 @@ declare module '@polkadot/api/types/submittable' { * # </weight> **/ setBudget: AugmentedSubmittable<(balance: Balance | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Sets the budget refill amount + * + * # <weight> + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # </weight> + **/ + setBudgetIncrement: AugmentedSubmittable<(budgetIncrement: Balance | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Set short description for the user's candidacy. Can be called anytime during user's candidacy. * @@ -498,6 +726,18 @@ declare module '@polkadot/api/types/submittable' { * # </weight> **/ setCandidacyNote: AugmentedSubmittable<(membershipId: MemberId | AnyNumber | Uint8Array, note: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Sets the councilor reward per block + * + * # <weight> + * + * ## weight + * `O (1)` + * - db: + * - `O(1)` doesn't depend on the state or parameters + * # </weight> + **/ + setCouncilorReward: AugmentedSubmittable<(councilorReward: Balance | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Withdraw candidacy and release candidacy stake. * @@ -607,51 +847,238 @@ declare module '@polkadot/api/types/submittable' { forum: { /** * Add post + * + * <weight> + * + * ## Weight + * `O (W + V)` where: + * - `W` is the category depth, + * - `V` is the length of the text + * - DB: + * - O(W) + * # </weight> **/ - addPost: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, text: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + addPost: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, text: Bytes | string | Uint8Array, editable: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Add a new category. + * + * <weight> + * + * ## Weight + * `O (W + V + X)` where: + * - `W` is the category depth + * - `V` is the length of the category title. + * - `X` is the length of the category description. + * - DB: + * - O(W) + * # </weight> **/ createCategory: AugmentedSubmittable<(parentCategoryId: Option<CategoryId> | null | object | string | Uint8Array, title: Bytes | string | Uint8Array, description: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Create new thread in category with poll + * + * <weight> + * + * ## Weight + * `O (W + V + X + Y)` where: + * - `W` is the category depth + * - `V` is the length of the thread title. + * - `X` is the length of the thread text. + * - `Y` is the number of poll alternatives. + * - DB: + * - O(W) + * # </weight> **/ createThread: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, title: Bytes | string | Uint8Array, text: Bytes | string | Uint8Array, poll: Option<Poll> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Delete category + * + * <weight> + * + * ## Weight + * `O (W)` where: + * - `W` is the category depth + * - DB: + * - O(W) + * # </weight> + **/ deleteCategory: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; - deleteThread: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Delete post from storage. + * You need to provide a vector of posts to delete in the form + * (T::CategoryId, T::ThreadId, T::PostId, bool) + * where the last bool is whether you want to hide it apart from deleting it + * + * ## Weight + * `O (W + V + P)` where: + * - `W` is the category depth, + * - `V` is the length of the rationale + * - `P` is the number of posts to delete + * - DB: + * - O(W + P) + * # </weight> + **/ + deletePosts: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, posts: Vec<ITuple<[CategoryId, ThreadId, PostId, bool]>> | ([CategoryId | AnyNumber | Uint8Array, ThreadId | AnyNumber | Uint8Array, PostId | AnyNumber | Uint8Array, bool | boolean | Uint8Array])[], rationale: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Delete thread + * + * <weight> + * + * ## Weight + * `O (W)` where: + * - `W` is the category depth + * - DB: + * - O(W) + * # </weight> + **/ + deleteThread: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, hide: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Edit post text + * + * <weight> + * + * ## Weight + * `O (W + V)` where: + * - `W` is the category depth, + * - `V` is the length of the new text + * - DB: + * - O(W) + * # </weight> **/ editPostText: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, postId: PostId | AnyNumber | Uint8Array, newText: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Edit thread title + * + * <weight> + * + * ## Weight + * `O (W + V)` where: + * - `W` is the category depth + * - `V` is the length of the thread title. + * - DB: + * - O(W) + * # </weight> + **/ editThreadTitle: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, newTitle: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Moderate post + * + * <weight> + * + * ## Weight + * `O (W + V)` where: + * - `W` is the category depth, + * - `V` is the length of the rationale + * - DB: + * - O(W) + * # </weight> **/ moderatePost: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, postId: PostId | AnyNumber | Uint8Array, rationale: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Moderate thread + * + * <weight> + * + * ## Weight + * `O (W + V + X)` where: + * - `W` is the category depth, + * - `V` is the number of thread posts, + * - `X` is the length of the rationale + * - DB: + * - O(W + V) + * # </weight> + **/ moderateThread: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, rationale: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Move thread to another category + * + * <weight> + * + * ## Weight + * `O (W)` where: + * - `W` is the category depth + * - DB: + * - O(W) + * # </weight> + **/ moveThreadToCategory: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, newCategoryId: CategoryId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** - * like or unlike a post. + * Like or unlike a post. + * + * <weight> + * + * ## Weight + * `O (W)` where: + * - `W` is the category depth, + * - DB: + * - O(W) + * # </weight> **/ reactPost: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, postId: PostId | AnyNumber | Uint8Array, react: PostReactionId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Set stickied threads for category + * + * <weight> + * + * ## Weight + * `O (W + V)` where: + * - `W` is the category depth, + * - `V` is the length of the stickied_ids + * - DB: + * - O(W + V) + * # </weight> **/ setStickiedThreads: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, stickiedIds: Vec<ThreadId> | (ThreadId | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>; /** - * Update category + * Update archival status + * + * <weight> + * + * ## Weight + * `O (W)` where: + * - `W` is the category depth + * - DB: + * - O(W) + * # </weight> **/ updateCategoryArchivalStatus: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, newArchivalStatus: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Enable a moderator can moderate a category and its sub categories. + * + * <weight> + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> **/ updateCategoryMembershipOfModerator: AugmentedSubmittable<(moderatorId: ModeratorId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, newValue: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** - * Update category + * Update thread archival status + * + * <weight> + * + * ## Weight + * `O (W)` where: + * - `W` is the category depth + * - DB: + * - O(W) + * # </weight> **/ updateThreadArchivalStatus: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, newArchivalStatus: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** - * submit a poll + * Submit a poll + * + * <weight> + * + * ## Weight + * `O (W + V)` where: + * - `W` is the category depth, + * - `V` is the number of poll alternatives. + * - DB: + * - O(W) + * # </weight> **/ voteOnPoll: AugmentedSubmittable<(forumUserId: ForumUserId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; }; @@ -669,7 +1096,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - addOpening: AugmentedSubmittable<(description: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Regular' | number | Uint8Array, stakePolicy: Option<StakePolicy> | null | object | string | Uint8Array, rewardPerBlock: Option<BalanceOf> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + addOpening: AugmentedSubmittable<(description: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Regular' | number | Uint8Array, stakePolicy: StakePolicy | { stake_amount?: any; leaving_unstaking_period?: any } | string | Uint8Array, rewardPerBlock: Option<BalanceOf> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Apply on a worker opening. * @@ -747,7 +1174,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, rationale: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Sets a new budget for the working group. * Requires root origin. @@ -789,7 +1216,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Penalty | { slashing_text?: any; slashing_amount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: BalanceOf | AnyNumber | Uint8Array, rationale: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Transfers specified amount to any account. * Requires leader origin. @@ -815,7 +1242,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Option<Penalty> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Option<BalanceOf> | null | object | string | Uint8Array, rationale: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Update the reward account associated with a set reward relationship for the active worker. * @@ -911,63 +1338,235 @@ declare module '@polkadot/api/types/submittable' { **/ heartbeat: AugmentedSubmittable<(heartbeat: Heartbeat | { blockNumber?: any; networkState?: any; sessionIndex?: any; authorityIndex?: any; validatorsLen?: any } | string | Uint8Array, signature: Signature | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; }; + joystreamUtility: { + /** + * Burns token for caller account + * <weight> + * + * ## Weight + * `O (1)` Doesn't depend on the state or parameters + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> + **/ + burnAccountTokens: AugmentedSubmittable<(amount: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Runtime upgrade proposal extrinsic. + * Should be used as callable object to pass to the `engine` module. + * <weight> + * + * ## Weight + * `O (C)` where: + * - `C` is the length of `wasm` + * However, we treat this as a full block as `frame_system::Module::set_code` does + * # </weight> + **/ + executeRuntimeUpgradeProposal: AugmentedSubmittable<(wasm: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Signal proposal extrinsic. Should be used as callable object to pass to the `engine` module. + * + * <weight> + * + * ## Weight + * `O (S)` where: + * - `S` is the length of the signal + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> + **/ + executeSignalProposal: AugmentedSubmittable<(signal: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Update working group budget + * <weight> + * + * ## Weight + * `O (1)` Doesn't depend on the state or parameters + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> + **/ + updateWorkingGroupBudget: AugmentedSubmittable<(workingGroup: WorkingGroup | 'Forum'|'Storage'|'Content'|'Membership' | number | Uint8Array, amount: BalanceOf | AnyNumber | Uint8Array, balanceKind: BalanceKind | 'Positive'|'Negative' | number | Uint8Array) => SubmittableExtrinsic<ApiType>>; + }; members: { /** * Add staking account candidate for a member. * The membership must be confirmed before usage. + * + * <weight> + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> **/ addStakingAccountCandidate: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Non-members can buy membership. + * + * <weight> + * + * ## Weight + * `O (W + V + X + Y)` where: + * - `W` is the member name + * - `V` is the member handle + * - `X` is the member avatar uri + * - `Y` is the member about + * - DB: + * - O(V) + * # </weight> **/ - buyMembership: AugmentedSubmittable<(params: BuyMembershipParameters | { root_account?: any; controller_account?: any; name?: any; handle?: any; avatar_uri?: any; about?: any; referrer_id?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + buyMembership: AugmentedSubmittable<(params: BuyMembershipParameters | { root_account?: any; controller_account?: any; handle?: any; metadata?: any; referrer_id?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Confirm staking account candidate for a member. + * + * <weight> + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> **/ confirmStakingAccount: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, stakingAccountId: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Invite a new member. + * + * <weight> + * + * ## Weight + * `O (W + V + X + Y)` where: + * - `W` is the member name + * - `V` is the member handle + * - `X` is the member avatar uri + * - `Y` is the member about + * - DB: + * - O(V) + * # </weight> **/ - inviteMember: AugmentedSubmittable<(params: InviteMembershipParameters | { inviting_member_id?: any; root_account?: any; controller_account?: any; name?: any; handle?: any; avatar_uri?: any; about?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + inviteMember: AugmentedSubmittable<(params: InviteMembershipParameters | { inviting_member_id?: any; root_account?: any; controller_account?: any; handle?: any; metadata?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Remove staking account for a member. + * + * <weight> + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> **/ removeStakingAccount: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Updates initial invitation balance for a invited member. Requires root origin. + * + * <weight> + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> **/ setInitialInvitationBalance: AugmentedSubmittable<(newInitialBalance: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Updates initial invitation count for a member. Requires root origin. + * + * <weight> + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> **/ setInitialInvitationCount: AugmentedSubmittable<(newInvitationCount: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Updates leader invitation quota. Requires root origin. + * + * <weight> + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> **/ setLeaderInvitationQuota: AugmentedSubmittable<(invitationQuota: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Updates membership price. Requires root origin. + * + * <weight> + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> **/ setMembershipPrice: AugmentedSubmittable<(newPrice: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** - * Updates membership referral cut. Requires root origin. + * Updates membership referral cut percent value. Requires root origin. + * + * <weight> + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> **/ - setReferralCut: AugmentedSubmittable<(value: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + setReferralCut: AugmentedSubmittable<(percentValue: u8 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Transfers invites from one member to another. + * + * <weight> + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> **/ transferInvites: AugmentedSubmittable<(sourceMemberId: MemberId | AnyNumber | Uint8Array, targetMemberId: MemberId | AnyNumber | Uint8Array, numberOfInvites: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Updates member root or controller accounts. No effect if both new accounts are empty. + * + * <weight> + * + * <weight> + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> **/ updateAccounts: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, newRootAccount: Option<AccountId> | null | object | string | Uint8Array, newControllerAccount: Option<AccountId> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Update member's all or some of name, handle, avatar and about text. * No effect if no changed fields. + * + * <weight> + * + * ## Weight + * `O (W)` where: + * - `W` is the handle length + * - DB: + * - O(W) + * # </weight> **/ - updateProfile: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, name: Option<Bytes> | null | object | string | Uint8Array, handle: Option<Bytes> | null | object | string | Uint8Array, avatarUri: Option<Bytes> | null | object | string | Uint8Array, about: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + updateProfile: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, handle: Option<Bytes> | null | object | string | Uint8Array, metadata: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Updates member profile verification status. Requires working group member origin. + * + * <weight> + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> **/ updateProfileVerification: AugmentedSubmittable<(workerId: ActorId | AnyNumber | Uint8Array, targetMemberId: MemberId | AnyNumber | Uint8Array, isVerified: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>; }; @@ -985,7 +1584,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - addOpening: AugmentedSubmittable<(description: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Regular' | number | Uint8Array, stakePolicy: Option<StakePolicy> | null | object | string | Uint8Array, rewardPerBlock: Option<BalanceOf> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + addOpening: AugmentedSubmittable<(description: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Regular' | number | Uint8Array, stakePolicy: StakePolicy | { stake_amount?: any; leaving_unstaking_period?: any } | string | Uint8Array, rewardPerBlock: Option<BalanceOf> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Apply on a worker opening. * @@ -1063,7 +1662,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, rationale: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Sets a new budget for the working group. * Requires root origin. @@ -1105,7 +1704,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Penalty | { slashing_text?: any; slashing_amount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: BalanceOf | AnyNumber | Uint8Array, rationale: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Transfers specified amount to any account. * Requires leader origin. @@ -1131,7 +1730,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Option<Penalty> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Option<BalanceOf> | null | object | string | Uint8Array, rationale: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Update the reward account associated with a set reward relationship for the active worker. * @@ -1188,17 +1787,19 @@ declare module '@polkadot/api/types/submittable' { proposalsCodex: { /** * Create a proposal, the type of proposal depends on the `proposal_details` variant + * + * <weight> + * + * ## Weight + * `O (T + D + I)` where: + * - `T` is the length of the title + * - `D` is the length of the description + * - `I` is the length of any parameter in `proposal_details` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> **/ - createProposal: AugmentedSubmittable<(generalProposalParameters: GeneralProposalParameters | { member_id?: any; title?: any; description?: any; staking_account_id?: any; exact_execution_block?: any } | string | Uint8Array, proposalDetails: ProposalDetailsOf | { Text: any } | { RuntimeUpgrade: any } | { Spending: any } | { SetValidatorCount: any } | { AddWorkingGroupLeaderOpening: any } | { FillWorkingGroupLeaderOpening: any } | { SetWorkingGroupBudgetCapacity: any } | { DecreaseWorkingGroupLeaderStake: any } | { SlashWorkingGroupLeaderStake: any } | { SetWorkingGroupLeaderReward: any } | { TerminateWorkingGroupLeaderRole: any } | { AmendConstitution: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; - /** - * Runtime upgrade proposal extrinsic. - * Should be used as callable object to pass to the `engine` module. - **/ - executeRuntimeUpgradeProposal: AugmentedSubmittable<(wasm: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; - /** - * Text proposal extrinsic. Should be used as callable object to pass to the `engine` module. - **/ - executeTextProposal: AugmentedSubmittable<(text: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + createProposal: AugmentedSubmittable<(generalProposalParameters: GeneralProposalParameters | { member_id?: any; title?: any; description?: any; staking_account_id?: any; exact_execution_block?: any } | string | Uint8Array, proposalDetails: ProposalDetailsOf | { Signal: any } | { RuntimeUpgrade: any } | { FundingRequest: any } | { SetMaxValidatorCount: any } | { CreateWorkingGroupLeadOpening: any } | { FillWorkingGroupLeadOpening: any } | { UpdateWorkingGroupBudget: any } | { DecreaseWorkingGroupLeadStake: any } | { SlashWorkingGroupLead: any } | { SetWorkingGroupLeadReward: any } | { TerminateWorkingGroupLead: any } | { AmendConstitution: any } | { CancelWorkingGroupLeadOpening: any } | { SetMembershipPrice: any } | { SetCouncilBudgetIncrement: any } | { SetCouncilorReward: any } | { SetInitialInvitationBalance: any } | { SetInitialInvitationCount: any } | { SetMembershipLeadInvitationQuota: any } | { SetReferralCut: any } | { CreateBlogPost: any } | { EditBlogPost: any } | { LockBlogPost: any } | { UnlockBlogPost: any } | { VetoProposal: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; }; proposalsDiscussion: { /** @@ -1207,13 +1808,13 @@ declare module '@polkadot/api/types/submittable' { * <weight> * * ## Weight - * `O (W)` where: - * - `W` is the number of whitelisted members for `thread_id` + * `O (L)` where: + * - `L` is the length of `text` * - DB: * - O(1) doesn't depend on the state or parameters * # </weight> **/ - addPost: AugmentedSubmittable<(postAuthorId: MemberId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, text: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + addPost: AugmentedSubmittable<(postAuthorId: MemberId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, text: Bytes | string | Uint8Array, editable: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Changes thread permission mode. * @@ -1227,13 +1828,27 @@ declare module '@polkadot/api/types/submittable' { * # </weight> **/ changeThreadMode: AugmentedSubmittable<(memberId: MemberId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, mode: ThreadMode | { Open: any } | { Closed: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Remove post from storage, with the last parameter indicating whether to also hide it + * in the UI. + * + * <weight> + * + * ## Weight + * `O (1)` + * - DB: + * - O(1) doesn't depend on the state or parameters + * # </weight> + **/ + deletePost: AugmentedSubmittable<(deleterId: MemberId | AnyNumber | Uint8Array, postId: PostId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, hide: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Updates a post with author origin check. Update attempts number is limited. * * <weight> * * ## Weight - * `O (1)` doesn't depend on the state or parameters + * `O (L)` where: + * - `L` is the length of `text` * - DB: * - O(1) doesn't depend on the state or parameters * # </weight> @@ -1299,7 +1914,8 @@ declare module '@polkadot/api/types/submittable' { * * ## Weight * `O (W)` where: - * - `W` is the number of `intermediate_winners` stored in the current `Stage::<T, I>::get()` + * - `W` is the number of `intermediate_winners` stored in the current + * `Stage::<T, I>::get()` * - DB: * - `O(1)` doesn't depend on the state or parameters * # </weight> @@ -1316,7 +1932,7 @@ declare module '@polkadot/api/types/submittable' { * - `O(1)` doesn't depend on the state or parameters * # </weight> **/ - vote: AugmentedSubmittable<(commitment: Hash | string | Uint8Array, stake: Balance | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + vote: AugmentedSubmittable<(commitment: Hash | string | Uint8Array, stake: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; }; session: { /** @@ -1847,7 +2463,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - addOpening: AugmentedSubmittable<(description: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Regular' | number | Uint8Array, stakePolicy: Option<StakePolicy> | null | object | string | Uint8Array, rewardPerBlock: Option<BalanceOf> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + addOpening: AugmentedSubmittable<(description: Bytes | string | Uint8Array, openingType: OpeningType | 'Leader'|'Regular' | number | Uint8Array, stakePolicy: StakePolicy | { stake_amount?: any; leaving_unstaking_period?: any } | string | Uint8Array, rewardPerBlock: Option<BalanceOf> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Apply on a worker opening. * @@ -1925,7 +2541,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>; + leaveRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, rationale: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Sets a new budget for the working group. * Requires root origin. @@ -1967,7 +2583,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Penalty | { slashing_text?: any; slashing_amount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + slashStake: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: BalanceOf | AnyNumber | Uint8Array, rationale: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Transfers specified amount to any account. * Requires leader origin. @@ -1993,7 +2609,7 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Option<Penalty> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + terminateRole: AugmentedSubmittable<(workerId: WorkerId | AnyNumber | Uint8Array, penalty: Option<BalanceOf> | null | object | string | Uint8Array, rationale: Option<Bytes> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Update the reward account associated with a set reward relationship for the active worker. * diff --git a/types/augment/augment-types.ts b/types/augment/augment-types.ts index 24e6e60378..ea556607e1 100644 --- a/types/augment/augment-types.ts +++ b/types/augment/augment-types.ts @@ -3,7 +3,7 @@ import { Compact, Option, Raw, Vec } from '@polkadot/types/codec'; import { BitVec, Bytes, Data, DoNotConstruct, Null, StorageKey, Text, Type, U256, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types/primitive'; -import { Actor, ActorId, AddOpeningParameters, AddSchemaSupportToEntityOperation, Application, ApplicationId, ApplicationIdSet, ApplicationIdToWorkerIdMap, ApplicationInfo, ApplyOnOpeningParameters, Approved, BlockAndTime, BuyMembershipParameters, Candidate, CastVoteOf, Category, CategoryId, Class, ClassId, ClassOf, ClassPermissions, ConstitutionInfo, ContentId, CouncilMemberOf, CouncilStage, CouncilStageAnnouncing, CouncilStageElection, CouncilStageUpdate, CreateEntityOperation, CuratorGroup, CuratorGroupId, CuratorId, DataObject, DataObjectStorageRelationship, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DataObjectsMap, DiscussionPost, DiscussionThread, Entity, EntityController, EntityCreationVoucher, EntityId, EntityOf, EntityPermissions, EntityReferenceCounterSideEffect, ExecutionFailed, ExecutionStatus, FailedAt, FillOpeningParameters, ForumUserId, GeneralProposalParameters, HashedTextMaxLength, IPNSIdentity, InboundReferenceCounter, InputEntityValuesMap, InputPropertyValue, InputValidationLengthConstraint, InputValue, InviteMembershipParameters, LiaisonJudgement, MemberId, Membership, MemoText, ModeratorId, Nonce, Opening, OpeningId, OpeningType, OperationType, OptionResult, ParameterizedEntity, ParametrizedClassPropertyValue, ParametrizedPropertyValue, Penalty, Poll, PollAlternative, Post, PostId, PostReactionId, PrivilegedActor, Property, PropertyId, PropertyLockingPolicy, PropertyType, PropertyTypeSingle, PropertyTypeVector, ProposalDecision, ProposalDetails, ProposalDetailsOf, ProposalId, ProposalOf, ProposalParameters, ProposalStatus, ReferenceCounterSideEffects, ReferendumStage, ReferendumStageRevealing, ReferendumStageVoting, SameController, Schema, SchemaId, ServiceProviderRecord, SetLeadParams, SideEffect, SideEffects, StakeParameters, StakePolicy, StakingAccountMemberBinding, Status, StorageProviderId, StoredPropertyValue, StoredValue, TerminateRoleParameters, TextMaxLength, Thread, ThreadId, ThreadMode, UpdatePropertyValuesOperation, Url, VecInputValue, VecMaxLength, VecStoredPropertyValue, VecStoredValue, VoteKind, VotePower, VotingResults, Worker, WorkerId, WorkerInfo, WorkingGroup } from './all'; +import { Actor, ActorId, AddSchemaSupportToEntityOperation, Application, ApplicationId, ApplicationIdSet, ApplicationIdToWorkerIdMap, ApplicationInfo, ApplyOnOpeningParameters, Approved, AssuranceContractType, BalanceKind, BlockAndTime, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, Candidate, CastVoteOf, Category, CategoryId, Class, ClassId, ClassOf, ClassPermissions, ConstitutionInfo, ContentId, CouncilMemberOf, CouncilStage, CouncilStageAnnouncing, CouncilStageElection, CouncilStageUpdate, CreateEntityOperation, CreateOpeningParameters, CuratorGroup, CuratorGroupId, CuratorId, DataObject, DataObjectStorageRelationship, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DataObjectsMap, DiscussionPost, DiscussionThread, Entity, EntityController, EntityCreationVoucher, EntityId, EntityOf, EntityPermissions, EntityReferenceCounterSideEffect, Entry, EntryId, ExecutionFailed, ExecutionStatus, FailedAt, FillOpeningParameters, ForumUserId, FundingRequestParameters, FundingType, FundingType_Limited, FundingType_Perpetual, GeneralProposalParameters, HashedTextMaxLength, IPNSIdentity, InboundReferenceCounter, InputEntityValuesMap, InputPropertyValue, InputValidationLengthConstraint, InputValue, InviteMembershipParameters, LiaisonJudgement, MemberId, Membership, MemoText, ModeratorId, Nonce, Opening, OpeningId, OpeningType, OperationType, OptionResult, OracleJudgment, OracleJudgment_Winner, ParameterizedEntity, ParametrizedClassPropertyValue, ParametrizedPropertyValue, ParticipantId, Penalty, Poll, PollAlternative, Post, PostId, PostReactionId, PrivilegedActor, Property, PropertyId, PropertyLockingPolicy, PropertyType, PropertyTypeSingle, PropertyTypeVector, ProposalDecision, ProposalDetails, ProposalDetailsOf, ProposalId, ProposalOf, ProposalParameters, ProposalStatus, ReferenceCounterSideEffects, ReferendumStage, ReferendumStageRevealing, ReferendumStageVoting, Reply, ReplyId, SameController, Schema, SchemaId, ServiceProviderRecord, SetLeadParams, SideEffect, SideEffects, StakeParameters, StakePolicy, StakingAccountMemberBinding, Status, StorageProviderId, StoredPropertyValue, StoredValue, TerminateRoleParameters, TextMaxLength, Thread, ThreadId, ThreadMode, ThreadOf, Title, UpdatePropertyValuesOperation, UpdatedBody, UpdatedTitle, Url, VecInputValue, VecMaxLength, VecStoredPropertyValue, VecStoredValue, VoteKind, VotePower, VotingResults, Worker, WorkerId, WorkerInfo, WorkingGroup } from './all'; import { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/types/interfaces/attestations'; import { RawAuraPreDigest } from '@polkadot/types/interfaces/aura'; import { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author'; @@ -1800,6 +1800,9 @@ declare module '@polkadot/types/types/registry' { MemoText: MemoText; 'Option<MemoText>': Option<MemoText>; 'Vec<MemoText>': Vec<MemoText>; + BalanceKind: BalanceKind; + 'Option<BalanceKind>': Option<BalanceKind>; + 'Vec<BalanceKind>': Vec<BalanceKind>; Membership: Membership; 'Option<Membership>': Option<Membership>; 'Vec<Membership>': Vec<Membership>; @@ -1867,6 +1870,9 @@ declare module '@polkadot/types/types/registry' { PrivilegedActor: PrivilegedActor; 'Option<PrivilegedActor>': Option<PrivilegedActor>; 'Vec<PrivilegedActor>': Vec<PrivilegedActor>; + ThreadOf: ThreadOf; + 'Option<ThreadOf>': Option<ThreadOf>; + 'Vec<ThreadOf>': Vec<ThreadOf>; ApplicationId: ApplicationId; 'Compact<ApplicationId>': Compact<ApplicationId>; 'Option<ApplicationId>': Option<ApplicationId>; @@ -1954,6 +1960,26 @@ declare module '@polkadot/types/types/registry' { DataObjectsMap: DataObjectsMap; 'Option<DataObjectsMap>': Option<DataObjectsMap>; 'Vec<DataObjectsMap>': Vec<DataObjectsMap>; + ParticipantId: ParticipantId; + 'Compact<ParticipantId>': Compact<ParticipantId>; + 'Option<ParticipantId>': Option<ParticipantId>; + 'Vec<ParticipantId>': Vec<ParticipantId>; + Title: Title; + 'Option<Title>': Option<Title>; + 'Vec<Title>': Vec<Title>; + UpdatedTitle: UpdatedTitle; + 'Option<UpdatedTitle>': Option<UpdatedTitle>; + 'Vec<UpdatedTitle>': Vec<UpdatedTitle>; + UpdatedBody: UpdatedBody; + 'Option<UpdatedBody>': Option<UpdatedBody>; + 'Vec<UpdatedBody>': Vec<UpdatedBody>; + ReplyId: ReplyId; + 'Compact<ReplyId>': Compact<ReplyId>; + 'Option<ReplyId>': Option<ReplyId>; + 'Vec<ReplyId>': Vec<ReplyId>; + Reply: Reply; + 'Option<Reply>': Option<Reply>; + 'Vec<Reply>': Vec<Reply>; ProposalId: ProposalId; 'Compact<ProposalId>': Compact<ProposalId>; 'Option<ProposalId>': Option<ProposalId>; @@ -1988,9 +2014,9 @@ declare module '@polkadot/types/types/registry' { DiscussionPost: DiscussionPost; 'Option<DiscussionPost>': Option<DiscussionPost>; 'Vec<DiscussionPost>': Vec<DiscussionPost>; - AddOpeningParameters: AddOpeningParameters; - 'Option<AddOpeningParameters>': Option<AddOpeningParameters>; - 'Vec<AddOpeningParameters>': Vec<AddOpeningParameters>; + CreateOpeningParameters: CreateOpeningParameters; + 'Option<CreateOpeningParameters>': Option<CreateOpeningParameters>; + 'Vec<CreateOpeningParameters>': Vec<CreateOpeningParameters>; FillOpeningParameters: FillOpeningParameters; 'Option<FillOpeningParameters>': Option<FillOpeningParameters>; 'Vec<FillOpeningParameters>': Vec<FillOpeningParameters>; @@ -2015,6 +2041,9 @@ declare module '@polkadot/types/types/registry' { ExecutionStatus: ExecutionStatus; 'Option<ExecutionStatus>': Option<ExecutionStatus>; 'Vec<ExecutionStatus>': Vec<ExecutionStatus>; + FundingRequestParameters: FundingRequestParameters; + 'Option<FundingRequestParameters>': Option<FundingRequestParameters>; + 'Vec<FundingRequestParameters>': Vec<FundingRequestParameters>; Nonce: Nonce; 'Compact<Nonce>': Compact<Nonce>; 'Option<Nonce>': Option<Nonce>; @@ -2191,5 +2220,40 @@ declare module '@polkadot/types/types/registry' { ConstitutionInfo: ConstitutionInfo; 'Option<ConstitutionInfo>': Option<ConstitutionInfo>; 'Vec<ConstitutionInfo>': Vec<ConstitutionInfo>; + BountyId: BountyId; + 'Compact<BountyId>': Compact<BountyId>; + 'Option<BountyId>': Option<BountyId>; + 'Vec<BountyId>': Vec<BountyId>; + EntryId: EntryId; + 'Compact<EntryId>': Compact<EntryId>; + 'Option<EntryId>': Option<EntryId>; + 'Vec<EntryId>': Vec<EntryId>; + BountyActor: BountyActor; + 'Option<BountyActor>': Option<BountyActor>; + 'Vec<BountyActor>': Vec<BountyActor>; + AssuranceContractType: AssuranceContractType; + 'Option<AssuranceContractType>': Option<AssuranceContractType>; + 'Vec<AssuranceContractType>': Vec<AssuranceContractType>; + FundingType_Limited: FundingType_Limited; + 'Option<FundingType_Limited>': Option<FundingType_Limited>; + 'Vec<FundingType_Limited>': Vec<FundingType_Limited>; + FundingType_Perpetual: FundingType_Perpetual; + 'Option<FundingType_Perpetual>': Option<FundingType_Perpetual>; + 'Vec<FundingType_Perpetual>': Vec<FundingType_Perpetual>; + FundingType: FundingType; + 'Option<FundingType>': Option<FundingType>; + 'Vec<FundingType>': Vec<FundingType>; + BountyCreationParameters: BountyCreationParameters; + 'Option<BountyCreationParameters>': Option<BountyCreationParameters>; + 'Vec<BountyCreationParameters>': Vec<BountyCreationParameters>; + OracleJudgment_Winner: OracleJudgment_Winner; + 'Option<OracleJudgment_Winner>': Option<OracleJudgment_Winner>; + 'Vec<OracleJudgment_Winner>': Vec<OracleJudgment_Winner>; + OracleJudgment: OracleJudgment; + 'Option<OracleJudgment>': Option<OracleJudgment>; + 'Vec<OracleJudgment>': Vec<OracleJudgment>; + Entry: Entry; + 'Option<Entry>': Option<Entry>; + 'Vec<Entry>': Vec<Entry>; } } diff --git a/types/package.json b/types/package.json index 8d585a2659..8c0c3f4d5f 100644 --- a/types/package.json +++ b/types/package.json @@ -1,7 +1,7 @@ { "name": "@joystream/types", "version": "0.15.0", - "description": "Types for Joystream Substrate Runtime - Babylon release", + "description": "Types for Joystream Substrate Runtime - Olympia release", "main": "index.js", "types": "index.d.ts", "scripts": { diff --git a/types/src/blog.ts b/types/src/blog.ts new file mode 100644 index 0000000000..c80b4ceee9 --- /dev/null +++ b/types/src/blog.ts @@ -0,0 +1,23 @@ +import { JoyStructDecorated, MemberId, Hash, PostId } from './common' +import { Text, Option, u64 } from '@polkadot/types' + +export class ParticipantId extends MemberId {} +export class Title extends Text {} +export class UpdatedTitle extends Option.with(Text) {} +export class UpdatedBody extends Option.with(Text) {} +export class ReplyId extends u64 {} + +export class Reply extends JoyStructDecorated({ + text_hash: Hash, + owner: ParticipantId, + parent_id: PostId, +}) {} + +export default { + ParticipantId, + Title, + UpdatedTitle, + UpdatedBody, + ReplyId, + Reply, +} diff --git a/types/src/bounty.ts b/types/src/bounty.ts new file mode 100644 index 0000000000..7bfe0995e1 --- /dev/null +++ b/types/src/bounty.ts @@ -0,0 +1,75 @@ +import { Null, u32, u128, bool, Option } from '@polkadot/types' +import AccountId from '@polkadot/types/generic/AccountId' +import { JoyEnum, JoyStructDecorated, JoyBTreeSet, MemberId } from './common' + +export class BountyId extends u32 {} +export class EntryId extends u32 {} + +export class BountyActor extends JoyEnum({ + Council: Null, + Member: MemberId, +}) {} + +export class AssuranceContractType extends JoyEnum({ + Open: Null, + Closed: JoyBTreeSet(MemberId), +}) {} + +export class FundingType_Perpetual extends JoyStructDecorated({ + target: u128, // Balance +}) {} + +export class FundingType_Limited extends JoyStructDecorated({ + min_funding_amount: u128, // Balance + max_funding_amount: u128, // Balance + funding_period: u32, // BlockNumber +}) {} + +export class FundingType extends JoyEnum({ + Perpetual: FundingType_Perpetual, + Limited: FundingType_Limited, +}) {} + +export class BountyCreationParameters extends JoyStructDecorated({ + oracle: BountyActor, + contract_type: AssuranceContractType, + creator: BountyActor, + cherry: u128, // Balance + entrant_stake: u128, // Balance + funding_type: FundingType, + work_period: u32, // BlockNumber + judging_period: u32, // BlockNumber +}) {} + +export class OracleJudgment_Winner extends JoyStructDecorated({ + reward: u128, // Balance +}) {} + +export class OracleJudgment extends JoyEnum({ + Winner: OracleJudgment_Winner, + Rejected: Null, +}) {} + +export class Entry extends JoyStructDecorated({ + member_id: MemberId, + staking_account_id: AccountId, + submitted_at: u32, // BlockNumber + work_submitted: bool, + oracle_judgment_result: Option.with(OracleJudgment), +}) {} + +export const bountyTypes = { + BountyId, + EntryId, + BountyActor, + AssuranceContractType, + FundingType_Limited, + FundingType_Perpetual, + FundingType, + BountyCreationParameters, + OracleJudgment_Winner, + OracleJudgment, + Entry, +} + +export default bountyTypes diff --git a/types/src/common.ts b/types/src/common.ts index 66c78b09bb..e4976cf36b 100644 --- a/types/src/common.ts +++ b/types/src/common.ts @@ -134,6 +134,11 @@ export class WorkingGroup extends JoyEnum(WorkingGroupDef) {} export class MemoText extends Text {} +export class BalanceKind extends JoyEnum({ + Positive: Null, + Negative: Null, +}) {} + // @polkadot/types overrides required since migration to Substrate 2.0, // see: https://polkadot.js.org/docs/api/FAQ#i-cannot-send-transactions-sending-yields-address-decoding-failures export class AccountId extends GenericAccountId {} @@ -149,6 +154,7 @@ export const commonTypes: RegistryTypes = { InputValidationLengthConstraint, WorkingGroup, MemoText, + BalanceKind, // Customize Address type for joystream chain Address, LookupSource, diff --git a/types/src/forum.ts b/types/src/forum.ts index 95d15be70f..5d6e39ab60 100644 --- a/types/src/forum.ts +++ b/types/src/forum.ts @@ -73,6 +73,8 @@ export const forumTypes: RegistryTypes = { PollAlternative, Poll, PrivilegedActor, + // runtime alias + ThreadOf: Thread, } export default forumTypes diff --git a/types/src/index.ts b/types/src/index.ts index 215ce58d25..9e943d8312 100644 --- a/types/src/index.ts +++ b/types/src/index.ts @@ -6,10 +6,12 @@ import forum from './forum' import workingGroup from './working-group' import discovery from './discovery' import media from './media' +import blog from './blog' import proposals from './proposals' import contentDirectory from './content-directory' import referendum from './referendum' import constitution from './constitution' +import bounty from './bounty' import { InterfaceTypes } from '@polkadot/types/types/registry' import { TypeRegistry, Text, UInt, Null, bool, Option, Vec, BTreeSet, BTreeMap } from '@polkadot/types' import { ExtendedEnum } from './JoyEnum' @@ -27,10 +29,12 @@ export const types: RegistryTypes = { ...workingGroup, ...discovery, ...media, + ...blog, ...proposals, ...contentDirectory, ...referendum, ...constitution, + ...bounty, } // Allows creating types without api instance (it's not a recommended way though, so should be used just for mocks) @@ -70,7 +74,7 @@ type CreateInterface_NoOption<T extends Codec> = // Wrapper for CreateInterface_NoOption that includes resolving an Option // (nested Options like Option<Option<Codec>> will resolve to Option<any>, but there are very edge case) -type CreateInterface<T extends Codec> = +export type CreateInterface<T extends Codec> = | T | (T extends Option<infer S> ? undefined | null | S | CreateInterface_NoOption<S> : CreateInterface_NoOption<T>) diff --git a/types/src/members.ts b/types/src/members.ts index 518d23c632..4df61d5136 100644 --- a/types/src/members.ts +++ b/types/src/members.ts @@ -35,10 +35,8 @@ export class StakingAccountMemberBinding export type IBuyMembershipParameters = { root_account: AccountId controller_account: AccountId - name: Option<Text> handle: Option<Text> - avatar_uri: Option<Text> - about: Option<Text> + metadata: Bytes referrer_id: Option<MemberId> } @@ -46,10 +44,8 @@ export class BuyMembershipParameters extends JoyStructDecorated({ root_account: AccountId, controller_account: AccountId, - name: Option.with(Text), handle: Option.with(Text), - avatar_uri: Option.with(Text), - about: Option.with(Text), + metadata: Bytes, referrer_id: Option.with(MemberId), }) implements IBuyMembershipParameters {} @@ -58,10 +54,8 @@ export type IInviteMembershipParameters = { inviting_member_id: MemberId root_account: AccountId controller_account: AccountId - name: Option<Text> handle: Option<Text> - avatar_uri: Option<Text> - about: Option<Text> + metadata: Bytes } export class InviteMembershipParameters @@ -69,10 +63,8 @@ export class InviteMembershipParameters inviting_member_id: MemberId, root_account: AccountId, controller_account: AccountId, - name: Option.with(Text), handle: Option.with(Text), - avatar_uri: Option.with(Text), - about: Option.with(Text), + metadata: Bytes, }) implements IInviteMembershipParameters {} diff --git a/types/src/proposals.ts b/types/src/proposals.ts index 2488654f6a..ed50a77b1c 100644 --- a/types/src/proposals.ts +++ b/types/src/proposals.ts @@ -1,7 +1,7 @@ import { Text, u32, Tuple, u8, u128, Vec, Option, Null, Bytes } from '@polkadot/types' import { BlockNumber, Balance } from '@polkadot/types/interfaces' -import { AccountId, MemberId, WorkingGroup, JoyEnum, JoyStructDecorated } from './common' -import { ApplicationId, OpeningId, Penalty, StakePolicy, WorkerId } from './working-group' +import { AccountId, MemberId, WorkingGroup, JoyEnum, JoyStructDecorated, BalanceKind, PostId } from './common' +import { ApplicationId, OpeningId, StakePolicy, WorkerId } from './working-group' export type IVotingResults = { abstensions: u32 @@ -191,21 +191,21 @@ export class GeneralProposalParameters }) implements IGeneralProposalParameters {} -export type IAddOpeningParameters = { +export type ICreateOpeningParameters = { description: Text - stake_policy: Option<StakePolicy> + stake_policy: StakePolicy reward_per_block: Option<Balance> working_group: WorkingGroup } -export class AddOpeningParameters +export class CreateOpeningParameters extends JoyStructDecorated({ description: Text, - stake_policy: Option.with(StakePolicy), + stake_policy: StakePolicy, reward_per_block: Option.with(u128), working_group: WorkingGroup, }) - implements IAddOpeningParameters {} + implements ICreateOpeningParameters {} export type IFillOpeningParameters = { opening_id: OpeningId @@ -223,31 +223,56 @@ export class FillOpeningParameters export type ITerminateRoleParameters = { worker_id: WorkerId - penalty: Option<Penalty> + slashing_amount: Option<Balance> working_group: WorkingGroup } export class TerminateRoleParameters extends JoyStructDecorated({ worker_id: WorkerId, - penalty: Option.with(Penalty), + slashing_amount: Option.with(u128), working_group: WorkingGroup, }) implements ITerminateRoleParameters {} +export type IFundingRequestParameters = { + account: AccountId + amount: Balance +} + +export class FundingRequestParameters + extends JoyStructDecorated({ + account: AccountId, + amount: u128, + }) + implements IFundingRequestParameters {} + export class ProposalDetails extends JoyEnum({ - Text: Text, + Signal: Text, RuntimeUpgrade: Bytes, - Spending: SpendingParams, - SetValidatorCount: u32, - AddWorkingGroupLeaderOpening: AddOpeningParameters, - FillWorkingGroupLeaderOpening: FillOpeningParameters, - SetWorkingGroupBudgetCapacity: Tuple.with(['Balance', WorkingGroup]), - DecreaseWorkingGroupLeaderStake: Tuple.with([WorkerId, 'Balance', WorkingGroup]), - SlashWorkingGroupLeaderStake: Tuple.with([WorkerId, 'Balance', WorkingGroup]), - SetWorkingGroupLeaderReward: Tuple.with([WorkerId, 'Balance', WorkingGroup]), - TerminateWorkingGroupLeaderRole: TerminateRoleParameters, + FundingRequest: Vec.with(FundingRequestParameters), + SetMaxValidatorCount: u32, + CreateWorkingGroupLeadOpening: CreateOpeningParameters, + FillWorkingGroupLeadOpening: FillOpeningParameters, + UpdateWorkingGroupBudget: Tuple.with(['Balance', WorkingGroup, BalanceKind]), + DecreaseWorkingGroupLeadStake: Tuple.with([WorkerId, 'Balance', WorkingGroup]), + SlashWorkingGroupLead: Tuple.with([WorkerId, 'Balance', WorkingGroup]), + SetWorkingGroupLeadReward: Tuple.with([WorkerId, 'Option<Balance>', WorkingGroup]), + TerminateWorkingGroupLead: TerminateRoleParameters, AmendConstitution: Text, + CancelWorkingGroupLeadOpening: Tuple.with([OpeningId, WorkingGroup]), + SetMembershipPrice: u128, + SetCouncilBudgetIncrement: u128, + SetCouncilorReward: u128, + SetInitialInvitationBalance: u128, + SetInitialInvitationCount: u32, + SetMembershipLeadInvitationQuota: u32, + SetReferralCut: u128, + CreateBlogPost: Tuple.with([Text, Text]), + EditBlogPost: Tuple.with([PostId, Option.with(Text), Option.with(Text)]), + LockBlogPost: PostId, + UnlockBlogPost: PostId, + VetoProposal: ProposalId, } as const) {} // Discussions @@ -283,7 +308,7 @@ export const proposalsTypes = { VoteKind, DiscussionThread, DiscussionPost, - AddOpeningParameters, + CreateOpeningParameters, FillOpeningParameters, TerminateRoleParameters, ProposalDecision, @@ -292,6 +317,7 @@ export const proposalsTypes = { SetLeadParams, ThreadMode, ExecutionStatus, + FundingRequestParameters, } export default proposalsTypes diff --git a/types/src/scripts/generateAugmentCodec.ts b/types/src/scripts/generateAugmentCodec.ts index 01a4f0bbfe..1efecc00a3 100644 --- a/types/src/scripts/generateAugmentCodec.ts +++ b/types/src/scripts/generateAugmentCodec.ts @@ -19,6 +19,8 @@ import proposals from '../proposals' import contentDirectory from '../content-directory' import referendum from '../referendum' import constitution from '../constitution' +import blog from '../blog' +import bounty from '../bounty' const AUGMENT_INTERFACES_PATH = path.join(__dirname, '../../augment') const AUGMENT_CODEC_PATH = path.join(__dirname, '../../augment-codec') @@ -37,6 +39,8 @@ const typesByModule = { 'content-directory': contentDirectory, 'referendum': referendum, 'constitution': constitution, + 'blog': blog, + 'bounty': bounty, } type Imports = { [moduleName: string]: string[] } diff --git a/types/src/working-group/index.ts b/types/src/working-group/index.ts index c8fd22696f..c86293c76f 100644 --- a/types/src/working-group/index.ts +++ b/types/src/working-group/index.ts @@ -1,5 +1,5 @@ import { BTreeMap, Option, Text } from '@polkadot/types' -import { Null, u32, u64, u128 } from '@polkadot/types/primitive' +import { Null, u32, u64, u128, Bytes } from '@polkadot/types/primitive' import { BlockNumber, Balance } from '@polkadot/types/interfaces' import { AccountId, ActorId, MemberId, JoyEnum, JoyStructDecorated, JoyBTreeSet } from '../common' import { RegistryTypes } from '@polkadot/types/types' @@ -17,7 +17,8 @@ export type IApplication = { reward_account_id: AccountId staking_account_id: AccountId member_id: MemberId - description_hash: Text + description_hash: Bytes + opening_id: OpeningId } export class Application @@ -26,7 +27,8 @@ export class Application reward_account_id: AccountId, staking_account_id: AccountId, member_id: MemberId, - description_hash: Text, + description_hash: Bytes, + opening_id: OpeningId, }) implements IApplication {} @@ -45,7 +47,7 @@ export class ApplicationInfo export type IWorker = { member_id: MemberId role_account_id: AccountId - staking_account_id: Option<AccountId> + staking_account_id: AccountId reward_account_id: AccountId started_leaving_at: Option<BlockNumber> job_unstaking_period: BlockNumber @@ -58,7 +60,7 @@ export class Worker extends JoyStructDecorated({ member_id: MemberId, role_account_id: AccountId, - staking_account_id: Option.with(AccountId), + staking_account_id: AccountId, reward_account_id: AccountId, started_leaving_at: Option.with(u32), job_unstaking_period: u32, @@ -113,8 +115,8 @@ export type IApplyOnOpeningParameters = { opening_id: OpeningId role_account_id: AccountId reward_account_id: AccountId - description: Text - stake_parameters: Option<StakeParameters> + description: Bytes + stake_parameters: StakeParameters } export class ApplyOnOpeningParameters @@ -123,8 +125,8 @@ export class ApplyOnOpeningParameters opening_id: OpeningId, role_account_id: AccountId, reward_account_id: AccountId, - description: Text, - stake_parameters: Option.with(StakeParameters), + description: Bytes, + stake_parameters: StakeParameters, }) implements IApplyOnOpeningParameters {} @@ -152,8 +154,8 @@ export class OpeningType extends JoyEnum(OpeningTypeDef) {} export type IOpening = { opening_type: OpeningType created: BlockNumber - description_hash: Text - stake_policy: Option<StakePolicy> + description_hash: Bytes + stake_policy: StakePolicy reward_per_block: Option<Balance> } @@ -161,8 +163,8 @@ export class Opening extends JoyStructDecorated({ opening_type: OpeningType, created: u32, - description_hash: Text, - stake_policy: Option.with(StakePolicy), + description_hash: Bytes, + stake_policy: StakePolicy, reward_per_block: Option.with(u128), }) implements IOpening {} From 7b9654f49b26c88f175952a80b635cbd0ce2b4a0 Mon Sep 17 00:00:00 2001 From: Leszek Wiesner <leszek@jsgenesis.com> Date: Mon, 26 Apr 2021 13:39:12 +0200 Subject: [PATCH 2/2] Add ReplyToDelete and RewardPaymentType --- types/augment-codec/all.ts | 6 +++--- types/augment-codec/augment-api-tx.ts | 30 +++++++++++++-------------- types/augment-codec/augment-types.ts | 8 ++++++- types/augment/all/defs.json | 11 ++++++++++ types/augment/all/types.ts | 13 ++++++++++++ types/augment/augment-api-tx.ts | 30 +++++++++++++-------------- types/augment/augment-types.ts | 8 ++++++- types/src/blog.ts | 9 +++++++- types/src/working-group/index.ts | 7 +++++++ 9 files changed, 86 insertions(+), 36 deletions(-) diff --git a/types/augment-codec/all.ts b/types/augment-codec/all.ts index f540439a57..edb15a6519 100644 --- a/types/augment-codec/all.ts +++ b/types/augment-codec/all.ts @@ -3,14 +3,14 @@ import { ActorId, MemberId, BlockAndTime, ThreadId, PostId, InputValidationLengt import { Membership, StakingAccountMemberBinding, BuyMembershipParameters, InviteMembershipParameters } from '../members'; import { CouncilStageAnnouncing, CouncilStageElection, CouncilStageUpdate, CouncilStage, Candidate, CouncilMemberOf, CastVoteOf } from '../council'; import { ForumUserId, ModeratorId, CategoryId, PostReactionId, Category, Thread, Post, PollAlternative, Poll, PrivilegedActor, Thread as ThreadOf } from '../forum'; -import { ApplicationId, Application, ApplicationInfo, ApplicationIdSet, ApplicationIdToWorkerIdMap, WorkerId, Worker, WorkerInfo, Opening, OpeningId, StakePolicy, StakeParameters, StorageProviderId, OpeningType, ApplyOnOpeningParameters, Penalty } from '../working-group'; +import { ApplicationId, Application, ApplicationInfo, ApplicationIdSet, ApplicationIdToWorkerIdMap, WorkerId, Worker, WorkerInfo, Opening, OpeningId, StakePolicy, StakeParameters, StorageProviderId, OpeningType, ApplyOnOpeningParameters, Penalty, RewardPaymentType } from '../working-group'; import { Url, IPNSIdentity, ServiceProviderRecord } from '../discovery'; import { ContentId, LiaisonJudgement, DataObject, DataObjectStorageRelationshipId, DataObjectStorageRelationship, DataObjectTypeId, DataObjectType, DataObjectsMap } from '../media'; import { ProposalId, ProposalStatus, Proposal as ProposalOf, ProposalDetails, ProposalDetails as ProposalDetailsOf, VotingResults, ProposalParameters, GeneralProposalParameters, VoteKind, DiscussionThread, DiscussionPost, CreateOpeningParameters, FillOpeningParameters, TerminateRoleParameters, ProposalDecision, ExecutionFailed, Approved, SetLeadParams, ThreadMode, ExecutionStatus, FundingRequestParameters } from '../proposals'; import { Nonce, EntityId, ClassId, CuratorId, CuratorGroupId, VecMaxLength, TextMaxLength, HashedTextMaxLength, PropertyId, SchemaId, SameController, ClassPermissions, PropertyTypeSingle, PropertyTypeVector, PropertyType, PropertyLockingPolicy, Property, Schema, Class, Class as ClassOf, EntityController, EntityPermissions, StoredValue, VecStoredValue, VecStoredPropertyValue, StoredPropertyValue, InboundReferenceCounter, Entity, Entity as EntityOf, CuratorGroup, EntityCreationVoucher, Actor, EntityReferenceCounterSideEffect, ReferenceCounterSideEffects, SideEffects, SideEffect, Status, InputValue, VecInputValue, InputPropertyValue, ParameterizedEntity, ParametrizedPropertyValue, ParametrizedClassPropertyValue, CreateEntityOperation, UpdatePropertyValuesOperation, AddSchemaSupportToEntityOperation, OperationType, InputEntityValuesMap, FailedAt } from '../content-directory'; import { ReferendumStageVoting, ReferendumStageRevealing, ReferendumStage, OptionResult, VotePower } from '../referendum'; import { ConstitutionInfo } from '../constitution'; -import { ParticipantId, Title, UpdatedTitle, UpdatedBody, ReplyId, Reply } from '../blog'; +import { ParticipantId, Title, UpdatedTitle, UpdatedBody, ReplyId, Reply, ReplyToDelete } from '../blog'; import { BountyId, EntryId, BountyActor, AssuranceContractType, FundingType_Limited, FundingType_Perpetual, FundingType, BountyCreationParameters, OracleJudgment_Winner, OracleJudgment, Entry } from '../bounty'; -export { ActorId, MemberId, BlockAndTime, ThreadId, PostId, InputValidationLengthConstraint, WorkingGroup, MemoText, BalanceKind, Address, LookupSource, Membership, StakingAccountMemberBinding, BuyMembershipParameters, InviteMembershipParameters, CouncilStageAnnouncing, CouncilStageElection, CouncilStageUpdate, CouncilStage, Candidate, CouncilMemberOf, CastVoteOf, ForumUserId, ModeratorId, CategoryId, PostReactionId, Category, Thread, Post, PollAlternative, Poll, PrivilegedActor, ThreadOf, ApplicationId, Application, ApplicationInfo, ApplicationIdSet, ApplicationIdToWorkerIdMap, WorkerId, Worker, WorkerInfo, Opening, OpeningId, StakePolicy, StakeParameters, StorageProviderId, OpeningType, ApplyOnOpeningParameters, Penalty, Url, IPNSIdentity, ServiceProviderRecord, ContentId, LiaisonJudgement, DataObject, DataObjectStorageRelationshipId, DataObjectStorageRelationship, DataObjectTypeId, DataObjectType, DataObjectsMap, ProposalId, ProposalStatus, ProposalOf, ProposalDetails, ProposalDetailsOf, VotingResults, ProposalParameters, GeneralProposalParameters, VoteKind, DiscussionThread, DiscussionPost, CreateOpeningParameters, FillOpeningParameters, TerminateRoleParameters, ProposalDecision, ExecutionFailed, Approved, SetLeadParams, ThreadMode, ExecutionStatus, FundingRequestParameters, Nonce, EntityId, ClassId, CuratorId, CuratorGroupId, VecMaxLength, TextMaxLength, HashedTextMaxLength, PropertyId, SchemaId, SameController, ClassPermissions, PropertyTypeSingle, PropertyTypeVector, PropertyType, PropertyLockingPolicy, Property, Schema, Class, ClassOf, EntityController, EntityPermissions, StoredValue, VecStoredValue, VecStoredPropertyValue, StoredPropertyValue, InboundReferenceCounter, Entity, EntityOf, CuratorGroup, EntityCreationVoucher, Actor, EntityReferenceCounterSideEffect, ReferenceCounterSideEffects, SideEffects, SideEffect, Status, InputValue, VecInputValue, InputPropertyValue, ParameterizedEntity, ParametrizedPropertyValue, ParametrizedClassPropertyValue, CreateEntityOperation, UpdatePropertyValuesOperation, AddSchemaSupportToEntityOperation, OperationType, InputEntityValuesMap, FailedAt, ReferendumStageVoting, ReferendumStageRevealing, ReferendumStage, OptionResult, VotePower, ConstitutionInfo, ParticipantId, Title, UpdatedTitle, UpdatedBody, ReplyId, Reply, BountyId, EntryId, BountyActor, AssuranceContractType, FundingType_Limited, FundingType_Perpetual, FundingType, BountyCreationParameters, OracleJudgment_Winner, OracleJudgment, Entry }; \ No newline at end of file +export { ActorId, MemberId, BlockAndTime, ThreadId, PostId, InputValidationLengthConstraint, WorkingGroup, MemoText, BalanceKind, Address, LookupSource, Membership, StakingAccountMemberBinding, BuyMembershipParameters, InviteMembershipParameters, CouncilStageAnnouncing, CouncilStageElection, CouncilStageUpdate, CouncilStage, Candidate, CouncilMemberOf, CastVoteOf, ForumUserId, ModeratorId, CategoryId, PostReactionId, Category, Thread, Post, PollAlternative, Poll, PrivilegedActor, ThreadOf, ApplicationId, Application, ApplicationInfo, ApplicationIdSet, ApplicationIdToWorkerIdMap, WorkerId, Worker, WorkerInfo, Opening, OpeningId, StakePolicy, StakeParameters, StorageProviderId, OpeningType, ApplyOnOpeningParameters, Penalty, RewardPaymentType, Url, IPNSIdentity, ServiceProviderRecord, ContentId, LiaisonJudgement, DataObject, DataObjectStorageRelationshipId, DataObjectStorageRelationship, DataObjectTypeId, DataObjectType, DataObjectsMap, ProposalId, ProposalStatus, ProposalOf, ProposalDetails, ProposalDetailsOf, VotingResults, ProposalParameters, GeneralProposalParameters, VoteKind, DiscussionThread, DiscussionPost, CreateOpeningParameters, FillOpeningParameters, TerminateRoleParameters, ProposalDecision, ExecutionFailed, Approved, SetLeadParams, ThreadMode, ExecutionStatus, FundingRequestParameters, Nonce, EntityId, ClassId, CuratorId, CuratorGroupId, VecMaxLength, TextMaxLength, HashedTextMaxLength, PropertyId, SchemaId, SameController, ClassPermissions, PropertyTypeSingle, PropertyTypeVector, PropertyType, PropertyLockingPolicy, Property, Schema, Class, ClassOf, EntityController, EntityPermissions, StoredValue, VecStoredValue, VecStoredPropertyValue, StoredPropertyValue, InboundReferenceCounter, Entity, EntityOf, CuratorGroup, EntityCreationVoucher, Actor, EntityReferenceCounterSideEffect, ReferenceCounterSideEffects, SideEffects, SideEffect, Status, InputValue, VecInputValue, InputPropertyValue, ParameterizedEntity, ParametrizedPropertyValue, ParametrizedClassPropertyValue, CreateEntityOperation, UpdatePropertyValuesOperation, AddSchemaSupportToEntityOperation, OperationType, InputEntityValuesMap, FailedAt, ReferendumStageVoting, ReferendumStageRevealing, ReferendumStage, OptionResult, VotePower, ConstitutionInfo, ParticipantId, Title, UpdatedTitle, UpdatedBody, ReplyId, Reply, ReplyToDelete, BountyId, EntryId, BountyActor, AssuranceContractType, FundingType_Limited, FundingType_Perpetual, FundingType, BountyCreationParameters, OracleJudgment_Winner, OracleJudgment, Entry }; \ No newline at end of file diff --git a/types/augment-codec/augment-api-tx.ts b/types/augment-codec/augment-api-tx.ts index b804ee6b23..4fd07083f1 100644 --- a/types/augment-codec/augment-api-tx.ts +++ b/types/augment-codec/augment-api-tx.ts @@ -4,7 +4,7 @@ import { AnyNumber, ITuple } from '@polkadot/types/types'; import { BTreeMap, BTreeSet, Compact, Option, Vec } from '@polkadot/types/codec'; import { Bytes, bool, u16, u32, u64, u8 } from '@polkadot/types/primitive'; -import { Actor, ActorId, ApplicationId, ApplyOnOpeningParameters, BalanceKind, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, CategoryId, ClassId, ClassPermissions, ContentId, CuratorGroupId, CuratorId, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DataObjectsMap, EntityController, EntityId, EntryId, ForumUserId, FundingRequestParameters, GeneralProposalParameters, InputPropertyValue, InputValue, InviteMembershipParameters, MemberId, MemoText, ModeratorId, Nonce, OpeningId, OpeningType, OperationType, OracleJudgment, ParticipantId, Poll, PostId, PostReactionId, PrivilegedActor, Property, PropertyId, ProposalDetailsOf, ProposalId, ReplyId, SchemaId, StakePolicy, StorageProviderId, ThreadId, ThreadMode, Url, VecMaxLength, VoteKind, WorkerId, WorkingGroup } from './all'; +import { Actor, ActorId, ApplicationId, ApplyOnOpeningParameters, BalanceKind, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, CategoryId, ClassId, ClassPermissions, ContentId, CuratorGroupId, CuratorId, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DataObjectsMap, EntityController, EntityId, EntryId, ForumUserId, FundingRequestParameters, GeneralProposalParameters, InputPropertyValue, InputValue, InviteMembershipParameters, MemberId, MemoText, ModeratorId, Nonce, OpeningId, OpeningType, OperationType, OracleJudgment, ParticipantId, Poll, PostId, PostReactionId, PrivilegedActor, Property, PropertyId, ProposalDetailsOf, ProposalId, ReplyId, ReplyToDelete, SchemaId, StakePolicy, StorageProviderId, ThreadId, ThreadMode, Url, VecMaxLength, VoteKind, WorkerId, WorkingGroup } from './all'; import { BabeEquivocationProof } from '@polkadot/types/interfaces/babe'; import { Extrinsic, Signature } from '@polkadot/types/interfaces/extrinsics'; import { GrandpaEquivocationProof, KeyOwnerProof } from '@polkadot/types/interfaces/grandpa'; @@ -146,7 +146,20 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - createReply: AugmentedSubmittable<(participantId: ParticipantId | AnyNumber | Uint8Array, postId: PostId | AnyNumber | Uint8Array, replyId: Option<ReplyId> | null | object | string | Uint8Array, text: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + createReply: AugmentedSubmittable<(participantId: ParticipantId | AnyNumber | Uint8Array, postId: PostId | AnyNumber | Uint8Array, replyId: Option<ReplyId> | null | object | string | Uint8Array, text: Bytes | string | Uint8Array, editable: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Remove reply from storage + * + * <weight> + * + * ## Weight + * `O (R)` where + * - R is the number of replies to be deleted + * - DB: + * - O(R) + * # </weight> + **/ + deleteReplies: AugmentedSubmittable<(participantId: ParticipantId | AnyNumber | Uint8Array, replies: Vec<ReplyToDelete> | (ReplyToDelete | { post_id?: any; reply_id?: any; hide?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>; /** * Blog owner can edit post, related to a given blog (if unlocked) * with a new title and/or body @@ -1054,19 +1067,6 @@ declare module '@polkadot/api/types/submittable' { * # </weight> **/ updateCategoryMembershipOfModerator: AugmentedSubmittable<(moderatorId: ModeratorId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, newValue: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>; - /** - * Update thread archival status - * - * <weight> - * - * ## Weight - * `O (W)` where: - * - `W` is the category depth - * - DB: - * - O(W) - * # </weight> - **/ - updateThreadArchivalStatus: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, newArchivalStatus: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Submit a poll * diff --git a/types/augment-codec/augment-types.ts b/types/augment-codec/augment-types.ts index ea556607e1..fcbb705e3e 100644 --- a/types/augment-codec/augment-types.ts +++ b/types/augment-codec/augment-types.ts @@ -3,7 +3,7 @@ import { Compact, Option, Raw, Vec } from '@polkadot/types/codec'; import { BitVec, Bytes, Data, DoNotConstruct, Null, StorageKey, Text, Type, U256, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types/primitive'; -import { Actor, ActorId, AddSchemaSupportToEntityOperation, Application, ApplicationId, ApplicationIdSet, ApplicationIdToWorkerIdMap, ApplicationInfo, ApplyOnOpeningParameters, Approved, AssuranceContractType, BalanceKind, BlockAndTime, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, Candidate, CastVoteOf, Category, CategoryId, Class, ClassId, ClassOf, ClassPermissions, ConstitutionInfo, ContentId, CouncilMemberOf, CouncilStage, CouncilStageAnnouncing, CouncilStageElection, CouncilStageUpdate, CreateEntityOperation, CreateOpeningParameters, CuratorGroup, CuratorGroupId, CuratorId, DataObject, DataObjectStorageRelationship, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DataObjectsMap, DiscussionPost, DiscussionThread, Entity, EntityController, EntityCreationVoucher, EntityId, EntityOf, EntityPermissions, EntityReferenceCounterSideEffect, Entry, EntryId, ExecutionFailed, ExecutionStatus, FailedAt, FillOpeningParameters, ForumUserId, FundingRequestParameters, FundingType, FundingType_Limited, FundingType_Perpetual, GeneralProposalParameters, HashedTextMaxLength, IPNSIdentity, InboundReferenceCounter, InputEntityValuesMap, InputPropertyValue, InputValidationLengthConstraint, InputValue, InviteMembershipParameters, LiaisonJudgement, MemberId, Membership, MemoText, ModeratorId, Nonce, Opening, OpeningId, OpeningType, OperationType, OptionResult, OracleJudgment, OracleJudgment_Winner, ParameterizedEntity, ParametrizedClassPropertyValue, ParametrizedPropertyValue, ParticipantId, Penalty, Poll, PollAlternative, Post, PostId, PostReactionId, PrivilegedActor, Property, PropertyId, PropertyLockingPolicy, PropertyType, PropertyTypeSingle, PropertyTypeVector, ProposalDecision, ProposalDetails, ProposalDetailsOf, ProposalId, ProposalOf, ProposalParameters, ProposalStatus, ReferenceCounterSideEffects, ReferendumStage, ReferendumStageRevealing, ReferendumStageVoting, Reply, ReplyId, SameController, Schema, SchemaId, ServiceProviderRecord, SetLeadParams, SideEffect, SideEffects, StakeParameters, StakePolicy, StakingAccountMemberBinding, Status, StorageProviderId, StoredPropertyValue, StoredValue, TerminateRoleParameters, TextMaxLength, Thread, ThreadId, ThreadMode, ThreadOf, Title, UpdatePropertyValuesOperation, UpdatedBody, UpdatedTitle, Url, VecInputValue, VecMaxLength, VecStoredPropertyValue, VecStoredValue, VoteKind, VotePower, VotingResults, Worker, WorkerId, WorkerInfo, WorkingGroup } from './all'; +import { Actor, ActorId, AddSchemaSupportToEntityOperation, Application, ApplicationId, ApplicationIdSet, ApplicationIdToWorkerIdMap, ApplicationInfo, ApplyOnOpeningParameters, Approved, AssuranceContractType, BalanceKind, BlockAndTime, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, Candidate, CastVoteOf, Category, CategoryId, Class, ClassId, ClassOf, ClassPermissions, ConstitutionInfo, ContentId, CouncilMemberOf, CouncilStage, CouncilStageAnnouncing, CouncilStageElection, CouncilStageUpdate, CreateEntityOperation, CreateOpeningParameters, CuratorGroup, CuratorGroupId, CuratorId, DataObject, DataObjectStorageRelationship, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DataObjectsMap, DiscussionPost, DiscussionThread, Entity, EntityController, EntityCreationVoucher, EntityId, EntityOf, EntityPermissions, EntityReferenceCounterSideEffect, Entry, EntryId, ExecutionFailed, ExecutionStatus, FailedAt, FillOpeningParameters, ForumUserId, FundingRequestParameters, FundingType, FundingType_Limited, FundingType_Perpetual, GeneralProposalParameters, HashedTextMaxLength, IPNSIdentity, InboundReferenceCounter, InputEntityValuesMap, InputPropertyValue, InputValidationLengthConstraint, InputValue, InviteMembershipParameters, LiaisonJudgement, MemberId, Membership, MemoText, ModeratorId, Nonce, Opening, OpeningId, OpeningType, OperationType, OptionResult, OracleJudgment, OracleJudgment_Winner, ParameterizedEntity, ParametrizedClassPropertyValue, ParametrizedPropertyValue, ParticipantId, Penalty, Poll, PollAlternative, Post, PostId, PostReactionId, PrivilegedActor, Property, PropertyId, PropertyLockingPolicy, PropertyType, PropertyTypeSingle, PropertyTypeVector, ProposalDecision, ProposalDetails, ProposalDetailsOf, ProposalId, ProposalOf, ProposalParameters, ProposalStatus, ReferenceCounterSideEffects, ReferendumStage, ReferendumStageRevealing, ReferendumStageVoting, Reply, ReplyId, ReplyToDelete, RewardPaymentType, SameController, Schema, SchemaId, ServiceProviderRecord, SetLeadParams, SideEffect, SideEffects, StakeParameters, StakePolicy, StakingAccountMemberBinding, Status, StorageProviderId, StoredPropertyValue, StoredValue, TerminateRoleParameters, TextMaxLength, Thread, ThreadId, ThreadMode, ThreadOf, Title, UpdatePropertyValuesOperation, UpdatedBody, UpdatedTitle, Url, VecInputValue, VecMaxLength, VecStoredPropertyValue, VecStoredValue, VoteKind, VotePower, VotingResults, Worker, WorkerId, WorkerInfo, WorkingGroup } from './all'; import { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/types/interfaces/attestations'; import { RawAuraPreDigest } from '@polkadot/types/interfaces/aura'; import { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author'; @@ -1925,6 +1925,9 @@ declare module '@polkadot/types/types/registry' { Penalty: Penalty; 'Option<Penalty>': Option<Penalty>; 'Vec<Penalty>': Vec<Penalty>; + RewardPaymentType: RewardPaymentType; + 'Option<RewardPaymentType>': Option<RewardPaymentType>; + 'Vec<RewardPaymentType>': Vec<RewardPaymentType>; Url: Url; 'Option<Url>': Option<Url>; 'Vec<Url>': Vec<Url>; @@ -1980,6 +1983,9 @@ declare module '@polkadot/types/types/registry' { Reply: Reply; 'Option<Reply>': Option<Reply>; 'Vec<Reply>': Vec<Reply>; + ReplyToDelete: ReplyToDelete; + 'Option<ReplyToDelete>': Option<ReplyToDelete>; + 'Vec<ReplyToDelete>': Vec<ReplyToDelete>; ProposalId: ProposalId; 'Compact<ProposalId>': Compact<ProposalId>; 'Option<ProposalId>': Option<ProposalId>; diff --git a/types/augment/all/defs.json b/types/augment/all/defs.json index 35c21ea0d7..3c47d9da3b 100644 --- a/types/augment/all/defs.json +++ b/types/augment/all/defs.json @@ -208,6 +208,12 @@ "slashing_text": "Text", "slashing_amount": "u128" }, + "RewardPaymentType": { + "_enum": [ + "MissedReward", + "RegularReward" + ] + }, "Url": "Text", "IPNSIdentity": "Text", "ServiceProviderRecord": { @@ -253,6 +259,11 @@ "owner": "ParticipantId", "parent_id": "PostId" }, + "ReplyToDelete": { + "post_id": "PostId", + "reply_id": "ReplyId", + "hide": "bool" + }, "ProposalId": "u32", "ProposalStatus": { "_enum": { diff --git a/types/augment/all/types.ts b/types/augment/all/types.ts index c2fc5e5753..4ea4648b00 100644 --- a/types/augment/all/types.ts +++ b/types/augment/all/types.ts @@ -866,6 +866,19 @@ export interface Reply extends Struct { /** @name ReplyId */ export interface ReplyId extends u64 {} +/** @name ReplyToDelete */ +export interface ReplyToDelete extends Struct { + readonly post_id: PostId; + readonly reply_id: ReplyId; + readonly hide: bool; +} + +/** @name RewardPaymentType */ +export interface RewardPaymentType extends Enum { + readonly isMissedReward: boolean; + readonly isRegularReward: boolean; +} + /** @name SameController */ export interface SameController extends bool {} diff --git a/types/augment/augment-api-tx.ts b/types/augment/augment-api-tx.ts index b804ee6b23..4fd07083f1 100644 --- a/types/augment/augment-api-tx.ts +++ b/types/augment/augment-api-tx.ts @@ -4,7 +4,7 @@ import { AnyNumber, ITuple } from '@polkadot/types/types'; import { BTreeMap, BTreeSet, Compact, Option, Vec } from '@polkadot/types/codec'; import { Bytes, bool, u16, u32, u64, u8 } from '@polkadot/types/primitive'; -import { Actor, ActorId, ApplicationId, ApplyOnOpeningParameters, BalanceKind, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, CategoryId, ClassId, ClassPermissions, ContentId, CuratorGroupId, CuratorId, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DataObjectsMap, EntityController, EntityId, EntryId, ForumUserId, FundingRequestParameters, GeneralProposalParameters, InputPropertyValue, InputValue, InviteMembershipParameters, MemberId, MemoText, ModeratorId, Nonce, OpeningId, OpeningType, OperationType, OracleJudgment, ParticipantId, Poll, PostId, PostReactionId, PrivilegedActor, Property, PropertyId, ProposalDetailsOf, ProposalId, ReplyId, SchemaId, StakePolicy, StorageProviderId, ThreadId, ThreadMode, Url, VecMaxLength, VoteKind, WorkerId, WorkingGroup } from './all'; +import { Actor, ActorId, ApplicationId, ApplyOnOpeningParameters, BalanceKind, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, CategoryId, ClassId, ClassPermissions, ContentId, CuratorGroupId, CuratorId, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DataObjectsMap, EntityController, EntityId, EntryId, ForumUserId, FundingRequestParameters, GeneralProposalParameters, InputPropertyValue, InputValue, InviteMembershipParameters, MemberId, MemoText, ModeratorId, Nonce, OpeningId, OpeningType, OperationType, OracleJudgment, ParticipantId, Poll, PostId, PostReactionId, PrivilegedActor, Property, PropertyId, ProposalDetailsOf, ProposalId, ReplyId, ReplyToDelete, SchemaId, StakePolicy, StorageProviderId, ThreadId, ThreadMode, Url, VecMaxLength, VoteKind, WorkerId, WorkingGroup } from './all'; import { BabeEquivocationProof } from '@polkadot/types/interfaces/babe'; import { Extrinsic, Signature } from '@polkadot/types/interfaces/extrinsics'; import { GrandpaEquivocationProof, KeyOwnerProof } from '@polkadot/types/interfaces/grandpa'; @@ -146,7 +146,20 @@ declare module '@polkadot/api/types/submittable' { * - O(1) doesn't depend on the state or parameters * # </weight> **/ - createReply: AugmentedSubmittable<(participantId: ParticipantId | AnyNumber | Uint8Array, postId: PostId | AnyNumber | Uint8Array, replyId: Option<ReplyId> | null | object | string | Uint8Array, text: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>>; + createReply: AugmentedSubmittable<(participantId: ParticipantId | AnyNumber | Uint8Array, postId: PostId | AnyNumber | Uint8Array, replyId: Option<ReplyId> | null | object | string | Uint8Array, text: Bytes | string | Uint8Array, editable: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>; + /** + * Remove reply from storage + * + * <weight> + * + * ## Weight + * `O (R)` where + * - R is the number of replies to be deleted + * - DB: + * - O(R) + * # </weight> + **/ + deleteReplies: AugmentedSubmittable<(participantId: ParticipantId | AnyNumber | Uint8Array, replies: Vec<ReplyToDelete> | (ReplyToDelete | { post_id?: any; reply_id?: any; hide?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>; /** * Blog owner can edit post, related to a given blog (if unlocked) * with a new title and/or body @@ -1054,19 +1067,6 @@ declare module '@polkadot/api/types/submittable' { * # </weight> **/ updateCategoryMembershipOfModerator: AugmentedSubmittable<(moderatorId: ModeratorId | AnyNumber | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, newValue: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>; - /** - * Update thread archival status - * - * <weight> - * - * ## Weight - * `O (W)` where: - * - `W` is the category depth - * - DB: - * - O(W) - * # </weight> - **/ - updateThreadArchivalStatus: AugmentedSubmittable<(actor: PrivilegedActor | { Lead: any } | { Moderator: any } | string | Uint8Array, categoryId: CategoryId | AnyNumber | Uint8Array, threadId: ThreadId | AnyNumber | Uint8Array, newArchivalStatus: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>>; /** * Submit a poll * diff --git a/types/augment/augment-types.ts b/types/augment/augment-types.ts index ea556607e1..fcbb705e3e 100644 --- a/types/augment/augment-types.ts +++ b/types/augment/augment-types.ts @@ -3,7 +3,7 @@ import { Compact, Option, Raw, Vec } from '@polkadot/types/codec'; import { BitVec, Bytes, Data, DoNotConstruct, Null, StorageKey, Text, Type, U256, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types/primitive'; -import { Actor, ActorId, AddSchemaSupportToEntityOperation, Application, ApplicationId, ApplicationIdSet, ApplicationIdToWorkerIdMap, ApplicationInfo, ApplyOnOpeningParameters, Approved, AssuranceContractType, BalanceKind, BlockAndTime, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, Candidate, CastVoteOf, Category, CategoryId, Class, ClassId, ClassOf, ClassPermissions, ConstitutionInfo, ContentId, CouncilMemberOf, CouncilStage, CouncilStageAnnouncing, CouncilStageElection, CouncilStageUpdate, CreateEntityOperation, CreateOpeningParameters, CuratorGroup, CuratorGroupId, CuratorId, DataObject, DataObjectStorageRelationship, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DataObjectsMap, DiscussionPost, DiscussionThread, Entity, EntityController, EntityCreationVoucher, EntityId, EntityOf, EntityPermissions, EntityReferenceCounterSideEffect, Entry, EntryId, ExecutionFailed, ExecutionStatus, FailedAt, FillOpeningParameters, ForumUserId, FundingRequestParameters, FundingType, FundingType_Limited, FundingType_Perpetual, GeneralProposalParameters, HashedTextMaxLength, IPNSIdentity, InboundReferenceCounter, InputEntityValuesMap, InputPropertyValue, InputValidationLengthConstraint, InputValue, InviteMembershipParameters, LiaisonJudgement, MemberId, Membership, MemoText, ModeratorId, Nonce, Opening, OpeningId, OpeningType, OperationType, OptionResult, OracleJudgment, OracleJudgment_Winner, ParameterizedEntity, ParametrizedClassPropertyValue, ParametrizedPropertyValue, ParticipantId, Penalty, Poll, PollAlternative, Post, PostId, PostReactionId, PrivilegedActor, Property, PropertyId, PropertyLockingPolicy, PropertyType, PropertyTypeSingle, PropertyTypeVector, ProposalDecision, ProposalDetails, ProposalDetailsOf, ProposalId, ProposalOf, ProposalParameters, ProposalStatus, ReferenceCounterSideEffects, ReferendumStage, ReferendumStageRevealing, ReferendumStageVoting, Reply, ReplyId, SameController, Schema, SchemaId, ServiceProviderRecord, SetLeadParams, SideEffect, SideEffects, StakeParameters, StakePolicy, StakingAccountMemberBinding, Status, StorageProviderId, StoredPropertyValue, StoredValue, TerminateRoleParameters, TextMaxLength, Thread, ThreadId, ThreadMode, ThreadOf, Title, UpdatePropertyValuesOperation, UpdatedBody, UpdatedTitle, Url, VecInputValue, VecMaxLength, VecStoredPropertyValue, VecStoredValue, VoteKind, VotePower, VotingResults, Worker, WorkerId, WorkerInfo, WorkingGroup } from './all'; +import { Actor, ActorId, AddSchemaSupportToEntityOperation, Application, ApplicationId, ApplicationIdSet, ApplicationIdToWorkerIdMap, ApplicationInfo, ApplyOnOpeningParameters, Approved, AssuranceContractType, BalanceKind, BlockAndTime, BountyActor, BountyCreationParameters, BountyId, BuyMembershipParameters, Candidate, CastVoteOf, Category, CategoryId, Class, ClassId, ClassOf, ClassPermissions, ConstitutionInfo, ContentId, CouncilMemberOf, CouncilStage, CouncilStageAnnouncing, CouncilStageElection, CouncilStageUpdate, CreateEntityOperation, CreateOpeningParameters, CuratorGroup, CuratorGroupId, CuratorId, DataObject, DataObjectStorageRelationship, DataObjectStorageRelationshipId, DataObjectType, DataObjectTypeId, DataObjectsMap, DiscussionPost, DiscussionThread, Entity, EntityController, EntityCreationVoucher, EntityId, EntityOf, EntityPermissions, EntityReferenceCounterSideEffect, Entry, EntryId, ExecutionFailed, ExecutionStatus, FailedAt, FillOpeningParameters, ForumUserId, FundingRequestParameters, FundingType, FundingType_Limited, FundingType_Perpetual, GeneralProposalParameters, HashedTextMaxLength, IPNSIdentity, InboundReferenceCounter, InputEntityValuesMap, InputPropertyValue, InputValidationLengthConstraint, InputValue, InviteMembershipParameters, LiaisonJudgement, MemberId, Membership, MemoText, ModeratorId, Nonce, Opening, OpeningId, OpeningType, OperationType, OptionResult, OracleJudgment, OracleJudgment_Winner, ParameterizedEntity, ParametrizedClassPropertyValue, ParametrizedPropertyValue, ParticipantId, Penalty, Poll, PollAlternative, Post, PostId, PostReactionId, PrivilegedActor, Property, PropertyId, PropertyLockingPolicy, PropertyType, PropertyTypeSingle, PropertyTypeVector, ProposalDecision, ProposalDetails, ProposalDetailsOf, ProposalId, ProposalOf, ProposalParameters, ProposalStatus, ReferenceCounterSideEffects, ReferendumStage, ReferendumStageRevealing, ReferendumStageVoting, Reply, ReplyId, ReplyToDelete, RewardPaymentType, SameController, Schema, SchemaId, ServiceProviderRecord, SetLeadParams, SideEffect, SideEffects, StakeParameters, StakePolicy, StakingAccountMemberBinding, Status, StorageProviderId, StoredPropertyValue, StoredValue, TerminateRoleParameters, TextMaxLength, Thread, ThreadId, ThreadMode, ThreadOf, Title, UpdatePropertyValuesOperation, UpdatedBody, UpdatedTitle, Url, VecInputValue, VecMaxLength, VecStoredPropertyValue, VecStoredValue, VoteKind, VotePower, VotingResults, Worker, WorkerId, WorkerInfo, WorkingGroup } from './all'; import { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/types/interfaces/attestations'; import { RawAuraPreDigest } from '@polkadot/types/interfaces/aura'; import { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author'; @@ -1925,6 +1925,9 @@ declare module '@polkadot/types/types/registry' { Penalty: Penalty; 'Option<Penalty>': Option<Penalty>; 'Vec<Penalty>': Vec<Penalty>; + RewardPaymentType: RewardPaymentType; + 'Option<RewardPaymentType>': Option<RewardPaymentType>; + 'Vec<RewardPaymentType>': Vec<RewardPaymentType>; Url: Url; 'Option<Url>': Option<Url>; 'Vec<Url>': Vec<Url>; @@ -1980,6 +1983,9 @@ declare module '@polkadot/types/types/registry' { Reply: Reply; 'Option<Reply>': Option<Reply>; 'Vec<Reply>': Vec<Reply>; + ReplyToDelete: ReplyToDelete; + 'Option<ReplyToDelete>': Option<ReplyToDelete>; + 'Vec<ReplyToDelete>': Vec<ReplyToDelete>; ProposalId: ProposalId; 'Compact<ProposalId>': Compact<ProposalId>; 'Option<ProposalId>': Option<ProposalId>; diff --git a/types/src/blog.ts b/types/src/blog.ts index c80b4ceee9..32f56b10a1 100644 --- a/types/src/blog.ts +++ b/types/src/blog.ts @@ -1,5 +1,5 @@ import { JoyStructDecorated, MemberId, Hash, PostId } from './common' -import { Text, Option, u64 } from '@polkadot/types' +import { Text, Option, u64, bool } from '@polkadot/types' export class ParticipantId extends MemberId {} export class Title extends Text {} @@ -13,6 +13,12 @@ export class Reply extends JoyStructDecorated({ parent_id: PostId, }) {} +export class ReplyToDelete extends JoyStructDecorated({ + post_id: PostId, + reply_id: ReplyId, + hide: bool, +}) {} + export default { ParticipantId, Title, @@ -20,4 +26,5 @@ export default { UpdatedBody, ReplyId, Reply, + ReplyToDelete, } diff --git a/types/src/working-group/index.ts b/types/src/working-group/index.ts index c86293c76f..07e9c2a341 100644 --- a/types/src/working-group/index.ts +++ b/types/src/working-group/index.ts @@ -169,6 +169,12 @@ export class Opening }) implements IOpening {} +// Reward payment type enum. +export class RewardPaymentType extends JoyEnum({ + MissedReward: Null, + RegularReward: Null, +}) {} + export const workingGroupTypes: RegistryTypes = { ApplicationId, Application, @@ -186,6 +192,7 @@ export const workingGroupTypes: RegistryTypes = { OpeningType, ApplyOnOpeningParameters, Penalty, + RewardPaymentType, } export default workingGroupTypes