Add kwrVoidPledge adapter for platform-admin-only voidPledge - #6
Open
Suvadra-Barua wants to merge 4 commits into
Open
Add kwrVoidPledge adapter for platform-admin-only voidPledge#6Suvadra-Barua wants to merge 4 commits into
Suvadra-Barua wants to merge 4 commits into
Conversation
…change Update mock and tests to match the recent interface changes: withdraw() split into kwrWithdraw() overloads, and setFeeAndPledge now includes the pledgeToken parameter. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mirrors the new voidPledge(uint256 tokenId) function from the upstream KeepWhatsRaised treasury contract (oak-network/contracts#90). This function is restricted to platform admin and voids a pledge without burning the receipt NFT, recovering funds to the platform admin. Changes: - IKeepWhatsRaised: add voidPledge to interface - KeepWhatsRaisedAdapter: add kwrVoidPledge with meta-transaction support - MockTreasury: add PledgeVoided event and voidPledge mock - Tests: access control, zero-address, and meta-transaction verification Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
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
kwrVoidPledge(address treasury, uint256 tokenId)toKeepWhatsRaisedAdapter, mirroring the newvoidPledgefunction from the upstream KeepWhatsRaised treasury (oak-network/contracts#90)onlyPlatformAdminon the treasury side — it voids a pledge without burning the receipt NFT, recovering funds to the platform adminwithdraw→kwrWithdrawrename andsetFeeAndPledgesignature changeChanges
IKeepWhatsRaised: addvoidPledge(uint256 tokenId)to interfaceKeepWhatsRaisedAdapter: addkwrVoidPledgewith admin gate, zero-address check, and meta-transaction sender forwardingMockKeepWhatsRaisedTreasury: addPledgeVoidedevent,voidPledgemock, fixwithdrawoverloads, fixsetFeeAndPledgesignaturekwrVoidPledge(call forwarding, access control, zero-address, meta-tx), plus fixes for pre-existing failuresTest plan
kwrVoidPledgecorrectly forwards call with meta-transaction senderkwrVoidPledgereverts for non-admin callerskwrVoidPledgereverts on zero treasury addresskwrVoidPledge🤖 Generated with Claude Code