Add set for contract ReturnFlags (#4397)

This commit is contained in:
Jaco
2021-12-27 12:56:54 +02:00
committed by GitHub
parent e16786a5f6
commit c6d330b91e
3 changed files with 38 additions and 8 deletions
@@ -42,7 +42,7 @@ export default {
}
},
ContractExecResultSuccessTo260: {
flags: 'u32',
flags: 'ContractReturnFlags',
data: 'Bytes',
gasConsumed: 'u64'
},
@@ -66,7 +66,7 @@ export default {
}
},
ContractExecResultOk: {
flags: 'u32',
flags: 'ContractReturnFlags',
data: 'Bytes'
},
ContractExecResultResult: {
@@ -93,13 +93,28 @@ export default {
Tombstone: 'TombstoneContractInfo'
}
},
ContractCallFlags: {
_set: {
_bitLength: 32,
ForwardInput: 0b0000_0001,
CloneInput: 0b0000_0010,
TailCall: 0b0000_0100,
AllowReentry: 0b0000_1000
}
},
ContractReturnFlags: {
_set: {
_bitLength: 32,
Revert: 0x0000_0001
}
},
ContractStorageKey: '[u8; 32]',
DeletedContract: {
pairCount: 'u32',
trieId: 'TrieId'
},
ExecReturnValue: {
flags: 'u32',
flags: 'ContractReturnFlags',
data: 'Bytes'
},
Gas: 'u64',
@@ -1,7 +1,7 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { Bytes, Compact, Enum, Null, Option, Raw, Struct, Text, U8aFixed, bool, u32, u64, u8 } from '@polkadot/types-codec';
import type { Bytes, Compact, Enum, Null, Option, Raw, Set, Struct, Text, U8aFixed, bool, u32, u64, u8 } from '@polkadot/types-codec';
import type { AccountId, Balance, BlockNumber, Hash, Weight } from '@polkadot/types/interfaces/runtime';
/** @name AliveContractInfo */
@@ -20,6 +20,14 @@ export interface AliveContractInfo extends Struct {
/** @name CodeHash */
export interface CodeHash extends Hash {}
/** @name ContractCallFlags */
export interface ContractCallFlags extends Set {
readonly isForwardInput: boolean;
readonly isCloneInput: boolean;
readonly isTailCall: boolean;
readonly isAllowReentry: boolean;
}
/** @name ContractCallRequest */
export interface ContractCallRequest extends Struct {
readonly origin: AccountId;
@@ -59,7 +67,7 @@ export interface ContractExecResultErrModule extends Struct {
/** @name ContractExecResultOk */
export interface ContractExecResultOk extends Struct {
readonly flags: u32;
readonly flags: ContractReturnFlags;
readonly data: Bytes;
}
@@ -80,7 +88,7 @@ export interface ContractExecResultSuccessTo255 extends Struct {
/** @name ContractExecResultSuccessTo260 */
export interface ContractExecResultSuccessTo260 extends Struct {
readonly flags: u32;
readonly flags: ContractReturnFlags;
readonly data: Bytes;
readonly gasConsumed: u64;
}
@@ -133,6 +141,11 @@ export interface ContractInstantiateResultTo267 extends Enum {
readonly type: 'Ok' | 'Err';
}
/** @name ContractReturnFlags */
export interface ContractReturnFlags extends Set {
readonly isRevert: boolean;
}
/** @name ContractStorageKey */
export interface ContractStorageKey extends U8aFixed {}
@@ -144,7 +157,7 @@ export interface DeletedContract extends Struct {
/** @name ExecReturnValue */
export interface ExecReturnValue extends Struct {
readonly flags: u32;
readonly flags: ContractReturnFlags;
readonly data: Bytes;
}