use moonbeam types npm package (#4296)

This commit is contained in:
Antoine Estienne 2020-12-29 18:35:25 +01:00 committed by GitHub
parent f92e62485f
commit 9973de5b20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 140 deletions

View File

@ -16,7 +16,8 @@
"@laminar/type-definitions": "^0.2.0-beta.141",
"@polkadot/networks": "^5.2.2",
"@sora-substrate/type-definitions": "^0.2.5",
"@subsocial/types": "^0.4.26"
"@subsocial/types": "^0.4.26",
"moonbeam-types-bundle": "^1.0.1"
},
"devDependencies": {
"i18next": "^19.8.4"

View File

@ -1,143 +1,6 @@
// Copyright 2017-2020 @polkadot/apps-config authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { OverrideBundleDefinition } from '@polkadot/types/types';
import { moonbeamDefinitions } from 'moonbeam-types-bundle';
// structs need to be in order
/* eslint-disable sort-keys */
const definitions: OverrideBundleDefinition = {
types: [
{
minmax: [0, 4],
types: {
AccountId: 'EthereumAccountId',
Address: 'AccountId',
Balance: 'u128',
RefCount: 'u8',
LookupSource: 'AccountId',
Account: {
nonce: 'U256',
balance: 'u128'
},
ExitReason: {
_enum: {
ExitSucceed: 'bool',
ExitError: 'bool',
ExitRevert: 'bool',
ExitFatal: 'bool'
}
}
}
},
{
minmax: [5, 5],
types: {
AccountId: 'EthereumAccountId',
Address: 'AccountId',
Balance: 'u128',
LookupSource: 'AccountId',
Account: {
nonce: 'U256',
balance: 'u128'
},
ExitReason: {
_enum: {
Succeed: 'ExitSucceed',
Error: 'ExitError',
Revert: 'ExitRevert',
verFatal: 'ExitFatal'
}
},
ExitSucceed: {
_enum: ['Stopped', 'Returned', 'Suicided']
},
ExitError: {
_enum: [
'StackUnderflow',
'StackOverflow',
'InvalidJump',
'InvalidRange',
'DesignatedInvalid',
'CallTooDeep',
'CreateCollision',
'CreateContractLimit',
'OutOfOffset',
'OutOfGas',
'OutOfFund',
'PCUnderflow',
'CreateEmpty',
"Other(Cow<'static, str>)"
]
},
ExitRevert: {
_enum: ['Reverted']
},
ExitFatal: {
_enum: [
'NotSupported',
'UnhandledInterrupt',
'CallErrorAsFatal(ExitError)',
"Other(Cow<'static, str>)"
]
}
}
},
{
minmax: [6, undefined],
types: {
AccountId: 'EthereumAccountId',
Address: 'AccountId',
Balance: 'u128',
LookupSource: 'AccountId',
Account: {
nonce: 'U256',
balance: 'u128'
},
ExtrinsicSignature: 'EthereumSignature',
ExitReason: {
_enum: {
Succeed: 'ExitSucceed',
Error: 'ExitError',
Revert: 'ExitRevert',
verFatal: 'ExitFatal'
}
},
ExitSucceed: {
_enum: ['Stopped', 'Returned', 'Suicided']
},
ExitError: {
_enum: [
'StackUnderflow',
'StackOverflow',
'InvalidJump',
'InvalidRange',
'DesignatedInvalid',
'CallTooDeep',
'CreateCollision',
'CreateContractLimit',
'OutOfOffset',
'OutOfGas',
'OutOfFund',
'PCUnderflow',
'CreateEmpty',
"Other(Cow<'static, str>)"
]
},
ExitRevert: {
_enum: ['Reverted']
},
ExitFatal: {
_enum: [
'NotSupported',
'UnhandledInterrupt',
'CallErrorAsFatal(ExitError)',
"Other(Cow<'static, str>)"
]
}
}
}
]
};
export default definitions;
export default moonbeamDefinitions;

View File

@ -2196,6 +2196,7 @@ __metadata:
"@sora-substrate/type-definitions": ^0.2.5
"@subsocial/types": ^0.4.26
i18next: ^19.8.4
moonbeam-types-bundle: ^1.0.1
languageName: unknown
linkType: soft
@ -12814,6 +12815,16 @@ fsevents@~2.1.2:
languageName: node
linkType: hard
"moonbeam-types-bundle@npm:^1.0.1":
version: 1.0.1
resolution: "moonbeam-types-bundle@npm:1.0.1"
dependencies:
"@polkadot/types": ^3.2.3
typescript: ^4.1.3
checksum: bf87dfe7ced6b4559afa6ab3473fa9da5d98f06104dc900ccf54f63a2bceff286e9e5ab44894502e50347a98fd3d19f4426e918d031b51039bcae290baffe291
languageName: node
linkType: hard
"ms@npm:2.0.0":
version: 2.0.0
resolution: "ms@npm:2.0.0"