Skip to content

Commit 4b4961a

Browse files
committed
Remove Repaid event from USDC pool
1 parent fd09d70 commit 4b4961a

File tree

4 files changed

+2
-14
lines changed

4 files changed

+2
-14
lines changed

contracts/LiquidityPool.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ contract LiquidityPool is ILiquidityPool, AccessControl, EIP712 {
7272
event MPCAddressSet(address oldMPCAddress, address newMPCAddress);
7373
event Paused(address account);
7474
event Unpaused(address account);
75-
event Repaid(address borrowToken, uint256 repaidAmount);
7675

7776
modifier whenNotPaused() {
7877
require(!paused, EnforcedPause());
@@ -181,7 +180,7 @@ contract LiquidityPool is ILiquidityPool, AccessControl, EIP712 {
181180
}
182181

183182
function repay(address[] calldata) external virtual override {
184-
emit Repaid(address(0), 0);
183+
revert NotImplemented();
185184
}
186185

187186
// Admin functions

contracts/LiquidityPoolAave.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ contract LiquidityPoolAave is LiquidityPool {
4949
event HealthFactorSet(uint256 oldHealthFactor, uint256 newHealthFactor);
5050
event DefaultLTVSet(uint256 oldDefaultLTV, uint256 newDefaultLTV);
5151
event WithdrawnFromAave(address to, uint256 amount);
52+
event Repaid(address borrowToken, uint256 repaidAmount);
5253

5354
constructor(
5455
address liquidityToken,

contracts/Repayer.sol

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,6 @@ contract Repayer is IRepayer, AccessControlUpgradeable, CCTPAdapter {
146146
if (provider == Provider.CCTP) {
147147
amount = processTransferCCTP(CCTP_MESSAGE_TRANSMITTER, ASSETS, destinationPool, extraData);
148148
require(amount > 0, ZeroAmount());
149-
address[] memory tokens = new address[](1);
150-
tokens[0] = address(ASSETS);
151-
ILiquidityPool(destinationPool).repay(tokens);
152149
} else {
153150
// Unreachable atm, but could become so when more providers are added to enum.
154151
revert UnsupportedProvider();
@@ -163,9 +160,6 @@ contract Repayer is IRepayer, AccessControlUpgradeable, CCTPAdapter {
163160
address destinationPool
164161
) internal {
165162
token.safeTransfer(destinationPool, amount);
166-
address[] memory tokens = new address[](1);
167-
tokens[0] = address(token);
168-
ILiquidityPool(destinationPool).repay(tokens);
169163
emit ProcessRepay(token, amount, destinationPool, Provider.LOCAL);
170164
}
171165

test/Repayer.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,6 @@ describe("Repayer", function () {
296296
await expect(tx)
297297
.to.emit(uni, "Transfer")
298298
.withArgs(repayer.target, liquidityPool.target, 4n * UNI_DEC);
299-
await expect(tx)
300-
.to.emit(liquidityPool, "Repaid");
301299

302300
expect(await uni.balanceOf(repayer.target)).to.equal(6n * UNI_DEC);
303301
expect(await uni.balanceOf(liquidityPool.target)).to.equal(4n * UNI_DEC);
@@ -322,8 +320,6 @@ describe("Repayer", function () {
322320
await expect(tx)
323321
.to.emit(usdc, "Transfer")
324322
.withArgs(repayer.target, liquidityPool2.target, 4n * USDC_DEC);
325-
await expect(tx)
326-
.to.emit(liquidityPool2, "Repaid");
327323

328324
expect(await usdc.balanceOf(repayer.target)).to.equal(6n * USDC_DEC);
329325
expect(await usdc.balanceOf(liquidityPool2.target)).to.equal(4n * USDC_DEC);
@@ -438,8 +434,6 @@ describe("Repayer", function () {
438434
await expect(tx)
439435
.to.emit(usdc, "Transfer")
440436
.withArgs(ZERO_ADDRESS, liquidityPool.target, 4n * USDC_DEC);
441-
await expect(tx)
442-
.to.emit(liquidityPool, "Repaid");
443437

444438
expect(await usdc.balanceOf(liquidityPool.target)).to.equal(4n * USDC_DEC);
445439
expect(await usdc.balanceOf(repayer.target)).to.equal(0n);

0 commit comments

Comments
 (0)