diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cf73d163e..79ffe174af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # 1.2.0-beta.x +- Add `LookupSource` and `LookupTarget` types instead of mapping these directly for aliassing - Add support for `system.account` for balance & nonce queries in derives (Substrate composites) # 1.1.1 diff --git a/packages/api/src/types/augment/tx.ts b/packages/api/src/types/augment/tx.ts index 5e75dff75b..07247da47c 100644 --- a/packages/api/src/types/augment/tx.ts +++ b/packages/api/src/types/augment/tx.ts @@ -4,7 +4,7 @@ import { AnyNumber, ITuple } from '@polkadot/types/types'; import { Compact, Option, Raw, Vec } from '@polkadot/types/codec'; import { Bytes, Data, IdentityFields, bool, u16, u32, u64 } from '@polkadot/types/primitive'; -import { AccountId, AccountIndex, Address, Balance, BalanceOf, BlockNumber, Call, ChangesTrieConfiguration, Hash, Header, KeyValue, Moment, Signature } from '@polkadot/types/interfaces/runtime'; +import { AccountId, AccountIndex, Balance, BalanceOf, BlockNumber, Call, ChangesTrieConfiguration, Hash, Header, KeyValue, LookupSource, Moment, Signature } from '@polkadot/types/interfaces/runtime'; import { MemberCount, ProposalIndex } from '@polkadot/types/interfaces/collective'; import { CodeHash, Gas, Schedule } from '@polkadot/types/interfaces/contracts'; import { Conviction, PropIndex, Proposal, ReferendumIndex } from '@polkadot/types/interfaces/democracy'; @@ -216,7 +216,7 @@ declare module '@polkadot/api/types/submittable' { * check that the transfer will not kill the origin account. * # **/ - transfer: AugmentedSubmittable<(dest: Address | string | AccountId | AccountIndex | Uint8Array, value: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + transfer: AugmentedSubmittable<(dest: LookupSource | string | AccountId | AccountIndex | Uint8Array, value: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic>; /** * Set the balances of a given account. * This will alter `FreeBalance` and `ReservedBalance` in storage. it will @@ -229,19 +229,19 @@ declare module '@polkadot/api/types/submittable' { * - Contains a limited number of reads and writes. * # **/ - setBalance: AugmentedSubmittable<(who: Address | string | AccountId | AccountIndex | Uint8Array, newFree: Compact | AnyNumber | Uint8Array, newReserved: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + setBalance: AugmentedSubmittable<(who: LookupSource | string | AccountId | AccountIndex | Uint8Array, newFree: Compact | AnyNumber | Uint8Array, newReserved: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic>; /** * Exactly as `transfer`, except the origin must be root and the source account may be * specified. **/ - forceTransfer: AugmentedSubmittable<(source: Address | string | AccountId | AccountIndex | Uint8Array, dest: Address | string | AccountId | AccountIndex | Uint8Array, value: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + forceTransfer: AugmentedSubmittable<(source: LookupSource | string | AccountId | AccountIndex | Uint8Array, dest: LookupSource | string | AccountId | AccountIndex | Uint8Array, value: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic>; /** * Same as the [`transfer`] call, but with a check that the transfer will not kill the * origin account. * 99% of the time you want [`transfer`] instead. * [`transfer`]: struct.Module.html#method.transfer **/ - transferKeepAlive: AugmentedSubmittable<(dest: Address | string | AccountId | AccountIndex | Uint8Array, value: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic>; + transferKeepAlive: AugmentedSubmittable<(dest: LookupSource | string | AccountId | AccountIndex | Uint8Array, value: Compact | AnyNumber | Uint8Array) => SubmittableExtrinsic>; }; staking: { [index: string]: SubmittableExtrinsicFunction; @@ -258,7 +258,7 @@ declare module '@polkadot/api/types/submittable' { * the `origin` falls below _existential deposit_ and gets removed as dust. * # **/ - bond: AugmentedSubmittable<(controller: Address | string | AccountId | AccountIndex | Uint8Array, value: Compact | AnyNumber | Uint8Array, payee: RewardDestination | ('Staked' | 'Stash' | 'Controller') | number | Uint8Array) => SubmittableExtrinsic>; + bond: AugmentedSubmittable<(controller: LookupSource | string | AccountId | AccountIndex | Uint8Array, value: Compact | AnyNumber | Uint8Array, payee: RewardDestination | ('Staked' | 'Stash' | 'Controller') | number | Uint8Array) => SubmittableExtrinsic>; /** * Add some extra amount that have appeared in the stash `free_balance` into the balance up * for staking. @@ -330,7 +330,7 @@ declare module '@polkadot/api/types/submittable' { * - Both the reads and writes follow a similar pattern. * # **/ - nominate: AugmentedSubmittable<(targets: Vec
| (Address | string | AccountId | AccountIndex | Uint8Array)[]) => SubmittableExtrinsic>; + nominate: AugmentedSubmittable<(targets: Vec | (LookupSource | string | AccountId | AccountIndex | Uint8Array)[]) => SubmittableExtrinsic>; /** * Declare no desire to either validate or nominate. * Effects will be felt at the beginning of the next era. @@ -363,7 +363,7 @@ declare module '@polkadot/api/types/submittable' { * - Writes are limited to the `origin` account key. * # **/ - setController: AugmentedSubmittable<(controller: Address | string | AccountId | AccountIndex | Uint8Array) => SubmittableExtrinsic>; + setController: AugmentedSubmittable<(controller: LookupSource | string | AccountId | AccountIndex | Uint8Array) => SubmittableExtrinsic>; /** * The ideal number of validators. **/ @@ -666,7 +666,7 @@ declare module '@polkadot/api/types/submittable' { * Writes: O(1) * # **/ - reportDefunctVoter: AugmentedSubmittable<(target: Address | string | AccountId | AccountIndex | Uint8Array) => SubmittableExtrinsic>; + reportDefunctVoter: AugmentedSubmittable<(target: LookupSource | string | AccountId | AccountIndex | Uint8Array) => SubmittableExtrinsic>; /** * Submit oneself for candidacy. * A candidate will either: @@ -705,7 +705,7 @@ declare module '@polkadot/api/types/submittable' { * Writes: O(do_phragmen) * # **/ - removeMember: AugmentedSubmittable<(who: Address | string | AccountId | AccountIndex | Uint8Array) => SubmittableExtrinsic>; + removeMember: AugmentedSubmittable<(who: LookupSource | string | AccountId | AccountIndex | Uint8Array) => SubmittableExtrinsic>; }; technicalMembership: { [index: string]: SubmittableExtrinsicFunction; @@ -763,7 +763,7 @@ declare module '@polkadot/api/types/submittable' { * - One DB change, one extra DB entry. * # **/ - proposeSpend: AugmentedSubmittable<(value: Compact | AnyNumber | Uint8Array, beneficiary: Address | string | AccountId | AccountIndex | Uint8Array) => SubmittableExtrinsic>; + proposeSpend: AugmentedSubmittable<(value: Compact | AnyNumber | Uint8Array, beneficiary: LookupSource | string | AccountId | AccountIndex | Uint8Array) => SubmittableExtrinsic>; /** * Reject a proposed spend. The original deposit will be slashed. * # @@ -887,7 +887,7 @@ declare module '@polkadot/api/types/submittable' { * * If no account exists and the call value is not less than `existential_deposit`, * a regular account will be created and any value will be transferred. **/ - call: AugmentedSubmittable<(dest: Address | string | AccountId | AccountIndex | Uint8Array, value: Compact | AnyNumber | Uint8Array, gasLimit: Compact | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array) => SubmittableExtrinsic>; + call: AugmentedSubmittable<(dest: LookupSource | string | AccountId | AccountIndex | Uint8Array, value: Compact | AnyNumber | Uint8Array, gasLimit: Compact | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array) => SubmittableExtrinsic>; /** * Instantiates a new contract from the `codehash` generated by `put_code`, optionally transferring some balance. * Instantiation is executed as follows: @@ -929,7 +929,7 @@ declare module '@polkadot/api/types/submittable' { * - One DB change. * # **/ - setKey: AugmentedSubmittable<(updated: Address | string | AccountId | AccountIndex | Uint8Array) => SubmittableExtrinsic>; + setKey: AugmentedSubmittable<(updated: LookupSource | string | AccountId | AccountIndex | Uint8Array) => SubmittableExtrinsic>; /** * Authenticates the sudo key and dispatches a function call with `Signed` origin from * a given account. @@ -941,7 +941,7 @@ declare module '@polkadot/api/types/submittable' { * - Unknown weight of derivative `proposal` execution. * # **/ - sudoAs: AugmentedSubmittable<(who: Address | string | AccountId | AccountIndex | Uint8Array, proposal: Proposal | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic>; + sudoAs: AugmentedSubmittable<(who: LookupSource | string | AccountId | AccountIndex | Uint8Array, proposal: Proposal | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic>; }; imOnline: { [index: string]: SubmittableExtrinsicFunction; @@ -1094,7 +1094,7 @@ declare module '@polkadot/api/types/submittable' { * - One event. * # **/ - provideJudgement: AugmentedSubmittable<(regIndex: Compact | AnyNumber | Uint8Array, target: Address | string | AccountId | AccountIndex | Uint8Array, judgement: IdentityJudgement | { unknown: any } | { feePaid: any } | { reasonable: any } | { knownGood: any } | { outOfDate: any } | { lowQuality: any } | { erroneous: any } | string | Uint8Array) => SubmittableExtrinsic>; + provideJudgement: AugmentedSubmittable<(regIndex: Compact | AnyNumber | Uint8Array, target: LookupSource | string | AccountId | AccountIndex | Uint8Array, judgement: IdentityJudgement | { unknown: any } | { feePaid: any } | { reasonable: any } | { knownGood: any } | { outOfDate: any } | { lowQuality: any } | { erroneous: any } | string | Uint8Array) => SubmittableExtrinsic>; /** * Remove an account's identity and sub-account information and slash the deposits. * Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by @@ -1111,7 +1111,7 @@ declare module '@polkadot/api/types/submittable' { * - One event. * # **/ - killIdentity: AugmentedSubmittable<(target: Address | string | AccountId | AccountIndex | Uint8Array) => SubmittableExtrinsic>; + killIdentity: AugmentedSubmittable<(target: LookupSource | string | AccountId | AccountIndex | Uint8Array) => SubmittableExtrinsic>; }; society: { [index: string]: SubmittableExtrinsicFunction; @@ -1237,7 +1237,7 @@ declare module '@polkadot/api/types/submittable' { * Total Complexity: O(M + logM + C) * # **/ - vote: AugmentedSubmittable<(candidate: Address | string | AccountId | AccountIndex | Uint8Array, approve: bool | boolean | Uint8Array) => SubmittableExtrinsic>; + vote: AugmentedSubmittable<(candidate: LookupSource | string | AccountId | AccountIndex | Uint8Array, approve: bool | boolean | Uint8Array) => SubmittableExtrinsic>; /** * As a member, vote on the defender. * The dispatch origin for this call must be _Signed_ and a member. @@ -1557,7 +1557,7 @@ declare module '@polkadot/api/types/submittable' { * - One event. * # **/ - vestOther: AugmentedSubmittable<(target: Address | string | AccountId | AccountIndex | Uint8Array) => SubmittableExtrinsic>; + vestOther: AugmentedSubmittable<(target: LookupSource | string | AccountId | AccountIndex | Uint8Array) => SubmittableExtrinsic>; }; } } diff --git a/packages/metadata/src/Metadata/v0/static-substrate.json b/packages/metadata/src/Metadata/v0/static-substrate.json index 6768c5fe17..3fc4e5a2c4 100644 --- a/packages/metadata/src/Metadata/v0/static-substrate.json +++ b/packages/metadata/src/Metadata/v0/static-substrate.json @@ -776,7 +776,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -793,7 +793,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "free", @@ -1118,7 +1118,7 @@ "args": [ { "name": "target", - "type": "Address" + "type": "LookupSource" } ], "documentation": [] @@ -1840,7 +1840,7 @@ }, { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "who_index", @@ -1893,7 +1893,7 @@ "args": [ { "name": "candidate", - "type": "Address" + "type": "LookupSource" }, { "name": "total", @@ -1931,7 +1931,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -2526,7 +2526,7 @@ }, { "name": "beneficiary", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -2714,7 +2714,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -2796,7 +2796,7 @@ "args": [ { "name": "new", - "type": "Address" + "type": "LookupSource" } ], "documentation": [] diff --git a/packages/metadata/src/Metadata/v1/static-substrate.json b/packages/metadata/src/Metadata/v1/static-substrate.json index 4ba69b98ee..d0c9385cce 100644 --- a/packages/metadata/src/Metadata/v1/static-substrate.json +++ b/packages/metadata/src/Metadata/v1/static-substrate.json @@ -473,7 +473,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -489,7 +489,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "free", @@ -1002,7 +1002,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1091,7 +1091,7 @@ "args": [ { "name": "targets", - "type": "Vec
" + "type": "Vec" } ], "documentation": [ @@ -1829,7 +1829,7 @@ }, { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "who_index", @@ -1879,7 +1879,7 @@ "args": [ { "name": "candidate", - "type": "Address" + "type": "LookupSource" }, { "name": "total", @@ -1915,7 +1915,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -2491,7 +2491,7 @@ }, { "name": "beneficiary", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -2783,7 +2783,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -2918,7 +2918,7 @@ "args": [ { "name": "new", - "type": "Address" + "type": "LookupSource" } ], "documentation": [] diff --git a/packages/metadata/src/Metadata/v10/static-polkadot.json b/packages/metadata/src/Metadata/v10/static-polkadot.json index be5aec9453..9063d8b40a 100644 --- a/packages/metadata/src/Metadata/v10/static-polkadot.json +++ b/packages/metadata/src/Metadata/v10/static-polkadot.json @@ -695,7 +695,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -735,7 +735,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "new_free", @@ -767,11 +767,11 @@ "args": [ { "name": "source", - "type": "Address" + "type": "LookupSource" }, { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -788,7 +788,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1447,7 +1447,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1601,7 +1601,7 @@ "args": [ { "name": "targets", - "type": "Vec
" + "type": "Vec" } ], "documentation": [ @@ -1662,7 +1662,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4050,7 +4050,7 @@ "args": [ { "name": "target", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4108,7 +4108,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4692,7 +4692,7 @@ }, { "name": "beneficiary", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -5582,7 +5582,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -6654,7 +6654,7 @@ }, { "name": "target", - "type": "Address" + "type": "LookupSource" }, { "name": "judgement", @@ -6688,7 +6688,7 @@ "args": [ { "name": "target", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ diff --git a/packages/metadata/src/Metadata/v10/static-substrate.json b/packages/metadata/src/Metadata/v10/static-substrate.json index 02207a8cb8..084b138a98 100644 --- a/packages/metadata/src/Metadata/v10/static-substrate.json +++ b/packages/metadata/src/Metadata/v10/static-substrate.json @@ -1144,7 +1144,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1184,7 +1184,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "new_free", @@ -1216,11 +1216,11 @@ "args": [ { "name": "source", - "type": "Address" + "type": "LookupSource" }, { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1237,7 +1237,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1795,7 +1795,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1932,7 +1932,7 @@ "args": [ { "name": "targets", - "type": "Vec
" + "type": "Vec" } ], "documentation": [ @@ -1993,7 +1993,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3974,7 +3974,7 @@ "args": [ { "name": "target", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4032,7 +4032,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4669,7 +4669,7 @@ }, { "name": "beneficiary", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -5243,7 +5243,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -5614,7 +5614,7 @@ "args": [ { "name": "new", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -5634,7 +5634,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "proposal", @@ -6260,7 +6260,7 @@ }, { "name": "target", - "type": "Address" + "type": "LookupSource" }, { "name": "judgement", @@ -6294,7 +6294,7 @@ "args": [ { "name": "target", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -6851,7 +6851,7 @@ "args": [ { "name": "candidate", - "type": "Address" + "type": "LookupSource" }, { "name": "approve", diff --git a/packages/metadata/src/Metadata/v11/static-polkadot.json b/packages/metadata/src/Metadata/v11/static-polkadot.json index 4829ffae76..36c8b0f56b 100644 --- a/packages/metadata/src/Metadata/v11/static-polkadot.json +++ b/packages/metadata/src/Metadata/v11/static-polkadot.json @@ -763,7 +763,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -803,7 +803,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "new_free", @@ -835,11 +835,11 @@ "args": [ { "name": "source", - "type": "Address" + "type": "LookupSource" }, { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -856,7 +856,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1515,7 +1515,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1652,7 +1652,7 @@ "args": [ { "name": "targets", - "type": "Vec
" + "type": "Vec" } ], "documentation": [ @@ -1713,7 +1713,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -2605,7 +2605,7 @@ "args": [ { "name": "new", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -2625,7 +2625,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "proposal", @@ -4249,7 +4249,7 @@ "args": [ { "name": "target", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4307,7 +4307,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4730,7 +4730,7 @@ }, { "name": "beneficiary", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -5904,7 +5904,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ diff --git a/packages/metadata/src/Metadata/v11/static-substrate.json b/packages/metadata/src/Metadata/v11/static-substrate.json index 9af83f7b16..ac59121108 100644 --- a/packages/metadata/src/Metadata/v11/static-substrate.json +++ b/packages/metadata/src/Metadata/v11/static-substrate.json @@ -1189,7 +1189,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1228,7 +1228,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "new_free", @@ -1260,11 +1260,11 @@ "args": [ { "name": "source", - "type": "Address" + "type": "LookupSource" }, { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1281,7 +1281,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1831,7 +1831,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1968,7 +1968,7 @@ "args": [ { "name": "targets", - "type": "Vec
" + "type": "Vec" } ], "documentation": [ @@ -2029,7 +2029,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4058,7 +4058,7 @@ "args": [ { "name": "target", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4116,7 +4116,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4753,7 +4753,7 @@ }, { "name": "beneficiary", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -5327,7 +5327,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -5726,7 +5726,7 @@ "args": [ { "name": "new", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -5746,7 +5746,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "proposal", @@ -6377,7 +6377,7 @@ }, { "name": "target", - "type": "Address" + "type": "LookupSource" }, { "name": "judgement", @@ -6411,7 +6411,7 @@ "args": [ { "name": "target", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -6974,7 +6974,7 @@ "args": [ { "name": "candidate", - "type": "Address" + "type": "LookupSource" }, { "name": "approve", @@ -8077,7 +8077,7 @@ "args": [ { "name": "target", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ diff --git a/packages/metadata/src/Metadata/v2/static-substrate.json b/packages/metadata/src/Metadata/v2/static-substrate.json index 2ee299f85e..f342451d35 100644 --- a/packages/metadata/src/Metadata/v2/static-substrate.json +++ b/packages/metadata/src/Metadata/v2/static-substrate.json @@ -503,7 +503,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -519,7 +519,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "free", @@ -1029,7 +1029,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1120,7 +1120,7 @@ "args": [ { "name": "targets", - "type": "Vec
" + "type": "Vec" } ], "documentation": [ @@ -1163,7 +1163,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -1935,7 +1935,7 @@ }, { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "who_index", @@ -1985,7 +1985,7 @@ "args": [ { "name": "candidate", - "type": "Address" + "type": "LookupSource" }, { "name": "total", @@ -2021,7 +2021,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -2604,7 +2604,7 @@ }, { "name": "beneficiary", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -2925,7 +2925,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -3060,7 +3060,7 @@ "args": [ { "name": "new", - "type": "Address" + "type": "LookupSource" } ], "documentation": [] diff --git a/packages/metadata/src/Metadata/v3/static-substrate.json b/packages/metadata/src/Metadata/v3/static-substrate.json index 2267fe9a2f..7bc08acaf9 100644 --- a/packages/metadata/src/Metadata/v3/static-substrate.json +++ b/packages/metadata/src/Metadata/v3/static-substrate.json @@ -548,7 +548,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -571,7 +571,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "free", @@ -1088,7 +1088,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1179,7 +1179,7 @@ "args": [ { "name": "targets", - "type": "Vec
" + "type": "Vec" } ], "documentation": [ @@ -1222,7 +1222,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -1994,7 +1994,7 @@ }, { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "who_index", @@ -2044,7 +2044,7 @@ "args": [ { "name": "candidate", - "type": "Address" + "type": "LookupSource" }, { "name": "total", @@ -2080,7 +2080,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -2663,7 +2663,7 @@ }, { "name": "beneficiary", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3029,7 +3029,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -3171,7 +3171,7 @@ "args": [ { "name": "new", - "type": "Address" + "type": "LookupSource" } ], "documentation": [] diff --git a/packages/metadata/src/Metadata/v4/static-substrate.json b/packages/metadata/src/Metadata/v4/static-substrate.json index 50ab30280a..71e6162c1b 100644 --- a/packages/metadata/src/Metadata/v4/static-substrate.json +++ b/packages/metadata/src/Metadata/v4/static-substrate.json @@ -597,7 +597,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -620,7 +620,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "free", @@ -1146,7 +1146,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1241,7 +1241,7 @@ "args": [ { "name": "targets", - "type": "Vec
" + "type": "Vec" } ], "documentation": [ @@ -1284,7 +1284,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -2230,7 +2230,7 @@ }, { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "who_index", @@ -2280,7 +2280,7 @@ "args": [ { "name": "candidate", - "type": "Address" + "type": "LookupSource" }, { "name": "total", @@ -2316,7 +2316,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -2748,7 +2748,7 @@ }, { "name": "beneficiary", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3179,7 +3179,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -3386,7 +3386,7 @@ "args": [ { "name": "new", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ diff --git a/packages/metadata/src/Metadata/v5/static-polkadot.json b/packages/metadata/src/Metadata/v5/static-polkadot.json index 0f3b8eaa7e..5fd34956eb 100644 --- a/packages/metadata/src/Metadata/v5/static-polkadot.json +++ b/packages/metadata/src/Metadata/v5/static-polkadot.json @@ -495,7 +495,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -533,7 +533,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "free", @@ -981,7 +981,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1118,7 +1118,7 @@ "args": [ { "name": "targets", - "type": "Vec
" + "type": "Vec" } ], "documentation": [ @@ -1179,7 +1179,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -2338,7 +2338,7 @@ }, { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "who_index", @@ -2414,7 +2414,7 @@ "args": [ { "name": "candidate", - "type": "Address" + "type": "LookupSource" }, { "name": "total", @@ -2455,7 +2455,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -2827,7 +2827,7 @@ }, { "name": "beneficiary", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3410,7 +3410,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3600,7 +3600,7 @@ "args": [ { "name": "new", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ diff --git a/packages/metadata/src/Metadata/v5/static-substrate.json b/packages/metadata/src/Metadata/v5/static-substrate.json index 39d625a930..9ee1893462 100644 --- a/packages/metadata/src/Metadata/v5/static-substrate.json +++ b/packages/metadata/src/Metadata/v5/static-substrate.json @@ -556,7 +556,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -594,7 +594,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "new_free", @@ -1042,7 +1042,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1179,7 +1179,7 @@ "args": [ { "name": "targets", - "type": "Vec
" + "type": "Vec" } ], "documentation": [ @@ -1240,7 +1240,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -2290,7 +2290,7 @@ }, { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "who_index", @@ -2366,7 +2366,7 @@ "args": [ { "name": "candidate", - "type": "Address" + "type": "LookupSource" }, { "name": "total", @@ -2407,7 +2407,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -2875,7 +2875,7 @@ }, { "name": "beneficiary", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3324,7 +3324,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -3537,7 +3537,7 @@ "args": [ { "name": "new", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ diff --git a/packages/metadata/src/Metadata/v6/static-polkadot.json b/packages/metadata/src/Metadata/v6/static-polkadot.json index 624741bf73..f617d4d155 100644 --- a/packages/metadata/src/Metadata/v6/static-polkadot.json +++ b/packages/metadata/src/Metadata/v6/static-polkadot.json @@ -548,7 +548,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -586,7 +586,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "new_free", @@ -977,7 +977,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1114,7 +1114,7 @@ "args": [ { "name": "targets", - "type": "Vec
" + "type": "Vec" } ], "documentation": [ @@ -1175,7 +1175,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -2793,7 +2793,7 @@ }, { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "who_index", @@ -2869,7 +2869,7 @@ "args": [ { "name": "candidate", - "type": "Address" + "type": "LookupSource" }, { "name": "total", @@ -2910,7 +2910,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3268,7 +3268,7 @@ }, { "name": "beneficiary", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3851,7 +3851,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4042,7 +4042,7 @@ "args": [ { "name": "new", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ diff --git a/packages/metadata/src/Metadata/v6/static-substrate.json b/packages/metadata/src/Metadata/v6/static-substrate.json index 7aff522591..23454fba1b 100644 --- a/packages/metadata/src/Metadata/v6/static-substrate.json +++ b/packages/metadata/src/Metadata/v6/static-substrate.json @@ -594,7 +594,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -632,7 +632,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "new_free", @@ -1023,7 +1023,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1160,7 +1160,7 @@ "args": [ { "name": "targets", - "type": "Vec
" + "type": "Vec" } ], "documentation": [ @@ -1221,7 +1221,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -2871,7 +2871,7 @@ }, { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "who_index", @@ -2947,7 +2947,7 @@ "args": [ { "name": "candidate", - "type": "Address" + "type": "LookupSource" }, { "name": "total", @@ -2988,7 +2988,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3352,7 +3352,7 @@ }, { "name": "beneficiary", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3624,7 +3624,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -3983,7 +3983,7 @@ "args": [ { "name": "new", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ diff --git a/packages/metadata/src/Metadata/v7/static-polkadot.json b/packages/metadata/src/Metadata/v7/static-polkadot.json index e321d22a64..3b321bf82f 100644 --- a/packages/metadata/src/Metadata/v7/static-polkadot.json +++ b/packages/metadata/src/Metadata/v7/static-polkadot.json @@ -679,7 +679,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -717,7 +717,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "new_free", @@ -749,11 +749,11 @@ "args": [ { "name": "source", - "type": "Address" + "type": "LookupSource" }, { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1165,7 +1165,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1302,7 +1302,7 @@ "args": [ { "name": "targets", - "type": "Vec
" + "type": "Vec" } ], "documentation": [ @@ -1363,7 +1363,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3344,7 +3344,7 @@ }, { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "who_index", @@ -3420,7 +3420,7 @@ "args": [ { "name": "candidate", - "type": "Address" + "type": "LookupSource" }, { "name": "total", @@ -3462,7 +3462,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3818,7 +3818,7 @@ }, { "name": "beneficiary", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4568,7 +4568,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4762,7 +4762,7 @@ "args": [ { "name": "new", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4782,7 +4782,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "proposal", diff --git a/packages/metadata/src/Metadata/v7/static-substrate.json b/packages/metadata/src/Metadata/v7/static-substrate.json index 7ca55490f3..5fc901fb68 100644 --- a/packages/metadata/src/Metadata/v7/static-substrate.json +++ b/packages/metadata/src/Metadata/v7/static-substrate.json @@ -776,7 +776,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -814,7 +814,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "new_free", @@ -846,11 +846,11 @@ "args": [ { "name": "source", - "type": "Address" + "type": "LookupSource" }, { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1205,7 +1205,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1342,7 +1342,7 @@ "args": [ { "name": "targets", - "type": "Vec
" + "type": "Vec" } ], "documentation": [ @@ -1403,7 +1403,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3055,7 +3055,7 @@ }, { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "who_index", @@ -3131,7 +3131,7 @@ "args": [ { "name": "candidate", - "type": "Address" + "type": "LookupSource" }, { "name": "total", @@ -3173,7 +3173,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3698,7 +3698,7 @@ }, { "name": "beneficiary", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3972,7 +3972,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -4305,7 +4305,7 @@ "args": [ { "name": "new", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4325,7 +4325,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "proposal", diff --git a/packages/metadata/src/Metadata/v8/static-substrate.json b/packages/metadata/src/Metadata/v8/static-substrate.json index b730f31299..c2cb076488 100644 --- a/packages/metadata/src/Metadata/v8/static-substrate.json +++ b/packages/metadata/src/Metadata/v8/static-substrate.json @@ -779,7 +779,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -819,7 +819,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "new_free", @@ -851,11 +851,11 @@ "args": [ { "name": "source", - "type": "Address" + "type": "LookupSource" }, { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -872,7 +872,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1359,7 +1359,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1496,7 +1496,7 @@ "args": [ { "name": "targets", - "type": "Vec
" + "type": "Vec" } ], "documentation": [ @@ -1557,7 +1557,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3108,7 +3108,7 @@ "args": [ { "name": "target", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3151,7 +3151,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3597,7 +3597,7 @@ }, { "name": "beneficiary", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3881,7 +3881,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -4215,7 +4215,7 @@ "args": [ { "name": "new", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4235,7 +4235,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "proposal", @@ -4583,7 +4583,7 @@ "args": [ { "name": "target", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4607,7 +4607,7 @@ "args": [ { "name": "target", - "type": "Address" + "type": "LookupSource" }, { "name": "name", diff --git a/packages/metadata/src/Metadata/v9/static-substrate.json b/packages/metadata/src/Metadata/v9/static-substrate.json index 11eb89c76f..b398678503 100644 --- a/packages/metadata/src/Metadata/v9/static-substrate.json +++ b/packages/metadata/src/Metadata/v9/static-substrate.json @@ -774,7 +774,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -814,7 +814,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "new_free", @@ -846,11 +846,11 @@ "args": [ { "name": "source", - "type": "Address" + "type": "LookupSource" }, { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -867,7 +867,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1354,7 +1354,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -1491,7 +1491,7 @@ "args": [ { "name": "targets", - "type": "Vec
" + "type": "Vec" } ], "documentation": [ @@ -1552,7 +1552,7 @@ "args": [ { "name": "controller", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3245,7 +3245,7 @@ "args": [ { "name": "target", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3303,7 +3303,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -3780,7 +3780,7 @@ }, { "name": "beneficiary", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4064,7 +4064,7 @@ "args": [ { "name": "dest", - "type": "Address" + "type": "LookupSource" }, { "name": "value", @@ -4398,7 +4398,7 @@ "args": [ { "name": "new", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4418,7 +4418,7 @@ "args": [ { "name": "who", - "type": "Address" + "type": "LookupSource" }, { "name": "proposal", @@ -4766,7 +4766,7 @@ "args": [ { "name": "target", - "type": "Address" + "type": "LookupSource" } ], "documentation": [ @@ -4790,7 +4790,7 @@ "args": [ { "name": "target", - "type": "Address" + "type": "LookupSource" }, { "name": "name", diff --git a/packages/types/src/codec/create/getTypeDef.spec.ts b/packages/types/src/codec/create/getTypeDef.spec.ts index 74b8a8f727..240da6be3f 100644 --- a/packages/types/src/codec/create/getTypeDef.spec.ts +++ b/packages/types/src/codec/create/getTypeDef.spec.ts @@ -181,10 +181,10 @@ describe('getTypeDef', (): void => { getTypeDef('Vec<(Box, Proposal,Lookup::Target)>') ).toEqual({ info: TypeDefInfo.Vec, - type: 'Vec<(PropIndex,Proposal,AccountId)>', + type: 'Vec<(PropIndex,Proposal,LookupTarget)>', sub: { info: TypeDefInfo.Tuple, - type: '(PropIndex,Proposal,AccountId)', + type: '(PropIndex,Proposal,LookupTarget)', sub: [ { info: TypeDefInfo.Plain, @@ -196,7 +196,7 @@ describe('getTypeDef', (): void => { }, { info: TypeDefInfo.Plain, - type: 'AccountId' + type: 'LookupTarget' } ] } diff --git a/packages/types/src/codec/create/sanitize.ts b/packages/types/src/codec/create/sanitize.ts index 6bb50fb633..76a7260fb9 100644 --- a/packages/types/src/codec/create/sanitize.ts +++ b/packages/types/src/codec/create/sanitize.ts @@ -29,10 +29,9 @@ const mappings: Mapper[] = [ _alias('&\\[u8\\]', 'Bytes'), // alias RawAddress -> Address _alias('RawAddress', 'Address'), - // alias Lookup::Source to Address (_could_ be AccountId on certain chains) - _alias('Lookup::Source', 'Address'), - // alias Lookup::Target to AccountId (always the case) - _alias('Lookup::Target', 'AccountId'), + // lookups, mapped to Address/AccountId as appropriate in runtime + _alias('Lookup::Source', 'LookupSource'), + _alias('Lookup::Target', 'LookupTarget'), // alias for grandpa internal, as used in polkadot _alias('grandpa::', ''), // specific for session internal diff --git a/packages/types/src/interfaceRegistry.ts b/packages/types/src/interfaceRegistry.ts index 10a41d643e..6e35ef9c2d 100644 --- a/packages/types/src/interfaceRegistry.ts +++ b/packages/types/src/interfaceRegistry.ts @@ -3,7 +3,7 @@ import { Compact, Option, Raw, Vec } from '@polkadot/types/codec'; import { Bytes, Data, Fixed64, H160, H256, H512, IdentityFields, Null, StorageData, StorageKey, Text, Type, U256, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types/primitive'; -import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, ChangesTrieConfiguration, Consensus, ConsensusEngineId, Digest, DigestItem, DispatchClass, DispatchInfo, DispatchInfoTo190, EcdsaSignature, Ed25519Signature, Extrinsic, ExtrinsicEra, ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV1, ExtrinsicPayloadV2, ExtrinsicPayloadV3, ExtrinsicPayloadV4, ExtrinsicSignatureV1, ExtrinsicSignatureV2, ExtrinsicSignatureV3, ExtrinsicSignatureV4, ExtrinsicUnknown, ExtrinsicV1, ExtrinsicV2, ExtrinsicV3, ExtrinsicV4, Hash, Header, ImmortalEra, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, Moment, MortalEra, MultiSignature, Origin, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Seal, SealV0, Signature, SignedBlock, SignerPayload, Sr25519Signature, ValidatorId, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime'; +import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, ChangesTrieConfiguration, Consensus, ConsensusEngineId, Digest, DigestItem, DispatchClass, DispatchInfo, DispatchInfoTo190, EcdsaSignature, Ed25519Signature, Extrinsic, ExtrinsicEra, ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV1, ExtrinsicPayloadV2, ExtrinsicPayloadV3, ExtrinsicPayloadV4, ExtrinsicSignatureV1, ExtrinsicSignatureV2, ExtrinsicSignatureV3, ExtrinsicSignatureV4, ExtrinsicUnknown, ExtrinsicV1, ExtrinsicV2, ExtrinsicV3, ExtrinsicV4, Hash, Header, ImmortalEra, Index, Justification, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, Moment, MortalEra, MultiSignature, Origin, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Seal, SealV0, Signature, SignedBlock, SignerPayload, Sr25519Signature, ValidatorId, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime'; import { InclusionHeight, Uncle, UncleEntryItem } from '@polkadot/types/interfaces/authorship'; import { RawAuraPreDigest } from '@polkadot/types/interfaces/aura'; import { BabeAuthorityWeight, BabeBlockWeight, BabeWeight, MaybeVrf, RawBabePreDigest, RawBabePreDigestCompat, RawBabePreDigestPrimary, RawBabePreDigestPrimaryTo159, RawBabePreDigestSecondary, RawBabePreDigestSecondaryTo159, RawBabePreDigestTo159, SlotNumber, VrfData, VrfProof } from '@polkadot/types/interfaces/babe'; @@ -258,6 +258,12 @@ export interface InterfaceRegistry { LockIdentifier: LockIdentifier; 'Option': Option; 'Vec': Vec; + LookupSource: LookupSource; + 'Option': Option; + 'Vec': Vec; + LookupTarget: LookupTarget; + 'Option': Option; + 'Vec': Vec; Moment: Moment; 'Compact': Compact; 'Option': Option; diff --git a/packages/types/src/interfaces/runtime/definitions.ts b/packages/types/src/interfaces/runtime/definitions.ts index c5e39bc0ca..9f46eea877 100644 --- a/packages/types/src/interfaces/runtime/definitions.ts +++ b/packages/types/src/interfaces/runtime/definitions.ts @@ -68,6 +68,8 @@ export default { KeyValue: '(StorageKey, StorageData)', KeyTypeId: 'u32', LockIdentifier: '[u8; 8]', + LookupSource: 'Address', + LookupTarget: 'AccountId', Moment: 'u64', Origin: 'GenericOrigin', Perbill: 'u32', diff --git a/packages/types/src/interfaces/runtime/types.ts b/packages/types/src/interfaces/runtime/types.ts index 0cc05d46b8..52b8ddec2a 100644 --- a/packages/types/src/interfaces/runtime/types.ts +++ b/packages/types/src/interfaces/runtime/types.ts @@ -159,6 +159,12 @@ export interface KeyValue extends ITuple<[StorageKey, StorageData]> {} /** @name LockIdentifier */ export interface LockIdentifier extends Uint8Array, Codec {} +/** @name LookupSource */ +export interface LookupSource extends Address {} + +/** @name LookupTarget */ +export interface LookupTarget extends AccountId {} + /** @name Moment */ export interface Moment extends u64 {} diff --git a/packages/types/src/known/overrides.ts b/packages/types/src/known/overrides.ts index 1a1bd65117..ccc30830d7 100644 --- a/packages/types/src/known/overrides.ts +++ b/packages/types/src/known/overrides.ts @@ -12,6 +12,9 @@ const TYPES_MODULES: Record = { identity: { Judgement: 'IdentityJudgement' }, + parachains: { + Id: 'ParaId' + }, society: { Judgement: 'SocietyJudgement', Vote: 'SocietyVote' @@ -41,6 +44,7 @@ const TYPES_KUSAMA_VERSIONED: OverrideVersionedType[] = [ BalanceLock: 'BalanceLockTo212', DispatchError: 'DispatchErrorTo198', Keys: 'SessionKeys5', + LookupSource: 'Address', SlashingSpans: 'SlashingSpansTo204' } }, @@ -49,14 +53,23 @@ const TYPES_KUSAMA_VERSIONED: OverrideVersionedType[] = [ types: { BalanceLock: 'BalanceLockTo212', Keys: 'SessionKeys5', + LookupSource: 'Address', SlashingSpans: 'SlashingSpansTo204' } }, { - minmax: [1043, undefined], + minmax: [1043, 1045], types: { BalanceLock: 'BalanceLockTo212', - Keys: 'SessionKeys5' + Keys: 'SessionKeys5', + LookupSource: 'Address' + } + }, + { + minmax: [1046, undefined], + types: { + Keys: 'SessionKeys5', + LookupSource: 'AccountId' } } ];