You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It can be a confusing developer experience when using a library that references different contracts as interfaces vs. addresses. For example, these are both contracts:
My opinion is to have every contract referenced as an address and provide an additional library variable prepended with I to reference the same contract as an interface. It would add some bloat to the libraries but given they are auto-generated and lightweight I don't see it as an issue.
The text was updated successfully, but these errors were encountered:
@pegahcarter, i have no to strong opinion on this.
We added interfaces for addresses that in governance-proposals are usually used as Interface and omitted them on addresses that are usually just used as contract (if at all).
Changing this now would be a huge breaking change, bloat contract verification (as all these contract will end up on etherscan even when only a single address/interface is used). Leaning towards thinking it's not worth it, given you can simply fix your example by casting to address.
It can be a confusing developer experience when using a library that references different contracts as interfaces vs. addresses. For example, these are both contracts:
aave-address-book/src/AaveV3Ethereum.sol
Lines 37 to 41 in f73f77c
This could be a problem when importing a library to use within a contract to reference. For example, this compile would succeed:
But this compile would fail:
My opinion is to have every contract referenced as an address and provide an additional library variable prepended with
I
to reference the same contract as an interface. It would add some bloat to the libraries but given they are auto-generated and lightweight I don't see it as an issue.The text was updated successfully, but these errors were encountered: