Skip to content
This repository was archived by the owner on Jun 26, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
node-version: 18
- run: npm install
- run: npm run codegen
- run: npm run build
- run: npm run build
22 changes: 22 additions & 0 deletions .github/workflows/deploy-moonbeam.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: DeployMoonbeam
on:
push:
branches:
- moonbeam

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JS
uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install
- run: npm install -g @graphprotocol/graph-cli
- run: npm run codegen
- run: graph auth --product hosted-service ${API_KEY}
env:
API_KEY: ${{ secrets.HP_GRAPH_API_KEY }}
- run: graph deploy --product hosted-service humanprotocol/moonbeam
2 changes: 1 addition & 1 deletion .github/workflows/deploy-rinkeby.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- run: graph auth --product hosted-service ${API_KEY}
env:
API_KEY: ${{ secrets.HP_GRAPH_API_KEY }}
- run: graph deploy --product hosted-service humanprotocol/rinkeby
- run: graph deploy --product hosted-service humanprotocol/rinkeby
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- run: graph auth --product hosted-service ${API_KEY}
env:
API_KEY: ${{ secrets.HP_GRAPH_API_KEY }}
- run: graph deploy --product hosted-service humanprotocol/polygon
- run: graph deploy --product hosted-service humanprotocol/polygon
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ generated/
node_modules/
package-lock.json
src/generated
yarn.lock
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ Currently deploying to:
- main branch -> https://thegraph.com/hosted-service/subgraph/humanprotocol/polygon

- rinkeby branch -> https://thegraph.com/hosted-service/subgraph/humanprotocol/rinkeby

- moonbeam branch -> https://thegraph.com/hosted-service/subgraph/humanprotocol/moonbeam
11 changes: 10 additions & 1 deletion networks.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{
"mbase": {
"EscrowFactory": {
"address": "0x98108c28B7767a52BE38B4860832dd4e11A7ecad",
"startBlock": 1145429
},
"HMToken": {
"address": "0x3b25BC1dC591D24d60560d0135D6750A561D4764 ",
"startBlock": 1105853
}
},
"matic": {
"EscrowFactory": {
"address": "0x45eBc3eAE6DA485097054ae10BA1A0f8e8c7f794",
Expand All @@ -19,5 +29,4 @@
"startBlock": 7200306
}
}

}
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
"name": "humansubgraph",
"name": "hmtmoonbeam",
"license": "UNLICENSED",
"scripts": {
"codegen": "graph codegen",
"build": "graph build",
"deploy": "graph deploy --node https://api.thegraph.com/deploy/ posix4e/humansubgraph",
"create-local": "graph create --node http://localhost:8020/ posix4e/humansubgraph",
"remove-local": "graph remove --node http://localhost:8020/ posix4e/humansubgraph",
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 posix4e/humansubgraph"
"build": "graph build"
},
"dependencies": {
"@graphprotocol/graph-cli": "0.29.2",
Expand Down
4 changes: 2 additions & 2 deletions src/mapping/escrow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
IntermediateStorage,
Pending,
StoreResultsCall
} from "../generated/templates/Escrow/Escrow"
} from "../../generated/templates/Escrow/Escrow"
import { ethereum } from '@graphprotocol/graph-ts'
import { BulkTransferEvent, ISEvent, PEvent} from "../generated/schema"
import { BulkTransferEvent, ISEvent, PEvent} from "../../generated/schema"

export function handleIntermediateStorage(event: IntermediateStorage): void {
// Entities can be loaded from the store using a string ID; this ID
Expand Down
6 changes: 3 additions & 3 deletions src/mapping/escrowfactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { BigInt } from "@graphprotocol/graph-ts"
import {
EscrowFactory,
Launched
} from "../generated/EscrowFactory/EscrowFactory"
import { EscrowFactory } from "../generated/schema"
import { Escrow } from "../generated/templates"
} from "../../generated/EscrowFactory/EscrowFactory"
import { EscrowFactory } from "../../generated/schema"
import { Escrow } from "../../generated/templates"

export function handleLaunched(event: Launched): void {
// Entities can be loaded from the store using a string ID; this ID
Expand Down
4 changes: 2 additions & 2 deletions src/mapping/hm-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
Transfer,
BulkApproval,
BulkTransfer,
} from "../generated/HMToken/HMToken";
import { HMBulkTransferEvent, HMTransferEvent } from "../generated/schema";
} from "../../generated/HMToken/HMToken";
import { HMBulkTransferEvent, HMTransferEvent } from "../../generated/schema";

export function handleTransfer(event: Transfer): void {
let entity = HMTransferEvent.load(
Expand Down
15 changes: 7 additions & 8 deletions subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
specVersion: 0.0.5
description: Human Polygon, with transactions 1
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: EscrowFactory
network: matic
network: moonbeam
source:
abi: EscrowFactory
address: "0x45eBc3eAE6DA485097054ae10BA1A0f8e8c7f794"
startBlock: 25426565
address: "0x98108c28B7767a52BE38B4860832dd4e11A7ecad"
startBlock: 1145429
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand All @@ -25,11 +24,11 @@ dataSources:
handler: handleLaunched
- kind: ethereum
name: HMToken
network: matic
network: moonbeam
source:
abi: HMToken
address: "0xc748B2A084F8eFc47E086ccdDD9b7e67aEb571Bf"
startBlock: 20181700
address: "0x3b25BC1dC591D24d60560d0135D6750A561D4764"
startBlock: 1105853
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand All @@ -55,7 +54,7 @@ dataSources:
templates:
- name: Escrow
kind: ethereum/contract
network: matic
network: moonbeam
source:
abi: Escrow
mapping:
Expand Down