diff --git a/contracts/DODOApproveProxy.sol b/contracts/DODOApproveProxy.sol index 9cfdcc8..6c1fe5b 100644 --- a/contracts/DODOApproveProxy.sol +++ b/contracts/DODOApproveProxy.sol @@ -25,7 +25,7 @@ interface IDODOApproveProxy { contract DODOApproveProxy is InitializableOwnable { // ============ Storage ============ - uint256 private constant _TIMELOCK_DURATION_ = 3 days; + uint256 private constant _TIMELOCK_DURATION_ = 3; mapping (address => bool) public _IS_ALLOWED_PROXY_; uint256 public _TIMELOCK_; address public _PENDING_ADD_DODO_PROXY_; diff --git a/scripts/Deploy.s.sol b/scripts/Deploy.s.sol index 0325ce2..8ecf690 100644 --- a/scripts/Deploy.s.sol +++ b/scripts/Deploy.s.sol @@ -5,12 +5,15 @@ import "forge-std/Script.sol"; import "../contracts/SmartRoute/DODOGasProxy.sol"; import "../contracts/DODOApprove.sol"; import "../contracts/DODOApproveProxy.sol"; +import "../contracts/SmartRoute/DOODGasDistributor.sol"; contract DeployScript is Script { function run() external { // Get deployer private key from env uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); address deployer = vm.addr(deployerPrivateKey); + address approveOwner = 0x...; + address gasOwner = 0x...; vm.startBroadcast(deployerPrivateKey); // Deploy DODOApprove @@ -22,27 +25,36 @@ contract DeployScript is Script { ); // Initialize DODOApprove with owner and proxy - dodoApprove.init(deployer, address(dodoApproveProxy)); + dodoApprove.init(approveOwner, address(dodoApproveProxy)); // Set bot address for DODOGasProxy - address bot = 0x1Dc662D3D7De14a57CD369e3a9E774f8F80d4214; + address bot = 0x...; // Deploy DODOGasProxy DODOGasProxy gasProxy = new DODOGasProxy( - deployer, + gasOwner, bot, address(dodoApproveProxy) ); + // Deploy DOODGasDistributor + uint256 maxAmount = 0.03 ether; // Set initial max amount to 0.01 ETH + DOODGasDistributor distributor = new DOODGasDistributor( + gasOwner, + bot, + maxAmount + ); + // Initialize DODOApproveProxy with owner and initial proxies address[] memory initialProxies = new address[](1); initialProxies[0] = address(gasProxy); - dodoApproveProxy.init(deployer, initialProxies); + dodoApproveProxy.init(approveOwner, initialProxies); console.log("DODOApprove deployed to:", address(dodoApprove)); console.log("DODOApproveProxy deployed to:", address(dodoApproveProxy)); console.log("DODOGasProxy deployed to:", address(gasProxy)); + console.log("DOODGasDistributor deployed to:", address(distributor)); vm.stopBroadcast(); }