feat: revoke a polling schedule#124
Open
anxolin wants to merge 3 commits into
Open
Conversation
This was referenced Jul 10, 2026
anxolin
marked this pull request as draft
July 10, 2026 22:37
anxolin
force-pushed
the
feat/poller-register
branch
from
July 10, 2026 23:12
8fdcbe1 to
4e308b0
Compare
anxolin
force-pushed
the
feat/poller-revoke
branch
from
July 10, 2026 23:12
aa7dd2c to
3075f3d
Compare
anxolin
force-pushed
the
feat/poller-revoke
branch
from
July 10, 2026 23:20
3075f3d to
056b564
Compare
anxolin
force-pushed
the
feat/poller-register
branch
from
July 11, 2026 00:42
4e308b0 to
6966303
Compare
anxolin
force-pushed
the
feat/poller-revoke
branch
from
July 11, 2026 00:42
056b564 to
072d04d
Compare
anxolin
force-pushed
the
feat/poller-register
branch
from
July 11, 2026 01:44
6966303 to
04c1bde
Compare
anxolin
force-pushed
the
feat/poller-revoke
branch
from
July 11, 2026 01:44
072d04d to
e5dcc99
Compare
anxolin
marked this pull request as ready for review
July 13, 2026 09:04
anxolin
force-pushed
the
feat/poller-register
branch
from
July 13, 2026 09:17
04c1bde to
bf350d1
Compare
anxolin
force-pushed
the
feat/poller-revoke
branch
from
July 13, 2026 09:17
e5dcc99 to
d18a322
Compare
igorroncevic
approved these changes
Jul 14, 2026
kaze-cow
reviewed
Jul 17, 2026
| /// should be revoked separately to fully close the surface. | ||
| function revoke(bytes32 id) external { | ||
| Schedule storage schedule = schedules[id]; | ||
| if (msg.sender != schedule.funder) revert OnlyFunder(); |
There was a problem hiding this comment.
it is now possible/simpler to do
Suggested change
| if (msg.sender != schedule.funder) revert OnlyFunder(); | |
| require(msg.sender == schedule.funder, OnlyFunder()); |
There was a problem hiding this comment.
While I prefer this style of reverts, this is not a standard adopted in any CoW repo IIRC.
Comment on lines
+147
to
+148
| (, address scheduleFunder, , ,) = poller.schedules(id); | ||
| assertEq(scheduleFunder, address(0), "schedule cleared"); |
There was a problem hiding this comment.
it would be most complete to validate that every field here has been zeroed out
Assert that revoke clears every field stored in a polling schedule.
igorroncevic
force-pushed
the
feat/poller-register
branch
from
July 17, 2026 17:17
21fe323 to
45755b8
Compare
igorroncevic
force-pushed
the
feat/poller-revoke
branch
from
July 17, 2026 17:17
3672984 to
b3f8561
Compare
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.
Part of #121. Follows up #123
What
Adds
revoke(bytes32 id)— only the schedule'sfundermay revoke, which clears the stored schedule and emitsScheduleRevoked.Why
Lets a funder tear down a schedule they registered. (A standing ERC-20 allowance should be revoked separately.)
Test plan
forge test --match-contract ComposableCowPollerTest -vvCovers
test_revoke_clearsSchedule(funder-only guard + schedule cleared).