Skip to main content

Crate df_elysium_core

Crate df_elysium_core 

Source
Expand description

Elysium SDK for Rust, on df-hyperliquid-core.

  • client: the Client, the network, the JSON-RPC Nitro adds, typed contract calls and reads.
  • nitro: ArbOS’s precompiles and the NodeInterface.
  • gas: what a transaction costs, Elysium’s gas and HyperEVM’s data split.
  • account: signers, balances and nonces.
  • transfer: HYPE, ERC-20s and Multicall3.
  • bridge: HYPE and messages between HyperEVM and Elysium, both ways.
  • deploy: contracts, CREATE2, Stylus and source verification.
  • live: new blocks and logs, polled.
  • utils: addresses, exact decimals, hex and HYPE’s units.

Testnet only until Kinetiq publishes mainnet. Money is exact integers and decimals, never floats. Features: sign and native (default), web, offline.

Re-exports§

pub use client::Client;
pub use client::Network;

Modules§

account
What an address holds and who signs for it.
bridge
HYPE and messages between HyperEVM and Elysium, both ways, through the rollup’s own contracts on the parent chain (Contracts).
client
Connecting to Elysium: the Client that reads, signs and sends over one network’s JSON-RPC, the network, the methods Nitro adds (rpc) and the records it answers with (records), typed contract calls (method, event, read), and the native and browser wires from df-hyperliquid-core.
deploy
Contracts on Elysium: a creation and where it lands (CREATE from the sender’s nonce, CREATE2 through the deterministic deployer at its usual address), Stylus programs activated after they are deployed (crate::nitro::wasm), and source verification on Conduit’s Sourcify (verify). CreateX is not deployed.
gas
What a transaction costs on Elysium. One gas figure pays for two things: Elysium’s execution at its base fee, and posting the transaction’s bytes to HyperEVM, which ArbOS folds into the same gas at the parent chain’s data price. A plain HYPE transfer therefore takes a little over 21,000 (a hard-coded 21,000 is refused as intrinsic gas too low).
live
New blocks and logs as they land, polled: Elysium’s public node has no websocket, and a block every 100 to 200 ms makes a poll every few hundred milliseconds as fresh as a subscription.
nitro
ArbOS’s precompiles and the NodeInterface: the chain-specific surface of an Arbitrum Nitro chain, as Elysium serves it (ArbOS 61, Stylus on). Each is a list of Methods as the Nitro interfaces declare them, typed Reads for the views, and Calls for what a transaction does.
transfer
Moving value on Elysium: HYPE, the native coin (hype), ERC-20 tokens (erc20), and many reads in one call through Multicall3 (multicall). Uniswap’s Permit2 is predeployed at its canonical address. Moving HYPE to or from HyperEVM is crate::bridge.
utils
What every Elysium app reaches for: addresses, exact decimals, hex, JSON and keccak from df-hyperliquid-core, and HYPE’s units on Elysium.

Structs§

Address
Twenty bytes. Read in either case, written lowercase, which is the only form the venue hashes.
B256
Thirty-two bytes: a transaction or block hash, a log topic, a storage slot.
Dec
An exact decimal, units / 10^scale, for every amount the venue prices in. The venue sends and takes these as strings, and a float between the two would change the figure that gets signed.
U256
An unsigned 256-bit integer. The limbs are most significant first, so the derived order is the numeric one.