What is the IERC20.sol contract used for if we have the ERC20.sol contract?
IERC20.sol is a
interface contract, all in this file are standard as defined in the EIP.
ERC20.sol, it is an implementation of the
IERC20.sol, you can define all your token logic in it.
Hi. what is meant by “interface” so does this connect EIP standards to something?
interface, you can check this doc: https://solidity.readthedocs.io/en/v0.7.4/contracts.html#interfaces,
EIP20, you can check at here: https://eips.ethereum.org/EIPS/eip-20
Awesome replies by @Skyge ()
You can interact with a contract via the functions in the interface and don’t need the whole implementation, e.g. Example on how to use ERC20 token in another contract which uses IERC20 to interact with the token.
that makes sense thank you!