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

link transfer status #13177

Merged
merged 1 commit into from
May 20, 2024
Merged

link transfer status #13177

merged 1 commit into from
May 20, 2024

Conversation

shileiwill
Copy link
Contributor

No description provided.

@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

@@ -78,7 +78,10 @@ contract AutomationRegistryLogicC2_3 is AutomationRegistryBase2_3 {
uint96 balance = _updateTransmitterBalanceFromPool(from, s_hotVars.totalPremium, uint96(s_transmittersList.length));
s_transmitters[from].balance = 0;
s_reserveAmounts[IERC20(address(i_link))] = s_reserveAmounts[IERC20(address(i_link))] - balance;
i_link.transfer(to, balance);
bool transferStatus = i_link.transfer(to, balance);
Copy link
Contributor

Choose a reason for hiding this comment

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

why it won't fail in CI bc of you did not generate wrappers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm, can you elaborate on this?

Copy link
Contributor

Choose a reason for hiding this comment

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

bc the contract is changed, don't you need to regenerate Go wrappers?

Copy link
Contributor

Choose a reason for hiding this comment

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

wow this is super interesting. My guess is that because the link token always returns true, the optimizer considers this a "dead path" and essentially removes it, making the current bytecode match the old bytecode.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ran wrappers generation locally, and this change doesnt change any wrappers. Correct me if I need other steps..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If LINk never returns false, do we still need to check the status? our automation codebase has the tradition of checking the status :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@RyanRHall @FelixFan1992 If no objection, I will abandon this PR since checking the bool return is not needed for LINK.

@shileiwill shileiwill enabled auto-merge May 20, 2024 18:50
@shileiwill shileiwill added this pull request to the merge queue May 20, 2024
Merged via the queue into develop with commit 0d58a8d May 20, 2024
111 checks passed
@shileiwill shileiwill deleted the AUTO-10532 branch May 20, 2024 19:25
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.

3 participants