From c5d395d86305a7c77a44d525f8fdea8fcd3d6d51 Mon Sep 17 00:00:00 2001 From: tmcgroul Date: Fri, 26 Jul 2024 16:35:46 +0700 Subject: [PATCH] rename __type to __kind for ink decoded events --- .../@subsquid/ink-abi/ink-fix_2024-07-26-09-35.json | 10 ++++++++++ substrate/ink-abi/src/abi.ts | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 common/changes/@subsquid/ink-abi/ink-fix_2024-07-26-09-35.json 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) } }