Compare commits

..
14 Commits
Author SHA1 Message Date
Github Actions ad905db53b [CI Skip] release/stable 1.29.1
skip-checks: true
2020-08-17 10:56:06 +00:00
Jaco Greeff 0a0aa742b4 1.29 (#2489) 2020-08-17 12:43:56 +02:00
Github Actions dfbb06a4d6 [CI Skip] release/beta 1.29.0-beta.5
skip-checks: true
2020-08-13 09:05:15 +00:00
Jaco Greeff 82e71fd51e Bump deps (#2486) 2020-08-13 10:54:45 +02:00
Github Actions a8b88af97a [CI Skip] release/beta 1.29.0-beta.4
skip-checks: true
2020-08-13 07:59:11 +00:00
sung wu eee36537de Update tx.md (#2485)
fix sample code
2020-08-13 09:47:22 +02:00
Github Actions 20a75eafb6 [CI Skip] release/beta 1.29.0-beta.3
skip-checks: true
2020-08-11 15:33:01 +00:00
Jaco Greeff 00d3a1174b Add desiredRunnersUp (#2484) 2020-08-11 17:21:30 +02:00
Github Actions e293c7c1cf [CI Skip] release/beta 1.29.0-beta.2
skip-checks: true
2020-08-11 11:54:13 +00:00
Jaco Greeff 3c8cd499c4 Introduce compact version of CompactAssignments (#2483)
* Introduce compact version of CompactAssignments

* Rebuild interfaces, update tests
2020-08-11 13:43:24 +02:00
Github Actions cb3816df78 [CI Skip] release/beta 1.29.0-beta.1
skip-checks: true
2020-08-11 08:01:38 +00:00
Jaco Greeff fcfcbb2d97 Additional Fixed* types (#2481) 2020-08-11 09:50:28 +02:00
Github Actions 321b80ed63 [CI Skip] release/beta 1.29.0-beta.0
skip-checks: true
2020-08-10 14:55:58 +00:00
Jaco Greeff 73eaa9fe17 Cleanup id from index lookups (#2479) 2020-08-10 16:42:27 +02:00
28 changed files with 840 additions and 690 deletions
+11
View File
@@ -1,5 +1,16 @@
# CHANGELOG
## 1.29.1 Aug 17, 2020
Upgrade priority: Low, unless on bleeding-edge chain with new compact `CompactAssignments`.
- **Important** The Substrate `CompactAssignments` type has changed for better space utilization. On older chains, supply `CompactAssignments: 'CompactAssignmentsTo257'`
- Clean tx cookbook param expansion (Thanks to https://github.com/swswsw)
- Add additional `Fixed{I,U}{64,128}` and `{I,U}32F32` types
- Add `desiredRunnersUp` to council derives
- Cleanup indices/AccountId combination derive lookups
- `@polkadot/util` 3.2
## 1.28.1 Aug 10, 2020
Upgrade priority: Low, unless using Centrifuge or parachains
+3 -3
View File
@@ -16,9 +16,9 @@ const info = await api.tx.balances
// log relevant info, partialFee is Balance, estimated for current
console.log(`
class=${class.toString()},
weight=${weight.toString()},
partialFee=${partialFee.toHuman()}
class=${info.class.toString()},
weight=${info.weight.toString()},
partialFee=${info.partialFee.toHuman()}
`);
```
+1 -1
View File
@@ -9,5 +9,5 @@
"packages": [
"packages/*"
],
"version": "1.28.1"
"version": "1.29.1"
}
+3 -3
View File
@@ -27,12 +27,12 @@
"@babel/core": "^7.11.1",
"@babel/register": "^7.10.5",
"@babel/runtime": "^7.11.2",
"@polkadot/dev": "^0.55.36",
"@polkadot/ts": "^0.3.36",
"@polkadot/dev": "^0.55.38",
"@polkadot/ts": "^0.3.38",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^26.0.9",
"@vuepress/plugin-search": "^1.5.3",
"copyfiles": "^2.3.0"
},
"version": "1.28.1"
"version": "1.29.1"
}
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-contract",
"version": "1.28.1",
"version": "1.29.1",
"description": "Interfaces for interacting with contracts and contract ABIs",
"main": "index.js",
"keywords": [
@@ -27,10 +27,10 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@polkadot/api": "1.28.1",
"@polkadot/rpc-core": "1.28.1",
"@polkadot/types": "1.28.1",
"@polkadot/util": "^3.1.1",
"@polkadot/api": "1.29.1",
"@polkadot/rpc-core": "1.29.1",
"@polkadot/types": "1.29.1",
"@polkadot/util": "^3.2.1",
"bn.js": "^5.1.2",
"rxjs": "^6.6.2"
}
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-derive",
"version": "1.28.1",
"version": "1.29.1",
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
"main": "index.js",
"keywords": [
@@ -28,17 +28,17 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@polkadot/api": "1.28.1",
"@polkadot/rpc-core": "1.28.1",
"@polkadot/rpc-provider": "1.28.1",
"@polkadot/types": "1.28.1",
"@polkadot/util": "^3.1.1",
"@polkadot/util-crypto": "^3.1.1",
"@polkadot/api": "1.29.1",
"@polkadot/rpc-core": "1.29.1",
"@polkadot/rpc-provider": "1.29.1",
"@polkadot/types": "1.29.1",
"@polkadot/util": "^3.2.1",
"@polkadot/util-crypto": "^3.2.1",
"bn.js": "^5.1.2",
"memoizee": "^0.4.14",
"rxjs": "^6.6.2"
},
"devDependencies": {
"@polkadot/keyring": "^3.1.1"
"@polkadot/keyring": "^3.2.1"
}
}
@@ -30,7 +30,7 @@ function retrieve (api: ApiInterfaceRx, address: Address | AccountId | AccountIn
const accountIndex = api.registry.createType('AccountIndex', decoded);
return api.derive.accounts.indexToId(accountIndex).pipe(
return api.derive.accounts.indexToId(accountIndex.toString()).pipe(
map((accountId): AccountIdAndIndex => [accountId, accountIndex])
);
} catch (error) {
+2 -1
View File
@@ -4,13 +4,13 @@
import { AccountId, Balance, BlockNumber } from '@polkadot/types/interfaces';
import { ITuple } from '@polkadot/types/types';
import { DeriveElectionsInfo } from './types';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { ApiInterfaceRx } from '@polkadot/api/types';
import { Vec, u32 } from '@polkadot/types';
import { DeriveElectionsInfo } from '../types';
import { memo } from '../util';
function sortAccounts ([, balanceA]: ITuple<[AccountId, Balance]>, [, balanceB]: ITuple<[AccountId, Balance]>): number {
@@ -30,6 +30,7 @@ function queryElections (api: ApiInterfaceRx): Observable<DeriveElectionsInfo> {
candidacyBond: api.consts[section].candidacyBond as Balance,
candidateCount: api.registry.createType('u32', candidates.length),
candidates,
desiredRunnersUp: api.consts[section].desiredRunnersUp as u32,
desiredSeats: api.consts[section].desiredMembers as u32,
members: members.length
? members.sort(sortAccounts)
@@ -0,0 +1,22 @@
// Copyright 2017-2020 @polkadot/api-derive authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { AccountId, Balance, BlockNumber, SetIndex, VoteIndex } from '@polkadot/types/interfaces';
import { u32 } from '@polkadot/types';
export interface DeriveElectionsInfo {
candidates: AccountId[];
candidateCount: u32;
candidacyBond?: Balance;
desiredRunnersUp: u32;
desiredSeats: u32;
members: [AccountId, Balance][];
nextVoterSet?: SetIndex;
runnersUp: [AccountId, Balance][];
termDuration: BlockNumber;
voteCount?: VoteIndex;
voterCount?: SetIndex;
votingBond?: Balance;
}
+2 -15
View File
@@ -3,13 +3,14 @@
// of the Apache-2.0 license. See the LICENSE file for details.
import type BN from 'bn.js';
import { AccountId, Balance, BalanceLock, BalanceLockTo212, BalanceOf, Bid, BidKind, BlockNumber, Hash, Index, Proposal, ProposalIndex, SetIndex, SocietyVote, StrikeCount, TreasuryProposal, Votes, VoteIndex, VouchingStatus } from '@polkadot/types/interfaces';
import { AccountId, Balance, BalanceLock, BalanceLockTo212, BalanceOf, Bid, BidKind, BlockNumber, Hash, Index, Proposal, ProposalIndex, SetIndex, SocietyVote, StrikeCount, TreasuryProposal, Votes, VouchingStatus } from '@polkadot/types/interfaces';
import { u32 } from '@polkadot/types';
export * from './accounts/types';
export * from './council/types';
export * from './democracy/types';
export * from './elections/types';
export * from './parachains/types';
export * from './session/types';
export * from './staking/types';
@@ -59,20 +60,6 @@ export interface DeriveCollectiveProposal {
export type DeriveCollectiveProposals = DeriveCollectiveProposal[];
export interface DeriveElectionsInfo {
candidates: AccountId[];
candidateCount: u32;
candidacyBond?: Balance;
desiredSeats: u32;
members: [AccountId, Balance][];
nextVoterSet?: SetIndex;
runnersUp: [AccountId, Balance][];
termDuration: BlockNumber;
voteCount?: VoteIndex;
voterCount?: SetIndex;
votingBond?: Balance;
}
export interface DeriveFees {
creationFee: Balance;
existentialDeposit: Balance;
+11 -11
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api",
"version": "1.28.1",
"version": "1.29.1",
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
"main": "index.js",
"keywords": [
@@ -27,20 +27,20 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@polkadot/api-derive": "1.28.1",
"@polkadot/keyring": "^3.1.1",
"@polkadot/metadata": "1.28.1",
"@polkadot/rpc-core": "1.28.1",
"@polkadot/rpc-provider": "1.28.1",
"@polkadot/types": "1.28.1",
"@polkadot/types-known": "1.28.1",
"@polkadot/util": "^3.1.1",
"@polkadot/util-crypto": "^3.1.1",
"@polkadot/api-derive": "1.29.1",
"@polkadot/keyring": "^3.2.1",
"@polkadot/metadata": "1.29.1",
"@polkadot/rpc-core": "1.29.1",
"@polkadot/rpc-provider": "1.29.1",
"@polkadot/types": "1.29.1",
"@polkadot/types-known": "1.29.1",
"@polkadot/util": "^3.2.1",
"@polkadot/util-crypto": "^3.2.1",
"bn.js": "^5.1.2",
"eventemitter3": "^4.0.4",
"rxjs": "^6.6.2"
},
"devDependencies": {
"@polkadot/keyring": "^3.1.1"
"@polkadot/keyring": "^3.2.1"
}
}
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/metadata",
"version": "1.28.1",
"version": "1.29.1",
"description": "Helpers to extract information from runtime metadata",
"main": "index.js",
"publishConfig": {
@@ -27,13 +27,13 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@polkadot/types": "1.28.1",
"@polkadot/types-known": "1.28.1",
"@polkadot/util": "^3.1.1",
"@polkadot/util-crypto": "^3.1.1",
"@polkadot/types": "1.29.1",
"@polkadot/types-known": "1.29.1",
"@polkadot/util": "^3.2.1",
"@polkadot/util-crypto": "^3.2.1",
"bn.js": "^5.1.2"
},
"devDependencies": {
"@polkadot/keyring": "^3.1.1"
"@polkadot/keyring": "^3.2.1"
}
}
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-core",
"version": "1.28.1",
"version": "1.29.1",
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
"main": "index.js",
"keywords": [
@@ -27,14 +27,14 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@polkadot/metadata": "1.28.1",
"@polkadot/rpc-provider": "1.28.1",
"@polkadot/types": "1.28.1",
"@polkadot/util": "^3.1.1",
"@polkadot/metadata": "1.29.1",
"@polkadot/rpc-provider": "1.29.1",
"@polkadot/types": "1.29.1",
"@polkadot/util": "^3.2.1",
"memoizee": "^0.4.14",
"rxjs": "^6.6.2"
},
"devDependencies": {
"@polkadot/keyring": "^3.1.1"
"@polkadot/keyring": "^3.2.1"
}
}
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-provider",
"version": "1.28.1",
"version": "1.29.1",
"description": "Transport providers for the API",
"main": "index.js",
"keywords": [
@@ -27,18 +27,18 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@polkadot/metadata": "1.28.1",
"@polkadot/types": "1.28.1",
"@polkadot/util": "^3.1.1",
"@polkadot/util-crypto": "^3.1.1",
"@polkadot/metadata": "1.29.1",
"@polkadot/types": "1.29.1",
"@polkadot/util": "^3.2.1",
"@polkadot/util-crypto": "^3.2.1",
"bn.js": "^5.1.2",
"eventemitter3": "^4.0.4",
"isomorphic-fetch": "^2.2.1",
"websocket": "^1.0.31"
},
"devDependencies": {
"@polkadot/keyring": "^3.1.1",
"@polkadot/keyring": "^3.2.1",
"mock-socket": "^9.0.3",
"nock": "^13.0.3"
"nock": "^13.0.4"
}
}
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/typegen",
"version": "1.28.1",
"version": "1.29.1",
"description": "Type generation scripts",
"main": "index.js",
"bin": {
@@ -36,11 +36,11 @@
"@babel/core": "^7.11.1",
"@babel/register": "^7.10.5",
"@babel/runtime": "^7.11.2",
"@polkadot/api": "1.28.1",
"@polkadot/metadata": "1.28.1",
"@polkadot/rpc-provider": "1.28.1",
"@polkadot/types": "1.28.1",
"@polkadot/util": "^3.1.1",
"@polkadot/api": "1.29.1",
"@polkadot/metadata": "1.29.1",
"@polkadot/rpc-provider": "1.29.1",
"@polkadot/types": "1.29.1",
"@polkadot/util": "^3.2.1",
"handlebars": "^4.7.6",
"websocket": "^1.0.31",
"yargs": "^15.4.1"
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types-known",
"version": "1.28.1",
"version": "1.29.1",
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
"main": "index.js",
"keywords": [
@@ -27,8 +27,8 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@polkadot/types": "1.28.1",
"@polkadot/util": "^3.1.1",
"@polkadot/types": "1.29.1",
"@polkadot/util": "^3.2.1",
"bn.js": "^5.1.2"
},
"devDependencies": {
+9 -1
View File
@@ -20,6 +20,7 @@ const versioned: OverrideVersionedType[] = [
types: {
Address: 'GenericAddress',
BalanceLock: 'BalanceLockTo212',
CompactAssignments: 'CompactAssignmentsTo257',
DispatchError: 'DispatchErrorTo198',
DispatchInfo: 'DispatchInfoTo244',
Keys: 'SessionKeys5',
@@ -38,6 +39,7 @@ const versioned: OverrideVersionedType[] = [
types: {
Address: 'GenericAddress',
BalanceLock: 'BalanceLockTo212',
CompactAssignments: 'CompactAssignmentsTo257',
DispatchInfo: 'DispatchInfoTo244',
Keys: 'SessionKeys5',
LookupSource: 'Address',
@@ -56,6 +58,7 @@ const versioned: OverrideVersionedType[] = [
types: {
Address: 'GenericAddress',
BalanceLock: 'BalanceLockTo212',
CompactAssignments: 'CompactAssignmentsTo257',
DispatchInfo: 'DispatchInfoTo244',
Keys: 'SessionKeys5',
LookupSource: 'Address',
@@ -72,6 +75,7 @@ const versioned: OverrideVersionedType[] = [
types: {
// Indices optional, not in transaction
...sharedTypes,
CompactAssignments: 'CompactAssignmentsTo257',
DispatchInfo: 'DispatchInfoTo244',
Multiplier: 'Fixed64',
OpenTip: 'OpenTipTo225',
@@ -84,6 +88,7 @@ const versioned: OverrideVersionedType[] = [
minmax: [1055, 1056],
types: {
...sharedTypes,
CompactAssignments: 'CompactAssignmentsTo257',
DispatchInfo: 'DispatchInfoTo244',
Multiplier: 'Fixed64',
OpenTip: 'OpenTipTo225',
@@ -95,6 +100,7 @@ const versioned: OverrideVersionedType[] = [
minmax: [1057, 1061],
types: {
...sharedTypes,
CompactAssignments: 'CompactAssignmentsTo257',
DispatchInfo: 'DispatchInfoTo244',
OpenTip: 'OpenTipTo225'
}
@@ -103,13 +109,15 @@ const versioned: OverrideVersionedType[] = [
minmax: [1062, 2012],
types: {
...sharedTypes,
CompactAssignments: 'CompactAssignmentsTo257',
OpenTip: 'OpenTipTo225'
}
},
{
minmax: [2013, undefined],
types: {
...sharedTypes
...sharedTypes,
CompactAssignments: 'CompactAssignmentsTo257'
}
}
];
+3 -1
View File
@@ -19,13 +19,15 @@ const versioned: OverrideVersionedType[] = [
minmax: [0, 12],
types: {
...sharedTypes,
CompactAssignments: 'CompactAssignmentsTo257',
OpenTip: 'OpenTipTo225'
}
},
{
minmax: [13, undefined],
types: {
...sharedTypes
...sharedTypes,
CompactAssignments: 'CompactAssignmentsTo257'
}
}
];
+2 -1
View File
@@ -14,7 +14,8 @@ const versioned: OverrideVersionedType[] = [
{
minmax: [0, undefined],
types: {
...sharedTypes
...sharedTypes,
CompactAssignments: 'CompactAssignmentsTo257'
}
}
];
+4 -1
View File
@@ -18,6 +18,7 @@ const versioned: OverrideVersionedType[] = [
minmax: [1, 2],
types: {
...sharedTypes,
CompactAssignments: 'CompactAssignmentsTo257',
Multiplier: 'Fixed64',
OpenTip: 'OpenTipTo225',
Weight: 'u32'
@@ -27,13 +28,15 @@ const versioned: OverrideVersionedType[] = [
minmax: [3, 22],
types: {
...sharedTypes,
CompactAssignments: 'CompactAssignmentsTo257',
OpenTip: 'OpenTipTo225'
}
},
{
minmax: [23, undefined],
types: {
...sharedTypes
...sharedTypes,
CompactAssignments: 'CompactAssignmentsTo257'
}
}
];
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types",
"version": "1.28.1",
"version": "1.29.1",
"description": "Implementation of the Parity codec",
"main": "index.js",
"keywords": [
@@ -27,16 +27,16 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@polkadot/metadata": "1.28.1",
"@polkadot/util": "^3.1.1",
"@polkadot/util-crypto": "^3.1.1",
"@polkadot/metadata": "1.29.1",
"@polkadot/util": "^3.2.1",
"@polkadot/util-crypto": "^3.2.1",
"@types/bn.js": "^4.11.6",
"bn.js": "^5.1.2",
"memoizee": "^0.4.14",
"rxjs": "^6.6.2"
},
"devDependencies": {
"@polkadot/keyring": "^3.1.1",
"@polkadot/keyring": "^3.2.1",
"@types/memoizee": "^0.4.4"
}
}
+61 -28
View File
@@ -34,11 +34,11 @@ import { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/types/i
import { AccountStatus, AccountValidity } from '@polkadot/types/interfaces/purchase';
import { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
import { RpcMethods } from '@polkadot/types/interfaces/rpc';
import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, CallHash, CallHashOf, ChangesTrieConfiguration, Consensus, ConsensusEngineId, Digest, DigestItem, ExtrinsicsWeight, Fixed128, Fixed64, H160, H256, H512, Hash, Header, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, OpaqueCall, Origin, Pays, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Releases, RuntimeDbWeight, Seal, SealV0, SignedBlock, StorageData, ValidatorId, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, CallHash, CallHashOf, ChangesTrieConfiguration, Consensus, ConsensusEngineId, Digest, DigestItem, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H160, H256, H512, Hash, Header, I32F32, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, OpaqueCall, Origin, Pays, PerU16, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Releases, RuntimeDbWeight, Seal, SealV0, SignedBlock, StorageData, U32F32, ValidatorId, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
import { Period, Priority, SchedulePeriod, SchedulePriority, Scheduled, TaskAddress } from '@polkadot/types/interfaces/scheduler';
import { FullIdentification, IdentificationTuple, Keys, MembershipProof, SessionIndex, SessionKeys1, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6, ValidatorCount } from '@polkadot/types/interfaces/session';
import { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
import { ActiveEraInfo, CompactAssignments, CompactScore, ElectionCompute, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, OffchainAccuracy, PerU16, PhragmenScore, Points, RewardDestination, RewardPoint, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196 } from '@polkadot/types/interfaces/staking';
import { ActiveEraInfo, CompactAssignments, CompactAssignmentsTo257, CompactScore, CompactScoreCompact, ElectionCompute, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, NominatorIndexCompact, OffchainAccuracy, OffchainAccuracyCompact, PhragmenScore, Points, RewardDestination, RewardPoint, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorIndexCompact, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196 } from '@polkadot/types/interfaces/staking';
import { ApiId, KeyValueOption, ReadProof, RuntimeVersion, RuntimeVersionApi, StorageChangeSet } from '@polkadot/types/interfaces/state';
import { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
import { AccountInfo, ApplyExtrinsicResult, ChainProperties, ChainType, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, EventRecordTo76, Health, InvalidTransaction, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, Phase, RefCount, TransactionValidityError, UnknownTransaction } from '@polkadot/types/interfaces/system';
@@ -129,6 +129,50 @@ declare module '@polkadot/types/types/registry' {
Raw: Raw;
'Option<Raw>': Option<Raw>;
'Vec<Raw>': Vec<Raw>;
Fixed64: Fixed64;
'Option<Fixed64>': Option<Fixed64>;
'Vec<Fixed64>': Vec<Fixed64>;
FixedI64: FixedI64;
'Option<FixedI64>': Option<FixedI64>;
'Vec<FixedI64>': Vec<FixedI64>;
FixedU64: FixedU64;
'Option<FixedU64>': Option<FixedU64>;
'Vec<FixedU64>': Vec<FixedU64>;
Fixed128: Fixed128;
'Option<Fixed128>': Option<Fixed128>;
'Vec<Fixed128>': Vec<Fixed128>;
FixedI128: FixedI128;
'Option<FixedI128>': Option<FixedI128>;
'Vec<FixedI128>': Vec<FixedI128>;
FixedU128: FixedU128;
'Option<FixedU128>': Option<FixedU128>;
'Vec<FixedU128>': Vec<FixedU128>;
I32F32: I32F32;
'Option<I32F32>': Option<I32F32>;
'Vec<I32F32>': Vec<I32F32>;
U32F32: U32F32;
'Option<U32F32>': Option<U32F32>;
'Vec<U32F32>': Vec<U32F32>;
PerU16: PerU16;
'Compact<PerU16>': Compact<PerU16>;
'Option<PerU16>': Option<PerU16>;
'Vec<PerU16>': Vec<PerU16>;
Perbill: Perbill;
'Compact<Perbill>': Compact<Perbill>;
'Option<Perbill>': Option<Perbill>;
'Vec<Perbill>': Vec<Perbill>;
Percent: Percent;
'Compact<Percent>': Compact<Percent>;
'Option<Percent>': Option<Percent>;
'Vec<Percent>': Vec<Percent>;
Permill: Permill;
'Compact<Permill>': Compact<Permill>;
'Option<Permill>': Option<Permill>;
'Vec<Permill>': Vec<Permill>;
Perquintill: Perquintill;
'Compact<Perquintill>': Compact<Perquintill>;
'Option<Perquintill>': Option<Perquintill>;
'Vec<Perquintill>': Vec<Perquintill>;
AccountId: AccountId;
'Option<AccountId>': Option<AccountId>;
'Vec<AccountId>': Vec<AccountId>;
@@ -183,12 +227,6 @@ declare module '@polkadot/types/types/registry' {
ExtrinsicsWeight: ExtrinsicsWeight;
'Option<ExtrinsicsWeight>': Option<ExtrinsicsWeight>;
'Vec<ExtrinsicsWeight>': Vec<ExtrinsicsWeight>;
Fixed64: Fixed64;
'Option<Fixed64>': Option<Fixed64>;
'Vec<Fixed64>': Vec<Fixed64>;
Fixed128: Fixed128;
'Option<Fixed128>': Option<Fixed128>;
'Vec<Fixed128>': Vec<Fixed128>;
H160: H160;
'Option<H160>': Option<H160>;
'Vec<H160>': Vec<H160>;
@@ -243,22 +281,6 @@ declare module '@polkadot/types/types/registry' {
Pays: Pays;
'Option<Pays>': Option<Pays>;
'Vec<Pays>': Vec<Pays>;
Perbill: Perbill;
'Compact<Perbill>': Compact<Perbill>;
'Option<Perbill>': Option<Perbill>;
'Vec<Perbill>': Vec<Perbill>;
Percent: Percent;
'Compact<Percent>': Compact<Percent>;
'Option<Percent>': Option<Percent>;
'Vec<Percent>': Vec<Percent>;
Permill: Permill;
'Compact<Permill>': Compact<Permill>;
'Option<Permill>': Option<Permill>;
'Vec<Permill>': Vec<Permill>;
Perquintill: Perquintill;
'Compact<Perquintill>': Compact<Perquintill>;
'Option<Perquintill>': Option<Perquintill>;
'Vec<Perquintill>': Vec<Perquintill>;
Phantom: Phantom;
'Option<Phantom>': Option<Phantom>;
'Vec<Phantom>': Vec<Phantom>;
@@ -897,9 +919,15 @@ declare module '@polkadot/types/types/registry' {
CompactAssignments: CompactAssignments;
'Option<CompactAssignments>': Option<CompactAssignments>;
'Vec<CompactAssignments>': Vec<CompactAssignments>;
CompactAssignmentsTo257: CompactAssignmentsTo257;
'Option<CompactAssignmentsTo257>': Option<CompactAssignmentsTo257>;
'Vec<CompactAssignmentsTo257>': Vec<CompactAssignmentsTo257>;
CompactScore: CompactScore;
'Option<CompactScore>': Option<CompactScore>;
'Vec<CompactScore>': Vec<CompactScore>;
CompactScoreCompact: CompactScoreCompact;
'Option<CompactScoreCompact>': Option<CompactScoreCompact>;
'Vec<CompactScoreCompact>': Vec<CompactScoreCompact>;
ElectionCompute: ElectionCompute;
'Option<ElectionCompute>': Option<ElectionCompute>;
'Vec<ElectionCompute>': Vec<ElectionCompute>;
@@ -947,13 +975,15 @@ declare module '@polkadot/types/types/registry' {
'Compact<NominatorIndex>': Compact<NominatorIndex>;
'Option<NominatorIndex>': Option<NominatorIndex>;
'Vec<NominatorIndex>': Vec<NominatorIndex>;
NominatorIndexCompact: NominatorIndexCompact;
'Option<NominatorIndexCompact>': Option<NominatorIndexCompact>;
'Vec<NominatorIndexCompact>': Vec<NominatorIndexCompact>;
OffchainAccuracy: OffchainAccuracy;
'Option<OffchainAccuracy>': Option<OffchainAccuracy>;
'Vec<OffchainAccuracy>': Vec<OffchainAccuracy>;
PerU16: PerU16;
'Compact<PerU16>': Compact<PerU16>;
'Option<PerU16>': Option<PerU16>;
'Vec<PerU16>': Vec<PerU16>;
OffchainAccuracyCompact: OffchainAccuracyCompact;
'Option<OffchainAccuracyCompact>': Option<OffchainAccuracyCompact>;
'Vec<OffchainAccuracyCompact>': Vec<OffchainAccuracyCompact>;
PhragmenScore: PhragmenScore;
'Option<PhragmenScore>': Option<PhragmenScore>;
'Vec<PhragmenScore>': Vec<PhragmenScore>;
@@ -1002,6 +1032,9 @@ declare module '@polkadot/types/types/registry' {
'Compact<ValidatorIndex>': Compact<ValidatorIndex>;
'Option<ValidatorIndex>': Option<ValidatorIndex>;
'Vec<ValidatorIndex>': Vec<ValidatorIndex>;
ValidatorIndexCompact: ValidatorIndexCompact;
'Option<ValidatorIndexCompact>': Option<ValidatorIndexCompact>;
'Vec<ValidatorIndexCompact>': Vec<ValidatorIndexCompact>;
ValidatorPrefs: ValidatorPrefs;
'Option<ValidatorPrefs>': Option<ValidatorPrefs>;
'Vec<ValidatorPrefs>': Vec<ValidatorPrefs>;
@@ -7,9 +7,26 @@
import { Definitions } from '../../types';
const numberTypes = {
Fixed64: 'Int<64, Fixed64>',
FixedI64: 'Int<64, FixedI64>',
FixedU64: 'UInt<64, FixedU64>',
Fixed128: 'Int<128, Fixed128>',
FixedI128: 'Int<128, FixedI128>',
FixedU128: 'UInt<128, FixedU128>',
I32F32: 'Int<64, I32F32>',
U32F32: 'UInt<64, U32F32>',
PerU16: 'u16',
Perbill: 'u32',
Percent: 'u8',
Permill: 'u32',
Perquintill: 'u64'
};
export default {
rpc: {},
types: {
...numberTypes,
AccountId: 'GenericAccountId',
AccountIdOf: 'AccountId',
AccountIndex: 'GenericAccountIndex',
@@ -45,8 +62,6 @@ export default {
normal: 'Weight',
operational: 'Weight'
},
Fixed64: 'Int<64, Fixed64>',
Fixed128: 'Int<128, Fixed128>',
H160: '[u8; 20; H160]',
H256: '[u8; 32; H256]',
H512: '[u8; 64; H512]',
@@ -72,10 +87,6 @@ export default {
Pays: {
_enum: ['Yes', 'No']
},
Perbill: 'u32',
Percent: 'u8',
Permill: 'u32',
Perquintill: 'u64',
Phantom: 'Null',
PhantomData: 'Null',
Releases: {
+23 -2
View File
@@ -2,9 +2,9 @@
/* eslint-disable */
import { ITuple } from '@polkadot/types/types';
import { Compact, Enum, Int, Struct, U8aFixed, Vec } from '@polkadot/types/codec';
import { Compact, Enum, Int, Struct, U8aFixed, UInt, Vec } from '@polkadot/types/codec';
import { GenericAccountId, GenericAccountIndex, GenericAddress, GenericBlock, GenericCall, GenericConsensusEngineId } from '@polkadot/types/generic';
import { Bytes, DoNotConstruct, Null, StorageKey, u128, u32, u64, u8 } from '@polkadot/types/primitive';
import { Bytes, DoNotConstruct, Null, StorageKey, u128, u16, u32, u64, u8 } from '@polkadot/types/primitive';
import { AuthorityId } from '@polkadot/types/interfaces/consensus';
import { Signature } from '@polkadot/types/interfaces/extrinsics';
@@ -91,6 +91,18 @@ export interface Fixed128 extends Int {}
/** @name Fixed64 */
export interface Fixed64 extends Int {}
/** @name FixedI128 */
export interface FixedI128 extends Int {}
/** @name FixedI64 */
export interface FixedI64 extends Int {}
/** @name FixedU128 */
export interface FixedU128 extends UInt {}
/** @name FixedU64 */
export interface FixedU64 extends UInt {}
/** @name H160 */
export interface H160 extends U8aFixed {}
@@ -112,6 +124,9 @@ export interface Header extends Struct {
readonly digest: Digest;
}
/** @name I32F32 */
export interface I32F32 extends Int {}
/** @name Index */
export interface Index extends u32 {}
@@ -163,6 +178,9 @@ export interface Permill extends u32 {}
/** @name Perquintill */
export interface Perquintill extends u64 {}
/** @name PerU16 */
export interface PerU16 extends u16 {}
/** @name Phantom */
export interface Phantom extends Null {}
@@ -207,6 +225,9 @@ export interface SignedBlock extends Struct {
/** @name StorageData */
export interface StorageData extends Bytes {}
/** @name U32F32 */
export interface U32F32 extends UInt {}
/** @name ValidatorId */
export interface ValidatorId extends AccountId {}
File diff suppressed because one or more lines are too long
@@ -24,6 +24,24 @@ export default {
start: 'Option<Moment>'
},
CompactAssignments: {
votes1: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 0], ValidatorIndexCompact)>',
votes2: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 1], ValidatorIndexCompact)>',
votes3: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 2], ValidatorIndexCompact)>',
votes4: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 3], ValidatorIndexCompact)>',
votes5: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 4], ValidatorIndexCompact)>',
votes6: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 5], ValidatorIndexCompact)>',
votes7: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 6], ValidatorIndexCompact)>',
votes8: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 7], ValidatorIndexCompact)>',
votes9: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 8], ValidatorIndexCompact)>',
votes10: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 9], ValidatorIndexCompact)>',
votes11: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 10], ValidatorIndexCompact)>',
votes12: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 11], ValidatorIndexCompact)>',
votes13: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 12], ValidatorIndexCompact)>',
votes14: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 13], ValidatorIndexCompact)>',
votes15: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 14], ValidatorIndexCompact)>',
votes16: 'Vec<(NominatorIndexCompact, [CompactScoreCompact; 15], ValidatorIndexCompact)>'
},
CompactAssignmentsTo257: {
votes1: 'Vec<(NominatorIndex, [CompactScore; 0], ValidatorIndex)>',
votes2: 'Vec<(NominatorIndex, [CompactScore; 1], ValidatorIndex)>',
votes3: 'Vec<(NominatorIndex, [CompactScore; 2], ValidatorIndex)>',
@@ -42,6 +60,7 @@ export default {
votes16: 'Vec<(NominatorIndex, [CompactScore; 15], ValidatorIndex)>'
},
CompactScore: '(ValidatorIndex, OffchainAccuracy)',
CompactScoreCompact: '(ValidatorIndexCompact, OffchainAccuracyCompact)',
ElectionCompute: {
_enum: ['OnChain', 'Signed', 'Authority']
},
@@ -96,8 +115,9 @@ export default {
suppressed: 'bool'
},
NominatorIndex: 'u32',
NominatorIndexCompact: 'Compact<NominatorIndex>',
OffchainAccuracy: 'PerU16',
PerU16: 'u16',
OffchainAccuracyCompact: 'Compact<OffchainAccuracy>',
PhragmenScore: '[u128; 3]',
Points: 'u32',
RewardDestination: {
@@ -162,6 +182,7 @@ export default {
era: 'Compact<BlockNumber>'
},
ValidatorIndex: 'u16',
ValidatorIndexCompact: 'Compact<ValidatorIndex>',
ValidatorPrefs: {
commission: 'Compact<Perbill>'
},
+32 -3
View File
@@ -4,7 +4,7 @@
import { ITuple } from '@polkadot/types/types';
import { BTreeMap, Compact, Enum, Option, Struct, Vec } from '@polkadot/types/codec';
import { bool, u128, u16, u32 } from '@polkadot/types/primitive';
import { AccountId, Balance, BlockNumber, Moment, Perbill } from '@polkadot/types/interfaces/runtime';
import { AccountId, Balance, BlockNumber, Moment, PerU16, Perbill } from '@polkadot/types/interfaces/runtime';
/** @name ActiveEraInfo */
export interface ActiveEraInfo extends Struct {
@@ -14,6 +14,26 @@ export interface ActiveEraInfo extends Struct {
/** @name CompactAssignments */
export interface CompactAssignments extends Struct {
readonly votes1: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
readonly votes2: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
readonly votes3: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
readonly votes4: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
readonly votes5: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
readonly votes6: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
readonly votes7: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
readonly votes8: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
readonly votes9: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
readonly votes10: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
readonly votes11: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
readonly votes12: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
readonly votes13: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
readonly votes14: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
readonly votes15: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
readonly votes16: Vec<ITuple<[NominatorIndexCompact, Vec<CompactScoreCompact>, ValidatorIndexCompact]>>;
}
/** @name CompactAssignmentsTo257 */
export interface CompactAssignmentsTo257 extends Struct {
readonly votes1: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
readonly votes2: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
readonly votes3: Vec<ITuple<[NominatorIndex, Vec<CompactScore>, ValidatorIndex]>>;
@@ -35,6 +55,9 @@ export interface CompactAssignments extends Struct {
/** @name CompactScore */
export interface CompactScore extends ITuple<[ValidatorIndex, OffchainAccuracy]> {}
/** @name CompactScoreCompact */
export interface CompactScoreCompact extends ITuple<[ValidatorIndexCompact, OffchainAccuracyCompact]> {}
/** @name ElectionCompute */
export interface ElectionCompute extends Enum {
readonly isOnChain: boolean;
@@ -124,11 +147,14 @@ export interface Nominations extends Struct {
/** @name NominatorIndex */
export interface NominatorIndex extends u32 {}
/** @name NominatorIndexCompact */
export interface NominatorIndexCompact extends Compact<NominatorIndex> {}
/** @name OffchainAccuracy */
export interface OffchainAccuracy extends PerU16 {}
/** @name PerU16 */
export interface PerU16 extends u16 {}
/** @name OffchainAccuracyCompact */
export interface OffchainAccuracyCompact extends Compact<OffchainAccuracy> {}
/** @name PhragmenScore */
export interface PhragmenScore extends Vec<u128> {}
@@ -224,6 +250,9 @@ export interface UnlockChunk extends Struct {
/** @name ValidatorIndex */
export interface ValidatorIndex extends u16 {}
/** @name ValidatorIndexCompact */
export interface ValidatorIndexCompact extends Compact<ValidatorIndex> {}
/** @name ValidatorPrefs */
export interface ValidatorPrefs extends Struct {
readonly commission: Compact<Perbill>;
+562 -562
View File
File diff suppressed because it is too large Load Diff