diff --git a/scripts/build.sh b/scripts/build.sh index d5a2ff7..2ba4a56 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -8,6 +8,7 @@ registry_arbitrum=0x1675BF3F75046aCd131caD845eb8FF3Bed49a643 deployer_arbitrum=0x849B7B1102B0dcf6eC10f98b81C8D1c38f7cbf24 relayer_1_arbitrum=0xD7252C026c3cA28D73B4DeeF62FE6ADe86eC17A9 relayer_2_arbitrum=0x54FC6E302043aAF56154e8B4A7F01645eDAdA906 +relayer_3_arbitrum=0x9E0A538749A486bbF127F8848a6f2CF4e1e92DbD feeController_arbitrum=0x88586bfc840b99680c8cc753a36b51999608b1f6 block_arbitrum=117042327 @@ -16,6 +17,7 @@ registry_aurora=0x1675BF3F75046aCd131caD845eb8FF3Bed49a643 deployer_aurora=0x849B7B1102B0dcf6eC10f98b81C8D1c38f7cbf24 relayer_1_aurora=0xD7252C026c3cA28D73B4DeeF62FE6ADe86eC17A9 relayer_2_aurora=0x54FC6E302043aAF56154e8B4A7F01645eDAdA906 +relayer_3_aurora=0x9E0A538749A486bbF127F8848a6f2CF4e1e92DbD feeController_aurora=0x88586bfc840b99680c8cc753a36b51999608b1f6 block_aurora=104855032 @@ -24,6 +26,7 @@ registry_avalanche=0x1675BF3F75046aCd131caD845eb8FF3Bed49a643 deployer_avalanche=0x849B7B1102B0dcf6eC10f98b81C8D1c38f7cbf24 relayer_1_avalanche=0xD7252C026c3cA28D73B4DeeF62FE6ADe86eC17A9 relayer_2_avalanche=0x54FC6E302043aAF56154e8B4A7F01645eDAdA906 +relayer_3_avalanche=0x9E0A538749A486bbF127F8848a6f2CF4e1e92DbD feeController_avalanche=0x88586bfc840b99680c8cc753a36b51999608b1f6 block_avalanche=37130982 @@ -32,6 +35,7 @@ registry_base=0x1675BF3F75046aCd131caD845eb8FF3Bed49a643 deployer_base=0x849B7B1102B0dcf6eC10f98b81C8D1c38f7cbf24 relayer_1_base=0xD7252C026c3cA28D73B4DeeF62FE6ADe86eC17A9 relayer_2_base=0x54FC6E302043aAF56154e8B4A7F01645eDAdA906 +relayer_3_avalanche=0x9E0A538749A486bbF127F8848a6f2CF4e1e92DbD feeController_base=0x88586bfc840b99680c8cc753a36b51999608b1f6 block_base=5957564 @@ -40,6 +44,7 @@ registry_bsc=0x1675BF3F75046aCd131caD845eb8FF3Bed49a643 deployer_bsc=0x849B7B1102B0dcf6eC10f98b81C8D1c38f7cbf24 relayer_1_bsc=0xD7252C026c3cA28D73B4DeeF62FE6ADe86eC17A9 relayer_2_bsc=0x54FC6E302043aAF56154e8B4A7F01645eDAdA906 +relayer_3_bsc=0x9E0A538749A486bbF127F8848a6f2CF4e1e92DbD feeController_bsc=0x88586bfc840b99680c8cc753a36b51999608b1f6 block_bsc=33066995 @@ -48,6 +53,7 @@ registry_fantom=0x1675BF3F75046aCd131caD845eb8FF3Bed49a643 deployer_fantom=0x849B7B1102B0dcf6eC10f98b81C8D1c38f7cbf24 relayer_1_fantom=0xD7252C026c3cA28D73B4DeeF62FE6ADe86eC17A9 relayer_2_fantom=0x54FC6E302043aAF56154e8B4A7F01645eDAdA906 +relayer_3_fantom=0x9E0A538749A486bbF127F8848a6f2CF4e1e92DbD feeController_fantom=0x88586bfc840b99680c8cc753a36b51999608b1f6 block_fantom=69985942 @@ -56,6 +62,7 @@ registry_gnosis=0x1675BF3F75046aCd131caD845eb8FF3Bed49a643 deployer_gnosis=0x849B7B1102B0dcf6eC10f98b81C8D1c38f7cbf24 relayer_1_gnosis=0xD7252C026c3cA28D73B4DeeF62FE6ADe86eC17A9 relayer_2_gnosis=0x54FC6E302043aAF56154e8B4A7F01645eDAdA906 +relayer_3_gnosis=0x9E0A538749A486bbF127F8848a6f2CF4e1e92DbD feeController_gnosis=0x88586bfc840b99680c8cc753a36b51999608b1f6 block_gnosis=30715174 @@ -64,6 +71,7 @@ registry_mainnet=0x1675BF3F75046aCd131caD845eb8FF3Bed49a643 deployer_mainnet=0x849B7B1102B0dcf6eC10f98b81C8D1c38f7cbf24 relayer_1_mainnet=0xD7252C026c3cA28D73B4DeeF62FE6ADe86eC17A9 relayer_2_mainnet=0x54FC6E302043aAF56154e8B4A7F01645eDAdA906 +relayer_3_mainnet=0x9E0A538749A486bbF127F8848a6f2CF4e1e92DbD feeController_mainnet=0x88586bfc840b99680c8cc753a36b51999608b1f6 block_mainnet=18386855 @@ -72,6 +80,7 @@ registry_optimism=0x1675BF3F75046aCd131caD845eb8FF3Bed49a643 deployer_optimism=0x849B7B1102B0dcf6eC10f98b81C8D1c38f7cbf24 relayer_1_optimism=0xD7252C026c3cA28D73B4DeeF62FE6ADe86eC17A9 relayer_2_optimism=0x54FC6E302043aAF56154e8B4A7F01645eDAdA906 +relayer_3_optimism=0x9E0A538749A486bbF127F8848a6f2CF4e1e92DbD feeController_optimism=0x88586bfc840b99680c8cc753a36b51999608b1f6 block_optimism=111552683 @@ -80,6 +89,7 @@ registry_polygon=0x1675BF3F75046aCd131caD845eb8FF3Bed49a643 deployer_polygon=0x849B7B1102B0dcf6eC10f98b81C8D1c38f7cbf24 relayer_1_polygon=0xD7252C026c3cA28D73B4DeeF62FE6ADe86eC17A9 relayer_2_polygon=0x54FC6E302043aAF56154e8B4A7F01645eDAdA906 +relayer_3_polygon=0x9E0A538749A486bbF127F8848a6f2CF4e1e92DbD feeController_polygon=0x88586bfc840b99680c8cc753a36b51999608b1f6 block_polygon=49350048 @@ -88,6 +98,7 @@ registry_zkevm=0x1675BF3F75046aCd131caD845eb8FF3Bed49a643 deployer_zkevm=0x849B7B1102B0dcf6eC10f98b81C8D1c38f7cbf24 relayer_1_zkevm=0xD7252C026c3cA28D73B4DeeF62FE6ADe86eC17A9 relayer_2_zkevm=0x54FC6E302043aAF56154e8B4A7F01645eDAdA906 +relayer_3_zkevm=0x9E0A538749A486bbF127F8848a6f2CF4e1e92DbD feeController_zkevm=0x88586bfc840b99680c8cc753a36b51999608b1f6 block_zkevm=6788022 @@ -168,6 +179,18 @@ if [[ -z $RELAYER_2_ADDRESS ]]; then exit 1 fi +# Load relayer 3 address +if [[ -z $RELAYER_3_ADDRESS ]]; then + RELAYER_3_ADDRESS_VAR=relayer_3_$NETWORK + RELAYER_3_ADDRESS=${!RELAYER_3_ADDRESS_VAR} +fi + +# Validate relayer 3 address +if [[ -z $RELAYER_3_ADDRESS ]]; then + echo 'Please make sure a Relayer 3 address is provided' + exit 1 +fi + # Load fee controller address if [[ -z $FEE_CONTROLLER_ADDRESS ]]; then FEE_CONTROLLER_ADDRESS_VAR=feeController_$NETWORK @@ -198,6 +221,7 @@ sed -i -e "s/{{registryAddress}}/${REGISTRY_ADDRESS}/g" subgraph.yaml sed -i -e "s/{{deployerAddress}}/${DEPLOYER_ADDRESS}/g" subgraph.yaml sed -i -e "s/{{relayer1Address}}/${RELAYER_1_ADDRESS}/g" subgraph.yaml sed -i -e "s/{{relayer2Address}}/${RELAYER_2_ADDRESS}/g" subgraph.yaml +sed -i -e "s/{{relayer3Address}}/${RELAYER_3_ADDRESS}/g" subgraph.yaml sed -i -e "s/{{feeControllerAddress}}/${FEE_CONTROLLER_ADDRESS}/g" subgraph.yaml sed -i -e "s/{{blockNumber}}/${BLOCK_NUMBER}/g" subgraph.yaml rm -f subgraph.yaml-e @@ -208,7 +232,7 @@ output=$(yarn ts-node ./scripts/build-permissions-dictionary.ts) # Check dictionary build status if [ $? -ne 0 ]; then - echo "Error trying to build funcitons selectors dictionary with exit status $?" + echo "Error trying to build functions selectors dictionary with exit status $?" echo "$output" exit $? fi diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 5633661..2053625 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -144,6 +144,48 @@ dataSources: - event: ExecutorSet(indexed address,bool) handler: handleExecutorSet file: ./src/Relayer.ts + - kind: ethereum/contract + name: Relayer_3 + network: {{network}} + source: + address: '{{relayer3Address}}' + abi: Relayer + startBlock: {{blockNumber}} + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Relayer + abis: + - name: Relayer + file: ./node_modules/@mimic-fi/v3-relayer/artifacts/contracts/interfaces/IRelayer.sol/IRelayer.json + - name: Task + file: ./node_modules/@mimic-fi/v3-tasks/artifacts/contracts/interfaces/ITask.sol/ITask.json + - name: ERC20 + file: ./abis/IERC20.json + - name: AggregatorV3Interface + file: ./node_modules/@chainlink/contracts/abi/v0.8/AggregatorV3Interface.json + eventHandlers: + - event: Deposited(indexed address,uint256) + handler: handleDeposited + - event: GasPaid(indexed address,uint256,uint256) + handler: handleGasPaid + - event: QuotaPaid(indexed address,uint256) + handler: handleQuotaPaid + - event: SmartVaultCollectorSet(indexed address,indexed address) + handler: handleSmartVaultCollectorSet + - event: SmartVaultMaxQuotaSet(indexed address,uint256) + handler: handleSmartVaultMaxQuotaSet + - event: TaskExecuted(indexed address,indexed address,bytes,bool,bytes,uint256,uint256) + handler: handleTaskExecuted + - event: Withdrawn(indexed address,uint256) + handler: handleWithdrawn + - event: DefaultCollectorSet(indexed address) + handler: handleDefaultDefaultCollectorSet + - event: ExecutorSet(indexed address,bool) + handler: handleExecutorSet + file: ./src/Relayer.ts - kind: ethereum/contract name: FeeController network: {{network}}