Use ethers.js replace util for errors in bytesToString host API (#515)

* Use replacement strategy for ethers.utils.toUtf8String in graph-node host API

* Upgrade package versions
This commit is contained in:
2024-06-04 11:41:54 +05:30
committed by GitHub
parent 3b67fa1827
commit 7cc61579d8
14 changed files with 36 additions and 36 deletions
+5 -5
View File
@@ -1,10 +1,10 @@
{
"name": "@cerc-io/graph-node",
"version": "0.2.92",
"version": "0.2.93",
"main": "dist/index.js",
"license": "AGPL-3.0",
"devDependencies": {
"@cerc-io/solidity-mapper": "^0.2.92",
"@cerc-io/solidity-mapper": "^0.2.93",
"@ethersproject/providers": "^5.4.4",
"@graphprotocol/graph-ts": "^0.22.0",
"@nomiclabs/hardhat-ethers": "^2.0.2",
@@ -51,9 +51,9 @@
"dependencies": {
"@apollo/client": "^3.3.19",
"@cerc-io/assemblyscript": "0.19.10-watcher-ts-0.1.2",
"@cerc-io/cache": "^0.2.92",
"@cerc-io/ipld-eth-client": "^0.2.92",
"@cerc-io/util": "^0.2.92",
"@cerc-io/cache": "^0.2.93",
"@cerc-io/ipld-eth-client": "^0.2.93",
"@cerc-io/util": "^0.2.93",
"@types/json-diff": "^0.5.2",
"@types/yargs": "^17.0.0",
"bn.js": "^4.11.9",
+1 -1
View File
@@ -340,7 +340,7 @@ export const instantiate = async (
},
'typeConversion.bytesToString': async (bytes: number) => {
const byteArray = __getArray(bytes);
const string = utils.toUtf8String(byteArray);
const string = utils.toUtf8String(byteArray, utils.Utf8ErrorFuncs.replace);
const ptr = await __newString(string);
return ptr;