trn-seed
trn-seed copied to clipboard
Emit an event to know withdraw source for EBD
Bridging from TRN->ETH side, when it is a futureverse (proxyExtrinsic). EBD stores the sender (EOA) as the from address. There is a requirement to use fpass address in these case. The PR will address this.
Also for XBD, we can track the event (xrplBridge.WithdrawRequestRequest)
Erc20Withdraw
Cause we have different function to process delayed withdrawal and normal withdrawal, which would mean we need to make update two events
Self::deposit_event(Event::<T>::Erc20Withdraw(
asset_id,
withdrawal_message.amount.saturated_into(),
withdrawal_message.beneficiary,
));
and
if Self::process_withdrawal(withdrawal_message.clone(), asset_id).is_err() {
Self::deposit_event(Event::<T>::DelayedErc20WithdrawalFailed(
asset_id,
withdrawal_message.beneficiary.into(),
));
}
and in process_delayed_payment, we don't know the source...
Erc20Withdraw
Cause we have different function to process delayed withdrawal and normal withdrawal, which would mean we need to make update two events
Self::deposit_event(Event::<T>::Erc20Withdraw( asset_id, withdrawal_message.amount.saturated_into(), withdrawal_message.beneficiary, ));
and
if Self::process_withdrawal(withdrawal_message.clone(), asset_id).is_err() { Self::deposit_event(Event::<T>::DelayedErc20WithdrawalFailed( asset_id, withdrawal_message.beneficiary.into(), )); }
and in process_delayed_payment, we don't know the source...
I see, that makes it tricky. We could potentially change the storage of a delayed withdrawal to include the sender address. Not entirely sure whether it's worth the hassle though. Easiest approach might be best (The separate events)