Skip to content

Commit

Permalink
Upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
rrecuero committed Dec 15, 2024
1 parent e65d88d commit 834b4a4
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 23 deletions.
13 changes: 13 additions & 0 deletions artifacts/42161.json
Original file line number Diff line number Diff line change
Expand Up @@ -2914,6 +2914,19 @@
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "rescueToken",
"inputs": [
{
"name": "token",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "sUSDe",
Expand Down
28 changes: 28 additions & 0 deletions broadcast/02-upgrade_bridger.s.sol/42161/run-1734224571.json

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions broadcast/02-upgrade_bridger.s.sol/42161/run-1734224796.json

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions broadcast/02-upgrade_bridger.s.sol/42161/run-latest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion script/migrations/arbitrum/02-upgrade_bridger.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ contract UpgradeBridgerScript is Constants, Test, MigrationHelper {
// assertEq(bridger.SOLV_BTC(), 0x3647c54c4c2C65bC7a2D63c0Da2809B399DBBDC0, "Invalid SolvBtc address");

// Save address
saveContractAddress("BridgerV11-impl", newImpl);
saveContractAddress("BridgerV12-impl", newImpl);
}
}
5 changes: 5 additions & 0 deletions src/bridger/Bridger.sol
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,11 @@ contract Bridger is
return amountOut;
}

/// @inheritdoc IBridger
function rescueToken(address token) external override onlyOwner {
IERC20(token).safeTransfer(owner(), IERC20(token).balanceOf(address(this)));

Check warning on line 331 in src/bridger/Bridger.sol

View check run for this annotation

Codecov / codecov/patch

src/bridger/Bridger.sol#L330-L331

Added lines #L330 - L331 were not covered by tests
}

/* ============ Private Functions ============ */

/**
Expand Down
6 changes: 6 additions & 0 deletions src/interfaces/bridger/IBridger.sol
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ interface IBridger {
BridgeData calldata bridgeData
) external payable returns (uint256);

/**
* @notice Rescue tokens from the contract back to safe.
* @param token Address of the token to rescue.
*/
function rescueToken(address token) external;

/**
* @notice Pause the contract.
*/
Expand Down
2 changes: 1 addition & 1 deletion test/artifacts/42161/addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"BridgerV1-impl": "0x7AD03919B4E6fAeaF62b097Dc9Fd1754D66a073e",
"BridgerV10-impl": "0x0BFD5D96dE5a461e07c3Fa6deC274D9631a43986",
"BridgerV11-impl": "0xF9C2756425B57e7c142887272bFA4B3270Ccc490",
"BridgerV12-impl": "0x910daCb0FAFA791656c69A61D4BF29E80FF7F0f2",
"BridgerV12-impl": "0x916B72125eec510E9cd64fd3eDF914E90980537B",
"BridgerV2-impl": "0x66Fd2Ec572bE9f8a332Bc40350b72c72470D9aCd",
"BridgerV3-impl": "0x1634254b7296cDA083a3cDb711CdBD7736410FC5",
"BridgerV4-impl": "0x51be166199e39805ac68b758a2236a5b3c358b01",
Expand Down

0 comments on commit 834b4a4

Please sign in to comment.