Proxy Fee Template V2: receiver validation, accrued fees, and versioned upgrades#5
Open
giantcoconut wants to merge 4 commits into
Open
Conversation
Author
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.

Summary
Implements Mission 02 sub-bounties 2A, 2B, and 2C while preserving the existing Hardhat/TypeScript project structure.
Covered
2A: Receiver Validation
receiver == msg.senderindeposit,depositBatch,createAtoms, andcreateTriples.IntuitionFeeProxy_InvalidReceiver.2C: Fee Accumulation + Withdraw
accruedFees.withdrawFees(uint256),withdrawAllFees(),getNonFeeBalance(), andsweepNonFeeBalance(address,uint256).feeRecipient.2B: Versioned Upgradeability
ERC7936Proxy, an ERC-7936-style versioned proxy.IntuitionFeeProxyto initializer-based storage for upgradeable deployments.proxiableUUID()compatibility for implementation validation.Migration Note
Existing V1 deployments were standalone contracts, not proxy deployments, so they cannot keep the same address when moving to V2.
The intended migration path is to deploy a V2 implementation, deploy a new
ERC7936Proxyinitialized with the existing V1 fee/admin configuration, and update app integrations to use the new proxy address. Once on the V2 proxy, future implementation changes can be registered as new versions and promoted to the default version.Validation
Result:
Refs #2