Skip to content
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
Empty file added README.md
Empty file.
754 changes: 269 additions & 485 deletions abis/IDistributor.json

Large diffs are not rendered by default.

671 changes: 671 additions & 0 deletions abis/IDistributor_Nexus.json

Large diffs are not rendered by default.

29 changes: 2 additions & 27 deletions networks.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,7 @@
{
"mainnet": {
"nexus_distributor": {
"address": "0x0000000000000000000000000000000000000000",
"startBlock": 13212759
},
"insurace_distributor": {
"address": "0x98fb0e1191651b6292d3482cebf54e6d35542ca4",
"startBlock": 14416212
},
"ease_distributor": {
"address": "0xF11186032dF1E2723600A253A975fcb3dC7bd419",
"startBlock": 15135842
}
},
"bsc": {
"insurace_distributor": {
"address": "0x68f4c3a5ac3ea721c67fc1061e02d39fb55e9fa9",
"startBlock": 12753267
}
},
"matic": {
"insurace_distributor": {
"address": "0x371BdDD1321D24C130d79Ec85f125dd34928B054",
"startBlock": 21512216
}
},
"avalanche": {
"insurace_distributor": {
"insurace": {
"name": "insurace",
"address": "0x375d9567b483814d1275869b543101b725779b67",
"startBlock": 11943843
}
Expand Down
40 changes: 40 additions & 0 deletions networks_all.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"mainnet": [
{
"name": "nexus_v2",
"address": "0x425b3a68f1fd5de26b4b9f4be8049e36406b187a",
"startBlock": 13212759
},
{
"name": "insurace",
"address": "0x98fb0e1191651b6292d3482cebf54e6d35542ca4",
"startBlock": 14416212
},
{
"name": "ease",
"address": "0xF11186032dF1E2723600A253A975fcb3dC7bd419",
"startBlock": 15135842
}
],
"bsc": [
{
"name": "insurace",
"address": "0x68f4c3a5ac3ea721c67fc1061e02d39fb55e9fa9",
"startBlock": 12753267
}
],
"matic": [
{
"name": "insurace",
"address": "0x371BdDD1321D24C130d79Ec85f125dd34928B054",
"startBlock": 21512216
}
],
"avalanche": [
{
"name": "insurace",
"address": "0x375d9567b483814d1275869b543101b725779b67",
"startBlock": 11943843
}
]
}
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@
"scripts": {
"codegen": "graph codegen",
"build": "graph build",
"prep-subgraph:mainnet": "mustache networks_all.json subgraphs/mainnet.template.yaml > subgraph.yaml",
"prep-subgraph:matic": "mustache networks_all.json subgraphs/matic.template.yaml > subgraph.yaml",
"prep-subgraph:bsc": "mustache networks_all.json subgraphs/bsc.template.yaml > subgraph.yaml",
"prep-subgraph:avalanche": "mustache networks_all.json subgraphs/avalanche.template.yaml > subgraph.yaml",
"deploy": "graph deploy --node https://api.studio.thegraph.com/deploy/ brightunion_distributors",
"create-local": "graph create --node http://localhost:8020/ brightunion_distributors",
"remove-local": "graph remove --node http://localhost:8020/ brightunion_distributors",
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 brightunion_distributors"
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 brightunion_distributors",
"deploy-studio": "graph build && graph deploy --studio bu-distributors-mainnet",
"deploy-hosted:bsc": "graph deploy --product hosted-service --network bsc bright-union/bu-distributors-avalanche"
},
"dependencies": {
"@graphprotocol/graph-cli": "0.32.0",
"@graphprotocol/graph-ts": "0.27.0"
"@graphprotocol/graph-ts": "0.27.0",
"mustache": "^4.2.0"
}
}
15 changes: 10 additions & 5 deletions schema.graphql
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
type CoverBought @entity {
type BuyCoverEvent @entity {
id: ID!
buyer: Bytes!
coverId: BigInt!
buyer: Bytes! # address
contractAddress: Bytes! # address
feePercentage: BigInt!
coverPrice: BigInt!
expiry: BigInt!
contractAddress: Bytes!
amount: BigInt!
price: BigInt!
network: String!
distributor: Bytes!
timestamp: BigInt!
blockNumber: BigInt!
transactionHash: Bytes!
asset: Bytes!
}
Loading