Values & components for H{256, 512} & i{8, 16, 32, 64, 128} (#1634)

This commit is contained in:
Jaco Greeff 2019-09-19 12:46:51 +02:00 committed by GitHub
parent 11ea701a38
commit 93a1882903
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View File

@ -37,14 +37,14 @@ interface TypeToComponent {
const components: ComponentMap = ([
{ c: Account, t: ['AccountId', 'AccountIdOf', 'Address', 'AuthorityId', 'SessionKey', 'ValidatorId'] },
{ c: Amount, t: ['AccountIndex', 'AssetId', 'BlockNumber', 'Gas', 'Index', 'Nonce', 'ParaId', 'ProposalIndex', 'PropIndex', 'ReferendumIndex', 'u16', 'u32', 'u64', 'u128', 'u256', 'VoteIndex'] },
{ c: Amount, t: ['AccountIndex', 'AssetId', 'BlockNumber', 'Gas', 'Index', 'Nonce', 'ParaId', 'ProposalIndex', 'PropIndex', 'ReferendumIndex', 'i8', 'i16', 'i32', 'i64', 'i128', 'u8', 'u16', 'u32', 'u64', 'u128', 'u256', 'VoteIndex'] },
{ c: Balance, t: ['Amount', 'AssetOf', 'Balance', 'BalanceOf'] },
{ c: Bool, t: ['bool'] },
{ c: Bytes, t: ['Bytes'] },
{ c: Code, t: ['Code'] },
{ c: Data, t: ['Data', 'Keys'] },
{ c: Enum, t: ['Enum'] },
{ c: Hash, t: ['CodeHash', 'Hash', 'SeedOf', 'Signature'] },
{ c: Hash, t: ['CodeHash', 'Hash', 'H256', 'H512', 'SeedOf', 'Signature'] },
{ c: KeyValue, t: ['KeyValue'] },
{ c: KeyValueArray, t: ['Vec<KeyValue>'] },
{ c: Moment, t: ['Moment', 'MomentOf'] },

View File

@ -46,6 +46,13 @@ export default function getInitValue (def: TypeDef): RawParamValue | RawParamVal
case 'PropIndex':
case 'ProposalIndex':
case 'ReferendumIndex':
case 'i8':
case 'i16':
case 'i32':
case 'i64':
case 'i128':
case 'u8':
case 'u16':
case 'u32':
case 'u64':
case 'u128':
@ -75,6 +82,12 @@ export default function getInitValue (def: TypeDef): RawParamValue | RawParamVal
case 'Hash':
return createType('Hash');
case 'H256':
return createType('H256');
case 'H512':
return createType('H512');
case 'Data':
case 'Keys':
return '';