i create instance of IERC20 public token in some contract.
How can i get the same address of token contract from the instance? token.this? token.address?
i create instance of IERC20 public token in some contract.
How can i get the same address of token contract from the instance? token.this? token.address?
All contract objects can be casted as an address in Solidity:
const address myAddres = address(myContract);
However usually you do not need to do this, but you can pass the IERC20 object as is between functions.