Skip to content

Commit

Permalink
Merge branch 'master' into jg-ns
Browse files Browse the repository at this point in the history
  • Loading branch information
jacogr committed Apr 9, 2022
2 parents 089ba53 + 6c3bd2f commit 9c2cdc8
Show file tree
Hide file tree
Showing 88 changed files with 10,055 additions and 9,352 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
_book/
build/
build-cjs/
build-esm/
build-docs/
coverage/
docs/.vuepress/dist/
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@

## master

- **Breaking change** In this major version the commonjs outputs are moved to a sub-folder. Since the export map and main field in package.json does reflect this change, there should be no usage changes. However the packages here will all need to be on the same version for internal linkage.

Contributed:

- Improve `rpc-provider` README (Thanks to https://github.com/josepot)
- Add handling for `Vec<[<Type>;<length>]>` in typegen (Thanks to https://github.com/zannis)

Changes:

- Add basic `api.derive.bagsList.*` support
- Return sorted names for `api.registry.lookup.names`
- Optimize JSONRPC requests/response handling
- Output commonjs files under the `cjs/**` root
- Update to latest Substrate, Kusama & Polkadot static metadata
- Add latest Polkadot 9180 upgrade block
- Update to `@polkadot/util` 9.0.1


## 7.15.1 Apr 3, 2022

Contributed:

- Export `WellKnownChain` for `substrate-connect` (Thanks to https://github.com/josepot)
Expand All @@ -12,6 +32,9 @@ Changes:

- Cater for `DispatchError` with `error` as `[u8; 4]`
- Add in-flight cache for parallel same-version metadata queries
- Cater for lazy `@polkadot/util-crypto` init (adjustment for React Native)
- Update to latest Substrate, Kusama & Polkadot static metadata
- Update latest Westend & Kusama (up to 9180) upgrade blocks


## 7.14.3 Mar 28, 2022
Expand Down
5 changes: 3 additions & 2 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
2888 Jaco Promise cache for metadata from version (improves parallel) (#4708)
2906 Jaco Bump metadata (#4732)
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
37 Keith Ingram Update contract types and rpc (#4541)
35 Stefanie Doll Updated child storage parameters (#1709)
Expand All @@ -22,6 +22,7 @@
3 Ewa Kowalska Handle no council for bounties proposals (#3062)
3 hamidra add support for n key entries for NMaps (#3886)
3 Hamza Tokuchi more typos (#2532)
3 Josep M Sobrepere docs: improve rpc-provider README (#4719)
3 Julien Eluard Fixed typos about module balances (#1402)
3 KarishmaBothara Backward compatibility thing (#3511)
3 Miguel Hervas Adding RT4 Types (#3007)
Expand All @@ -33,7 +34,6 @@
2 HackFisher Update maxExtrinsic definition (#4703)
2 Jakub Pánik All heads subscription (#1899)
2 James Lefrère Add `.eq()` usage to docs and fix docs typos (#1405)
2 Josep M Sobrepere fix: export substrate-connect `WellKnownChain` (#4700)
2 Keith Yeung Allow keyPrefix to accept an additional argument for double maps (#2230)
2 MOZGIII Follow-up fix after #4665 (#4666)
2 Nikos Kontakis Add auction in shared types (#4085)
Expand Down Expand Up @@ -98,4 +98,5 @@
1 Yaroslav Bolyukin Support BTreeMap/BTreeSet in typegen (#4682)
1 yjh fix MetadataVersioned.asV12 (#2983)
1 Yuri fixes #3693 Fix uniques return types (#3694)
1 Zannis Kalampoukis fix: typegen supports vectors of slices (#4720)
1 Zeke Mostov fix: Allow sudo for polkadot indexed proxy enum (#3286)
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"sideEffects": false,
"type": "commonjs",
"version": "7.14.4-5",
"version": "7.15.2-14",
"workspaces": [
"packages/*"
],
Expand All @@ -31,10 +31,10 @@
"test:watch": "polkadot-dev-run-test --watch"
},
"devDependencies": {
"@babel/core": "^7.17.8",
"@babel/core": "^7.17.9",
"@babel/register": "^7.17.7",
"@babel/runtime": "^7.17.8",
"@polkadot/dev": "^0.65.101",
"@babel/runtime": "^7.17.9",
"@polkadot/dev": "^0.66.1",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^27.4.1",
"copyfiles": "^2.4.1"
Expand Down
18 changes: 9 additions & 9 deletions packages/api-augment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.14.4-5",
"version": "7.15.2-14",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.8",
"@polkadot/api-base": "7.14.4-5",
"@polkadot/rpc-augment": "7.14.4-5",
"@polkadot/types": "7.14.4-5",
"@polkadot/types-augment": "7.14.4-5",
"@polkadot/types-codec": "7.14.4-5",
"@polkadot/util": "^8.7.1"
"@babel/runtime": "^7.17.9",
"@polkadot/api-base": "7.15.2-14",
"@polkadot/rpc-augment": "7.15.2-14",
"@polkadot/types": "7.15.2-14",
"@polkadot/types-augment": "7.15.2-14",
"@polkadot/types-codec": "7.15.2-14",
"@polkadot/util": "^9.0.1"
},
"devDependencies": {
"@polkadot/types-support": "7.14.4-5"
"@polkadot/types-support": "7.15.2-14"
}
}
52 changes: 29 additions & 23 deletions packages/api-augment/src/kusama/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,6 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec;
};
bounties: {
/**
* Percentage of the curator fee that will be reserved upfront as deposit for bounty
* curator.
**/
bountyCuratorDeposit: Permill & AugmentedConst<ApiType>;
/**
* The amount held on deposit for placing a bounty proposal.
**/
Expand All @@ -156,6 +151,21 @@ declare module '@polkadot/api-base/types/consts' {
* Minimum value for a bounty.
**/
bountyValueMinimum: u128 & AugmentedConst<ApiType>;
/**
* Maximum amount of funds that should be placed in a deposit for making a proposal.
**/
curatorDepositMax: Option<u128> & AugmentedConst<ApiType>;
/**
* Minimum amount of funds that should be placed in a deposit for making a proposal.
**/
curatorDepositMin: Option<u128> & AugmentedConst<ApiType>;
/**
* The curator deposit is calculated as a percentage of the curator fee.
*
* This deposit has optional upper and lower bounds with `CuratorDepositMax` and
* `CuratorDepositMin`.
**/
curatorDepositMultiplier: Permill & AugmentedConst<ApiType>;
/**
* The amount held on deposit per byte within the tip report reason or bounty description.
**/
Expand All @@ -172,11 +182,6 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec;
};
childBounties: {
/**
* Percentage of child-bounty value to be reserved as curator deposit
* when curator fee is zero.
**/
childBountyCuratorDepositBase: Permill & AugmentedConst<ApiType>;
/**
* Minimum value for a child-bounty.
**/
Expand Down Expand Up @@ -279,6 +284,16 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec;
};
electionProviderMultiPhase: {
/**
* The maximum number of electable targets to put in the snapshot.
**/
maxElectableTargets: u16 & AugmentedConst<ApiType>;
/**
* The maximum number of electing voters to put in the snapshot. At the moment, snapshots
* are only over a single block, but once multi-block elections are introduced they will
* take place over multiple blocks.
**/
maxElectingVoters: u32 & AugmentedConst<ApiType>;
/**
* Maximum length (bytes) that the mined solution should consume.
*
Expand Down Expand Up @@ -349,15 +364,6 @@ declare module '@polkadot/api-base/types/consts' {
* Duration of the unsigned phase.
**/
unsignedPhase: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of voters to put in the snapshot. At the moment, snapshots are only
* over a single block, but once multi-block elections are introduced they will take place
* over multiple blocks.
*
* Also, note the data type: If the voters are represented by a `u32` in `type
* CompactSolution`, the same `u32` is used here to ensure bounds are respected.
**/
voterSnapshotPerBlock: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
Expand Down Expand Up @@ -835,6 +841,10 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec;
};
transactionPayment: {
/**
* The polynomial that is applied in order to derive fee from length.
**/
lengthToFee: Vec<FrameSupportWeightsWeightToFeeCoefficient> & AugmentedConst<ApiType>;
/**
* A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their
* `priority`
Expand All @@ -859,10 +869,6 @@ declare module '@polkadot/api-base/types/consts' {
* transactions.
**/
operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
/**
* The fee to be paid for making a transaction; the per-byte portion.
**/
transactionByteFee: u128 & AugmentedConst<ApiType>;
/**
* The polynomial that is applied in order to derive fee from weight.
**/
Expand Down
4 changes: 4 additions & 0 deletions packages/api-augment/src/kusama/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,10 @@ declare module '@polkadot/api-base/types/events' {
* A proxy was executed correctly, with the given.
**/
ProxyExecuted: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
/**
* A proxy was removed.
**/
ProxyRemoved: AugmentedEvent<ApiType, [AccountId32, AccountId32, KusamaRuntimeProxyType, u32]>;
/**
* Generic event
**/
Expand Down
30 changes: 18 additions & 12 deletions packages/api-augment/src/kusama/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4408,10 +4408,13 @@ declare module '@polkadot/api-base/types/submittable' {
**/
forceXcmVersion: AugmentedSubmittable<(location: XcmV1MultiLocation | { parents?: any; interior?: any } | string | Uint8Array, xcmVersion: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmV1MultiLocation, u32]>;
/**
* Transfer some assets from the local chain to the sovereign account of a destination chain and forward
* a notification XCM.
* Transfer some assets from the local chain to the sovereign account of a destination
* chain and forward a notification XCM.
*
* Fee payment on the destination side is made from the first asset listed in the `assets` vector.
* Fee payment on the destination side is made from the asset in the `assets` vector of
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
* is needed than `weight_limit`, then the operation will fail and the assets send may be
* at risk.
*
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
Expand All @@ -4428,7 +4431,10 @@ declare module '@polkadot/api-base/types/submittable' {
/**
* Teleport some assets from the local chain to some destination chain.
*
* Fee payment on the destination side is made from the first asset listed in the `assets` vector.
* Fee payment on the destination side is made from the asset in the `assets` vector of
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
* is needed than `weight_limit`, then the operation will fail and the assets send may be
* at risk.
*
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
Expand All @@ -4443,12 +4449,12 @@ declare module '@polkadot/api-base/types/submittable' {
**/
limitedTeleportAssets: AugmentedSubmittable<(dest: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, beneficiary: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, assets: XcmVersionedMultiAssets | { V0: any } | { V1: any } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array, weightLimit: XcmV2WeightLimit | { Unlimited: any } | { Limited: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedMultiLocation, XcmVersionedMultiLocation, XcmVersionedMultiAssets, u32, XcmV2WeightLimit]>;
/**
* Transfer some assets from the local chain to the sovereign account of a destination chain and forward
* a notification XCM.
* Transfer some assets from the local chain to the sovereign account of a destination
* chain and forward a notification XCM.
*
* Fee payment on the destination side is made from the first asset listed in the `assets` vector and
* fee-weight is calculated locally and thus remote weights are assumed to be equal to
* local weights.
* Fee payment on the destination side is made from the asset in the `assets` vector of
* index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
* with all fees taken as needed from the asset.
*
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
Expand All @@ -4465,9 +4471,9 @@ declare module '@polkadot/api-base/types/submittable' {
/**
* Teleport some assets from the local chain to some destination chain.
*
* Fee payment on the destination side is made from the first asset listed in the `assets` vector and
* fee-weight is calculated locally and thus remote weights are assumed to be equal to
* local weights.
* Fee payment on the destination side is made from the asset in the `assets` vector of
* index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
* with all fees taken as needed from the asset.
*
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
Expand Down
2 changes: 1 addition & 1 deletion packages/api-augment/src/packageInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

// Do not edit, auto-generated by @polkadot/dev

export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '7.14.4-5' };
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '7.15.2-14' };
Loading

0 comments on commit 9c2cdc8

Please sign in to comment.