Repository navigation
feat: implement issues 769-772 (factory events, errors, governor roles, voting period) - #799
Merged
Jaydbrown merged 5 commits intoOct 19, 2026
Conversation
…oncurrency tests - Add ZeroRateStreamNotAllowed error variant for stream creation validation (conduit-protocol#792) - Add bump_stream_instance function for low-cost keeper-driven TTL maintenance (conduit-protocol#791) - Add set_stream_title/set_reference_tag and getters for post-creation metadata updates (conduit-protocol#790) - Add high-concurrency stress tests for factory stream creation under load (conduit-protocol#789) Closes conduit-protocol#792 Closes conduit-protocol#791 Closes conduit-protocol#790 Closes conduit-protocol#789
…s, voting period) **Issue conduit-protocol#769**: Add ProtocolFeeCollected event emission - New event: protocol_fee_collected(token, recipient, amount) - Allows indexers to track fee accumulation without scanning balance changes - Topics: ("pfee_collected", recipient), Data: (token, amount) **Issue conduit-protocol#770**: Add InvalidFactoryConfiguration error - New error code: InvalidFactoryConfiguration = 20 - Diagnostic code for invalid factory initialization parameters - Simplifies deployment verification in CI/CD scripts **Issue conduit-protocol#771**: Add multi-role authorization checks for emergency responders - New function: require_emergency_responder(caller) - Separates regular parameter tuning from emergency pause authority - Pauser role can execute pause/unpause operations (or Admin as super-user) **Issue conduit-protocol#772**: Validate voting period bounds against Soroban ledger close time - Add VotingPeriodLedgers to DataKey enum - Add voting_period_ledgers field to GovernorConfig - Enforce minimum voting period of 17280 ledgers (~1 day) - Prevents flash-loan voting attacks and allows DAO reaction time - set_voting_period() validates and enforces minimum during configuration Closes conduit-protocol#769 Closes conduit-protocol#770 Closes conduit-protocol#771 Closes conduit-protocol#772
|
@afterlyfe2078 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
…um definition The VotingPeriodLedgers variant was incorrectly placed outside the DataKey enum closing brace, causing a syntax error. Moved it inside the enum definition before the closing brace.
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
Implementation of four factory and governor contract enhancements:
Changes
Issue #769 - ProtocolFeeCollected Event
protocol_fee_collected(token, recipient, amount)("pfee_collected", recipient)(token, amount)Issue #770 - InvalidFactoryConfiguration Error
InvalidFactoryConfiguration = 20error variantIssue #771 - Emergency Responder Role Authorization
require_emergency_responder(caller)Issue #772 - Voting Period Validation
VotingPeriodLedgersto DataKey enumvoting_period_ledgersfield to GovernorConfigset_voting_period()validates configuration changesAffected Files
contracts/factory/src/events.rs- New protocol_fee_collected eventcontracts/factory/src/errors.rs- New InvalidFactoryConfiguration errorcontracts/governor/src/role.rs- New require_emergency_responder functioncontracts/governor/src/config.rs- Voting period validation and constantscontracts/governor/src/storage.rs- VotingPeriodLedgers storage keyCloses #769
Closes #770
Closes #771
Closes #772