From 05ccf8ad841cd8b1165ffc0f415ac0683b7be21b Mon Sep 17 00:00:00 2001 From: Eldar Gabdullin Date: Thu, 22 Aug 2024 12:01:07 +0300 Subject: [PATCH] EVM traces: allow suicide calls to zero address --- .../evm-processor/master_2024-08-22-09-01.json | 10 ++++++++++ evm/evm-processor/src/ds-rpc/schema.ts | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 common/changes/@subsquid/evm-processor/master_2024-08-22-09-01.json diff --git a/common/changes/@subsquid/evm-processor/master_2024-08-22-09-01.json b/common/changes/@subsquid/evm-processor/master_2024-08-22-09-01.json new file mode 100644 index 000000000..6f6afe25f --- /dev/null +++ b/common/changes/@subsquid/evm-processor/master_2024-08-22-09-01.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@subsquid/evm-processor", + "comment": "traces: allow suicide calls to zero address", + "type": "patch" + } + ], + "packageName": "@subsquid/evm-processor" +} \ No newline at end of file diff --git a/evm/evm-processor/src/ds-rpc/schema.ts b/evm/evm-processor/src/ds-rpc/schema.ts index e1928fa97..b6336c633 100644 --- a/evm/evm-processor/src/ds-rpc/schema.ts +++ b/evm/evm-processor/src/ds-rpc/schema.ts @@ -125,7 +125,7 @@ function getDebugFrameValidator(fields: FieldSelection['trace']) { let Call = object({ ...base, - to: BYTES, + to: withDefault('0x0000000000000000000000000000000000000000', BYTES), input: BYTES, ...project({ from: fields?.callFrom, @@ -144,7 +144,7 @@ function getDebugFrameValidator(fields: FieldSelection['trace']) { let Suicide = object({ ...base, - to: BYTES, + to: withDefault('0x0000000000000000000000000000000000000000', BYTES), ...project({ from: fields?.suicideAddress, value: fields?.suicideBalance