Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.

Commit 8a12f39

Browse files
committed
update smart contract and logging
1 parent 6c178c8 commit 8a12f39

File tree

4 files changed

+37
-3
lines changed

4 files changed

+37
-3
lines changed

contracts/src/v0.8/ccip/test/helpers/receivers/MaybeRevertMessageReceiver.sol

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,12 @@ contract MaybeRevertMessageReceiver is IAny2EVMMessageReceiver, IERC165 {
109109

110110
emit TokensWithdrawn(token, s_manager, amount);
111111
}
112+
113+
/// @notice Fetches the balance of an ERC-20 token held by the contract
114+
/// @param token The address of the ERC-20 token contract
115+
/// @return The balance of the specified ERC-20 token
116+
function balanceOfToken(address token) external view returns (uint256) {
117+
IERC20 erc20 = IERC20(token);
118+
return erc20.balanceOf(address(this));
119+
}
112120
}

0 commit comments

Comments
 (0)