Skip to Content
Supra Layer 1SupraEVMGetting Started

Getting Started with SupraEVM

SupraEVM is an Ethereum-compatible execution environment running on the Supra blockchain, alongside the chain’s Move environment, SupraMVM. It speaks JSON-RPC 2.0, so the tooling you already use — MetaMask, Foundry, Hardhat, viem, ethers, web3.py — connects to it.

This page connects you to SupraEVM on Devnet and funds an account. Deploying a contract is covered by the Foundry, Hardhat and Remix IDE pages. Read Differences from Ethereum for the JSON-RPC surface the node serves and the state model behind it, and Gas and Fees for the figures a transaction has to satisfy to be accepted.

Status

SupraEVM is available on Devnet before Testnet. Interfaces can change between Devnet upgrades, including the JSON-RPC behaviour, the addresses and ABIs of the Supra precompiles, the system contracts and the gas figures. Contracts, balances and addresses on Devnet do not carry over to Testnet; a contract is deployed there again.

Network parameters

Each column is a network SupraEVM runs on.

ParameterDevnet
Network nameSupra Devnet
Chain ID535600 (0x82c30)
JSON-RPC endpointPOST https://rpc-devnet.supra.com/rpc/v1/eth
Wallet JSON-RPC endpointPOST https://rpc-devnet.supra.com/rpc/v1/eth/wallet_integration
WebSocket endpointwss://rpc-devnet.supra.com/rpc/v1/eth
Currency symbolSUPRA
Currency decimals18
Explorerhttps://devnet.suprascan.io

Devnet’s REST API, faucet and reset policy are on Devnet.

Chain ID

Devnet’s Move chain ID is 50 and its EVM chain ID is 535600. A SupraEVM transaction is signed with the EVM chain ID, which is what eth_chainId returns. The Move chain ID is the one REST responses carry in the x-supra-chain-id header.

Which endpoint to use

Give a wallet, Foundry and Hardhat /rpc/v1/eth/wallet_integration. The two endpoints serve the same methods, except that only /rpc/v1/eth serves debug_traceCall, and differ in how they treat a block parameter that names anything other than the head of the chain: /rpc/v1/eth refuses it, and /rpc/v1/eth/wallet_integration accepts it and, except for an eth_estimateGas at a named height, answers for the head; The wallet-integration endpoint sets out the difference. forge script and a forked forge test read the chain’s state at a numbered block, so both fail against /rpc/v1/eth. Give /rpc/v1/eth to a client that names only the head, or that needs a request for another height refused rather than answered for the head.

The WebSocket endpoint is at the same path as the JSON-RPC one, reached with a GET upgrade rather than a POST. It serves subscriptions.

Native currency

SupraEVM’s native currency is SUPRA, the same asset SupraMVM holds, with 18 decimals — so a wei on SupraEVM is what a wei is on Ethereum, and eth_getBalance, msg.value and a gas price all mean what you expect. A crossing to SupraMVM must be a whole multiple of 10^10 wei.

SupraMVM holds SUPRA with 8 decimals, where the unit is the quant. One quant is 10^10 wei. A balance therefore reads differently depending on which side you ask, and a value crossing between the two must be a whole number of quants. See Performing Cross-VM Transfers.

The EVM has no RPC method that reports a currency’s symbol or decimals, so a wallet takes both from what you type when you add the network.

Blocks and finality

A block is executed only after consensus has committed it, and a committed block is final: there is no reorganisation to wait out and no confirmation count to apply. How each block tag resolves, and which methods accept which tags, is set out in Block tags and finality.

Funding an account

Devnet has no EVM faucet. You fund an EVM address in two steps: take SUPRA from the Move faucet into a Move account, then cross it from that account to your EVM address. Both steps are ordinary transactions, and the crossing is the one described in Performing Cross-VM Transfers, which covers its timing, its refusals and what a refund means.

A crossing does not complete in the block that starts it. Value is escrowed by one block and paid out by a later one, normally the next.

The faucet’s responses, limits and refusals, and how to ask for more SUPRA than its limits allow, are in Faucet.

From the Supra CLI

Create a CLI profile for Devnet. With no key variable set, the command asks in a terminal whether to generate a new Move account or import an existing one; choose “Generate a new account”. With --accept-defaults, or without a terminal, it generates the account without asking. It makes the new profile the active one, which the commands below use:

supra profile new <PROFILE> --network devnet

The CLI keeps its profiles in the directory named by SUPRA_HOME, or by --supra-home. When neither is set, it uses .supra in the current directory, so a command run from another directory does not see these profiles.

With the profile’s Move account as the one to fund, take a grant and then cross it:

supra move account fund-with-faucet \ --faucet-url https://rpc-devnet.supra.com/ supra move account transfer-to-evm \ --recipient 0xYourEvmAddress \ --amount 400000000000 \ --wait \ --accept-defaults \ --rpc-url https://rpc-devnet.supra.com/

fund-with-faucet prints the faucet’s response and returns once the funding transaction has been submitted. Cross only once that transaction has executed; until then the Move account does not hold the grant.

--amount is in quants; the example crosses 4,000 SUPRA. Choose an amount below the Move account’s balance that leaves enough to pay for the crossing transaction. --recipient is your EVM address; a mixed-case address is checked against its EIP-55 checksum and refused if the checksum disagrees. --accept-defaults answers the CLI’s prompts, including the gas-price confirmation, with their defaults; without it the command asks at a terminal, and fails when there is none. --wait follows the crossing until SupraEVM has credited it, for 120 seconds by default or for --settlement-timeout-secs, from 1 to 86400. Giving up on the wait says nothing about the crossing, which stays recorded and is still applied.

The command refuses, before submitting anything and so before costing you a fee: an amount of zero; --wait together with --simulate; a chain that has no settlement escrow; a chain with crossings switched off; and a crossing backlog that is already at its bound. The report it prints carries the transaction, the settlement id and, with --wait, the crossing’s progress.

From a browser

The node serves an interactive API page at https://rpc-devnet.supra.com/docs, generated from its own OpenAPI description. It lists every REST endpoint with its parameters and lets you call them. It does not hold keys or sign: the crossing is a Move transaction, so you sign it yourself before the page can submit it.

  1. Call GET /rpc/v4/wallet/faucet/<move_address> from that page to fund your Move account.
  2. Build a transaction calling the entry function 0x1::evm_settlement::deposit_to_evm, with the amount in quants and your 20-byte EVM address as the recipient, and sign it with your wallet or an SDK. Post the signed transaction to POST /rpc/v4/transactions/submit; the page accepts it in either JSON or BCS form.

The transaction emits a 0x1::evm_settlement::SettlementRecorded event carrying the crossing’s settlement id. Keep it: it is what Tracing Cross-VM Transfers looks a crossing up by.

See the StarKey page for current wallet support.

Your first transaction

  1. Add the network to your wallet. Use the parameters in Network parameters above, pointing the wallet at https://rpc-devnet.supra.com/rpc/v1/eth/wallet_integration.

  2. Fund the address. Follow Funding an account. The Move account you take the grant into does not have to be related to the EVM address you cross to.

  3. Check the balance. Either read it in the wallet, or ask the node:

    curl -X POST https://rpc-devnet.supra.com/rpc/v1/eth \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBalance", "params":["0xYourEvmAddress","latest"]}'

    The balance is returned in wei, hex-encoded. It is zero until the block that pays the crossing out has executed, which is normally the block after the one that recorded it.

  4. Send something. Once the balance is non-zero you can transfer, deploy and call as you would on Ethereum. The gas price has a floor well above Ethereum’s; a client that sets its gas price below the gas price floor has its transactions refused.

Where to go next

Last updated on