From b1fcd92bc0d445e8a45411371a8fad425683a037 Mon Sep 17 00:00:00 2001 From: Luis Lopez Date: Tue, 22 Mar 2022 11:28:31 -0300 Subject: [PATCH 1/2] Update function code to work with Uint8Array --- lib/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.ts b/lib/utils.ts index 85af30e..4ac1d52 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -20,7 +20,7 @@ export namespace bytes { } export function toUnsignedInt(value: Bytes, bigEndian: boolean = true): BigInt { - return BigInt.fromUnsignedBytes(bigEndian ? (value.reverse() as Bytes) : value) + return BigInt.fromUnsignedBytes(bigEndian ? Bytes.fromUint8Array(value.reverse()) : value) } // Helpers From e6cb2a795091b30489934686449962a5fa1fb901 Mon Sep 17 00:00:00 2001 From: Luis Lopez Date: Wed, 23 Mar 2022 09:51:28 -0300 Subject: [PATCH 2/2] update package version --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3533cfc..ddf1ca3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@protofire/subgraph-toolkit", - "version": "0.1.2", + "version": "0.1.3", "description": "AssemblyScript helpers for writing subgraph mappings for The Graph", "repository": "https://github.com/protofire/subgraph-toolkit.git", "license": "GPL-3.0-only", @@ -17,4 +17,4 @@ "peerDependencies": { "@graphprotocol/graph-ts": ">=0.20.0" } -} +} \ No newline at end of file