You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the validation rules, we should try to use anyhow::ensure!(INVARIANT, MSG_INVARIANT_CONTEXT) as much as possible, so that we can formulate validation rules positively (like they would be in a natural language spec) e.g.
// Spec: The sequence number must be zero.ensure!(seq == 0,"opened auction nft MUST have sequence set to zero (got {bad_seq})");
## Describe your changes
This PR adds validation logic for:
- `ActionDutchAuctionSchedule`
- `ActionDutchAuctionEnd`
- `ActionDutchAuctionWithdraw`
and a component implementation, on a model similar-but-simpler to the
DEX:
- a `DutchAuctionManager` extension trait defines a crate-level API to
effect a validated action
- an `Inner` internal implementation manages writing to the state
- internal data can be accessed via a general `AuctionStoreRead` trait
which manage tentatively deserializing raw auction state (wkt `Any`)
into a useful domain type.
## Issue ticket number and link
#4211
## Checklist before requesting a review
- [x] If this code contains consensus-breaking changes, I have added the
"consensus-breaking" label. Otherwise, I declare my belief that there
are not consensus-breaking changes, for the following reason:
> Those actions are not integrated in our transaction system, our
application impl.
Once we have #4206, we can start filling in their validation/execution handlers:
ActionDutchAuctionSchedule
ActionDutchAuctionEnd
ActionDutchAuctionWithdraw
The text was updated successfully, but these errors were encountered: