Add managed quote-push treasury workflows

This commit is contained in:
defiQUG
2026-04-13 21:37:33 -07:00
parent 2b52cc6e32
commit 7517869ea6
9 changed files with 429 additions and 39 deletions

View File

@@ -8,7 +8,7 @@ import {QuotePushTreasuryManager} from "../../contracts/flash/QuotePushTreasuryM
/**
* @title DeployQuotePushTreasuryManager
* @notice Deploy a treasury manager for quote-push retained surplus and optionally
* hand receiver ownership to it in the same broadcast.
* hand receiver ownership to it in the same broadcast sequence.
*
* Env:
* PRIVATE_KEY required
@@ -63,6 +63,7 @@ contract DeployQuotePushTreasuryManager is Script {
if (takeReceiverOwnership) {
AaveQuotePushFlashReceiver(receiver).transferOwnership(address(manager));
require(manager.isReceiverOwnedByManager(), "receiver ownership not finalized");
console.log("Receiver ownership transferred to manager");
}
vm.stopBroadcast();

View File

@@ -0,0 +1,36 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {Script, console} from "forge-std/Script.sol";
import {TwoHopDodoToUniswapV3MultiHopExternalUnwinder} from "../../contracts/flash/TwoHopDodoToUniswapV3MultiHopExternalUnwinder.sol";
/**
* @title DeployTwoHopDodoToUniswapV3MultiHopExternalUnwinder
* @notice Deploy three-hop DODO -> DODO -> Uniswap V3 unwinder for quote-push workflows.
*
* Env:
* PRIVATE_KEY required
* DODO_PMM_INTEGRATION_MAINNET required
* UNISWAP_V3_SWAP_ROUTER_MAINNET optional; defaults to legacy SwapRouter `0xE592...`
*/
contract DeployTwoHopDodoToUniswapV3MultiHopExternalUnwinder is Script {
address internal constant DEFAULT_UNISWAP_V3_ROUTER_MAINNET = 0xE592427A0AEce92De3Edee1F18E0157C05861564;
function run() external {
uint256 pk = vm.envUint("PRIVATE_KEY");
address integration = vm.envAddress("DODO_PMM_INTEGRATION_MAINNET");
address router = vm.envOr("UNISWAP_V3_SWAP_ROUTER_MAINNET", DEFAULT_UNISWAP_V3_ROUTER_MAINNET);
address deployer = vm.addr(pk);
console.log("Deployer:", deployer);
console.log("DODO PMM integration:", integration);
console.log("Uniswap V3 router:", router);
vm.startBroadcast(pk);
TwoHopDodoToUniswapV3MultiHopExternalUnwinder unwinder =
new TwoHopDodoToUniswapV3MultiHopExternalUnwinder(integration, router);
vm.stopBroadcast();
console.log("TwoHopDodoToUniswapV3MultiHopExternalUnwinder:", address(unwinder));
}
}