@reality.eth/graph 0.4.15 → 0.4.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reality.eth/graph",
3
- "version": "0.4.15",
3
+ "version": "0.4.16",
4
4
  "scripts": {
5
5
  "create-local": "graph create realityeth/realityeth --node http://127.0.0.1:8020",
6
6
  "remove-local": "graph remove realityeth/realityeth --node http://127.0.0.1:8020",
@@ -16,6 +16,7 @@
16
16
  "deploy:mainnet": "yarn prepare:mainnet && graph deploy --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ realityeth/realityeth",
17
17
  "deploy:optimism": "yarn prepare:optimism && graph deploy --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ realityeth/realityeth-optimism",
18
18
  "deploy:polygon": "yarn prepare:polygon && graph deploy --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ realityeth/realityeth-polygon",
19
+ "deploy:mumbai": "yarn prepare:mumbai && graph deploy --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ realityeth/realityeth-mumbai",
19
20
  "deploy:rinkeby": "yarn prepare:rinkeby && graph deploy --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ realityeth/realityeth-rinkeby",
20
21
  "deploy:sokol": "yarn prepare:sokol && graph deploy --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ realityeth/realityeth-sokol",
21
22
  "deploy:xdai": "yarn prepare:xdai && graph deploy --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ realityeth/realityeth-xdai",
@@ -29,6 +30,7 @@
29
30
  "prepare:mainnet": "yarn clean && node render-templates.js 1 && graph codegen",
30
31
  "prepare:optimism": "yarn clean && node render-templates.js 10 && graph codegen",
31
32
  "prepare:polygon": "yarn clean && node render-templates.js 137 && graph codegen",
33
+ "prepare:mumbai": "yarn clean && node render-templates.js 80001 && graph codegen",
32
34
  "prepare:rinkeby": "yarn clean && node render-templates.js 4 && graph codegen",
33
35
  "prepare:sokol": "yarn clean && node render-templates.js 77 && graph codegen",
34
36
  "prepare:xdai": "yarn clean && node render-templates.js 100 && graph codegen",
@@ -50,5 +52,5 @@
50
52
  "mustache": "^4.2.0",
51
53
  "truffle-hdwallet-provider": "^1.0.4"
52
54
  },
53
- "gitHead": "a6967162fe1addfaa727cb3d3bac37fcabb2c7bb"
55
+ "gitHead": "c455af927697dad5fc3f4ff76475a230e9cb93d4"
54
56
  }
package/schema.graphql CHANGED
@@ -150,3 +150,14 @@ type UserAction @entity {
150
150
  createdBlock: BigInt!
151
151
  createdTimestamp: BigInt!
152
152
  }
153
+
154
+ type FactoryDeployment @entity {
155
+ id: ID!
156
+ token_address: Bytes!
157
+ token_symbol: String!
158
+ token_decimals: BigInt!
159
+ factory: Bytes!
160
+ realityETH: Bytes!
161
+ createdBlock: BigInt!
162
+ createdTimestamp: BigInt!
163
+ }
package/src/mapping.ts CHANGED
@@ -15,6 +15,7 @@ import {
15
15
  Withdrawal,
16
16
  Fund,
17
17
  UserAction,
18
+ FactoryDeployment,
18
19
  } from '../generated/schema'
19
20
 
20
21
  import {
@@ -429,5 +430,16 @@ function saveAnswer(contractQuestionId: string, answer: Bytes, bond: BigInt, ts:
429
430
  }
430
431
 
431
432
  export function handleFactoryRealityETHDeploy(event: RealityETH_ERC20_deployed): void {
432
- FactoryCreatedRealityETH.create(event.params.reality_eth)
433
+ FactoryCreatedRealityETH.create(event.params.reality_eth)
434
+
435
+ let deploymentId = event.address.toHexString() + event.params.token.toHexString();
436
+ let facdep = new FactoryDeployment(deploymentId)
437
+ facdep.token_address = event.params.token;
438
+ facdep.token_symbol = event.params.token_ticker;
439
+ facdep.token_decimals = new BigInt(event.params.decimals);
440
+ facdep.realityETH = event.params.reality_eth;
441
+ facdep.factory = event.address;
442
+ facdep.createdBlock = event.block.number;
443
+ facdep.createdTimestamp = event.block.timestamp;
444
+ facdep.save();
433
445
  }