-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turn ERC1967Upgrade into a library #4204
Comments
@Amxx If I understood it correctly, since now we can emit Interface events from within library thus, we are trying to change ERC1967 from abstract to library, right? |
We were always able to emit events (defined in libraries or in contracts ... not in interfaces) from libraries. In the past these events were correctly emitted but the corresponding ABI was not included in the contract that uses the library. Since 0.8.20, the event definition is added to the contracts ABI |
Okay, got it, thank you for the answer, this helps. |
Thank you for your proposal, but please don't. We already have code/branch that starts implementing that and we would not want to ave effort duplication. |
Also not that we are currently blocked by this: The compiler does not let us do import "../../interfaces/IERC1967.sol";
library ERC1967Upgrade {
function upgradeTo(address newImplementation) internal {
_setImplementation(newImplementation);
emit IERC1967.Upgraded(newImplementation); // This gives an error
}
} Its unclear how what workaround we want to use (if any) |
Okay, let me check ethereum/solidity#14206 |
Blocker was resolved by solidity, and should be available in 0.8.21. |
If that's the case then it requires bumping the pragma solidity version in the contract to get started, however, this would impact all other contracts pragma solidity version to be bumped too. |
@balajipachai Yes, all pragmas will be bumped to near-latest Solidity in Contacts 5.0. |
Great, whose working on bumping the pragma version in all other contracts? I would like to work alongside him/her/them |
Solidity 0.8.20 should include ethereum/solidity#10996, which would finally allow
ERC1967Upgrade
to be written as a library (instead of an abstract contract).This raises the question of what to do with
IERC1967
.The text was updated successfully, but these errors were encountered: