-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
When the Bytes are too large, the toHexString function cannot execute.
Env
- zkgraph-lib: v1.0.1
- zkgraph-cli: v1.0.0
Reproduce
npm init zkgraph@latest- Follow the guide to initialize a project of type "event"
- modify src/mapping.ts as follow:
//@ts-ignore
import { Bytes, Block } from "@hyperoracle/zkgraph-lib";
export function handleBlocks(blocks: Block[]): Bytes {
const event = blocks[0].events[0];
event.data.toHexString();
return Bytes.empty();
}- modify src/zkgraph.yaml as follow:
specVersion: 0.0.2
apiVersion: 0.0.2
name: eg_event
description: "This demo zkGraph shows 3 ways to access / filter out source events."
repository: https://github.com/hyperoracle/zkgraph
dataSources:
- kind: ethereum
network: sepolia
event:
- address: '0xfa002dc692d045afde265d5eac09d012c1af50e8'
events:
- "ethscriptions_protocol_CreateEthscription(address,string)"
mapping:
language: wasm/assemblyscript
file: ./mapping.ts
handler: handleBlocks
dataDestinations:
- kind: ethereum
network: sepolia
address: "0x0000000000000000000000000000000000000001"npm run compile && npm run exec -- 4940316
Next, there will be the following error message from execue.

Metadata
Metadata
Assignees
Labels
No labels