diff --git a/contracts/Token/TokenBridgeController.sol b/contracts/Token/TokenBridgeController.sol index c6785e6..b72c8a6 100644 --- a/contracts/Token/TokenBridgeController.sol +++ b/contracts/Token/TokenBridgeController.sol @@ -54,6 +54,10 @@ contract TokenBridgeController is MultichainTokenController { _increaseMintLimit(msg.sender, amount_); } + function decimals() external view returns (uint8) { + return INNER_TOKEN.decimals(); + } + /** * @notice Hook that is called before any transfer of tokens. This includes * minting and burning. diff --git a/contracts/interfaces/IMultichainToken.sol b/contracts/interfaces/IMultichainToken.sol index 54c0a63..a1c0173 100644 --- a/contracts/interfaces/IMultichainToken.sol +++ b/contracts/interfaces/IMultichainToken.sol @@ -10,4 +10,6 @@ interface IMultichainToken { function mint(address to, uint256 amount) external; function burn(address from, uint256 amount) external; + + function decimals() external view returns (uint8); } diff --git a/contracts/test/MockToken.sol b/contracts/test/MockToken.sol index 8f8f337..d43c10c 100644 --- a/contracts/test/MockToken.sol +++ b/contracts/test/MockToken.sol @@ -21,4 +21,12 @@ contract MockToken is ERC20 { function decimals() public view virtual override returns (uint8) { return _decimals; } + + function mint(address account, uint256 amount) external { + _mint(account, amount); + } + + function burn(address account, uint256 amount) external { + _burn(account, amount); + } }