Developers
A layer is a plain EVM chain behind a standard JSON-RPC endpoint. Anything you can deploy on an Orbit chain you can deploy on a layer with viem, Foundry or your wallet; the Builder's templates are a shortcut, not a fence.
#Chain parameters
| Field | Value |
|---|---|
| Chain id | 999011000 + layer id. The Commons is 999011000 (0x3b8bb2b8). |
| RPC URL | https://www.elysiumdemiurge.com/rpc/<slug> |
| Currency | HYPE, 18 decimals |
| Block explorer | The in-app page /app/explorer/<slug>; the layer's contracts on Elysium are on elysiumscan.io |
| Parent | Elysium, chain id 99901, RPC https://rpc.elysium.kinetiq.xyz |
A layer's id, chain id and slug are on its layer page, and in the Hub: layerIdBySlug(slug) then layer(id).
To add a layer to a wallet by hand, wallet_addEthereumChain takes:
{
"chainId": "0x3b8bb2b8",
"chainName": "The Commons",
"nativeCurrency": { "name": "HYPE", "symbol": "HYPE", "decimals": 18 },
"rpcUrls": ["https://www.elysiumdemiurge.com/rpc/commons"]
}#viem
import { createPublicClient, createWalletClient, defineChain, http, parseEther } from "viem";
import { privateKeyToAccount } from "viem/accounts";
export const commons = defineChain({
id: 999011000,
name: "The Commons",
nativeCurrency: { name: "HYPE", symbol: "HYPE", decimals: 18 },
rpcUrls: { default: { http: ["https://www.elysiumdemiurge.com/rpc/commons"] } },
});
const client = createPublicClient({ chain: commons, transport: http() });
console.log(await client.getBlockNumber(), await client.getGasPrice());
const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
const wallet = createWalletClient({ account, chain: commons, transport: http() });
const hash = await wallet.sendTransaction({ to: account.address, value: parseEther("0.0001") });
await client.waitForTransactionReceipt({ hash });Sign locally, as above, or through a browser wallet. The endpoint has no accounts of its own. For events, poll with getLogs or let viem's watchers fall back to polling: filter methods are not available.
#Foundry
Point any command at the layer's RPC. A script runs and simulates against the layer's live state before anything is broadcast:
export LAYER_RPC=https://www.elysiumdemiurge.com/rpc/commons
# read
cast chain-id --rpc-url $LAYER_RPC
cast balance <address> --ether --rpc-url $LAYER_RPC
# deploy one contract
forge create src/Counter.sol:Counter --rpc-url $LAYER_RPC --interactive --broadcast
# run a deployment script: without --broadcast it only simulates
forge script script/Deploy.s.sol:Deploy --rpc-url $LAYER_RPC --interactive
forge script script/Deploy.s.sol:Deploy --rpc-url $LAYER_RPC --interactive --broadcastFoundry labels amounts in ETH; on a layer they are HYPE. The templates and the AI builder compile for EVM version cancun, which layers run.
#Allowed methods
The gateway in front of every layer answers these methods and refuses every other one with error -32601:
| Group | Methods |
|---|---|
| Chain | eth_chainId, net_version, net_listening, web3_clientVersion, eth_syncing, eth_blockNumber |
| State | eth_getBalance, eth_getCode, eth_getStorageAt, eth_getTransactionCount, eth_getProof |
| Calls | eth_call, eth_estimateGas, eth_simulateV1 |
| Fees | eth_gasPrice, eth_maxPriorityFeePerGas, eth_feeHistory |
| Blocks | eth_getBlockByNumber, eth_getBlockByHash, eth_getBlockTransactionCountByNumber, eth_getBlockTransactionCountByHash |
| Transactions | eth_sendRawTransaction, eth_getTransactionByHash, eth_getTransactionReceipt, eth_getTransactionByBlockNumberAndIndex, eth_getTransactionByBlockHashAndIndex |
| Logs | eth_getLogs |
Not available, among others: eth_accounts and eth_sendTransaction (sign locally), eth_newFilter and the other filter methods, eth_subscribe (HTTP only), and the debug_, trace_, txpool_ and arb_ namespaces.
#Limits
| Limit | Value | Answer when exceeded |
|---|---|---|
eth_getLogs range |
10,000 blocks between fromBlock and toBlock. A query by blockHash has no range. |
Error -32005, "eth_getLogs range is limited to 10000 blocks" |
| Batch size | 50 requests | HTTP 400, "batch too large" |
| Request body | 512 KB | HTTP 413 |
| Upstream wait | 30 seconds | Error, "the layer did not answer" |
| A layer that is stopped or unknown | HTTP 404, error -32000, "this layer is not running" |
In a batch, one refused request refuses the whole batch with that request's error. To read a long history, walk back in windows of 10,000 blocks, as the bridge page does:
const head = await client.getBlockNumber();
let logs = [];
for (let to = head; ; ) {
const from = to > 9_999n ? to - 9_999n : 0n;
logs = [...(await client.getLogs({ address, fromBlock: from, toBlock: to })), ...logs];
if (from === 0n) break;
to = from - 1n;
}#Testing against live state
eth_simulateV1 runs calls on the layer's latest state without sending anything, and accepts state overrides. This is how the AI builder tests a contract: it lends the compiled test contract to an address, gives it HYPE, and calls each test in one simulated block.
curl -s https://www.elysiumdemiurge.com/rpc/commons -H 'content-type: application/json' --data '{
"jsonrpc": "2.0", "id": 1, "method": "eth_simulateV1",
"params": [{ "blockStateCalls": [{ "calls": [
{ "from": "0x0000000000000000000000000000000000000001",
"to": "0x0000000000000000000000000000000000000064",
"data": "0xa3b1b31d" } ] }] }, "latest"]
}'That call asks ArbSys.arbBlockNumber(), the layer's own block number.
#EVM notes
A layer is an Orbit chain, and these Orbit rules apply:
block.numberfollows the parent chain. On a layer it returns Elysium's view of the block number, which on Elysium is a HyperEVM block number, about one per second. The layer's own block number isArbSys(0x64).arbBlockNumber().block.prevrandaois the constant 1, andblockhashis not a source of randomness: the sequencer sees every transaction before ordering it.block.timestampis the time to use.- A deposit or a delayed message sent by a contract on Elysium arrives from the aliased address of that contract.
Useful precompiles on every layer:
| Address | Precompile | Used for |
|---|---|---|
0x…0064 |
ArbSys | withdrawEth, arbBlockNumber, arbOSVersion |
0x…006b |
ArbOwnerPublic | getAllChainOwners, getNetworkFeeAccount |
0x…006c |
ArbGasInfo | getMinimumGasPrice, getPricesInWei |
0x…00c8 |
NodeInterface | constructOutboxProof, through eth_call only |
#The Hub from your code
The DemiurgeHub on Elysium is at 0xC0E368370786629A7F3ECfC5fEae7E7AD64597F2. Useful reads:
export ELYSIUM_RPC=https://rpc.elysium.kinetiq.xyz
export HUB=0xC0E368370786629A7F3ECfC5fEae7E7AD64597F2
cast call $HUB "layerCount()(uint256)" --rpc-url $ELYSIUM_RPC
cast call $HUB "layerIdBySlug(string)(uint256)" commons --rpc-url $ELYSIUM_RPC
cast call $HUB "planPrice()(uint256)" --rpc-url $ELYSIUM_RPC
cast call $HUB "layerStake(uint256)(uint256,uint256)" 0 --rpc-url $ELYSIUM_RPClayer(id) returns the whole record: owner, chain id, paid-until date, whether it is free, block speed, gas floor, the five rollup addresses, the time the rollup was recorded, slug and name. The events LayerRequested, RollupRegistered, PlanPaid, RevenueSplit, Staked, Activated, UnstakeRequested, Withdrawn and Claimed let you follow everything.
Demiurge