Documentation

Everything you need to build, deploy, and scale cross-VM applications on InterLayer.

CLI Reference

interlayer init

Initialize a new InterLayer project

$ interlayer init [project-name] --template [evm|svm|polkavm|move|cosmwasm]
Options:
  • --template: Choose VM template (evm, svm, polkavm, move)
  • --path: Custom directory path
  • --git: Initialize git repository

interlayer compile

Compile smart contracts

$ interlayer compile [--vm evm|svm|polkavm]

interlayer deploy

Deploy contracts to network

$ interlayer deploy --network [testnet|mainnet] --vm [evm|svm]
Options:
  • --network: Target network (testnet, mainnet, local)
  • --vm: Specify VM for deployment
  • --account: Deployer account
  • --gas-limit: Custom gas limit

interlayer node

Run local development node

$ interlayer node start [--dev]

Network Ports & MEL Envelope

Below are the active local and staging ports used by developers to interface with specific execution layers. When deploying or developing on standard domains, the network gateway handles mapping automatically.

RPC Endpoints

ServiceEndpointProtocolUse
Unified MEL (HTTPS)rpc.interlayer.oneHTTPAll virtual machines
Unified MEL (WSS)ws.interlayer.oneWSSRealtime subscriptions
EVM RPCevm.interlayer.oneHTTPMetaMask / Foundry
SVM RPCsvm.interlayer.oneHTTPSolana SDK / Phantom
PolkaVMpolkavm.interlayer.oneHTTPink! / Cargo Contract
Move VMmove.interlayer.oneHTTPMove CLI / Modules
CosmWasmcosmwasm.interlayer.oneHTTPCosmJS / CosmWasm

The Multi-VM Transaction Envelope (MEL Envelope)

Transactions executed across completely different virtual machines are wrapped into a single unified container before consensus boundary verification. This container is signed once by your primary wallet credentials.

// Example payload of a MEL Transaction Envelope
const
melTx = {
from: Array.from(ethers.getBytes(evmAddress)),
to: Array.from(ethers.getBytes(contractAddress)),
vm: { EVM: null }, // Target Virtual Machine adapter
payload: Array.from(evmRlpBytes), // Raw VM-specific transaction bytes
gas_budget: 21000,
nonce: Date.now(),
chain_id: 2021, // Gravity Testnet Chain ID
auth_scheme: { Native: null } // Adapter verifies VM internally
};
Unified Balance Safety
The on-chain unified-balance ledger dynamically locks the user's primary account balance before acquiring the targeted VM locks, preventing double-spends and partial states.

SDK Documentation

TypeScript SDK

import
{ InterLayerClient } from '@interlayer/sdk';
const
client = new InterLayerClient({
rpcUrl: 'https://rpc.interlayer.one',
chain: 'testnet'
});
// Deploy EVM contract
const
tx = await client.deploy({
vm: 'evm',
bytecode,
abi
});

Rust SDK

use
interlayer_sdk::{Client, VmType};
let
client = Client::new("https://rpc.interlayer.one")?;
let
result = client.cross_vm_call(
VmType::EVM,
contract_address,
method_data
).await?;

JSON-RPC API

InterLayer exposes standard Substrate JSON-RPC endpoints plus custom MEL methods:

chain_getBlock

Get block details by hash or number

POST {"method": "chain_getBlock", "params": ["0x..."]}

mel_submitCrossVmTx

Submit atomic cross-VM transaction

POST {"method": "mel_submitCrossVmTx", "params": [{"vm": "evm", "calls": [...]}]}

state_getStorage

Query chain state directly

POST {"method": "state_getStorage", "params": ["key"]}