Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non-forked testnet indexer with custom chainId - rc5d #25

Merged
merged 8 commits into from
Jun 27, 2023
Merged
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
3 changes: 1 addition & 2 deletions clean-container.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
docker-compose down -v
docker rm ajna-testnet-subgraph
sudo rm -rf data
source .env
docker-compose up --force-recreate
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ services:
- ./data/ipfs:/data/ipfs
postgres:
image: postgres
ports:
- '5432:5432'
expose:
- '5432'
command: ["postgres", "-c", "shared_preload_libraries=pg_stat_statements"]
environment:
POSTGRES_USER: graph-node
Expand Down
11 changes: 7 additions & 4 deletions ganache-indexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.7'

services:
ajna-testnet:
image: ghcr.io/ajna-finance/ajna-testnet:rc5
image: ghcr.io/ajna-finance/ajna-testnet:rc5d
ports:
- 8555:8555
container_name: ajna-testnet-subgraph
Expand All @@ -28,11 +28,14 @@ services:
postgres_db: graph-node
ipfs: 'ipfs:5001'
ethereum: ganache:http://ajna-testnet:8555
ETHEREUM_REORG_THRESHOLD: 1
ETHEREUM_ANCESTOR_COUNT: 1
GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER: 0
GRAPH_LOG: info
networks:
- ajna_test_network
ipfs:
image: ipfs/kubo:master-latest
image: ipfs/kubo:v0.20.0
ports:
- '5001:5001'
networks:
Expand All @@ -41,8 +44,8 @@ services:
- ./data/ipfs:/data/ipfs
postgres:
image: postgres
ports:
- '5432:5432'
expose:
- '5432'
command: ["postgres", "-c", "shared_preload_libraries=pg_stat_statements"]
environment:
POSTGRES_USER: graph-node
Expand Down
18 changes: 9 additions & 9 deletions networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@
},
"ganache": {
"ERC20PoolFactory": {
"address": "0xD86c4A8b172170Da0d5C0C1F12455bA80Eaa42AD",
"startBlock": 16295000
"address": "0x9617ABE221F9A9c492D5348be56aef4Db75A692d",
"startBlock": 0
},
"ERC721PoolFactory": {
"address": "0x9617ABE221F9A9c492D5348be56aef4Db75A692d",
"startBlock": 16295000
"address": "0x4f05DA51eAAB00e5812c54e370fB95D4C9c51F21",
"startBlock": 0
},
"PositionManager": {
"address": "0x6c5c7fD98415168ada1930d44447790959097482",
"startBlock": 16295000
"address": "0x6548dF23A854f72335902e58a1e59B50bb3f11F1",
"startBlock": 0
},
"RewardsManager": {
"address": "0x6548dF23A854f72335902e58a1e59B50bb3f11F1",
"startBlock": 16295000
"address": "0xdF7403003a16c49ebA5883bB5890d474794cea5a",
"startBlock": 0
},
"GrantFund": {
"address": "0xE340B87CEd1af1AbE1CE8D617c84B7f168e3b18b",
"startBlock": 16295000
"startBlock": 0
}
}
}
6 changes: 3 additions & 3 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ export const MAX_BUCKET_INDEX = 4156;
// Pool addresses per network
export const erc20FactoryAddressTable = new TypedMap<string, Address>()
erc20FactoryAddressTable.set('goerli', Address.fromString('0xb54FE3ee12926e63FF4A5163766fb93eDbADd5f3'))
erc20FactoryAddressTable.set('ganache', Address.fromString('0xD86c4A8b172170Da0d5C0C1F12455bA80Eaa42AD'))
erc20FactoryAddressTable.set('ganache', Address.fromString('0x9617ABE221F9A9c492D5348be56aef4Db75A692d'))
export const poolInfoUtilsAddressTable = new TypedMap<string, Address>()
poolInfoUtilsAddressTable.set('goerli', Address.fromString('0x28ef92e694d1044917981837b21e5eA994931c71'))
poolInfoUtilsAddressTable.set('ganache', Address.fromString('0x4f05DA51eAAB00e5812c54e370fB95D4C9c51F21'))
poolInfoUtilsAddressTable.set('ganache', Address.fromString('0x6c5c7fD98415168ada1930d44447790959097482'))
export const positionManagerAddressTable = new TypedMap<string, Address>()
positionManagerAddressTable.set('goerli', Address.fromString('0x31E3B448cAFF35e9eEb232053f4d5e76776a1C83'))
positionManagerAddressTable.set('ganache', Address.fromString('0x6c5c7fD98415168ada1930d44447790959097482'))
positionManagerAddressTable.set('ganache', Address.fromString('0x6548dF23A854f72335902e58a1e59B50bb3f11F1'))
export const grantFundAddressTable = new TypedMap<string, Address>()
grantFundAddressTable.set('goerli', Address.fromString('0xd364766E1D431e0bb99705c8eb0e6665C3b32eB5'))
grantFundAddressTable.set('ganache', Address.fromString('0xE340B87CEd1af1AbE1CE8D617c84B7f168e3b18b'))
Expand Down
32 changes: 16 additions & 16 deletions subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ dataSources:
name: PositionManager
source:
abi: PositionManager
address: "0x31E3B448cAFF35e9eEb232053f4d5e76776a1C83"
startBlock: 9129648
address: "0x6548dF23A854f72335902e58a1e59B50bb3f11F1"
startBlock: 0
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand Down Expand Up @@ -46,13 +46,13 @@ dataSources:
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleTransfer
file: ./src/position-manager.ts
network: goerli
network: ganache
- kind: ethereum
name: ERC20PoolFactory
source:
abi: ERC20PoolFactory
address: "0xb54FE3ee12926e63FF4A5163766fb93eDbADd5f3"
startBlock: 9129648
address: "0x9617ABE221F9A9c492D5348be56aef4Db75A692d"
startBlock: 0
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand All @@ -72,13 +72,13 @@ dataSources:
- event: PoolCreated(address)
handler: handlePoolCreated
file: ./src/erc-20-pool-factory.ts
network: goerli
network: ganache
- kind: ethereum
name: RewardsManager
source:
abi: RewardsManager
address: "0x015441062c2aad707629D9A1f2029074F58ad5aE"
startBlock: 9129648
address: "0xdF7403003a16c49ebA5883bB5890d474794cea5a"
startBlock: 0
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand Down Expand Up @@ -107,13 +107,13 @@ dataSources:
- event: UpdateExchangeRates(indexed address,indexed address,uint256[],uint256)
handler: handleUpdateExchangeRates
file: ./src/rewards-manager.ts
network: goerli
network: ganache
- kind: ethereum
name: ERC721PoolFactory
source:
abi: ERC721PoolFactory
address: "0x87c2B348F487955e58F75B8Ca72c1345f0bA6906"
startBlock: 9129648
address: "0x4f05DA51eAAB00e5812c54e370fB95D4C9c51F21"
startBlock: 0
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand All @@ -131,13 +131,13 @@ dataSources:
- event: PoolCreated(address)
handler: handlePoolCreated
file: ./src/erc-721-pool-factory.ts
network: goerli
network: ganache
- kind: ethereum
name: GrantFund
source:
abi: GrantFund
address: "0xd364766E1D431e0bb99705c8eb0e6665C3b32eB5"
startBlock: 9129753
address: "0xE340B87CEd1af1AbE1CE8D617c84B7f168e3b18b"
startBlock: 0
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand Down Expand Up @@ -169,7 +169,7 @@ dataSources:
- event: VoteCast(indexed address,uint256,uint8,uint256,string)
handler: handleVoteCast
file: ./src/grant-fund.ts
network: goerli
network: ganache
templates:
- kind: ethereum
name: ERC20Pool
Expand Down Expand Up @@ -273,4 +273,4 @@ templates:
- event: UpdateInterestRate(uint256,uint256)
handler: handleUpdateInterestRate
file: ./src/erc-20-pool.ts
network: goerli
network: ganache