pub struct SendToEvmWithData { /* private fields */ }Expand description
sendToEvmWithData: a linked token from a Core balance to its contract on HyperEVM, which the
venue calls with coreReceiveWithData(from, destinationRecipient, destinationChainId, amount, nonce, data) in place of a transfer. The token must be linked to a contract that takes that
call; nothing here checks it. User-signed, keys in the order @nktkas/hyperliquid 0.33.3 posts
them: token, amount, sourceDex, destinationRecipient, addressEncoding,
destinationChainId, gasLimit, data as 0x and hex (signed as bytes), then the nonce.
Implementations§
Source§impl SendToEvmWithData
impl SendToEvmWithData
Sourcepub fn new(
token: &str,
amount: Amount,
source_dex: &str,
destination: Destination,
gas_limit: u64,
data: Vec<u8>,
nonce: u64,
) -> SendToEvmWithData
pub fn new( token: &str, amount: Amount, source_dex: &str, destination: Destination, gas_limit: u64, data: Vec<u8>, nonce: u64, ) -> SendToEvmWithData
amount of token (NAME:0x<tokenId>, as spotMeta lists it) from the balance
source_dex names ("" the main perp dex, spot the spot balance), for destination,
with gas_limit for the call on the destination chain and data passed to the contract.
Sourcepub const fn destination(&self) -> &Destination
pub const fn destination(&self) -> &Destination
Where the contract is asked to send it on.
Trait Implementations§
Source§impl Clone for SendToEvmWithData
impl Clone for SendToEvmWithData
Source§impl Debug for SendToEvmWithData
impl Debug for SendToEvmWithData
impl Eq for SendToEvmWithData
Source§impl PartialEq for SendToEvmWithData
impl PartialEq for SendToEvmWithData
impl StructuralPartialEq for SendToEvmWithData
Source§impl UserAction for SendToEvmWithData
impl UserAction for SendToEvmWithData
Source§fn user_signed(&self) -> UserSigned<'_>
fn user_signed(&self) -> UserSigned<'_>
Source§fn action(&self, network: Network) -> Map
fn action(&self, network: Network) -> Map
UserSigned::action: the action as posted on network.Source§fn typed(&self, network: Network) -> TypedStruct<'_>
fn typed(&self, network: Network) -> TypedStruct<'_>
UserSigned::typed: the struct the key signs.Source§fn wallet_json(&self, network: Network) -> String
fn wallet_json(&self, network: Network) -> String
UserSigned::wallet_json: the typed data for a browser wallet.Auto Trait Implementations§
impl Forget for SendToEvmWithData
impl Freeze for SendToEvmWithData
impl Move for SendToEvmWithData
impl RefUnwindSafe for SendToEvmWithData
impl Send for SendToEvmWithData
impl Sync for SendToEvmWithData
impl Unpin for SendToEvmWithData
impl UnsafeUnpin for SendToEvmWithData
impl UnwindSafe for SendToEvmWithData
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.