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.

Last updated