Why doesn't the IOFT.sol interface (https://github.com/LayerZero-Labs/LayerZero-v2/blob/main/packages/layerzero-v2/evm/oapp/contracts/oft/interfaces/IOFT.sol) include the standard ERC-20 .decimals() function?
This means when using something like hardhat and trying to query the decimals of an OFT, the following error throws:
TypeError: dstOftContract.decimals is not a function
A solution is to take the OFT address and use the standard ERC20 interface to find out the decimals e.g.
const erc20 = new Contract(dstOftContract.address, ERC20_DECIMALS_ABI, dstOftContract.provider)
localDecimals = await erc20.decimals()
However it would be nicer IMO if poss to call dstOftContract.decimals()
Why doesn't the IOFT.sol interface (https://github.com/LayerZero-Labs/LayerZero-v2/blob/main/packages/layerzero-v2/evm/oapp/contracts/oft/interfaces/IOFT.sol) include the standard ERC-20
.decimals()function?This means when using something like hardhat and trying to query the decimals of an OFT, the following error throws:
TypeError: dstOftContract.decimals is not a functionA solution is to take the OFT address and use the standard ERC20 interface to find out the decimals e.g.
However it would be nicer IMO if poss to call
dstOftContract.decimals()