Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
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: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env
build/
node_modules/
src/types/
Expand All @@ -8,4 +9,4 @@ yarn-error.log
data/ipfs
data/postgres
*.js
subgraph*.yaml
subgraph*.yaml
52 changes: 52 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
services:
postgres:
image: postgres:14
ports:
- "5434:5432"
command:
[
"postgres",
"-cshared_preload_libraries=pg_stat_statements",
"-cmax_connections=200",
]
environment:
POSTGRES_USER: graph-node
POSTGRES_PASSWORD: let-me-in
POSTGRES_DB: graph-node
POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
volumes:
- postgres_data:/var/lib/postgresql/data

ipfs:
image: ipfs/kubo:latest
ports:
- "5001:5001"
- "8080:8080"
command: daemon
volumes:
- ipfs_data:/data/ipfs

graph-node:
image: graphprotocol/graph-node
depends_on:
- postgres
- ipfs
ports:
- "8000:8000" # GraphQL endpoint
- "8020:8020" # Admin (deploy)
- "8030:8030" # Status API
environment:
postgres_host: postgres
postgres_user: graph-node
postgres_pass: let-me-in
postgres_db: graph-node
ipfs: "ipfs:5001"
ethereum: "mainnet:https://lb.drpc.org/ogrpc?network=ethereum&dkey=AqE6WN_rjEghpXA5G1Meef-5siiudm0R7493hlDYfw4q"
# ethereum: "mainnet:https://mainnet.infura.io/v3/978eeafc4ba34908a9a839ac470207ff"
GRAPH_LOG: debug
extra_hosts:
- "host.docker.internal:host-gateway"

volumes:
postgres_data:
ipfs_data:
102 changes: 4 additions & 98 deletions manifest.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ dataSources:
- kind: ethereum/contract
name: Vault
network: {{network}}
context:
Comment thread
gmbronco marked this conversation as resolved.
storeEventsFrom:
type: BigInt
data: '{{Vault.storeEventsFrom}}'
source:
address: '{{Vault.address}}'
abi: Vault
Expand All @@ -56,13 +60,7 @@ dataSources:
- Balancer
- Pool
- PoolToken
- User
- UserInternalBalance
- Token
- TokenSnapshot
- TradePair
- TradePairSnapshot
- BalancerSnapshot
abis:
- name: Vault
file: ./abis/Vault.json
Expand All @@ -85,8 +83,6 @@ dataSources:
handler: handleBalanceChange
- event: PoolBalanceManaged(indexed bytes32,indexed address,indexed address,int256,int256)
handler: handleBalanceManage
- event: InternalBalanceChanged(indexed address,indexed address,int256)
handler: handleInternalBalanceChange
{{#if WeightedPoolFactory}}
- kind: ethereum/contract
name: WeightedPoolFactory
Expand Down Expand Up @@ -430,39 +426,6 @@ dataSources:
- event: PoolCreated(indexed address)
handler: handleNewInvestmentPool
{{/if}}
{{#if ManagedPoolV2Factory}}
- kind: ethereum/contract
name: ManagedPoolV2Factory
network: {{network}}
source:
address: '{{ManagedPoolV2Factory.address}}'
abi: ManagedPoolV2Factory
startBlock: {{ManagedPoolV2Factory.startBlock}}
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/poolFactory.ts
entities:
- Balancer
- Pool
abis:
- name: Vault
file: ./abis/Vault.json
- name: ERC20
file: ./abis/ERC20.json
- name: WeightedPool
file: ./abis/WeightedPool.json
- name: WeightedPoolV2
file: ./abis/WeightedPoolV2.json
- name: ManagedPoolV2Factory
file: ./abis/ManagedPoolV2Factory.json
- name: ManagedPool
file: ./abis/ManagedPoolV2.json
eventHandlers:
- event: PoolCreated(indexed address)
handler: handleNewManagedPoolV2
{{/if}}
{{#if ManagedKassandraPoolControllerFactory}}
- kind: ethereum/contract
name: ManagedKassandraPoolControllerFactory
Expand Down Expand Up @@ -2136,62 +2099,6 @@ templates:
handler: handleManagementFeePercentageChanged
- event: PausedStateChanged(bool)
handler: handlePausedStateChanged
- kind: ethereum/contract
name: ManagedPool
network: {{network}}
source:
abi: ManagedPool
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
file: ./src/mappings/poolController.ts
entities:
- Pool
- PoolShare
- Swap
- PoolToken
- GradualWeightUpdate
abis:
- name: WeightedPool
file: ./abis/WeightedPool.json
- name: WeightedPoolV2
file: ./abis/WeightedPoolV2.json
- name: ManagedPool
file: ./abis/ManagedPoolV2.json
- name: Vault
file: ./abis/Vault.json
- name: ERC20
file: ./abis/ERC20.json
eventHandlers:
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
- event: SwapEnabledSet(bool)
handler: handleSwapEnabledSet
- event: PausedStateChanged(bool)
handler: handlePausedStateChanged
- event: JoinExitEnabledSet(bool)
handler: handleJoinExitEnabledSet
- event: MustAllowlistLPsSet(bool)
handler: handleMustAllowlistLPsSet
- event: RecoveryModeStateChanged(bool)
handler: handleRecoveryModeStateChanged
- event: CircuitBreakerSet(indexed address,uint256,uint256,uint256)
handler: handleCircuitBreakerSet
- event: TokenAdded(indexed address,uint256)
handler: handleTokenAdded
- event: TokenRemoved(indexed address)
handler: handleTokenRemoved
- event: ManagementAumFeeCollected(uint256)
handler: handleManagementAumFeeCollected
- event: GradualSwapFeeUpdateScheduled(uint256,uint256,uint256,uint256)
handler: handleGradualSwapFeeUpdateScheduled
- event: GradualWeightUpdateScheduled(uint256,uint256,uint256[],uint256[])
handler: handleGradualWeightUpdateScheduled
- event: ManagementAumFeePercentageChanged(uint256)
handler: handleManagementAumFeePercentageChanged
- event: ProtocolFeePercentageCacheUpdated(bytes32)
handler: handleEncodedProtocolFeePercentageCacheUpdated
- kind: ethereum/contract
name: StablePhantomPool
network: {{network}}
Expand Down Expand Up @@ -2480,4 +2387,3 @@ templates:
eventHandlers:
- event: AnswerUpdated(indexed int256,indexed uint256,uint256)
handler: handleAnswerUpdated

7 changes: 1 addition & 6 deletions networks.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
mainnet:
network: mainnet
graft:
# Apr-11-2024 02:34:11 PM +UTC
block: 19633000
# always make sure the base subgraph has not been pruned
# it should be possible to run time travel queries on it going back to the vault's startBlock
base: QmX6XKG5dSUf2FjKpeAdVPjbZSZ5qptnGGegHcwk4367Ph
EventEmitter:
address: "0x1ACfEEA57d2ac674d7E65964f155AB9348A6C290"
startBlock: 16419620
Vault:
address: "0xBA12222222228d8Ba445958a75a0704d566BF2C8"
startBlock: 12272146
storeEventsFrom: "23817625"
WeightedPoolFactory:
address: "0x8E9aa87E45e92bad84D5F8DD1bff34Fb92637dE9"
startBlock: 12272146
Expand Down
Loading
Loading