pub enum ValidationError {
TakeBeforeCredit {
currency: Address,
wanted: u128,
have: i128,
},
SwapCalcBeforeCredit {
pool: Address,
},
Erc20TransferBeforeCredit {
currency: Address,
wanted: u128,
have: i128,
},
FlashDebtUnpaid {
currency: Address,
amount: u128,
},
PmDeltaNonzero {
currency: Address,
delta: i128,
},
NativeTransferBeforeCredit {
wanted: u128,
have: i128,
},
UnknownExternalLedger {
ledger: u8,
},
OpenWethBatchNotFollowedByMint {
weth: Address,
},
}Expand description
Why a stream was rejected — the invariant that fired and the offending op.
Variants§
TakeBeforeCredit
A take/mint fired before the PoolManager held credit (the D0
bug class).
SwapCalcBeforeCredit
A V2_SWAP_CALC fired before the pair was seeded (the terminal-V2 /
2PT5HH über-draw class).
Erc20TransferBeforeCredit
An ERC20_TRANSFER debiting the executor fired before the executor held
currency credit (the V2/V3 flash-repay-before-credit class; surfaced
by the 6SRC23 POC — byte-parity cannot see this ordering defect).
FlashDebtUnpaid
A flash debt was left unpaid at finish() — the V2/V3 analogue of the
V4 “every delta nets to zero by callback end” invariant.
PmDeltaNonzero
A V4_UNLOCK closed with a nonzero PM[currency] delta — the V4 master
invariant violation (a touched currency was not settled to zero by
callback end).
NativeTransferBeforeCredit
A NativeTransfer (the executor→PM native pay-in leg of a native
settle) debited the executor’s native balance before it held credit (the
native analogue of Erc20TransferBeforeCredit). Surfaced by the
a WethWithdraw (or native V4 take) must
precede the native pay-in.
UnknownExternalLedger
An ExternalFlash/ExternalRepay referenced an external-ledger index
not registered on the validator (VIXQYH stub). The validator must be
constructed with with_external_ledgers covering the index the stream
uses.
OpenWethBatchNotFollowedByMint
A V4_BATCH_OPEN_WETH (0x43) left the WETH delta OPEN and the unlock
closed before a WETH V4_MINT_COMPACT consumed it — the PM’s
delta() would settle the leftover delta to the caller at callback
end (TGUZCT: with the open-weth batch, a batch without its mint is
unrepresentable).
Trait Implementations§
Source§impl Clone for ValidationError
impl Clone for ValidationError
impl Copy for ValidationError
Source§impl Debug for ValidationError
impl Debug for ValidationError
impl Eq for ValidationError
Source§impl PartialEq for ValidationError
impl PartialEq for ValidationError
impl StructuralPartialEq for ValidationError
Auto Trait Implementations§
impl Freeze for ValidationError
impl RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnsafeUnpin for ValidationError
impl UnwindSafe for ValidationError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more