pub struct BridgeTransfer {
pub transfer_id: String,
pub message: BridgeMessage,
pub asset_id: String,
pub amount: u64,
pub bridge_fee: u64,
pub relayer_fee: u64,
pub source_tx_hash: Option<Hash>,
pub destination_tx_hash: Option<Hash>,
pub proof: Option<BridgeProof>,
pub metadata: BridgeTransferMetadata,
}Expand description
A cross-chain transfer via bridge
Fields§
§transfer_id: StringTransfer ID
message: BridgeMessageBridge message
asset_id: StringAsset being transferred
amount: u64Amount being transferred
bridge_fee: u64Bridge fee (in source chain units)
relayer_fee: u64Relayer fee (in destination chain units)
source_tx_hash: Option<Hash>Source transaction hash
destination_tx_hash: Option<Hash>Destination transaction hash
proof: Option<BridgeProof>Transfer proof
metadata: BridgeTransferMetadataTransfer metadata
Implementations§
Source§impl BridgeTransfer
impl BridgeTransfer
Sourcepub fn new(
message: BridgeMessage,
asset_id: String,
amount: u64,
bridge_fee: u64,
) -> Self
pub fn new( message: BridgeMessage, asset_id: String, amount: u64, bridge_fee: u64, ) -> Self
Creates a new bridge transfer
Sourcepub fn with_source_tx(self, tx_hash: Hash) -> Self
pub fn with_source_tx(self, tx_hash: Hash) -> Self
Sets the source transaction hash
Sourcepub fn with_destination_tx(self, tx_hash: Hash) -> Self
pub fn with_destination_tx(self, tx_hash: Hash) -> Self
Sets the destination transaction hash
Sourcepub fn with_proof(self, proof: BridgeProof) -> Self
pub fn with_proof(self, proof: BridgeProof) -> Self
Sets the transfer proof
Trait Implementations§
Source§impl Clone for BridgeTransfer
impl Clone for BridgeTransfer
Source§fn clone(&self) -> BridgeTransfer
fn clone(&self) -> BridgeTransfer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BridgeTransfer
impl Debug for BridgeTransfer
Source§impl<'de> Deserialize<'de> for BridgeTransfer
impl<'de> Deserialize<'de> for BridgeTransfer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for BridgeTransfer
Source§impl PartialEq for BridgeTransfer
impl PartialEq for BridgeTransfer
Source§fn eq(&self, other: &BridgeTransfer) -> bool
fn eq(&self, other: &BridgeTransfer) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BridgeTransfer
impl Serialize for BridgeTransfer
impl StructuralPartialEq for BridgeTransfer
Auto Trait Implementations§
impl Freeze for BridgeTransfer
impl RefUnwindSafe for BridgeTransfer
impl Send for BridgeTransfer
impl Sync for BridgeTransfer
impl Unpin for BridgeTransfer
impl UnsafeUnpin for BridgeTransfer
impl UnwindSafe for BridgeTransfer
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
Mutably borrows from an owned value. Read more