Initia (Closed Testnet)
  • Reminder
    • ⛔Confidentiality Disclaimer
  • WELCOME TO CLOSED TESTNET
    • Welcome to Closed Testnet
  • About Initia
    • What is the Initia Platform?
      • Architecture
        • Layer 1
        • Layer 2
      • Aligning Initia (coming soon!)
    • InitiaDEX
    • Enshrined Liquidity and Staking
  • Developers
    • Initiad
      • Download Initiad
      • Using Initiad
    • Get INIT token
    • Build your own Minitia
      • Simple Minitia Setup
      • Connect Minitia to L1
        • OPinit Stack
          • OPinit Module
          • OPinit Bots
        • Relayer
          • Fetching Oracle Prices
    • Virtual Machines
      • MoveVM
        • Interact with CLI
      • WasmVM
    • Contracts
      • Move Contracts
      • CosmWasm Contracts
      • EVM Contracts (Coming Soon)
    • Oracles
  • Initia Developer Tutorials
    • 1. Create account
    • 2. Send Move coin
    • 3. Interchain Message
    • 4. Create your own Move coin
    • 5. Create your own Move NFT
    • 6. Build and Publish Contracts
      • Move Module
      • CosmWasm Contract
  • Core Applications
    • Core Applications
      • Wallet
      • Initia App
      • Usernames
      • Initia Scan
  • Node Operators
    • Running Initia Node
      • Prerequisites
      • Oracle
      • Boot an Initia Node
      • Connect to Initia Network
      • Cosmovisor Guide
    • Configuring Initia Validator
  • References and Tools
    • Move Language
    • Rust Language (CosmWasm)
    • Closed Testnet Chain Information
    • Chain Parameters
    • Initia.js
    • API Docs
    • API Docs (minimove)
    • API Docs (miniwasm)
    • Whitelisted Tokens and Pairs
Powered by GitBook
On this page
  • Installation
  • How to use
  • Create Bridge
  • Configuration
  • Bridge Executor
  • Batch Submitter
  • Output Submitter
  • Challenger
  1. Developers
  2. Build your own Minitia
  3. Connect Minitia to L1
  4. OPinit Stack

OPinit Bots

This page will provide how to set OPinit bots for your minitia

Initia Optimistic Rollup Bots.

  • Batch Submitter: Submit batch to L1 node

  • Output Submitter: Submit output to L1 node

  • Challenger: Challenge invalid output

  • Bridge Executor: Execute bridge transaction

Installation

git clone https://github.com/initia-labs/OPinit.git
cd OPinit/bots
npm install

How to use

Create Bridge

Before running rollup bots, you should create bridge between L1 and L2. If you use initia.js, you can create bridge using MsgCreateBridge message as follows.

import { MsgCreateBridge, BridgeConfig, Duration } from '@initia/initia.js';

const bridgeConfig = new BridgeConfig(
    challenger.key.accAddress,
    outputSubmitter.key.accAddress,
    Duration.fromString(submissionInterval.toString()),
    Duration.fromString(finalizedTime.toString()),
    new Date(),
    this.metadata
);

const msg = new MsgCreateBridge(executor.key.accAddress, bridgeConfig);

Configuration

Name
Description
Default

L1_LCD_URI

L1 node LCD URI

http://127.0.0.1:1317

L1_RPC_URI

L1 node RPC URI

http://127.0.0.1:26657

L2_LCD_URI

L2 node LCD URI

http://127.0.0.1:1317

L2_RPC_URI

L2 node RPC URI

http://127.0.0.1:26657

BRIDGE_ID

Bridge ID

""

EXECUTOR_PORT

Executor port

3000

BATCH_PORT

Batch submitter port

3001

EXECUTOR_MNEMONIC

Mnemonic seed for executor

""

BATCH_SUBMITTER_MNEMONIC

Mnemonic seed for submitter

""

OUTPUT_SUBMITTER_MNEMONIC

Mnemonic seed for output submitter

""

CHALLENGER_MNEMONIC

Mnemonic seed for challenger

""

L2_DENOM

L2 fee denom

umin

SLACK_WEB_HOOK

Slack web hook url for notification

""

DELETE_OUTPUT_PROPOSAL

Whether to allow challenger to automatically delete output proposals

false

Bridge Executor

Bridge executor is a bot that monitor L1, L2 node and execute bridge transaction. It will execute following steps.

  1. Set bridge executor mnemonic on .env.executor.

    export EXECUTOR_MNEMONIC="..."
  2. Run executor bot

    npm run executor

Batch Submitter

Batch submitter is a background process that submits transaction batches to the BatchInbox module of L1.

  1. Set batch submitter mnemonic on .env.batch.

    export BATCH_SUBMITTER_MNEMONIC="..."
  2. Run batch submitter bot

    npm run batch

Output Submitter

Output submitter is the component to store the L2 output root for block finalization. Output submitter will get the L2 output results from executor and submit it to L1.

  1. Set output submitter mnemonic on .env.output.

    export OUTPUT_SUBMITTER_MNEMONIC="..."
  2. Run output submitter bot

    npm run output

Challenger

Challenger is an entity capable of deleting invalid output proposals from the output oracle.

  1. Set challenger mnemonic on .env.challenger.

    export CHALLENGER_MNEMONIC="..."
  2. Run challenger bot

    npm run challenger
PreviousOPinit ModuleNextRelayer

Last updated 1 year ago

In OPinit bots, we use for managing environment variable for development.

dotenv