diff --git a/pallets/rolldown/src/lib.rs b/pallets/rolldown/src/lib.rs index 6c598a7e9..2a6d769f9 100644 --- a/pallets/rolldown/src/lib.rs +++ b/pallets/rolldown/src/lib.rs @@ -525,6 +525,8 @@ pub mod pallet { UninitializedChainId, // Asset can be withdrawn only to sender's address NontransferableToken, + // the deposit was already ferried + AlreadyFerried, } #[cfg(feature = "runtime-benchmarks")] @@ -1843,6 +1845,11 @@ impl Pallet { return Err(Error::::AlreadyExecuted); } + ensure!( + !FerriedDeposits::::contains_key((chain, deposit_hash)), + Error::::AlreadyFerried + ); + let amount = deposit .amount .checked_sub(deposit.ferryTip)