Skip to content
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

Refactor BurnMintERC677 to inherit from generic BurnMintERC20 #14605

Conversation

jhweintraub
Copy link
Collaborator

@jhweintraub jhweintraub commented Sep 30, 2024

The existing implementation of BurnMintERC677 inherits the ERC20 functionality from OZ, but not any of the BurnMint Functionality that is desired from it. As a result there exists no standard BurnMintERC20 implementation for Chainlink projects/customers to use without requiring they also support ERC-677 functionality

This PR restructures the BurnMintERC677 implementation to inherit from a more generic BurnMintERC20 and then adds the transferAndCall method and updates to supportsInterface() in to ensure compliance with ERC677. The existing base implementation of the standard ERC677.sol has not been modified.

Copy link
Contributor

github-actions bot commented Sep 30, 2024

Static analysis results are available

Hey @jhweintraub, you can view Slither reports in the job summary here or download them as artifact here.

Please check them before merging and make sure you have addressed all issues.

@app-token-issuer-infra-releng app-token-issuer-infra-releng bot requested review from george-dorin and removed request for a team September 30, 2024 18:21
Copy link
Contributor

github-actions bot commented Sep 30, 2024

Solidity Review Jira issue

Hey! We have taken the liberty to link this PR to a Jira issue for Solidity Review.

This is a new feature, that's currently in the pilot phase, so please make sure that the linkage is correct. In a contrary case, please update it manually in JIRA and replace Solidity Review issue key in the changeset file with the correct one.
Please reach out to the Test Tooling team and notify them about any issues you encounter.

Any changes to the Solidity Review Jira issue should be reflected in the changeset file. If you need to update the issue key, please do so manually in the following changeset file: contracts/.changeset/giant-bulldogs-cry.md

This PR has been linked to Solidity Review Jira issue:

RyanRHall
RyanRHall previously approved these changes Oct 3, 2024
@jhweintraub jhweintraub dismissed stale reviews from 0xsuryansh and RyanRHall via 664b015 October 3, 2024 15:56
0xsuryansh
0xsuryansh previously approved these changes Oct 3, 2024
RyanRHall
RyanRHall previously approved these changes Oct 3, 2024
matYang
matYang previously approved these changes Oct 3, 2024

contract BurnMintERC677Helper is BurnMintERC677, IGetCCIPAdmin {
contract BurnMintERC677Helper is BurnMintERC677 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I probably removed it somewhere in the development process when it was causing inheritance issues and forgot to put it back in at some point. This is a helper contract does it matter?

Copy link
Contributor

@RensR RensR Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would you remove it if it doesn't matter? This is deployed to testnets so yes it matters.

Copy link
Collaborator Author

@jhweintraub jhweintraub Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean I had the opposite belief, that if it didn't matter then remove it for readability but thats fine it's been re-added anyways, this comment is stale anyways

@@ -1932,11 +1932,11 @@ func (LinkTokenOwnershipTransferred) Topic() common.Hash {
}

func (LinkTokenTransfer) Topic() common.Hash {
return common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef")
return common.HexToHash("0xe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What causes this diff? Can we undo that?

Copy link
Collaborator Author

@jhweintraub jhweintraub Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto generated by the CI gethwrappers

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that, but I'd like it to stay the same. Why would the hash change was my question, did something in this onchain logic change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't have. I will investigate.

@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

auto-merge was automatically disabled October 15, 2024 19:30

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants