Documentation

Quick start

Your L2aaS chain is a standard EVM blockchain. Any tool that works with Ethereum works with your chain — MetaMask, Remix, Hardhat, Foundry, ethers.js, viem, web3.js.

First step: Get your free key on the homepage. Your key identifies your account — no email, no password. Save it immediately.

Your RPC endpoint

Once provisioned (Basic or Production tier), your RPC endpoint looks like this:

https://rpc.l2aas.net/l2k_YOUR_KEY

Your Chain ID and exact endpoint are shown on your account page after provisioning.

Example: ethers.js v6

import { JsonRpcProvider } from 'ethers';

const provider = new JsonRpcProvider(
  'https://rpc.l2aas.net/l2k_YOUR_KEY'
);
const block = await provider.getBlockNumber();
console.log('Current block:', block);

Example: viem

import { createPublicClient, http, defineChain } from 'viem';

const myChain = defineChain({
  id: YOUR_CHAIN_ID,  // from your account page
  name: 'My L2',
  nativeCurrency: { name: 'OPGas', symbol: 'OPG', decimals: 18 },
  rpcUrls: { default: { http: ['https://rpc.l2aas.net/l2k_YOUR_KEY'] } },
});

const client = createPublicClient({
  chain: myChain,
  transport: http(),
});

Example: curl

curl -X POST https://rpc.l2aas.net/l2k_YOUR_KEY \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

MetaMask setup

Add your chain to MetaMask in under 60 seconds:

  1. Open MetaMask → click the network dropdown (top-left)
  2. Click Add a custom network
  3. Fill in the fields below
  4. Click Save
FieldValue
Network nameMy L2 (or any name you prefer)
New RPC URLhttps://rpc.l2aas.net/l2k_YOUR_KEY
Chain IDYour Chain ID (shown on account page)
Currency symbolOPG
Block explorer URLLeave blank (optional)

After adding the network, switch to it. Your OPGas balance will appear as the ETH-equivalent in MetaMask.

Hardhat config

// hardhat.config.js
require('@nomicfoundation/hardhat-toolbox');

module.exports = {
  solidity: '0.8.24',
  networks: {
    myl2: {
      url: 'https://rpc.l2aas.net/l2k_YOUR_KEY',
      chainId: YOUR_CHAIN_ID,
      accounts: [process.env.PRIVATE_KEY],
    },
  },
};
# Deploy to your L2
npx hardhat run scripts/deploy.js --network myl2

Foundry config

# foundry.toml
[profile.default]
src = "src"
out = "out"
libs = ["lib"]

[rpc_endpoints]
myl2 = "https://rpc.l2aas.net/l2k_YOUR_KEY"
# Deploy
forge script script/Deploy.s.sol \
  --rpc-url myl2 \
  --private-key $PRIVATE_KEY \
  --broadcast

Remix

Remix works two ways with your chain:

Via MetaMask (recommended)

  1. Add your chain to MetaMask (see above)
  2. In Remix, select Injected Provider — MetaMask as the environment
  3. Make sure MetaMask is on your L2 network
  4. Deploy and interact normally

Via direct RPC

  1. In Remix, select Custom — External Http Provider
  2. Enter https://rpc.l2aas.net/l2k_YOUR_KEY
  3. Click OK

OPGas

OPGas is the native fuel for your chain. It functions identically to ETH on Ethereum — it pays for transaction fees and contract deployment.

What is OPGas?

OPGas is the gas token used on your L2 chain (and on the underlying L1 network). The denomination and conversion rate is the same everywhere — 1 OPGas = 1018 wei, just like ETH. Any tool that handles ETH will handle OPGas without changes.

How to buy OPGas

  1. Go to your account page
  2. Click Buy OPGas
  3. Choose an amount (larger amounts get volume discounts)
  4. Approve USDC on Base — we transfer OPGas to your wallet
  5. Bridge from your wallet to your L2 chain via the account page

OPGas volume discounts

Purchase amountDiscount
$20Base rate
$50~10% off
$200~25% off
$1,000~40% off

Bridging L1 → L2

Your L1 wallet is the master switch. OPGas purchased lands in your L1 wallet first. From there, bridge to your L2:

  1. Go to your account page → Bridge OPGas
  2. Enter the amount to bridge
  3. Confirm the transaction in your wallet
  4. Wait ~2 minutes for the bridge to complete

Your L2 wallet is now funded. Transactions and contract deployments will work.

Keep your L1 wallet topped up. The monthly hosting fee ($20 or $200 worth of OPGas) is auto-debited from your L1 wallet. If your L1 wallet runs to zero, your chain freezes within 7 days.

Chain lifecycle

Your chain goes through defined states based on your OPGas credits:

StateConditionWhat happens
ActiveOPGas credits > 0Everything running normally
FrozenCredits = 0, up to 7 daysSequencer stopped. Data kept on disk. Top up to reactivate.
Archived7 days frozen, up to 30 daysData moved to cold storage (S3). Still recoverable.
Deleted30 days archivedAll data permanently deleted. Cannot be recovered.

To reactivate a frozen or archived chain, go to your account page and buy OPGas. The system will restart automatically.

Service tiers

TierChainRegionsUptimePrice
FreeShared demo1Best effort$0
BasicDedicated1Best effort$20/mo
ProductionDedicated399.9% SLA$200/mo

The monthly fee is debited in OPGas from your L1 wallet. Upgrade or downgrade via your account page.

Billing

Paid tiers use USDC or USDT on Base (chain ID 8453).

  1. Link your wallet address to your key from the account page
  2. Approve our billing contract for the desired amount
  3. We pull the monthly subscription from your USDC balance
  4. To cancel: revoke the USDC approval in your wallet — no forms, no emails

Your USDC stays in your wallet until pulled. Every on-chain transaction is your receipt.

If a pull fails

If your USDC balance is insufficient when we try to pull, your chain enters the frozen state after 7 days. No debt is carried. Top up OPGas and restore your USDC approval to reactivate.

Common errors

ErrorMeaning
401 UnauthorizedInvalid or unknown key
402 Payment RequiredNo active subscription — upgrade from your account page
429 Too Many RequestsFree tier rate limit exceeded
503 Service UnavailableChain is frozen or being provisioned
execution revertedContract error — check your Solidity logic
insufficient fundsOPGas balance too low — buy and bridge more OPGas

Frequently asked questions

Is this a real blockchain?

Yes. Your chain processes real transactions, runs real EVM contracts, and maintains a real chain of blocks. It is isolated from other customers' chains. What you deploy there is yours.

Can I use ERC-20 tokens on my chain?

Yes. Deploy any ERC-20 contract and it works exactly as on any EVM chain. OPGas is only the native gas token — you can still deploy arbitrary tokens on top.

Can I bridge assets from Ethereum or Base to my chain?

In a future release, a standard bridge will be available. Currently, you deploy your own bridge contracts if needed. OPGas is the only bridgeable asset via the built-in bridge.

Is my key the same as my private key?

No. Your L2aaS key (starts with l2k_) is an access key for the L2aaS service — similar to an API key. Your wallet private key is separate, held only by you, used for signing on-chain transactions.

What happens if I lose my key?

Your key cannot be recovered. There is no email reset. If you lose it, you lose access to your account, RPC endpoint, and chain management. Save your key in a password manager immediately after generating it.

Can I run my own validator?

Not in the current version. The chain infrastructure is managed by L2aaS. You control your contracts, your wallet, and your OPGas. Infrastructure management may be available in a future tier.