Making Swaps
Funding
Approvals
contract Approve is Script {
function run() external {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);
UniswapSinglePair vault = UniswapSinglePair(
payable(YOUR_VAULT_CONTRACT)
);
address weth = address(0x82aF49447D8a07e3bd95BD0d56f35241523fBab1);
address usdc = address(0xaf88d065e77c8cC2239327C5EDb3A432268e5831);
vault.approveSwapRouter(weth, type(uint).max);
vault.approveSwapRouter(usdc, type(uint).max);
vm.stopBroadcast();
}
}Swap
Last updated
Was this helpful?