diff --git a/common/changes/@subsquid/ink-abi/ink-fix_2024-07-26-09-35.json b/common/changes/@subsquid/ink-abi/ink-fix_2024-07-26-09-35.json new file mode 100644 index 000000000..9be37b532 --- /dev/null +++ b/common/changes/@subsquid/ink-abi/ink-fix_2024-07-26-09-35.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@subsquid/ink-abi", + "comment": "rename `__type` to `__kind` for decoded events", + "type": "patch" + } + ], + "packageName": "@subsquid/ink-abi" +} \ No newline at end of file diff --git a/substrate/ink-abi/src/abi.ts b/substrate/ink-abi/src/abi.ts index 0299ffab9..3edb76106 100644 --- a/substrate/ink-abi/src/abi.ts +++ b/substrate/ink-abi/src/abi.ts @@ -63,7 +63,7 @@ export class Abi { } return { - __type: event.name, + __kind: event.name, ...this.scaleCodec.decode(event.type, src) } } @@ -74,7 +74,7 @@ export class Abi { let event = this.events.find(e => e.signatureTopic == topic) if (event) { return { - __type: event.name, + __kind: event.name, ...this.scaleCodec.decodeBinary(event.type, data) } } @@ -93,7 +93,7 @@ export class Abi { if (potentialEvents.length == 1) { let event = potentialEvents[0] return { - __type: event.name, + __kind: event.name, ...this.scaleCodec.decodeBinary(event.type, data) } }