diff --git a/common/changes/@subsquid/evm-processor/master_2023-07-20-23-45.json b/common/changes/@subsquid/evm-processor/master_2023-07-20-23-45.json new file mode 100644 index 000000000..0a112c8f3 --- /dev/null +++ b/common/changes/@subsquid/evm-processor/master_2023-07-20-23-45.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@subsquid/evm-processor", + "comment": "fix `TypeError: Cannot convert null to a BigInt` during data mapping", + "type": "patch" + } + ], + "packageName": "@subsquid/evm-processor" +} \ No newline at end of file diff --git a/evm/evm-processor/src/ds-archive/mapping.ts b/evm/evm-processor/src/ds-archive/mapping.ts index 157521888..496226f2a 100644 --- a/evm/evm-processor/src/ds-archive/mapping.ts +++ b/evm/evm-processor/src/ds-archive/mapping.ts @@ -104,6 +104,7 @@ function mapBlockHeader(src: gw.Block): BlockHeader { let key: keyof gw.Block for (key in src) { + if (src[key] == null) continue switch(key) { case 'number': header.height = src.number @@ -135,6 +136,7 @@ function mapTransaction(block: BlockHeader, src: gw.Transaction): Tra let key: keyof gw.Transaction for (key in src) { + if (src[key] == null) continue switch(key) { case 'gas': case 'gasPrice':