From 064fc650784d0d802f8a6173aaa7ee5ecda3dd61 Mon Sep 17 00:00:00 2001 From: amaqkkg <16919110+amaqkkg@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:52:32 +0700 Subject: [PATCH] Add allowance viewer --- src/IDRCoin.sol | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/IDRCoin.sol b/src/IDRCoin.sol index bd7719e..53c77a1 100644 --- a/src/IDRCoin.sol +++ b/src/IDRCoin.sol @@ -195,6 +195,13 @@ contract IDRCoin is ERC20 { return DECIMALS; } + function allowance( + address _owner, + address _spender + ) public view override returns (uint256) { + return allowances[_owner][_spender]; + } + // setter/admin function // set the bankHub address function setBankHub(address _bankHub) external onlyAdmin {