⛓️Launching a Game Chain
Launching a dedicated Game Chain is the ultimate step for developers seeking maximum performance, sovereignty, and customization on Wall Street Chain. A Game Chain is your own Sovereign Rollup, an L2 execution environment that inherits the full security of the Wall Street Chain L1 while operating in complete isolation from the rest of the ecosystem.
This guide will walk you through the technical process of configuring, bonding, and deploying your own Game Chain.
Benefits of Your Own Game Chain:
Guaranteed Performance: Your game's throughput is never affected by other applications. You own the blockspace.
Economic Sovereignty: You control the fee market. Use $WSC, your own native game token, or even implement gasless transactions.
Full Customization: Implement custom logic, precompiles, or unique governance models tailored specifically to your game's needs.
Prerequisites
Before you begin, ensure you have the following:
A Deployed Game: Your game's smart contracts should already be tested and deployed on the Wall Street Chain Mainnet (or Testnet for a trial run).
A Sequencer Node: You must have a server ready to run your Game Chain's sequencer. The hardware requirements are similar to running a Wall Street Chain L1 validator node.
$WSC for Bonding: A significant amount of $WSC is required to post as a security bond on the L1. This bond is what gets slashed in the event of fraudulent activity, securing the bridge between the L1 and your Game Chain. The current minimum bond is 100,000,000 $WSC.
The node's hardware requirements:
CPU: 8-Core / 16-Thread Processor
RAM: 32 GB DDR4 ECC
Storage: 1 TB NVMe SSD
Network: 100 Mbps Symmetrical Connection
Step 1: Define Your Game Chain Configuration
The first step is to create a configuration file that defines the unique properties of your Game Chain. This is typically a genesis.json or a similar configuration file that our node software will ingest.
Create a file named my-game-chain-config.json:
JSON
{
"chainName": "Degen Arena",
"chainId": 420,
"sequencerAddress": "0xYourSequencerWalletAddress",
"adminAddress": "0xYourAdminWalletAddress",
"feeToken": {
"symbol": "ARENA",
"address": "0xYourGameTokenContractAddress",
"decimals": 18
},
"initialAlloc": {
"0xPlayerOneAddress": "1000000000000000000000",
"0xPlayerTwoAddress": "500000000000000000000"
},
"l1ContractBridge": "0xL1ChainDeploymentManagerAddressOnWSC"
}Configuration Parameters:
chainName: The public name of your Game Chain.
chainId: A unique integer for your chain. You must register this on the Wall Street Chain developer portal to ensure it doesn't conflict with another Game Chain.
sequencerAddress: The public address of the wallet that your sequencer node will use to post transaction batches to the L1.
adminAddress: The address that has administrative rights over the chain, such as the ability to upgrade the sequencer.
feeToken: An object defining the token used for gas fees. To use $WSC, set the address to 0x0000000000000000000000000000000000000000. Otherwise, specify your game's native ERC-20 token address.
initialAlloc: The genesis allocation. You can pre-fund wallets with your native gas token at launch.
l1ContractBridge: The static address of the Wall Street Chain L1's deployment manager contract.
Step 2: Post Your Security Bond on the L1
To activate your Game Chain, you must register it and post the security bond to the Chain Deployment Manager smart contract on the Wall Street Chain L1.
Generate a Config Hash: Use our CLI tool to generate a unique hash of your configuration file. This ensures the on-chain registration matches your intended setup.
Bash
wsc-cli utils hash my-game-chain-config.json
# Output: 0xabc123...Interact with the L1 Contract: Using a framework like Hardhat or Foundry, call the registerGameChain function on the L1 Chain Deployment Manager contract.
JavaScript
// Example using Ethers.js
const deploymentManagerABI = [/* ... contract ABI ... */];
const contractAddress = "0xL1ChainDeploymentManagerAddressOnWSC";
const bondAmount = ethers.utils.parseEther("100000000"); // 100 Million WSC
const contract = new ethers.Contract(contractAddress, deploymentManagerABI, signer);
const tx = await contract.registerGameChain(
420, // Your Game Chain ID
"0xabc123...", // The config hash from the CLI
"0xYourSequencerWalletAddress",
{ value: bondAmount }
);
await tx.wait();
console.log("Game Chain registered and bond posted successfully!");Once this transaction is finalized, your Game Chain is officially recognized by the L1 and is ready for its sequencer to come online.
Step 3: Launch Your Sequencer Node
With your configuration defined and your bond posted, you can now launch the node that will act as the sequencer for your Game Chain.
Install the Wall Street Chain Node Software: Download and install the latest version of our node software (wsc-node) from our official GitHub repository.
Start the Sequencer: Run the node software with the appropriate flags. The sequencer will begin processing transactions, producing blocks, and posting transaction data back to the L1.
Bash
wsc-node \
--mode sequencer \
--gamechain-config ./my-game-chain-config.json \
--l1-rpc-url https://mainnet.wsc.rpc \
--sequencer-private-key $SEQUENCER_PKYour sequencer is now live. It will provide a new RPC endpoint (e.g., http://localhost:8545) that is the gateway to your Game Chain. You should configure this to be publicly accessible via a secure domain.
Step 4: Connect Your Ecosystem
Your Game Chain is now a fully functional, independent EVM network.
Update Your dApp: Reconfigure your game's frontend to point to your new Game Chain's public RPC URL.
Add to Wallets: Provide a simple "Add Network" button in your dApp so players can easily add your Game Chain to their MetaMask.
JavaScript
await window.ethereum.request({
method: 'wallet_addEthereumChain',
params: [{
chainId: '0x1A4', // Hex for 420
chainName: 'Degen Arena',
nativeCurrency: { name: 'ARENA', symbol: 'ARENA', decimals: 18 },
rpcUrls: ['https://rpc.degen-arena.io'],
blockExplorerUrls: ['https://explorer.degen-arena.io'], // Optional
}],
});Advanced Configuration
Gasless (Subsidized) Transactions
Since you control the execution environment, you can implement gasless transactions for your players. This is typically done by setting up a relayer that accepts meta-transactions, pays the gas fee on the player's behalf (in your custom feeToken), and submits the transaction to your sequencer.
Custom Precompiles
For performance-critical operations, you can fork our node software to add custom precompiles. This allows you to implement complex logic (e.g., specific cryptographic functions, complex state updates for your game) in a lower-level language like Go or Rust, which can be called directly from your Solidity smart contracts at a fraction of the gas cost.
Last updated