diff --git a/CHANGELOG.md b/CHANGELOG.md index e459f3e8a5..d501bb26b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 1.29.0-beta.x + +- Add additional `Fixed{I,U}{64,128}` and `{I,U}32F32` types + ## 1.28.1 Aug 10, 2020 Upgrade priority: Low, unless using Centrifuge or parachains diff --git a/packages/types/src/interfaces/runtime/definitions.ts b/packages/types/src/interfaces/runtime/definitions.ts index 3a2d6bca4c..5b215680d2 100644 --- a/packages/types/src/interfaces/runtime/definitions.ts +++ b/packages/types/src/interfaces/runtime/definitions.ts @@ -7,9 +7,25 @@ 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>', + Perbill: 'u32', + Percent: 'u8', + Permill: 'u32', + Perquintill: 'u64' +}; + export default { rpc: {}, types: { + ...numberTypes, AccountId: 'GenericAccountId', AccountIdOf: 'AccountId', AccountIndex: 'GenericAccountIndex', @@ -45,8 +61,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 +86,6 @@ export default { Pays: { _enum: ['Yes', 'No'] }, - Perbill: 'u32', - Percent: 'u8', - Permill: 'u32', - Perquintill: 'u64', Phantom: 'Null', PhantomData: 'Null', Releases: {