diff --git a/.github/workflows/deploy-v3-pools.yml b/.github/workflows/deploy-v3-pools.yml index ecf3f3f..0a38942 100644 --- a/.github/workflows/deploy-v3-pools.yml +++ b/.github/workflows/deploy-v3-pools.yml @@ -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 }} \ No newline at end of file diff --git a/.github/workflows/deploy-v3-vault.yml b/.github/workflows/deploy-v3-vault.yml index e47d647..71e1398 100644 --- a/.github/workflows/deploy-v3-vault.yml +++ b/.github/workflows/deploy-v3-vault.yml @@ -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 }} \ No newline at end of file diff --git a/networks.json b/networks.json index d6c8cdb..93b4ba0 100644 --- a/networks.json +++ b/networks.json @@ -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 + } } } diff --git a/subgraphs/v3-pools/subgraph.arbitrum-one.yaml b/subgraphs/v3-pools/subgraph.arbitrum-one.yaml new file mode 100644 index 0000000..6545c29 --- /dev/null +++ b/subgraphs/v3-pools/subgraph.arbitrum-one.yaml @@ -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 diff --git a/subgraphs/v3-pools/subgraph.base.yaml b/subgraphs/v3-pools/subgraph.base.yaml new file mode 100644 index 0000000..446e3b0 --- /dev/null +++ b/subgraphs/v3-pools/subgraph.base.yaml @@ -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 diff --git a/subgraphs/v3-pools/subgraph.sonic.yaml b/subgraphs/v3-pools/subgraph.sonic.yaml new file mode 100644 index 0000000..780b634 --- /dev/null +++ b/subgraphs/v3-pools/subgraph.sonic.yaml @@ -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 diff --git a/subgraphs/v3-vault/subgraph.arbitrum-one.yaml b/subgraphs/v3-vault/subgraph.arbitrum-one.yaml new file mode 100644 index 0000000..816857d --- /dev/null +++ b/subgraphs/v3-vault/subgraph.arbitrum-one.yaml @@ -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 diff --git a/subgraphs/v3-vault/subgraph.base.yaml b/subgraphs/v3-vault/subgraph.base.yaml new file mode 100644 index 0000000..7757227 --- /dev/null +++ b/subgraphs/v3-vault/subgraph.base.yaml @@ -0,0 +1,105 @@ +specVersion: 1.0.0 +schema: + file: ./schema.graphql +dataSources: + - kind: ethereum + name: Vault + network: base + source: + abi: Vault + address: "0xbA1333333333a1BA1108E8412f11850A5C319bA9" + startBlock: 25343854 + 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: base + source: + abi: ProtocolFeeController + address: "0xa731C23D7c95436Baaae9D52782f966E1ed07cc8" + startBlock: 25343854 + 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: base + 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 diff --git a/subgraphs/v3-vault/subgraph.sonic.yaml b/subgraphs/v3-vault/subgraph.sonic.yaml new file mode 100644 index 0000000..1553e29 --- /dev/null +++ b/subgraphs/v3-vault/subgraph.sonic.yaml @@ -0,0 +1,105 @@ +specVersion: 1.0.0 +schema: + file: ./schema.graphql +dataSources: + - kind: ethereum + name: Vault + network: sonic + source: + abi: Vault + address: "0xbA1333333333a1BA1108E8412f11850A5C319bA9" + startBlock: 368135 + 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: sonic + source: + abi: ProtocolFeeController + address: "0xa731C23D7c95436Baaae9D52782f966E1ed07cc8" + startBlock: 368135 + 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: sonic + 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