pub struct Linked {
pub index: u64,
pub contract: Option<Address>,
pub wei_decimals: u32,
pub evm_extra_wei_decimals: i32,
}Expand description
A spot token as it is linked to HyperEVM. Its contract can hold arbitrary code; nothing here
checks its supply or what its transfer does.
Fields§
§index: u64§contract: Option<Address>The ERC-20; None for HYPE, which is the chain’s native coin.
wei_decimals: u32The decimals Core counts the token in (spotMeta’s weiDecimals).
evm_extra_wei_decimals: i32How many more the ERC-20 counts in, -2 to 18.
Implementations§
Source§impl Linked
impl Linked
Sourcepub const fn hype(wei_decimals: u32) -> Linked
pub const fn hype(wei_decimals: u32) -> Linked
HYPE: native on HyperEVM, eighteen decimals there.
Sourcepub const fn erc20(
index: u64,
contract: Address,
wei_decimals: u32,
evm_extra_wei_decimals: i32,
) -> Linked
pub const fn erc20( index: u64, contract: Address, wei_decimals: u32, evm_extra_wei_decimals: i32, ) -> Linked
A token linked to an ERC-20 (spotMeta’s evmContract).
Sourcepub fn system(&self) -> Address
pub fn system(&self) -> Address
Where the token crosses, both ways. Sent there on Core, it arrives at the sender’s address on HyperEVM.
Sourcepub fn evm_decimals(&self) -> Option<u32>
pub fn evm_decimals(&self) -> Option<u32>
The decimals the token counts in on HyperEVM.
Sourcepub fn core_places(&self) -> Option<u32>
pub fn core_places(&self) -> Option<u32>
The most places an amount crossing either way may have: the fewer of Core’s and the EVM’s.
Trait Implementations§
impl Copy for Linked
impl Eq for Linked
impl StructuralPartialEq for Linked
Auto Trait Implementations§
impl Freeze for Linked
impl RefUnwindSafe for Linked
impl Send for Linked
impl Sync for Linked
impl Unpin for Linked
impl UnsafeUnpin for Linked
impl UnwindSafe for Linked
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
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
Compare self to
key and return true if they are equal.