Prefer BuyGDFactory V3 for swaphelper (goodprotocol 2.3.0)#531
Open
blueogin wants to merge 1 commit into
Open
Conversation
…b3Wallet to use BUYGDFactoryV3
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The key used for the V3 factory in
ContractsAddressis${this.network}.BUYGDFactoryV3; double-check this matches the actual deployment.json property naming convention (it looks inconsistent withBuyGDFactoryV2/BuyGDFactory). - The nested
getcall for resolving the BuyGD factory address is a bit hard to read; consider extracting the V3 → V2 → V1 resolution into a small helper function or a clearer sequence of lookups to make the fallback logic more explicit.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The key used for the V3 factory in `ContractsAddress` is `${this.network}.BUYGDFactoryV3`; double-check this matches the actual deployment.json property naming convention (it looks inconsistent with `BuyGDFactoryV2`/`BuyGDFactory`).
- The nested `get` call for resolving the BuyGD factory address is a bit hard to read; consider extracting the V3 → V2 → V1 resolution into a small helper function or a clearer sequence of lookups to make the fallback logic more explicit.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
@gooddollar/goodprotocolto^2.3.0soBUYGDFactoryV3(0xB1C87d…) is available in deployment addresses./verify/swaphelpertargets the same helper clones as the Buy G$ UI.BuyGDCloneV2.min.json(V3 factory still deploysBuyGDCloneV2clones;BuyGDClone.min.jsonwas removed).About # (link your issue here)
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist:
Summary by Sourcery
Update GoodProtocol integration to prefer the BUYGDFactoryV3 deployment for swap helper resolution while maintaining backward compatibility with earlier factory versions.
New Features:
Enhancements: