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

feat: update robot operator, maxGasLimit for keepers #9

Merged
merged 14 commits into from
Sep 12, 2024
Merged
23 changes: 15 additions & 8 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ LEDGER_SENDER=
PRIVATE_KEY=

# Test rpc_endpoints
RPC_MAINNET=https://rpc.flashbots.net
RPC_MAINNET=https://eth.llamarpc.com
RPC_AVALANCHE=https://api.avax.network/ext/bc/C/rpc
RPC_OPTIMISM=https://mainnet.optimism.io
RPC_POLYGON=https://polygon-rpc.com
RPC_ARBITRUM=https://arb1.arbitrum.io/rpc
RPC_OPTIMISM=https://optimism.llamarpc.com
RPC_POLYGON=https://polygon.llamarpc.com
RPC_ARBITRUM=https://arbitrum.llamarpc.com
RPC_FANTOM=https://rpc.ftm.tools
RPC_HARMONY=https://api.harmony.one
RPC_SEPOLIA=https://rpc.sepolia.org
RPC_FUJI=https://rpc.ankr.com/avalanche_fuji
RPC_METIS=https://andromeda.metis.io/?owner=1088
RPC_BASE=https://base.llamarpc.com
RPC_ZKEVM=https://zkevm-rpc.com
RPC_GNOSIS=https://rpc.ankr.com/gnosis
RPC_BNB=https://binance.llamarpc.com
RPC_SCROLL=https://rpc.scroll.io

# Etherscan api keys for verification & download utils
ETHERSCAN_API_KEY_MAINNET=
Expand All @@ -23,5 +27,8 @@ ETHERSCAN_API_KEY_AVALANCHE=
ETHERSCAN_API_KEY_FANTOM=
ETHERSCAN_API_KEY_OPTIMISM=
ETHERSCAN_API_KEY_ARBITRUM=
ETHERSCAN_API_KEY_SEPOLIA=
ETHERSCAN_API_KEY_FUJI=
ETHERSCAN_API_KEY_BASE=
ETHERSCAN_API_KEY_ZKEVM=
ETHERSCAN_API_KEY_GNOSIS=
ETHERSCAN_API_KEY_BNB=
ETHERSCAN_API_KEY_SCROLL=
7 changes: 7 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@
[submodule "lib/aave-governance-v3"]
path = lib/aave-governance-v3
url = https://github.com/bgd-labs/aave-governance-v3
[submodule "lib/solidity-utils"]
path = lib/solidity-utils
url = https://github.com/bgd-labs/solidity-utils
[submodule "lib/aave-helpers"]
path = lib/aave-helpers
url = https://github.com/bgd-labs/aave-helpers
branch = master
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,42 @@ deploy-mainnet-gov-keeper :; forge script ./scripts/GovernanceChainRobotKeeper.s
deploy-mainnet-execution-keeper :; forge script ./scripts/ExecutionChainRobotKeeper.s.sol:DeployMainnet --rpc-url mainnet --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_MAINNET} --gas-estimate-multiplier 175 --verify -vvvv
deploy-mainnet-consumer :; forge script ./scripts/RootsConsumer.s.sol:DeployMainnet --rpc-url mainnet --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_MAINNET} --gas-estimate-multiplier 175 --verify -vvvv
deploy-mainnet-voting-keeper :; forge script ./scripts/VotingChainRobotKeeper.s.sol:DeployMainnet --rpc-url mainnet --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_MAINNET} --gas-estimate-multiplier 175 --verify -vvvv
deploy-mainnet-gascapped-gov-keeper :; forge script ./scripts/GasCappedGovernanceChainRobotKeeper.s.sol:DeployMainnet --rpc-url mainnet --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_MAINNET} --gas-estimate-multiplier 175 --verify -vvvv
deploy-mainnet-gascapped-execution-keeper :; forge script ./scripts/GasCappedExecutionChainRobotKeeper.s.sol:DeployMainnet --rpc-url mainnet --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_MAINNET} --gas-estimate-multiplier 175 --verify -vvvv
deploy-mainnet-gascapped-voting-keeper :; forge script ./scripts/GasCappedVotingChainRobotKeeper.s.sol:DeployMainnet --rpc-url mainnet --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_MAINNET} --gas-estimate-multiplier 175 --verify -vvvv
deploy-mainnet-operator :; forge script ./scripts/RobotOperator.s.sol:DeployMainnet --rpc-url mainnet --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_MAINNET} --gas-estimate-multiplier 175 --verify -vvvv

# Polygon deployments
deploy-polygon-execution-keeper :; forge script ./scripts/ExecutionChainRobotKeeper.s.sol:DeployPolygon --rpc-url polygon --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_POLYGON} --gas-estimate-multiplier 175 --verify -vvvv
deploy-polygon-consumer :; forge script ./scripts/RootsConsumer.s.sol:DeployPolygon --rpc-url polygon --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_POLYGON} --gas-estimate-multiplier 175 --verify -vvvv
deploy-polygon-voting-keeper :; forge script ./scripts/VotingChainRobotKeeper.s.sol:DeployPolygon --rpc-url polygon --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_POLYGON} --gas-estimate-multiplier 175 --verify -vvvv
deploy-robot-operator :; forge script ./scripts/RobotOperator.s.sol:DeployPolygon --rpc-url polygon --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_POLYGON} --gas-estimate-multiplier 175 --verify -vvvv

# Avalanche deployments
deploy-avax-execution-keeper :; forge script ./scripts/ExecutionChainRobotKeeper.s.sol:DeployAvax --rpc-url avalanche --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_AVALANCHE} --gas-estimate-multiplier 175 --verify -vvvv
deploy-avax-consumer :; forge script ./scripts/RootsConsumer.s.sol:DeployAvax --rpc-url avalanche --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_AVALANCHE} --gas-estimate-multiplier 175 --verify -vvvv
deploy-avax-voting-keeper :; forge script ./scripts/VotingChainRobotKeeper.s.sol:DeployAvax --rpc-url avalanche --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_AVALANCHE} --gas-estimate-multiplier 175 --verify -vvvv
deploy-avalanche-operator :; forge script ./scripts/RobotOperator.s.sol:DeployAvalanche --rpc-url avalanche --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_AVALANCHE} --gas-estimate-multiplier 175 --verify -vvvv

# Optimism deployments
deploy-optimism-execution-keeper :; forge script ./scripts/ExecutionChainRobotKeeper.s.sol:DeployOptimism --rpc-url optimism --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_OPTIMISM} --gas-estimate-multiplier 175 --verify -vvvv
deploy-optimism-operator :; forge script ./scripts/RobotOperator.s.sol:DeployOptimism --rpc-url optimism --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_OPTIMISM} --gas-estimate-multiplier 175 --verify -vvvv

# Arbitrum deployments
deploy-arbitrum-execution-keeper :; forge script ./scripts/ExecutionChainRobotKeeper.s.sol:DeployArbitrum --rpc-url arbitrum --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_ARBITRUM} --gas-estimate-multiplier 175 --verify -vvvv
deploy-arbitrum-operator :; forge script ./scripts/RobotOperator.s.sol:DeployArbitrum --rpc-url arbitrum --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_ARBITRUM} --gas-estimate-multiplier 175 --verify -vvvv

# Bnb deployments
deploy-bnb-execution-keeper :; forge script ./scripts/ExecutionChainRobotKeeper.s.sol:DeployBnb --rpc-url bnb --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_ARBITRUM} --gas-estimate-multiplier 175 --verify -vvvv
deploy-bnb-execution-keeper :; forge script ./scripts/ExecutionChainRobotKeeper.s.sol:DeployBnb --rpc-url bnb --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_BNB} --gas-estimate-multiplier 175 --verify -vvvv
deploy-bnb-operator :; forge script ./scripts/RobotOperator.s.sol:DeployBNB --rpc-url bnb --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_BNB} --gas-estimate-multiplier 175 --verify -vvvv

# Base deployments
deploy-base-operator :; forge script ./scripts/RobotOperator.s.sol:DeployBase --rpc-url base --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_BASE} --gas-estimate-multiplier 175 --verify -vvvv
deploy-base-execution-keeper :; forge script ./scripts/ExecutionChainRobotKeeper.s.sol:DeployBase --rpc-url base --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_BASE} --gas-estimate-multiplier 175 --verify -vvvv
deploy-base-operator :; forge script ./scripts/RobotOperator.s.sol:DeployBase --rpc-url base --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_BASE} --gas-estimate-multiplier 175 --verify -vvvv

# Metis deployments
deploy-metis-execution-keeper :; forge script ./scripts/GelatoGasCappedExecutionChainRobotKeeper.s.sol:DeployMetis --rpc-url metis --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_METIS} --gas-estimate-multiplier 175 --verify -vvvv

# Gnosis deployments
deploy-gnosis-execution-keeper :; forge script ./scripts/GelatoGasCappedExecutionChainRobotKeeper.s.sol:DeployGnosis --rpc-url gnosis --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --etherscan-api-key ${ETHERSCAN_API_KEY_GNOSIS} --gas-estimate-multiplier 175 --verify -vvvv
58 changes: 58 additions & 0 deletions docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,64 @@ The keepers have the following functions:

- For voting chain keeper, we also perform the register roots action for the block hash only once and flag it, as it requests data off-chain to submit roots and to avoid calling it multiple times.

## Gas Capped Robots:

Similar to the governance robots `ExecutionChainRobotKeeper`, `GovernanceChainRobotKeeper`, `VotingChainRobotKeeper` with an additional functionality of executing actions only when the current network gas price is under the configured gas price. The robot uses chainlink fast-gas feed to fetch the current network gas prices. Since chainlink fast-gas feed is currently only available on mainnet, the gas-capped robots will be used only on ethereum.

## Gelato Gas Capped Robots:

Extending the gas capped feature on robots which is used to limit the execution on actions based on network gas prices, Gelato Gas Capped Robots is intended to be used via Gelato functions. The major difference from Gas Capped Robots which are used on chainlink automation is that on Gelato Gas Capped Robots we use `tx.gasprice` to fetch the current network gas price instead of the chainlink fast gas feed as Gelato natively supports `tx.gasprice` in their checker function.

## Aave CL Robot Operator:

The contract to perform admin actions on the Aave Robot Keepers.

_Note: The Robot Operator contract is configured to be upgradable by the governance, in order to be compatible with future interface changes on chainlink registry contract._

<img src="./robot-operator.png" alt="Aave Robot Operator v2" width="100%" height="100%">

<br />

- `register()`:

Called by the governance level 1 executor (owner) to register the Chainlink Keeper with the admin of the keeper as the operator contract.

- `cancel()`:

Called by the governance level 1 executor (owner) to cancel the Chainlink Keeper.

- `migrate()`:

Called by the governance level 1 executor (owner) to migrate all the robots from the old chainlink version to the newer one.

- `withdrawLink()`:

Can be called in a permissionless way by anyone to withdraw link from the Chainlink Keeper to the Aave Collector. Note that we can only withdraw link after a keeper has been canceled and 50 blocks have passed after being canceled.

- `setGasLimit()`:

Called by the governance level 1 executor (owner) / robot guardian to set the max gas limit for execution by the Chainlink Keeper.

- `setTriggerConfig()`:

Called by the governance level 1 executor (owner) / robot guardian to set the trigger config if it is a event based robot.

- `refillKeeper()`:

Can be called in a permissionless way by anyone to refill the keeper with link tokens for gas. Note that the sender has to approve link tokens to the operator contract first in order to refill the Chainlink Keeper.

- `setWithdrawAddress()`:

Called by the governance level 1 executor (owner), to set the withdraw address which is initially set to the Aave Collector, which is used to receive link after canceling and withdrawing funds from the Chainlink Keeper.

- `setRegistry()`:

Called by the governance level 1 executor (owner) to set the new chainlink registry contract.

- `setRegistrar()`:

Called by the governance level 1 executor (owner) to set the new chainlink registrar contract.

## API Consumer Contract:

The chainlink API consumer-compatible smart contracts are deployed on the voting chain networks to request data off-chain by calling the respective APIs to register the roots for the voting tokens.
Expand Down
Binary file added docs/robot-operator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 21 additions & 22 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ remappings = [
'aave-governance-v3/=lib/aave-governance-v3/',
'aave-address-book/=lib/aave-address-book/src/',
'aave-delivery-infrastructure/=lib/aave-governance-v3/lib/aave-delivery-infrastructure/src/',
'solidity-utils/=lib/aave-governance-v3/lib/solidity-utils/src/',
'aave-token-v3/=lib/aave-governance-v3/lib/aave-token-v3/src/'
'solidity-utils/=lib/solidity-utils/src/',
'aave-token-v3/=lib/aave-governance-v3/lib/aave-token-v3/src/',
'aave-helpers/=lib/aave-helpers/src/'
]
fs_permissions = [{access = "write", path = "./reports"}]
ffi = true
Expand All @@ -24,29 +25,27 @@ optimism = "${RPC_OPTIMISM}"
avalanche = "${RPC_AVALANCHE}"
polygon = "${RPC_POLYGON}"
arbitrum = "${RPC_ARBITRUM}"
bnb = "${RPC_BNB}"
base = "${RPC_BASE}"
fantom = "${RPC_FANTOM}"
harmony = "${RPC_HARMONY}"
sepolia = "${RPC_SEPOLIA}"
goerli = "${RPC_GOERLI}"
fuji = "${RPC_FUJI}"
mumbai = "${RPC_MUMBAI}"
bnb_testnet = "${RPC_BNB_TESTNET}"
metis = "${RPC_METIS}"
base = "${RPC_BASE}"
zkevm = "${RPC_ZKEVM}"
gnosis = "${RPC_GNOSIS}"
bnb = "${RPC_BNB}"
scroll="${RPC_SCROLL}"

[etherscan]
mainnet={key="${ETHERSCAN_API_KEY_MAINNET}",chainId=1}
optimism={key="${ETHERSCAN_API_KEY_OPTIMISM}",chainId=10}
avalanche={key="${ETHERSCAN_API_KEY_AVALANCHE}",chainId=43114}
polygon={key="${ETHERSCAN_API_KEY_POLYGON}",chainId=137}
base={key="${ETHERSCAN_API_KEY_BASE}",chain=8453}
mumbai={key="${ETHERSCAN_API_KEY_POLYGON}",chainId=80001}
bnb_testnet={key="${ETHERSCAN_API_KEY_BNB}",chainId=97, url='https://api-testnet.bscscan.com/'}
bnb={key="${ETHERSCAN_API_KEY_BNB}",chainId=56,url='https://api.bscscan.com/api'}
arbitrum={key="${ETHERSCAN_API_KEY_ARBITRUM}",chainId=42161}
fantom={key="${ETHERSCAN_API_KEY_FANTOM}",chainId=250}
goerli={key="${ETHERSCAN_API_KEY_GOERLI}",chainId=5}
sepolia={key="${ETHERSCAN_API_KEY_SEPOLIA}",chainId=11155111}
fuji={key="${ETHERSCAN_API_KEY_FUJI}",chainId=43113}
mainnet = { key="${ETHERSCAN_API_KEY_MAINNET}", chain=1 }
optimism = { key="${ETHERSCAN_API_KEY_OPTIMISM}", chain=10 }
avalanche = { key="${ETHERSCAN_API_KEY_AVALANCHE}", chain=43114 }
polygon = { key="${ETHERSCAN_API_KEY_POLYGON}", chain=137 }
arbitrum = { key="${ETHERSCAN_API_KEY_ARBITRUM}", chain=42161 }
fantom = { key="${ETHERSCAN_API_KEY_FANTOM}", chain=250 }
metis = { key="any", chainId=1088, url='https://andromeda-explorer.metis.io/' }
base = { key="${ETHERSCAN_API_KEY_BASE}", chainId=8453 }
zkevm = { key="${ETHERSCAN_API_KEY_ZKEVM}", chainId=1101 }
gnosis = { key="${ETHERSCAN_API_KEY_GNOSIS}", chainId=100 }
bnb= { key="${ETHERSCAN_API_KEY_BNB}",chainId=56,url='https://api.bscscan.com/api'}
scroll={key="${ETHERSCAN_API_KEY_SCROLL}",chainId=534352}

# See more config options https://github.com/gakonst/foundry/tree/master/config
2 changes: 1 addition & 1 deletion lib/aave-address-book
Submodule aave-address-book updated 549 files
2 changes: 1 addition & 1 deletion lib/aave-governance-v3
1 change: 1 addition & 0 deletions lib/aave-helpers
Submodule aave-helpers added at 8e1340
1 change: 1 addition & 0 deletions lib/forge-std
Submodule forge-std added at 2f6762
1 change: 1 addition & 0 deletions lib/solidity-utils
Submodule solidity-utils added at cd520d
23 changes: 23 additions & 0 deletions scripts/GasCappedExecutionChainRobotKeeper.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import {Script} from 'forge-std/Script.sol';
import {console} from 'forge-std/console.sol';
import {GasCappedExecutionChainRobotKeeper} from '../src/contracts/gasprice-capped-robots/GasCappedExecutionChainRobotKeeper.sol';
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';

contract DeployMainnet is Script {
GasCappedExecutionChainRobotKeeper public keeper;

function run() external {
vm.startBroadcast();
keeper = new GasCappedExecutionChainRobotKeeper(
address(GovernanceV3Ethereum.PAYLOADS_CONTROLLER), // payloads controller
0x169E633A2D1E6c10dD91238Ba11c4A708dfEF37C // chainlink fast gas feed
);
keeper.setMaxGasPrice(150 gwei);

console.log('Gas Capped Execution chain ethereum keeper address', address(keeper));
vm.stopBroadcast();
}
}
23 changes: 23 additions & 0 deletions scripts/GasCappedGovernanceChainRobotKeeper.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import {Script} from 'forge-std/Script.sol';
import {console} from 'forge-std/console.sol';
import {GasCappedGovernanceChainRobotKeeper} from '../src/contracts/gasprice-capped-robots/GasCappedGovernanceChainRobotKeeper.sol';
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';

contract DeployMainnet is Script {
GasCappedGovernanceChainRobotKeeper public keeper;

function run() external {
vm.startBroadcast();
keeper = new GasCappedGovernanceChainRobotKeeper(
address(GovernanceV3Ethereum.GOVERNANCE), // governance
0x169E633A2D1E6c10dD91238Ba11c4A708dfEF37C // chainlink fast gas feed
);
keeper.setMaxGasPrice(150 gwei);

console.log('Gas Capped Governance chain ethereum keeper address', address(keeper));
vm.stopBroadcast();
}
}
24 changes: 24 additions & 0 deletions scripts/GasCappedVotingChainRobotKeeper.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import {Script} from 'forge-std/Script.sol';
import {console} from 'forge-std/console.sol';
import {GasCappedVotingChainRobotKeeper} from '../src/contracts/gasprice-capped-robots/GasCappedVotingChainRobotKeeper.sol';
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';

contract DeployMainnet is Script {
GasCappedVotingChainRobotKeeper public keeper;

function run() external {
vm.startBroadcast();
keeper = new GasCappedVotingChainRobotKeeper(
GovernanceV3Ethereum.VOTING_MACHINE,
0x2fA6F0A65886123AFD24A575aE4554d0FCe8B577, // rootsConsumer
0x169E633A2D1E6c10dD91238Ba11c4A708dfEF37C // chainlink fast gas feed
);
keeper.setMaxGasPrice(150 gwei);

console.log('Gas Capped Voting chain ethereum keeper address', address(keeper));
vm.stopBroadcast();
}
}
Loading
Loading