Adjust Weight to u64 (#2181)
* Adjust Weight to u64 * Adjust copy (really should be reading folders...) * build:interfaces * EventRecord test expectation update
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# 1.11.0-beta.x
|
||||
|
||||
- **Important** Substrate master has an updated `Weight` (to `u64`), on older chains apply `Weight: 'u32'` (This does affect `DispatchInfo` decoding if wrongly set)
|
||||
- Align augmented generation with camelCase (Thanks to https://github.com/monitz87)
|
||||
- Fix bitfield endian encoding (Thanks to investigation by https://github.com/xlc)
|
||||
- Fix entries decoding for `Option<Number>` (& simplify, decoding correctly on rpc layer)
|
||||
|
||||
@@ -19,4 +19,5 @@ copy_folder "metadata"
|
||||
copy_folder "rpc-core"
|
||||
copy_folder "rpc-provider"
|
||||
copy_folder "types"
|
||||
copy_folder "types-known"
|
||||
copy_folder "typegen"
|
||||
|
||||
@@ -11,7 +11,8 @@ const versioned: OverrideVersionedType[] = [
|
||||
Address: 'AccountId',
|
||||
LookupSource: 'AccountId',
|
||||
ReferendumInfo: 'ReferendumInfoTo239',
|
||||
StakingLedger: 'StakingLedgerTo240'
|
||||
StakingLedger: 'StakingLedgerTo240',
|
||||
Weight: 'u32'
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
@@ -17,7 +17,8 @@ const versioned: OverrideVersionedType[] = [
|
||||
ReferendumInfo: 'ReferendumInfoTo239',
|
||||
SlashingSpans: 'SlashingSpansTo204',
|
||||
StakingLedger: 'StakingLedgerTo223',
|
||||
Votes: 'VotesTo230'
|
||||
Votes: 'VotesTo230',
|
||||
Weight: 'u32'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -30,7 +31,8 @@ const versioned: OverrideVersionedType[] = [
|
||||
ReferendumInfo: 'ReferendumInfoTo239',
|
||||
SlashingSpans: 'SlashingSpansTo204',
|
||||
StakingLedger: 'StakingLedgerTo223',
|
||||
Votes: 'VotesTo230'
|
||||
Votes: 'VotesTo230',
|
||||
Weight: 'u32'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -43,7 +45,8 @@ const versioned: OverrideVersionedType[] = [
|
||||
LookupSource: 'Address',
|
||||
ReferendumInfo: 'ReferendumInfoTo239',
|
||||
StakingLedger: 'StakingLedgerTo223',
|
||||
Votes: 'VotesTo230'
|
||||
Votes: 'VotesTo230',
|
||||
Weight: 'u32'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -55,7 +58,8 @@ const versioned: OverrideVersionedType[] = [
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId',
|
||||
ReferendumInfo: 'ReferendumInfoTo239',
|
||||
StakingLedger: 'StakingLedgerTo240'
|
||||
StakingLedger: 'StakingLedgerTo240',
|
||||
Weight: 'u32'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -64,7 +68,8 @@ const versioned: OverrideVersionedType[] = [
|
||||
Address: 'AccountId',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId',
|
||||
StakingLedger: 'StakingLedgerTo240'
|
||||
StakingLedger: 'StakingLedgerTo240',
|
||||
Weight: 'u32'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -72,7 +77,8 @@ const versioned: OverrideVersionedType[] = [
|
||||
types: {
|
||||
Address: 'AccountId',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId'
|
||||
LookupSource: 'AccountId',
|
||||
Weight: 'u32'
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
@@ -17,7 +17,8 @@ const versioned: OverrideVersionedType[] = [
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'Address',
|
||||
StakingLedger: 'StakingLedgerTo223',
|
||||
Votes: 'VotesTo230'
|
||||
Votes: 'VotesTo230',
|
||||
Weight: 'u32'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -28,7 +29,8 @@ const versioned: OverrideVersionedType[] = [
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId',
|
||||
ReferendumInfo: 'ReferendumInfoTo239',
|
||||
StakingLedger: 'StakingLedgerTo240'
|
||||
StakingLedger: 'StakingLedgerTo240',
|
||||
Weight: 'u32'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -37,7 +39,8 @@ const versioned: OverrideVersionedType[] = [
|
||||
Address: 'AccountId',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId',
|
||||
StakingLedger: 'StakingLedgerTo240'
|
||||
StakingLedger: 'StakingLedgerTo240',
|
||||
Weight: 'u32'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -45,7 +48,8 @@ const versioned: OverrideVersionedType[] = [
|
||||
types: {
|
||||
Address: 'AccountId',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId'
|
||||
LookupSource: 'AccountId',
|
||||
Weight: 'u32'
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
@@ -10,7 +10,8 @@ const versioned: OverrideVersionedType[] = [
|
||||
types: {
|
||||
Address: 'AccountId',
|
||||
Keys: 'SessionKeys5',
|
||||
LookupSource: 'AccountId'
|
||||
LookupSource: 'AccountId',
|
||||
Weight: 'u32'
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
@@ -85,7 +85,7 @@ export default {
|
||||
},
|
||||
StorageData: 'Bytes',
|
||||
ValidatorId: 'AccountId',
|
||||
Weight: 'u32',
|
||||
Weight: 'u64',
|
||||
WeightMultiplier: 'Fixed64',
|
||||
|
||||
// digest
|
||||
|
||||
@@ -187,7 +187,7 @@ export interface StorageData extends Bytes {}
|
||||
export interface ValidatorId extends AccountId {}
|
||||
|
||||
/** @name Weight */
|
||||
export interface Weight extends u32 {}
|
||||
export interface Weight extends u64 {}
|
||||
|
||||
/** @name WeightMultiplier */
|
||||
export interface WeightMultiplier extends Fixed64 {}
|
||||
|
||||
@@ -46,8 +46,8 @@ describe('EventRecord', (): void => {
|
||||
const er = records[0];
|
||||
|
||||
expect(er.phase.type).toEqual('ApplyExtrinsic');
|
||||
// additional payment info
|
||||
expect(records.toHex()).toEqual(`${hex}000000000000`);
|
||||
// additional payment info, weight u64 (vs u32)
|
||||
expect(records.toHex()).toEqual(hex + '000000000000' + '00000000');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user