diff --git a/lerna.json b/lerna.json index 5b72f2ebda..41f2143d06 100644 --- a/lerna.json +++ b/lerna.json @@ -9,5 +9,5 @@ "packages": [ "packages/*" ], - "version": "1.32.0-beta.3" + "version": "1.32.0-beta.4" } diff --git a/package.json b/package.json index 74b8350080..357c73c177 100644 --- a/package.json +++ b/package.json @@ -37,5 +37,5 @@ "typedoc-plugin-markdown": "^2.4.2", "typedoc-plugin-no-inherit": "^1.1.10" }, - "version": "1.32.0-beta.3" + "version": "1.32.0-beta.4" } diff --git a/packages/api-contract/package.json b/packages/api-contract/package.json index 6c7bab47f2..e4ce0ddd45 100644 --- a/packages/api-contract/package.json +++ b/packages/api-contract/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/api-contract", - "version": "1.32.0-beta.3", + "version": "1.32.0-beta.4", "description": "Interfaces for interacting with contracts and contract ABIs", "main": "index.js", "keywords": [ @@ -27,9 +27,9 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme", "dependencies": { "@babel/runtime": "^7.11.2", - "@polkadot/api": "1.32.0-beta.3", - "@polkadot/rpc-core": "1.32.0-beta.3", - "@polkadot/types": "1.32.0-beta.3", + "@polkadot/api": "1.32.0-beta.4", + "@polkadot/rpc-core": "1.32.0-beta.4", + "@polkadot/types": "1.32.0-beta.4", "@polkadot/util": "^3.4.1", "bn.js": "^5.1.3", "rxjs": "^6.6.2" diff --git a/packages/api-derive/package.json b/packages/api-derive/package.json index 98e2011532..229b4e1ea8 100644 --- a/packages/api-derive/package.json +++ b/packages/api-derive/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/api-derive", - "version": "1.32.0-beta.3", + "version": "1.32.0-beta.4", "description": "Common functions used across Polkadot, derived from RPC calls and storage queries.", "main": "index.js", "keywords": [ @@ -28,10 +28,10 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme", "dependencies": { "@babel/runtime": "^7.11.2", - "@polkadot/api": "1.32.0-beta.3", - "@polkadot/rpc-core": "1.32.0-beta.3", - "@polkadot/rpc-provider": "1.32.0-beta.3", - "@polkadot/types": "1.32.0-beta.3", + "@polkadot/api": "1.32.0-beta.4", + "@polkadot/rpc-core": "1.32.0-beta.4", + "@polkadot/rpc-provider": "1.32.0-beta.4", + "@polkadot/types": "1.32.0-beta.4", "@polkadot/util": "^3.4.1", "@polkadot/util-crypto": "^3.4.1", "bn.js": "^5.1.3", diff --git a/packages/api/package.json b/packages/api/package.json index a93d8a5dce..dcc4d156dc 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/api", - "version": "1.32.0-beta.3", + "version": "1.32.0-beta.4", "description": "Promise and RxJS wrappers around the Polkadot JS RPC", "main": "index.js", "keywords": [ @@ -27,13 +27,13 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme", "dependencies": { "@babel/runtime": "^7.11.2", - "@polkadot/api-derive": "1.32.0-beta.3", + "@polkadot/api-derive": "1.32.0-beta.4", "@polkadot/keyring": "^3.4.1", - "@polkadot/metadata": "1.32.0-beta.3", - "@polkadot/rpc-core": "1.32.0-beta.3", - "@polkadot/rpc-provider": "1.32.0-beta.3", - "@polkadot/types": "1.32.0-beta.3", - "@polkadot/types-known": "1.32.0-beta.3", + "@polkadot/metadata": "1.32.0-beta.4", + "@polkadot/rpc-core": "1.32.0-beta.4", + "@polkadot/rpc-provider": "1.32.0-beta.4", + "@polkadot/types": "1.32.0-beta.4", + "@polkadot/types-known": "1.32.0-beta.4", "@polkadot/util": "^3.4.1", "@polkadot/util-crypto": "^3.4.1", "bn.js": "^5.1.3", diff --git a/packages/api/src/augment/consts.ts b/packages/api/src/augment/consts.ts index ecc004f227..46abe12c7c 100644 --- a/packages/api/src/augment/consts.ts +++ b/packages/api/src/augment/consts.ts @@ -176,8 +176,27 @@ declare module '@polkadot/metadata/Decorated/consts/types' { **/ subAccountDeposit: AugmentedConst; }; + indices: { + [index: string]: AugmentedConst; + /** + * The deposit needed for reserving an index. + **/ + deposit: AugmentedConst; + }; proxy: { [index: string]: AugmentedConst; + /** + * `AnnouncementDepositBase` metadata shadow. + **/ + announcementDepositBase: AugmentedConst; + /** + * `AnnouncementDepositFactor` metadata shadow. + **/ + announcementDepositFactor: AugmentedConst; + /** + * `MaxPending` metadata shadow. + **/ + maxPending: AugmentedConst; /** * The maximum amount of proxies allowed for a single account. **/ diff --git a/packages/api/src/augment/query.ts b/packages/api/src/augment/query.ts index d6872d9d31..82202c952d 100644 --- a/packages/api/src/augment/query.ts +++ b/packages/api/src/augment/query.ts @@ -16,7 +16,7 @@ import { SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfa import { RegistrarInfo, Registration } from '@polkadot/types/interfaces/identity'; import { AuthIndex } from '@polkadot/types/interfaces/imOnline'; import { DeferredOffenceOf, Kind, OffenceDetails, OpaqueTimeSlot, ReportIdOf } from '@polkadot/types/interfaces/offences'; -import { ProxyType } from '@polkadot/types/interfaces/proxy'; +import { Announcement, ProxyDefinition } from '@polkadot/types/interfaces/proxy'; import { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery'; import { AccountId, AccountIndex, Balance, BalanceOf, BlockNumber, ExtrinsicsWeight, Hash, KeyTypeId, Moment, OpaqueCall, Perbill, Releases, ValidatorId } from '@polkadot/types/interfaces/runtime'; import { Scheduled, TaskAddress } from '@polkadot/types/interfaces/scheduler'; @@ -426,11 +426,15 @@ declare module '@polkadot/api/types/storage' { }; proxy: { [index: string]: QueryableStorageEntry; + /** + * The announcements made by the proxy (key). + **/ + announcements: AugmentedQuery Observable, BalanceOf]>>> & QueryableStorageEntry; /** * The set of account proxies. Maps the account which has delegated to the accounts * which are being delegated to, together with the amount held on deposit. **/ - proxies: AugmentedQuery Observable>, BalanceOf]>>> & QueryableStorageEntry; + proxies: AugmentedQuery Observable, BalanceOf]>>> & QueryableStorageEntry; }; randomnessCollectiveFlip: { [index: string]: QueryableStorageEntry; diff --git a/packages/api/src/augment/tx.ts b/packages/api/src/augment/tx.ts index c7c34015ba..d8e3d1fdd7 100644 --- a/packages/api/src/augment/tx.ts +++ b/packages/api/src/augment/tx.ts @@ -14,7 +14,7 @@ import { GrandpaEquivocationProof, KeyOwnerProof } from '@polkadot/types/interfa import { IdentityFields, IdentityInfo, IdentityJudgement, RegistrarIndex } from '@polkadot/types/interfaces/identity'; import { Heartbeat } from '@polkadot/types/interfaces/imOnline'; import { ProxyType } from '@polkadot/types/interfaces/proxy'; -import { AccountId, AccountIndex, Address, Balance, BalanceOf, BlockNumber, Call, ChangesTrieConfiguration, Hash, Header, KeyValue, LookupSource, Moment, OpaqueCall, Perbill, Percent, Weight } from '@polkadot/types/interfaces/runtime'; +import { AccountId, AccountIndex, Address, Balance, BalanceOf, BlockNumber, Call, CallHashOf, ChangesTrieConfiguration, Hash, Header, KeyValue, LookupSource, Moment, OpaqueCall, Perbill, Percent, Weight } from '@polkadot/types/interfaces/runtime'; import { Period, Priority } from '@polkadot/types/interfaces/scheduler'; import { Keys } from '@polkadot/types/interfaces/session'; import { SocietyJudgement } from '@polkadot/types/interfaces/society'; @@ -218,7 +218,6 @@ declare module '@polkadot/api/types/submittable' { * * # * Complexity: O(P) where P is the number of max proposals - * Base Weight: .49 * P * DB Weight: * * Reads: Proposals * * Writes: Voting, Proposals, ProposalOf @@ -278,7 +277,7 @@ declare module '@polkadot/api/types/submittable' { * * Requires root origin. * - * NOTE: Does not enforce the expected `MAX_MEMBERS` limit on the amount of members, but + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but * the weight estimations rely on it to estimate dispatchable weight. * * # @@ -324,7 +323,6 @@ declare module '@polkadot/api/types/submittable' { * - `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`. * - Db reads: `scheduler lookup`, scheduler agenda` * - Db writes: `scheduler lookup`, scheduler agenda` - * - Base Weight: 36.78 + 3.277 * D µs * # **/ cancelQueued: AugmentedSubmittable<(which: ReferendumIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic>; @@ -338,7 +336,6 @@ declare module '@polkadot/api/types/submittable' { * # * - Complexity: `O(1)`. * - Db writes: `ReferendumInfoOf` - * - Base Weight: 21.57 µs * # **/ cancelReferendum: AugmentedSubmittable<(refIndex: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic>; @@ -350,7 +347,6 @@ declare module '@polkadot/api/types/submittable' { * # * - `O(1)`. * - Db writes: `PublicProps` - * - Base Weight: 2.505 µs * # **/ clearPublicProposals: AugmentedSubmittable<() => SubmittableExtrinsic>; @@ -376,11 +372,10 @@ declare module '@polkadot/api/types/submittable' { * # * - Complexity: `O(R)` where R is the number of referendums the voter delegating to has * voted on. Weight is charged as if maximum votes. - * - Db reads: 2*`VotingOf`, `balances locks` - * - Db writes: 2*`VotingOf`, `balances locks` + * - Db reads: 3*`VotingOf`, `origin account locks` + * - Db writes: 3*`VotingOf`, `origin account locks` * - Db reads per votes: `ReferendumInfoOf` * - Db writes per votes: `ReferendumInfoOf` - * - Base Weight: 65.78 + 8.229 * R µs * # **/ delegate: AugmentedSubmittable<(to: AccountId | string | Uint8Array, conviction: Conviction | 'None'|'Locked1x'|'Locked2x'|'Locked3x'|'Locked4x'|'Locked5x'|'Locked6x' | number | Uint8Array, balance: BalanceOf | AnyNumber | Uint8Array) => SubmittableExtrinsic>; @@ -396,8 +391,6 @@ declare module '@polkadot/api/types/submittable' { * - Complexity: `O(1)`. * - Db reads: `ReferendumInfoOf`, `Cancellations` * - Db writes: `ReferendumInfoOf`, `Cancellations` - * ------------- - * - Base Weight: 34.25 µs * # **/ emergencyCancel: AugmentedSubmittable<(refIndex: ReferendumIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic>; @@ -418,7 +411,6 @@ declare module '@polkadot/api/types/submittable' { * Decoding vec of length V. Charged as maximum * - Db reads: `NextExternal`, `Blacklist` * - Db writes: `NextExternal` - * - Base Weight: 13.8 + .106 * V µs * # **/ externalPropose: AugmentedSubmittable<(proposalHash: Hash | string | Uint8Array) => SubmittableExtrinsic>; @@ -436,7 +428,6 @@ declare module '@polkadot/api/types/submittable' { * # * - Complexity: `O(1)` * - Db write: `NextExternal` - * - Base Weight: 3.087 µs * # **/ externalProposeDefault: AugmentedSubmittable<(proposalHash: Hash | string | Uint8Array) => SubmittableExtrinsic>; @@ -454,7 +445,6 @@ declare module '@polkadot/api/types/submittable' { * # * - Complexity: `O(1)` * - Db write: `NextExternal` - * - Base Weight: 3.065 µs * # **/ externalProposeMajority: AugmentedSubmittable<(proposalHash: Hash | string | Uint8Array) => SubmittableExtrinsic>; @@ -483,7 +473,9 @@ declare module '@polkadot/api/types/submittable' { fastTrack: AugmentedSubmittable<(proposalHash: Hash | string | Uint8Array, votingPeriod: BlockNumber | AnyNumber | Uint8Array, delay: BlockNumber | AnyNumber | Uint8Array) => SubmittableExtrinsic>; /** * Register the preimage for an upcoming proposal. This requires the proposal to be - * in the dispatch queue. No deposit is needed. + * in the dispatch queue. No deposit is needed. When this call is successful, i.e. + * the preimage has not been uploaded before and matches some imminent proposal, + * no fee is paid. * * The dispatch origin of this call must be _Signed_. * @@ -492,7 +484,9 @@ declare module '@polkadot/api/types/submittable' { * Emits `PreimageNoted`. * * # - * see `weight_for::note_preimage` + * - Complexity: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + * - Db reads: `Preimages` + * - Db writes: `Preimages` * # **/ noteImminentPreimage: AugmentedSubmittable<(encodedProposal: Bytes | string | Uint8Array) => SubmittableExtrinsic>; @@ -511,7 +505,9 @@ declare module '@polkadot/api/types/submittable' { * Emits `PreimageNoted`. * * # - * see `weight_for::note_preimage` + * - Complexity: `O(E)` with E size of `encoded_proposal` (protected by a required deposit). + * - Db reads: `Preimages` + * - Db writes: `Preimages` * # **/ notePreimage: AugmentedSubmittable<(encodedProposal: Bytes | string | Uint8Array) => SubmittableExtrinsic>; @@ -534,8 +530,6 @@ declare module '@polkadot/api/types/submittable' { * - Complexity: `O(1)` * - Db reads: `PublicPropCount`, `PublicProps` * - Db writes: `PublicPropCount`, `PublicProps`, `DepositOf` - * ------------------- - * Base Weight: 42.58 + .127 * P µs with `P` the number of proposals `PublicProps` * # **/ propose: AugmentedSubmittable<(proposalHash: Hash | string | Uint8Array, value: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic>; @@ -556,9 +550,8 @@ declare module '@polkadot/api/types/submittable' { * * # * - Complexity: `O(D)` where D is length of proposal. - * - Db reads: `Preimages` - * - Db writes: `Preimages` - * - Base Weight: 39.31 + .003 * b µs + * - Db reads: `Preimages`, provider account data + * - Db writes: `Preimages` provider account data * # **/ reapPreimage: AugmentedSubmittable<(proposalHash: Hash | string | Uint8Array, proposalLenUpperBound: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic>; @@ -581,7 +574,6 @@ declare module '@polkadot/api/types/submittable' { * Weight is calculated for the maximum number of vote. * - Db reads: `ReferendumInfoOf`, `VotingOf` * - Db writes: `ReferendumInfoOf`, `VotingOf` - * - Base Weight: 19.15 + .372 * R * # **/ removeOtherVote: AugmentedSubmittable<(target: AccountId | string | Uint8Array, index: ReferendumIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic>; @@ -616,7 +608,6 @@ declare module '@polkadot/api/types/submittable' { * Weight is calculated for the maximum number of vote. * - Db reads: `ReferendumInfoOf`, `VotingOf` * - Db writes: `ReferendumInfoOf`, `VotingOf` - * - Base Weight: 21.03 + .359 * R * # **/ removeVote: AugmentedSubmittable<(index: ReferendumIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic>; @@ -634,8 +625,6 @@ declare module '@polkadot/api/types/submittable' { * - Complexity: `O(S)` where S is the number of seconds a proposal already has. * - Db reads: `DepositOf` * - Db writes: `DepositOf` - * --------- - * - Base Weight: 22.28 + .229 * S µs * # **/ second: AugmentedSubmittable<(proposal: Compact | AnyNumber | Uint8Array, secondsUpperBound: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic>; @@ -657,7 +646,6 @@ declare module '@polkadot/api/types/submittable' { * - Db writes: 2*`VotingOf` * - Db reads per votes: `ReferendumInfoOf` * - Db writes per votes: `ReferendumInfoOf` - * - Base Weight: 33.29 + 8.104 * R µs * # **/ undelegate: AugmentedSubmittable<() => SubmittableExtrinsic>; @@ -672,9 +660,6 @@ declare module '@polkadot/api/types/submittable' { * - Complexity `O(R)` with R number of vote of target. * - Db reads: `VotingOf`, `balances locks`, `target account` * - Db writes: `VotingOf`, `balances locks`, `target account` - * - Base Weight: - * - Unlock Remove: 42.96 + .048 * R - * - Unlock Set: 37.63 + .327 * R * # **/ unlock: AugmentedSubmittable<(target: AccountId | string | Uint8Array) => SubmittableExtrinsic>; @@ -692,7 +677,6 @@ declare module '@polkadot/api/types/submittable' { * Performs a binary search on `existing_vetoers` which should not be very large. * - Db reads: `NextExternal`, `Blacklist` * - Db writes: `NextExternal`, `Blacklist` - * - Base Weight: 29.87 + .188 * V µs * # **/ vetoExternal: AugmentedSubmittable<(proposalHash: Hash | string | Uint8Array) => SubmittableExtrinsic>; @@ -710,10 +694,6 @@ declare module '@polkadot/api/types/submittable' { * weight is charged as if maximum votes. * - Db reads: `ReferendumInfoOf`, `VotingOf`, `balances locks` * - Db writes: `ReferendumInfoOf`, `VotingOf`, `balances locks` - * -------------------- - * - Base Weight: - * - Vote New: 49.24 + .333 * R µs - * - Vote Existing: 49.94 + .343 * R µs * # **/ vote: AugmentedSubmittable<(refIndex: Compact | AnyNumber | Uint8Array, vote: AccountVote | { Standard: any } | { Split: any } | string | Uint8Array) => SubmittableExtrinsic>; @@ -1479,12 +1459,34 @@ declare module '@polkadot/api/types/submittable' { * - `proxy_type`: The permissions allowed for this proxy account. * * # - * P is the number of proxies the user has - * - Base weight: 17.48 + .176 * P µs - * - DB weight: 1 storage read and write. + * Weight is a function of the number of proxies the user has (P). * # **/ - addProxy: AugmentedSubmittable<(proxy: AccountId | string | Uint8Array, proxyType: ProxyType | 'Any'|'NonTransfer'|'Governance'|'Staking' | number | Uint8Array) => SubmittableExtrinsic>; + addProxy: AugmentedSubmittable<(delegate: AccountId | string | Uint8Array, proxyType: ProxyType | 'Any'|'NonTransfer'|'Governance'|'Staking' | number | Uint8Array, delay: BlockNumber | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + /** + * Publish the hash of a proxy-call that will be made in the future. + * + * This must be called some number of blocks before the corresponding `proxy` is attempted + * if the delay associated with the proxy relationship is greater than zero. + * + * No more than `MaxPending` announcements may be made at any one time. + * + * This will take a deposit of `AnnouncementDepositFactor` as well as + * `AnnouncementDepositBase` if there are no other pending announcements. + * + * The dispatch origin for this call must be _Signed_ and a proxy of `real`. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + **/ + announce: AugmentedSubmittable<(real: AccountId | string | Uint8Array, callHash: CallHashOf | string | Uint8Array) => SubmittableExtrinsic>; /** * Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and * initialize it with a proxy of `proxy_type` for `origin` sender. @@ -1497,6 +1499,8 @@ declare module '@polkadot/api/types/submittable' { * - `index`: A disambiguation index, in case this is called multiple times in the same * transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just * want to use `0`. + * - `delay`: The announcement period required of the initial proxy. Will generally be + * zero. * * Fails with `Duplicate` if this has already been called in this transaction, from the * same sender, with the same parameters. @@ -1504,12 +1508,11 @@ declare module '@polkadot/api/types/submittable' { * Fails if there are insufficient funds to pay for deposit. * * # - * P is the number of proxies the user has - * - Base weight: 36.48 + .039 * P µs - * - DB weight: 1 storage read and write. + * Weight is a function of the number of proxies the user has (P). * # + * TODO: Might be over counting 1 read **/ - anonymous: AugmentedSubmittable<(proxyType: ProxyType | 'Any'|'NonTransfer'|'Governance'|'Staking' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + anonymous: AugmentedSubmittable<(proxyType: ProxyType | 'Any'|'NonTransfer'|'Governance'|'Staking' | number | Uint8Array, delay: BlockNumber | AnyNumber | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic>; /** * Removes a previously spawned anonymous proxy. * @@ -1529,9 +1532,7 @@ declare module '@polkadot/api/types/submittable' { * account whose `anonymous` call has corresponding parameters. * * # - * P is the number of proxies the user has - * - Base weight: 15.65 + .137 * P µs - * - DB weight: 1 storage read and write. + * Weight is a function of the number of proxies the user has (P). * # **/ killAnonymous: AugmentedSubmittable<(spawner: AccountId | string | Uint8Array, proxyType: ProxyType | 'Any'|'NonTransfer'|'Governance'|'Staking' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array, height: Compact | AnyNumber | Uint8Array, extIndex: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic>; @@ -1539,6 +1540,8 @@ declare module '@polkadot/api/types/submittable' { * Dispatch the given `call` from an account that the sender is authorised for through * `add_proxy`. * + * Removes any corresponding announcement(s). + * * The dispatch origin for this call must be _Signed_. * * Parameters: @@ -1547,13 +1550,68 @@ declare module '@polkadot/api/types/submittable' { * - `call`: The call to be made by the `real` account. * * # - * P is the number of proxies the user has - * - Base weight: 19.87 + .141 * P µs - * - DB weight: 1 storage read. - * - Plus the weight of the `call` + * Weight is a function of the number of proxies the user has (P). * # **/ proxy: AugmentedSubmittable<(real: AccountId | string | Uint8Array, forceProxyType: Option | null | object | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Dispatch the given `call` from an account that the sender is authorised for through + * `add_proxy`. + * + * Removes any corresponding announcement(s). + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * - `call`: The call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + **/ + proxyAnnounced: AugmentedSubmittable<(delegate: AccountId | string | Uint8Array, real: AccountId | string | Uint8Array, forceProxyType: Option | null | object | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Remove the given announcement of a delegate. + * + * May be called by a target (proxied) account to remove a call that one of their delegates + * (`delegate`) has announced they want to execute. The deposit is returned. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `delegate`: The account that previously announced the call. + * - `call_hash`: The hash of the call to be made. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + **/ + rejectAnnouncement: AugmentedSubmittable<(delegate: AccountId | string | Uint8Array, callHash: CallHashOf | string | Uint8Array) => SubmittableExtrinsic>; + /** + * Remove a given announcement. + * + * May be called by a proxy account to remove a call they previously announced and return + * the deposit. + * + * The dispatch origin for this call must be _Signed_. + * + * Parameters: + * - `real`: The account that the proxy will make a call on behalf of. + * - `call_hash`: The hash of the call to be made by the `real` account. + * + * # + * Weight is a function of: + * - A: the number of announcements made. + * - P: the number of proxies the user has. + * # + **/ + removeAnnouncement: AugmentedSubmittable<(real: AccountId | string | Uint8Array, callHash: CallHashOf | string | Uint8Array) => SubmittableExtrinsic>; /** * Unregister all proxy accounts for the sender. * @@ -1563,9 +1621,7 @@ declare module '@polkadot/api/types/submittable' { * the unreserved fees will be inaccessible. **All access to this account will be lost.** * * # - * P is the number of proxies the user has - * - Base weight: 13.73 + .129 * P µs - * - DB weight: 1 storage read and write. + * Weight is a function of the number of proxies the user has (P). * # **/ removeProxies: AugmentedSubmittable<() => SubmittableExtrinsic>; @@ -1579,12 +1635,10 @@ declare module '@polkadot/api/types/submittable' { * - `proxy_type`: The permissions currently enabled for the removed proxy account. * * # - * P is the number of proxies the user has - * - Base weight: 14.37 + .164 * P µs - * - DB weight: 1 storage read and write. + * Weight is a function of the number of proxies the user has (P). * # **/ - removeProxy: AugmentedSubmittable<(proxy: AccountId | string | Uint8Array, proxyType: ProxyType | 'Any'|'NonTransfer'|'Governance'|'Staking' | number | Uint8Array) => SubmittableExtrinsic>; + removeProxy: AugmentedSubmittable<(delegate: AccountId | string | Uint8Array, proxyType: ProxyType | 'Any'|'NonTransfer'|'Governance'|'Staking' | number | Uint8Array, delay: BlockNumber | AnyNumber | Uint8Array) => SubmittableExtrinsic>; }; recovery: { [index: string]: SubmittableExtrinsicFunction; @@ -2909,7 +2963,6 @@ declare module '@polkadot/api/types/submittable' { * * # * Complexity: O(P) where P is the number of max proposals - * Base Weight: .49 * P * DB Weight: * * Reads: Proposals * * Writes: Voting, Proposals, ProposalOf @@ -2969,7 +3022,7 @@ declare module '@polkadot/api/types/submittable' { * * Requires root origin. * - * NOTE: Does not enforce the expected `MAX_MEMBERS` limit on the amount of members, but + * NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but * the weight estimations rely on it to estimate dispatchable weight. * * # @@ -3069,9 +3122,6 @@ declare module '@polkadot/api/types/submittable' { * - `O(T)` where `T` complexity of `on_timestamp_set` * - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`) * - 1 event handler `on_timestamp_set` `O(T)`. - * - Benchmark: 7.678 (min squares analysis) - * - NOTE: This benchmark was done for a runtime with insignificant `on_timestamp_set` handlers. - * New benchmarking is needed when adding new handlers. * # **/ set: AugmentedSubmittable<(now: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic>; @@ -3249,11 +3299,6 @@ declare module '@polkadot/api/types/submittable' { * NOTE: Prior to version *12, this was called `as_limited_sub`. * * The dispatch origin for this call must be _Signed_. - * - * # - * - Base weight: 2.861 µs - * - Plus the weight of the `call` - * # **/ asDerivative: AugmentedSubmittable<(index: u16 | AnyNumber | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic>; /** diff --git a/packages/metadata/package.json b/packages/metadata/package.json index edb21e3b4e..02b8c7b03c 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/metadata", - "version": "1.32.0-beta.3", + "version": "1.32.0-beta.4", "description": "Helpers to extract information from runtime metadata", "main": "index.js", "publishConfig": { @@ -27,8 +27,8 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme", "dependencies": { "@babel/runtime": "^7.11.2", - "@polkadot/types": "1.32.0-beta.3", - "@polkadot/types-known": "1.32.0-beta.3", + "@polkadot/types": "1.32.0-beta.4", + "@polkadot/types-known": "1.32.0-beta.4", "@polkadot/util": "^3.4.1", "@polkadot/util-crypto": "^3.4.1", "bn.js": "^5.1.3" diff --git a/packages/rpc-core/package.json b/packages/rpc-core/package.json index f5d28fb2bc..fa20d74b16 100644 --- a/packages/rpc-core/package.json +++ b/packages/rpc-core/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/rpc-core", - "version": "1.32.0-beta.3", + "version": "1.32.0-beta.4", "description": "A JavaScript wrapper for the Polkadot JsonRPC interface", "main": "index.js", "keywords": [ @@ -27,9 +27,9 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme", "dependencies": { "@babel/runtime": "^7.11.2", - "@polkadot/metadata": "1.32.0-beta.3", - "@polkadot/rpc-provider": "1.32.0-beta.3", - "@polkadot/types": "1.32.0-beta.3", + "@polkadot/metadata": "1.32.0-beta.4", + "@polkadot/rpc-provider": "1.32.0-beta.4", + "@polkadot/types": "1.32.0-beta.4", "@polkadot/util": "^3.4.1", "memoizee": "^0.4.14", "rxjs": "^6.6.2" diff --git a/packages/rpc-provider/package.json b/packages/rpc-provider/package.json index 3a07d62478..80572ef0d6 100644 --- a/packages/rpc-provider/package.json +++ b/packages/rpc-provider/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/rpc-provider", - "version": "1.32.0-beta.3", + "version": "1.32.0-beta.4", "description": "Transport providers for the API", "main": "index.js", "keywords": [ @@ -27,8 +27,8 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme", "dependencies": { "@babel/runtime": "^7.11.2", - "@polkadot/metadata": "1.32.0-beta.3", - "@polkadot/types": "1.32.0-beta.3", + "@polkadot/metadata": "1.32.0-beta.4", + "@polkadot/types": "1.32.0-beta.4", "@polkadot/util": "^3.4.1", "@polkadot/util-crypto": "^3.4.1", "bn.js": "^5.1.3", diff --git a/packages/typegen/package.json b/packages/typegen/package.json index d4fe287d67..3e23e26fb7 100644 --- a/packages/typegen/package.json +++ b/packages/typegen/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/typegen", - "version": "1.32.0-beta.3", + "version": "1.32.0-beta.4", "description": "Type generation scripts", "main": "index.js", "bin": { @@ -36,10 +36,10 @@ "@babel/core": "^7.11.4", "@babel/register": "^7.10.5", "@babel/runtime": "^7.11.2", - "@polkadot/api": "1.32.0-beta.3", - "@polkadot/metadata": "1.32.0-beta.3", - "@polkadot/rpc-provider": "1.32.0-beta.3", - "@polkadot/types": "1.32.0-beta.3", + "@polkadot/api": "1.32.0-beta.4", + "@polkadot/metadata": "1.32.0-beta.4", + "@polkadot/rpc-provider": "1.32.0-beta.4", + "@polkadot/types": "1.32.0-beta.4", "@polkadot/util": "^3.4.1", "handlebars": "^4.7.6", "websocket": "^1.0.31", diff --git a/packages/types-known/package.json b/packages/types-known/package.json index 9821b2a2ce..ad3606b1d3 100644 --- a/packages/types-known/package.json +++ b/packages/types-known/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/types-known", - "version": "1.32.0-beta.3", + "version": "1.32.0-beta.4", "description": "A JavaScript wrapper for the Polkadot JsonRPC interface", "main": "index.js", "keywords": [ @@ -27,7 +27,7 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme", "dependencies": { "@babel/runtime": "^7.11.2", - "@polkadot/types": "1.32.0-beta.3", + "@polkadot/types": "1.32.0-beta.4", "@polkadot/util": "^3.4.1", "bn.js": "^5.1.3" }, diff --git a/packages/types/package.json b/packages/types/package.json index 1c495b5c6b..a833869bfb 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/types", - "version": "1.32.0-beta.3", + "version": "1.32.0-beta.4", "description": "Implementation of the Parity codec", "main": "index.js", "keywords": [ @@ -27,7 +27,7 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme", "dependencies": { "@babel/runtime": "^7.11.2", - "@polkadot/metadata": "1.32.0-beta.3", + "@polkadot/metadata": "1.32.0-beta.4", "@polkadot/util": "^3.4.1", "@polkadot/util-crypto": "^3.4.1", "@types/bn.js": "^4.11.6", diff --git a/yarn.lock b/yarn.lock index 70ffc1f398..b3cf15cf2f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2734,25 +2734,25 @@ __metadata: resolution: "@polkadot/api-contract@workspace:packages/api-contract" dependencies: "@babel/runtime": ^7.11.2 - "@polkadot/api": 1.32.0-beta.3 - "@polkadot/rpc-core": 1.32.0-beta.3 - "@polkadot/types": 1.32.0-beta.3 + "@polkadot/api": 1.32.0-beta.4 + "@polkadot/rpc-core": 1.32.0-beta.4 + "@polkadot/types": 1.32.0-beta.4 "@polkadot/util": ^3.4.1 bn.js: ^5.1.3 rxjs: ^6.6.2 languageName: unknown linkType: soft -"@polkadot/api-derive@1.32.0-beta.3, @polkadot/api-derive@workspace:packages/api-derive": +"@polkadot/api-derive@1.32.0-beta.4, @polkadot/api-derive@workspace:packages/api-derive": version: 0.0.0-use.local resolution: "@polkadot/api-derive@workspace:packages/api-derive" dependencies: "@babel/runtime": ^7.11.2 - "@polkadot/api": 1.32.0-beta.3 + "@polkadot/api": 1.32.0-beta.4 "@polkadot/keyring": ^3.4.1 - "@polkadot/rpc-core": 1.32.0-beta.3 - "@polkadot/rpc-provider": 1.32.0-beta.3 - "@polkadot/types": 1.32.0-beta.3 + "@polkadot/rpc-core": 1.32.0-beta.4 + "@polkadot/rpc-provider": 1.32.0-beta.4 + "@polkadot/types": 1.32.0-beta.4 "@polkadot/util": ^3.4.1 "@polkadot/util-crypto": ^3.4.1 bn.js: ^5.1.3 @@ -2761,18 +2761,18 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/api@1.32.0-beta.3, @polkadot/api@workspace:packages/api": +"@polkadot/api@1.32.0-beta.4, @polkadot/api@workspace:packages/api": version: 0.0.0-use.local resolution: "@polkadot/api@workspace:packages/api" dependencies: "@babel/runtime": ^7.11.2 - "@polkadot/api-derive": 1.32.0-beta.3 + "@polkadot/api-derive": 1.32.0-beta.4 "@polkadot/keyring": ^3.4.1 - "@polkadot/metadata": 1.32.0-beta.3 - "@polkadot/rpc-core": 1.32.0-beta.3 - "@polkadot/rpc-provider": 1.32.0-beta.3 - "@polkadot/types": 1.32.0-beta.3 - "@polkadot/types-known": 1.32.0-beta.3 + "@polkadot/metadata": 1.32.0-beta.4 + "@polkadot/rpc-core": 1.32.0-beta.4 + "@polkadot/rpc-provider": 1.32.0-beta.4 + "@polkadot/types": 1.32.0-beta.4 + "@polkadot/types-known": 1.32.0-beta.4 "@polkadot/util": ^3.4.1 "@polkadot/util-crypto": ^3.4.1 bn.js: ^5.1.3 @@ -2885,43 +2885,43 @@ __metadata: languageName: node linkType: hard -"@polkadot/metadata@1.32.0-beta.3, @polkadot/metadata@workspace:packages/metadata": +"@polkadot/metadata@1.32.0-beta.4, @polkadot/metadata@workspace:packages/metadata": version: 0.0.0-use.local resolution: "@polkadot/metadata@workspace:packages/metadata" dependencies: "@babel/runtime": ^7.11.2 "@polkadot/keyring": ^3.4.1 - "@polkadot/types": 1.32.0-beta.3 - "@polkadot/types-known": 1.32.0-beta.3 + "@polkadot/types": 1.32.0-beta.4 + "@polkadot/types-known": 1.32.0-beta.4 "@polkadot/util": ^3.4.1 "@polkadot/util-crypto": ^3.4.1 bn.js: ^5.1.3 languageName: unknown linkType: soft -"@polkadot/rpc-core@1.32.0-beta.3, @polkadot/rpc-core@workspace:packages/rpc-core": +"@polkadot/rpc-core@1.32.0-beta.4, @polkadot/rpc-core@workspace:packages/rpc-core": version: 0.0.0-use.local resolution: "@polkadot/rpc-core@workspace:packages/rpc-core" dependencies: "@babel/runtime": ^7.11.2 "@polkadot/keyring": ^3.4.1 - "@polkadot/metadata": 1.32.0-beta.3 - "@polkadot/rpc-provider": 1.32.0-beta.3 - "@polkadot/types": 1.32.0-beta.3 + "@polkadot/metadata": 1.32.0-beta.4 + "@polkadot/rpc-provider": 1.32.0-beta.4 + "@polkadot/types": 1.32.0-beta.4 "@polkadot/util": ^3.4.1 memoizee: ^0.4.14 rxjs: ^6.6.2 languageName: unknown linkType: soft -"@polkadot/rpc-provider@1.32.0-beta.3, @polkadot/rpc-provider@workspace:packages/rpc-provider": +"@polkadot/rpc-provider@1.32.0-beta.4, @polkadot/rpc-provider@workspace:packages/rpc-provider": version: 0.0.0-use.local resolution: "@polkadot/rpc-provider@workspace:packages/rpc-provider" dependencies: "@babel/runtime": ^7.11.2 "@polkadot/keyring": ^3.4.1 - "@polkadot/metadata": 1.32.0-beta.3 - "@polkadot/types": 1.32.0-beta.3 + "@polkadot/metadata": 1.32.0-beta.4 + "@polkadot/types": 1.32.0-beta.4 "@polkadot/util": ^3.4.1 "@polkadot/util-crypto": ^3.4.1 bn.js: ^5.1.3 @@ -2949,10 +2949,10 @@ __metadata: "@babel/core": ^7.11.4 "@babel/register": ^7.10.5 "@babel/runtime": ^7.11.2 - "@polkadot/api": 1.32.0-beta.3 - "@polkadot/metadata": 1.32.0-beta.3 - "@polkadot/rpc-provider": 1.32.0-beta.3 - "@polkadot/types": 1.32.0-beta.3 + "@polkadot/api": 1.32.0-beta.4 + "@polkadot/metadata": 1.32.0-beta.4 + "@polkadot/rpc-provider": 1.32.0-beta.4 + "@polkadot/types": 1.32.0-beta.4 "@polkadot/util": ^3.4.1 "@types/websocket": ^1.0.1 "@types/yargs": ^15.0.5 @@ -2968,25 +2968,25 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/types-known@1.32.0-beta.3, @polkadot/types-known@workspace:packages/types-known": +"@polkadot/types-known@1.32.0-beta.4, @polkadot/types-known@workspace:packages/types-known": version: 0.0.0-use.local resolution: "@polkadot/types-known@workspace:packages/types-known" dependencies: "@babel/runtime": ^7.11.2 - "@polkadot/types": 1.32.0-beta.3 + "@polkadot/types": 1.32.0-beta.4 "@polkadot/util": ^3.4.1 "@types/bn.js": ^4.11.6 bn.js: ^5.1.3 languageName: unknown linkType: soft -"@polkadot/types@1.32.0-beta.3, @polkadot/types@workspace:packages/types": +"@polkadot/types@1.32.0-beta.4, @polkadot/types@workspace:packages/types": version: 0.0.0-use.local resolution: "@polkadot/types@workspace:packages/types" dependencies: "@babel/runtime": ^7.11.2 "@polkadot/keyring": ^3.4.1 - "@polkadot/metadata": 1.32.0-beta.3 + "@polkadot/metadata": 1.32.0-beta.4 "@polkadot/util": ^3.4.1 "@polkadot/util-crypto": ^3.4.1 "@types/bn.js": ^4.11.6