add ChargeAssetTxPayment to SignedExtensions (#3668)

This commit is contained in:
Alexander Popiak
2021-06-19 09:50:30 +02:00
committed by GitHub
parent ce2037400c
commit 1de533ca9c
2 changed files with 19 additions and 1 deletions
@@ -5,16 +5,19 @@ import type { ExtDef, ExtInfo, ExtTypes } from './types';
import { polkadot } from './polkadot';
import { shell } from './shell';
import { statemint } from './statemint';
import { substrate } from './substrate';
// A mapping of the known signed extensions to the extra fields that they contain. Unlike in the actual extensions,
// we define the extra fields not as a Tuple, but rather as a struct so they can be named. These will be expanded
// into the various fields when added to the payload (we only support V4 onwards with these, V3 and earlier are
// deemed fixed and non-changeable)
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const allExtensions: ExtDef = {
...substrate,
...shell,
...polkadot
...polkadot,
...statemint
};
// the v4 signed extensions (the order is important here, as applied by default)
@@ -0,0 +1,15 @@
// Copyright 2017-2021 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ExtDef } from './types';
export const statemint: ExtDef = {
ChargeAssetTxPayment: {
extrinsic: {
tip: 'Compact<Balance>',
// eslint-disable-next-line sort-keys
assetId: 'Option<AssetId>'
},
payload: {}
}
};