diff --git a/common/changes/@subsquid/evm-processor/evm-default-trace-input_2024-07-22-11-20.json b/common/changes/@subsquid/evm-processor/evm-default-trace-input_2024-07-22-11-20.json new file mode 100644 index 000000000..d14e78c74 --- /dev/null +++ b/common/changes/@subsquid/evm-processor/evm-default-trace-input_2024-07-22-11-20.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@subsquid/evm-processor", + "comment": "make `DebugFrame.input` optional and add default value", + "type": "patch" + } + ], + "packageName": "@subsquid/evm-processor" +} \ No newline at end of file diff --git a/evm/evm-processor/src/ds-rpc/rpc-data.ts b/evm/evm-processor/src/ds-rpc/rpc-data.ts index 7e7f315a0..db588e22c 100644 --- a/evm/evm-processor/src/ds-rpc/rpc-data.ts +++ b/evm/evm-processor/src/ds-rpc/rpc-data.ts @@ -13,7 +13,8 @@ import { ref, SMALL_QTY, STRING, - Validator + Validator, + withDefault } from '@subsquid/util-internal-validation' import {Bytes, Bytes20, Bytes32, Qty} from '../interfaces/base' import {project} from '../mapping/schema' @@ -109,14 +110,14 @@ export type TransactionReceipt = GetSrcType export const DebugFrame: Validator = object({ type: STRING, - input: BYTES, + input: withDefault('0x', BYTES), calls: option(array(ref(() => DebugFrame))) }) export interface DebugFrame { type: string - input: Bytes + input?: Bytes | null calls?: DebugFrame[] | null }