-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
link refund tx to initial tx #235
Conversation
bridged-tokens-wrapper/src/lib.rs
Outdated
@@ -6,6 +6,7 @@ mod events; | |||
use core::ops::Deref; | |||
|
|||
pub use dfp_big_uint::DFPBigUint; | |||
use esdt_safe_proxy::RefundInfo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you dont have to import the struct explicitly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty, fixed
Coverage SummaryTotals
FilesExpand
|
Contract comparison - from 10502db to ef221a3
|
self.create_refund_transaction_event( | ||
batch_id, | ||
tx_nonce, | ||
payment_token, | ||
actual_bridged_amount, | ||
required_fee, | ||
refund_info.initial_batch_id, | ||
refund_info.initial_nonce, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we also need to include the refund address and tx.to in the create_refund_transaction_event because if we do not receive the create_transaction_event before, we don't have all the details to index the "refunded" swap in ES
@@ -34,7 +34,7 @@ pub trait BridgeProxyContract: | |||
|
|||
#[payable("*")] | |||
#[endpoint] | |||
fn deposit(&self, eth_tx: EthTransaction<Self::Api>) { | |||
fn deposit(&self, eth_tx: EthTransaction<Self::Api>, batch_id: u64) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not put this mandatory argument here, which is useless in the case we want to do a normal swap from Mvx->Eth
Instead, why not create a depositWithLinkedBatchID function? And that should be called from the bridge proxy SC
This is the bridge proxy SC, not the esdt safe
No description provided.