Skip to content

Commit

Permalink
Merge pull request #9 from balancer/add-networks
Browse files Browse the repository at this point in the history
add networks: arb, base, sonic
  • Loading branch information
mendesfabio authored Jan 22, 2025
2 parents 76b8e77 + 9abbcf3 commit 0d46e57
Show file tree
Hide file tree
Showing 9 changed files with 573 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/deploy-v3-pools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,30 @@ jobs:
manifest-file: subgraph.sepolia.yaml
secrets:
GRAPH_DEPLOY_KEY: ${{ secrets.GRAPH_DEPLOY_KEY }}

deploy-arbitrum:
uses: ./.github/workflows/deploy-subgraph.yml
with:
working-directory: subgraphs/v3-pools
subgraph-name: balancer-pools-v3-arbitrum
manifest-file: subgraph.arbitrum-one.yaml
secrets:
GRAPH_DEPLOY_KEY: ${{ secrets.GRAPH_DEPLOY_KEY }}

deploy-base:
uses: ./.github/workflows/deploy-subgraph.yml
with:
working-directory: subgraphs/v3-pools
subgraph-name: balancer-pools-v3-base
manifest-file: subgraph.base.yaml
secrets:
GRAPH_DEPLOY_KEY: ${{ secrets.GRAPH_DEPLOY_KEY }}

deploy-sonic:
uses: ./.github/workflows/deploy-subgraph.yml
with:
working-directory: subgraphs/v3-pools
subgraph-name: balancer-v3-pools-sonic
manifest-file: subgraph.sonic.yaml
secrets:
GRAPH_DEPLOY_KEY: ${{ secrets.BEETS_DEPLOY_KEY }}
27 changes: 27 additions & 0 deletions .github/workflows/deploy-v3-vault.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,30 @@ jobs:
manifest-file: subgraph.sepolia.yaml
secrets:
GRAPH_DEPLOY_KEY: ${{ secrets.GRAPH_DEPLOY_KEY }}

deploy-arbitrum:
uses: ./.github/workflows/deploy-subgraph.yml
with:
working-directory: subgraphs/v3-vault
subgraph-name: balancer-v3-arbitrum
manifest-file: subgraph.arbitrum-one.yaml
secrets:
GRAPH_DEPLOY_KEY: ${{ secrets.GRAPH_DEPLOY_KEY }}

deploy-base:
uses: ./.github/workflows/deploy-subgraph.yml
with:
working-directory: subgraphs/v3-vault
subgraph-name: balancer-v3-base
manifest-file: subgraph.base.yaml
secrets:
GRAPH_DEPLOY_KEY: ${{ secrets.GRAPH_DEPLOY_KEY }}

deploy-sonic:
uses: ./.github/workflows/deploy-subgraph.yml
with:
working-directory: subgraphs/v3-vault
subgraph-name: balancer-v3-vault-sonic
manifest-file: subgraph.sonic.yaml
secrets:
GRAPH_DEPLOY_KEY: ${{ secrets.BEETS_DEPLOY_KEY }}
54 changes: 54 additions & 0 deletions networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,59 @@
"address": "0xd67F485C07D258B3e93835a3799d862ffcB55923",
"startBlock": 7216947
}
},
"arbitrum-one": {
"Vault": {
"address": "0xbA1333333333a1BA1108E8412f11850A5C319bA9",
"startBlock": 297810187
},
"ProtocolFeeController": {
"address": "0xa731C23D7c95436Baaae9D52782f966E1ed07cc8",
"startBlock": 297810187
},
"WeightedPoolFactory": {
"address": "0xD961E30156C2E0D0d925A0De45f931CB7815e970",
"startBlock": 297830075
},
"StablePoolFactory": {
"address": "0xEB1eeaBF0126d813589C3D2CfeFFE410D9aE3863",
"startBlock": 297829373
}
},
"base": {
"Vault": {
"address": "0xbA1333333333a1BA1108E8412f11850A5C319bA9",
"startBlock": 25343854
},
"ProtocolFeeController": {
"address": "0xa731C23D7c95436Baaae9D52782f966E1ed07cc8",
"startBlock": 25343854
},
"WeightedPoolFactory": {
"address": "0x5cF4928a3205728bd12830E1840F7DB85c62a4B9",
"startBlock": 25347415
},
"StablePoolFactory": {
"address": "0xb9F8AB3ED3F3aCBa64Bc6cd2DcA74B7F38fD7B88",
"startBlock": 25347318
}
},
"sonic": {
"Vault": {
"address": "0xbA1333333333a1BA1108E8412f11850A5C319bA9",
"startBlock": 368135
},
"ProtocolFeeController": {
"address": "0xa731C23D7c95436Baaae9D52782f966E1ed07cc8",
"startBlock": 368135
},
"WeightedPoolFactory": {
"address": "0x4726Eb55c37F0353F6d5011B5652d44A87d60fc3",
"startBlock": 381432
},
"StablePoolFactory": {
"address": "0x815Ab57a5a2E4976cEC0b43C2D50CF26EF6F31Fd",
"startBlock": 381473
}
}
}
50 changes: 50 additions & 0 deletions subgraphs/v3-pools/subgraph.arbitrum-one.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
specVersion: 1.0.0
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: WeightedPoolFactory
network: arbitrum-one
source:
abi: BasePoolFactory
address: "0xD961E30156C2E0D0d925A0De45f931CB7815e970"
startBlock: 297830075
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Factory
- Pool
abis:
- name: WeightedPool
file: ./abis/WeightedPool.json
- name: BasePoolFactory
file: ./abis/BasePoolFactory.json
eventHandlers:
- event: PoolCreated(indexed address)
handler: handleWeightedPoolCreated
file: ./src/mappings/weighted.ts
- kind: ethereum
name: StablePoolFactory
network: arbitrum-one
source:
abi: BasePoolFactory
address: "0xEB1eeaBF0126d813589C3D2CfeFFE410D9aE3863"
startBlock: 297829373
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Factory
- Pool
abis:
- name: StablePool
file: ./abis/StablePool.json
- name: BasePoolFactory
file: ./abis/BasePoolFactory.json
eventHandlers:
- event: PoolCreated(indexed address)
handler: handleStablePoolCreated
file: ./src/mappings/stable.ts
50 changes: 50 additions & 0 deletions subgraphs/v3-pools/subgraph.base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
specVersion: 1.0.0
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: WeightedPoolFactory
network: base
source:
abi: BasePoolFactory
address: "0x5cF4928a3205728bd12830E1840F7DB85c62a4B9"
startBlock: 25347415
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Factory
- Pool
abis:
- name: WeightedPool
file: ./abis/WeightedPool.json
- name: BasePoolFactory
file: ./abis/BasePoolFactory.json
eventHandlers:
- event: PoolCreated(indexed address)
handler: handleWeightedPoolCreated
file: ./src/mappings/weighted.ts
- kind: ethereum
name: StablePoolFactory
network: base
source:
abi: BasePoolFactory
address: "0xb9F8AB3ED3F3aCBa64Bc6cd2DcA74B7F38fD7B88"
startBlock: 25347318
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Factory
- Pool
abis:
- name: StablePool
file: ./abis/StablePool.json
- name: BasePoolFactory
file: ./abis/BasePoolFactory.json
eventHandlers:
- event: PoolCreated(indexed address)
handler: handleStablePoolCreated
file: ./src/mappings/stable.ts
50 changes: 50 additions & 0 deletions subgraphs/v3-pools/subgraph.sonic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
specVersion: 1.0.0
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: WeightedPoolFactory
network: sonic
source:
abi: BasePoolFactory
address: "0x4726Eb55c37F0353F6d5011B5652d44A87d60fc3"
startBlock: 381432
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Factory
- Pool
abis:
- name: WeightedPool
file: ./abis/WeightedPool.json
- name: BasePoolFactory
file: ./abis/BasePoolFactory.json
eventHandlers:
- event: PoolCreated(indexed address)
handler: handleWeightedPoolCreated
file: ./src/mappings/weighted.ts
- kind: ethereum
name: StablePoolFactory
network: sonic
source:
abi: BasePoolFactory
address: "0x815Ab57a5a2E4976cEC0b43C2D50CF26EF6F31Fd"
startBlock: 381473
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Factory
- Pool
abis:
- name: StablePool
file: ./abis/StablePool.json
- name: BasePoolFactory
file: ./abis/BasePoolFactory.json
eventHandlers:
- event: PoolCreated(indexed address)
handler: handleStablePoolCreated
file: ./src/mappings/stable.ts
105 changes: 105 additions & 0 deletions subgraphs/v3-vault/subgraph.arbitrum-one.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
specVersion: 1.0.0
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: Vault
network: arbitrum-one
source:
abi: Vault
address: "0xbA1333333333a1BA1108E8412f11850A5C319bA9"
startBlock: 297810187
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Vault
- Pool
abis:
- name: ERC20
file: ./abis/ERC20.json
- name: ERC4626
file: ./abis/ERC4626.json
- name: Vault
file: ./abis/Vault.json
- name: VaultExtension
file: ./abis/VaultExtension.json
- name: ProtocolFeeController
file: ./abis/ProtocolFeeController.json
eventHandlers:
- event: PoolRegistered(indexed address,indexed address,(address,uint8,address,bool)[],uint256,uint32,(address,address,address),(bool,bool,bool,bool,bool,bool,bool,bool,bool,bool,address),(bool,bool,bool,bool))
handler: handlePoolRegistered
- event: LiquidityAdded(indexed address,indexed address,indexed uint8,uint256,uint256[],uint256[])
handler: handleLiquidityAdded
- event: LiquidityRemoved(indexed address,indexed address,indexed uint8,uint256,uint256[],uint256[])
handler: handleLiquidityRemoved
- event: Swap(indexed address,indexed address,indexed address,uint256,uint256,uint256,uint256)
handler: handleSwap
- event: LiquidityAddedToBuffer(indexed address,uint256,uint256,bytes32)
handler: handleLiquidityAddedToBuffer
- event: LiquidityRemovedFromBuffer(indexed address,uint256,uint256,bytes32)
handler: handleLiquidityRemovedFromBuffer
- event: Wrap(indexed address,uint256,uint256,bytes32)
handler: handleWrap
- event: Unwrap(indexed address,uint256,uint256,bytes32)
handler: handleUnwrap
file: ./src/mappings/vault.ts

- kind: ethereum
name: ProtocolFeeController
network: arbitrum-one
source:
abi: ProtocolFeeController
address: "0xa731C23D7c95436Baaae9D52782f966E1ed07cc8"
startBlock: 297810187
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- Vault
- Pool
abis:
- name: ProtocolFeeController
file: ./abis/ProtocolFeeController.json
eventHandlers:
- event: GlobalProtocolSwapFeePercentageChanged(uint256)
handler: handleGlobalProtocolSwapFeePercentageChanged
- event: GlobalProtocolYieldFeePercentageChanged(uint256)
handler: handleGlobalProtocolYieldFeePercentageChanged
- event: ProtocolSwapFeePercentageChanged(indexed address,uint256)
handler: handleProtocolSwapFeePercentageChanged
- event: ProtocolYieldFeePercentageChanged(indexed address,uint256)
handler: handleProtocolYieldFeePercentageChanged
- event: PoolCreatorSwapFeePercentageChanged(indexed address,uint256)
handler: handlePoolCreatorSwapFeePercentageChanged
- event: PoolCreatorYieldFeePercentageChanged(indexed address,uint256)
handler: handlePoolCreatorYieldFeePercentageChanged
- event: ProtocolSwapFeeCollected(indexed address,indexed address,uint256)
handler: handleProtocolSwapFeeCollected
- event: ProtocolYieldFeeCollected(indexed address,indexed address,uint256)
handler: handleProtocolYieldFeeCollected
- event: ProtocolFeesWithdrawn(indexed address,indexed address,indexed address,uint256)
handler: handleProtocolFeesWithdrawn
file: ./src/mappings/controller.ts

templates:
- kind: ethereum/contract
name: BPT
network: arbitrum-one
source:
abi: BPT
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- PoolShare
abis:
- name: BPT
file: ./abis/ERC20.json
eventHandlers:
- event: Transfer(indexed address,indexed address,uint256)
handler: handleTransfer
file: ./src/mappings/bpt.ts
Loading

0 comments on commit 0d46e57

Please sign in to comment.