pub enum SpotDeploy {
Show 16 variants
RegisterToken2 {
spec: TokenSpec,
max_gas: u64,
full_name: Option<String>,
},
UserGenesis {
token: u32,
user_and_wei: Vec<(Address, u128)>,
existing_token_and_wei: Vec<(u32, u128)>,
blacklist_users: Vec<(Address, bool)>,
},
Genesis {
token: u32,
max_supply: u128,
no_hyperliquidity: bool,
},
RegisterSpot {
base: u32,
quote: u32,
},
RegisterHyperliquidity {
spot: u32,
start_px: Dec,
order_sz: Dec,
n_orders: u32,
n_seeded_levels: Option<u32>,
},
SetDeployerTradingFeeShare {
token: u32,
share: FeeShare,
},
EnableQuoteToken(u32),
EnableAlignedQuoteToken(u32),
DisableQuoteToken(u32),
DisableAlignedQuoteToken(u32),
SetTokenAnnotation {
token: u32,
annotation: Annotation,
},
SetDeployerLabel(DexName),
EnableFreezePrivilege(u32),
FreezeUser {
token: u32,
user: Address,
freeze: bool,
},
RevokeFreezePrivilege(u32),
RequestEvmContract {
token: u32,
address: Address,
evm_extra_wei_decimals: i8,
},
}Expand description
{"type":"spotDeploy",<variant>:{..}}. A token is deployed in five steps
sent in this order: RegisterToken2,
UserGenesis (as many times as needed),
Genesis, RegisterSpot
and RegisterHyperliquidity. The
rest are optional. Wei amounts are integers in the token’s wei decimals.
Variants§
RegisterToken2
registerToken2: claims a token index, paying the token auction up
to max_gas. fullName is left out when None.
Fields
UserGenesis
userGenesis: wei for addresses, wei shared among the holders of
existing tokens, and addresses to blacklist (true) or take off the
blacklist (false). blacklistUsers is left out when empty.
Fields
Genesis
genesis: the maximum supply in wei, which must equal what the
user genesis steps gave out. noHyperliquidity is sent, as true,
only when set.
Fields
RegisterSpot
registerSpot: the pair of a base and a quote token. Between two
existing tokens it pays the spot pair auction.
Fields
RegisterHyperliquidity
registerHyperliquidity: the pair index (not the token’s), the
starting price, each order’s size in tokens (not wei), the number of
orders (0 after a genesis with no hyperliquidity) and the number of
levels seeded with USDC. nSeededLevels is left out when None.
Fields
setDeployerTradingFeeShare, at any time after registerToken2, and
again only to lower it.
EnableQuoteToken(u32)
enableQuoteToken: lets the token quote spot pairs.
EnableAlignedQuoteToken(u32)
enableAlignedQuoteToken: makes the token an aligned quote asset.
DisableQuoteToken(u32)
disableQuoteToken.
DisableAlignedQuoteToken(u32)
disableAlignedQuoteToken, sent after disableQuoteToken.
SetTokenAnnotation
setTokenAnnotation, at any time after registerToken2, at most
once a day.
SetDeployerLabel(DexName)
setDeployerLabel: the label shown for the deployer’s tokens, set
once per deployer.
EnableFreezePrivilege(u32)
enableFreezePrivilege: lets the deployer freeze holders of the
token. In Hyperliquid’s Python SDK; not in the API docs.
FreezeUser
freezeUser: freezes (true) or unfreezes (false) one holder. In
Hyperliquid’s Python SDK; not in the API docs.
Fields
RevokeFreezePrivilege(u32)
revokeFreezePrivilege: gives the freeze privilege up. In
Hyperliquid’s Python SDK; not in the API docs.
RequestEvmContract
requestEvmContract: asks to link the token to an ERC-20 on the
HyperEVM; the contract’s deployer then sends
FinalizeEvmContract. evm_extra_wei_decimals is the EVM
contract’s decimals less the token’s wei decimals, from -2 to 18.
Linking cannot be undone.
Implementations§
Source§impl SpotDeploy
impl SpotDeploy
Sourcepub fn register_hyperliquidity(
spot: u32,
start_px: Dec,
order_sz: Dec,
n_orders: u32,
n_seeded_levels: Option<u32>,
) -> Result<Self, BadDeploy>
pub fn register_hyperliquidity( spot: u32, start_px: Dec, order_sz: Dec, n_orders: u32, n_seeded_levels: Option<u32>, ) -> Result<Self, BadDeploy>
registerHyperliquidity, refusing a negative price or size.
Trait Implementations§
Source§impl Clone for SpotDeploy
impl Clone for SpotDeploy
Source§impl Debug for SpotDeploy
impl Debug for SpotDeploy
impl Eq for SpotDeploy
Source§impl L1Action for SpotDeploy
impl L1Action for SpotDeploy
Source§fn action(&self) -> Map
fn action(&self) -> Map
Source§fn msgpack(&self) -> Vec<u8> ⓘ
fn msgpack(&self) -> Vec<u8> ⓘ
Source§fn typed(
&self,
nonce: u64,
vault: Option<Address>,
network: Network,
) -> TypedStruct<'static>
fn typed( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> TypedStruct<'static>
Source§fn digest(
&self,
nonce: u64,
vault: Option<Address>,
network: Network,
) -> [u8; 32]
fn digest( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> [u8; 32]
Domain::EXCHANGE.Source§impl PartialEq for SpotDeploy
impl PartialEq for SpotDeploy
impl StructuralPartialEq for SpotDeploy
Auto Trait Implementations§
impl Forget for SpotDeploy
impl Freeze for SpotDeploy
impl Move for SpotDeploy
impl RefUnwindSafe for SpotDeploy
impl Send for SpotDeploy
impl Sync for SpotDeploy
impl Unpin for SpotDeploy
impl UnsafeUnpin for SpotDeploy
impl UnwindSafe for SpotDeploy
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.