Deploy a RepayFromLadle to the Ladle that allows an an extra argument of an address to be provided for each token transfer.
RepayFromLadle sends the collateral and the remainder to the same address. bugs #1
The proposal includes two mainnet executions...
- Deploying the RepayLadleModuleModule using this script. The RepayFromLadleModule takes the Cauldron and WETH addresses as constructor arguments.
- Add the RepayFromLadleModule to the Ladle using this script.
The testing is done on this test contract which uses a mainnet fork
$ forge test -c contracts/test/modules/RepayFromLadleModule.t.sol
[⠒] Compiling...
[⠒] Compiling 1 files with 0.8.15
[⠑] Solc 0.8.15 finished in 1.44s
Compiler run successful
Running 1 test for contracts/test/modules/RepayFromLadleModule.t.sol:WithVaultProvisioned
[PASS] testRepayFromLadle() (gas: 160063)
Logs:
Can repay from ladle
Test result: ok. 1 passed; 0 failed; finished in 2.83s
Running 1 test for contracts/test/modules/RepayFromLadleModule.t.sol:RepayFromLadleModuleTest
[PASS] testOnlyBorrowAndPoolVault() (gas: 436166)
Logs:
can only be used with Borrow and Pool vaults
Test result: ok. 1 passed; 0 failed; finished in 42.13s