Skip to content

Commit

Permalink
feat: make initialize function public virtual (#5285)
Browse files Browse the repository at this point in the history
### Description

<!--
What's included in this PR?
-->
This PR makes the `initialize` function public and virtual to allow for
further overriding in derived contracts.
### Drive-by changes

<!--
Are there any minor or drive-by changes also included?
-->
None.

### Related issues

<!--
- Fixes #[issue number here]
-->
N/A.

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

Yes
### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->
N/A

---------

Co-authored-by: Yorke Rhodes <[email protected]>
  • Loading branch information
garyghayrat and yorhodes authored Jan 24, 2025
1 parent af84574 commit 0446656
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fast-comics-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperlane-xyz/core": patch
---

Make `initialize` function public virtual
2 changes: 1 addition & 1 deletion solidity/contracts/token/HypERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ contract HypERC20 is ERC20Upgradeable, TokenRouter {
address _hook,
address _interchainSecurityModule,
address _owner
) external initializer {
) public virtual initializer {
// Initialize ERC20 metadata
__ERC20_init(_name, _symbol);
_mint(msg.sender, _totalSupply);
Expand Down

0 comments on commit 0446656

Please sign in to comment.