Skip to content

Commit

Permalink
update smart contract and logging
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoluisam committed Jan 25, 2025
1 parent 6c178c8 commit 8a12f39
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,12 @@ contract MaybeRevertMessageReceiver is IAny2EVMMessageReceiver, IERC165 {

emit TokensWithdrawn(token, s_manager, amount);
}

/// @notice Fetches the balance of an ERC-20 token held by the contract
/// @param token The address of the ERC-20 token contract
/// @return The balance of the specified ERC-20 token
function balanceOfToken(address token) external view returns (uint256) {
IERC20 erc20 = IERC20(token);
return erc20.balanceOf(address(this));
}
}
Loading

0 comments on commit 8a12f39

Please sign in to comment.