Skip to content

Commit

Permalink
subgraph v2 and contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
arjanjohan committed Apr 29, 2024
1 parent 06f5830 commit 33e5e04
Show file tree
Hide file tree
Showing 21 changed files with 260 additions and 4,527 deletions.
Binary file modified packages/graph/.yarn/install-state.gz
Binary file not shown.
296 changes: 0 additions & 296 deletions packages/graph/abis/Contract.json

This file was deleted.

File renamed without changes.
6 changes: 3 additions & 3 deletions packages/graph/networks.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"scroll-sepolia": {
"ScrollFighterV2": {
"address": "0x4250f996882e56b0d0a2daddf3ea0bf9904fec5e",
"startBlock": 4045133
"ScrollFighter": {
"address": "0x0f567534623A5715a8271235db4Ba58461154307",
"startBlock": 4114939
}
}
}
19 changes: 14 additions & 5 deletions packages/graph/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
{
"name": "graph",
"packageManager": "[email protected]",
"name": "scrollfighter",
"license": "UNLICENSED",
"scripts": {
"codegen": "graph codegen",
"build": "graph build",
"deploy": "graph deploy --node https://api.studio.thegraph.com/deploy/ scrollfighter",
"create-local": "graph create --node http://localhost:8020/ scrollfighter",
"remove-local": "graph remove --node http://localhost:8020/ scrollfighter",
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 scrollfighter",
"test": "graph test"
},
"dependencies": {
"@graphprotocol/graph-cli": "^0.71.0",
"@graphprotocol/graph-ts": "^0.35.1"
"@graphprotocol/graph-cli": "0.71.0",
"@graphprotocol/graph-ts": "0.32.0"
},
"devDependencies": {
"@graphprotocol/client-cli": "^3.0.1"
"matchstick-as": "0.5.0"
}
}
6 changes: 6 additions & 0 deletions packages/graph/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ type FightersRevealed @entity(immutable: true) {
gameId: BigInt! # uint256
player1: Bytes! # address
player2: Bytes! # address
fighter1: BigInt! # uint256
fighter2: BigInt! # uint256
moves1: [BigInt!]! # uint256[3]
moves2: [BigInt!]! # uint256[3]
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
Expand All @@ -25,6 +29,8 @@ type GameEnded @entity(immutable: true) {
player1: Bytes! # address
player2: Bytes! # address
winner: Bytes! # address
pain1: [BigInt!]! # uint256[3]
pain2: [BigInt!]! # uint256[3]
wageredAmount: BigInt! # uint256
blockNumber: BigInt!
blockTimestamp: BigInt!
Expand Down
Loading

0 comments on commit 33e5e04

Please sign in to comment.