#[non_exhaustive]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 (Non-exhaustive)§
This enum is marked as non-exhaustive
RegisterToken2
registerToken2: claims a token index, paying the token auction up
to max_gas. fullName is left out when None.
The gas paid is not refunded. max_gas is in HYPE wei, 8 decimals: 1 HYPE is
100_000_000, so 1_000_000_000_000 is 10,000 HYPE. The spec is fixed for good.
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.
Amounts are the token’s wei, the integer of whole tokens times 10^weiDecimals: with
weiDecimals 8, 100_000_000 is one token. A later userGenesis for the same address
replaces its amount rather than adding to it. The address 0xff..ff holds the
hyperliquidity allocation. Balances are fixed for good at Genesis.
Confirmed against mainnet deploys and tokenDetails.
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.
Irreversible: the supply and every genesis balance are final. maxSupply is the token’s
wei, whole tokens times 10^weiDecimals.
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.
Irreversible. startPx is the lowest level’s price in the quote token per whole token;
each level above is 0.3% higher. orderSz is whole tokens per level, and nOrders times
orderSz must be the 0xff..ff genesis balance. Confirmed against mainnet deploys and
their books.
Fields
setDeployerTradingFeeShare, at any time after registerToken2, and
again only to a strictly lower share: the venue refuses a raise and the same value.
Sent as a percentage string, "5%"; spotMeta shows it as a fraction, 0.05.
EnableQuoteToken(u32)
enableQuoteToken: lets the token quote spot pairs.
EnableAlignedQuoteToken(u32)
Hyperliquid’s nodes refuse this action; see the variant’s docs
enableAlignedQuoteToken: makes the token an aligned quote asset, as the docs write it.
Hyperliquid’s nodes do not take this action yet: mainnet and testnet refuse it with
422 Failed to deserialize for every shape, the answer for an action that does not
exist (checked 2026-11-24 by just testnet).
DisableQuoteToken(u32)
disableQuoteToken.
DisableAlignedQuoteToken(u32)
Hyperliquid’s nodes refuse this action; see the variant’s docs
disableAlignedQuoteToken, sent after disableQuoteToken, as the docs write it.
Hyperliquid’s nodes do not take this action yet: mainnet and testnet refuse it with
422 Failed to deserialize for every shape (checked 2026-11-24 by just testnet).
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.