This repository has been archived by the owner on Mar 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from hyperoracle/dev
Refactor and Compatibility Updates for zkGraph API
- Loading branch information
Showing
16 changed files
with
3,411 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Release | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Set node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
cache: pnpm | ||
|
||
- run: npx changelogithub | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//@ts-ignore | ||
import { require } from "@hyperoracle/zkgraph-lib"; | ||
import { Bytes, Event, BigInt, ByteArray } from "@hyperoracle/zkgraph-lib"; | ||
|
||
export function handleEvents(events: Event[]): Bytes { | ||
// run() - keccak256 c0406226a44c49a673ef01611ce55e97850e1c520ac5d22c6854eb2dbaee7040 | ||
let tmp = Bytes.fromHexString( | ||
"c0406226a44c49a673ef01611ce55e97850e1c520ac5d22c6854eb2dbaee7040", | ||
); | ||
return Bytes.fromHexString("c0406226").padEnd(32); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
specVersion: 0.0.1 | ||
name: ex_hello | ||
description: Demo graph for zkAutomation. Use greeting string as the trigger payload. | ||
repository: https://github.com/hyperoracle/zkgraph | ||
dataSources: | ||
- kind: ethereum/contract | ||
network: sepolia | ||
source: | ||
address: '0x362b63b77448C2ffBC03511FE100fCd3d879795F' | ||
mapping: | ||
kind: ethereum/events | ||
apiVersion: 0.0.1 | ||
language: wasm/assemblyscript | ||
file: ./mapping.ts | ||
eventHandlers: | ||
- event: 'eventTriggered(uint256,uint256)' | ||
handler: handleEvents | ||
# dataDestinations field is required for zkAutomation. | ||
dataDestinations: | ||
- kind: ethereum/contract | ||
network: sepolia | ||
destination: | ||
address: '0x362b63b77448C2ffBC03511FE100fCd3d879795F' |
Oops, something went wrong.