All phases of Avail's unification drop have now ended, ๐Ÿ‘‰๐Ÿ‘‰ check out this page ๐Ÿ‘ˆ๐Ÿ‘ˆ for more information.

Docs
Avail-powered Orbit chains

Deploy Arbitrum Orbit with Avail DA

Prerequisites

  1. You need to have docker (opens in a new tab) and docker-compose (opens in a new tab) installed on your machine.
  2. An Avail account with some AVAIL tokens in it. You can refer to our docs here to get started.
  3. This guide will use Arbitrum's ArbSepolia (opens in a new tab) and Avail's Turing testnets.

Step-1 :- Download avail nitro node docker image

  1. Download the avail-nitro-node image from docker hub:- avail-nitro-node-dev (opens in a new tab).

    docker pull availrishabh/avail-nitro-node-dev:v2.3.1

Step-2 :- Deploy Rollup Contracts

  1. Download the nitro-contract with Avail DA :- Clone the nitro-contracts (opens in a new tab)

    git clone https://github.com/availproject/nitro-contracts.git
    cd nitro-contracts
    git checkout data-availability-verifiaction-v2.3.1
    yarn install
    yarn build
  2. Create .env file as per .env.sample and Set Rollup Creator Address and Devnet Private key

    ROLLUP_CREATOR_ADDRESS="0xADCBE5c221566FA6e6Ebf5BA08759c83177DfCDA"
  3. Set the config file scripts/config.ts with required configurations where wasmModuleRoot. This must be based on your cpu arch.

    // for amd64
    wasmModuleRoot:'0xba5ff5ddc46b5c63fa02168819b8e236fa18b4b551f20eba378e3543477298bf'
    // for arm64
    wasmModuleRoot:'0x1cc4dd8f036f93e37b6c9fa4edfbefaf19cf893558e9358ad41ccb3804684092'
  4. Now deploy rollup contract using

    yarn run deploy-eth-rollup โ€”-network arbSepolia
  5. You will get to see this way of addresses:


nitro-stack

Step-3 :- Spin up the chain using orbit-setup-script

  1. Download orbit-setup-script:- Clone orbit-setup-script (opens in a new tab)

    git clone https://github.com/OffchainLabs/orbit-setup-script.git
    cd orbit-setup-script
  2. Add the nodeConfig.json in ./config, and update the file with the correct values as highlighted below:

    {
      "chain": {
        "info-json": "[{\"chain-id\":555371422,\"parent-chain-id\":421614,\"parent-chain-is-arbitrum\":true,\"chain-name\":\"My Arbitrum L3 Chain\",\"chain-config\":{\"homesteadBlock\":0,\"daoForkBlock\":null,\"daoForkSupport\":true,\"eip150Block\":0,\"eip150Hash\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"eip155Block\":0,\"eip158Block\":0,\"byzantiumBlock\":0,\"constantinopleBlock\":0,\"petersburgBlock\":0,\"istanbulBlock\":0,\"muirGlacierBlock\":0,\"berlinBlock\":0,\"londonBlock\":0,\"clique\":{\"period\":0,\"epoch\":0},\"arbitrum\":{\"EnableArbOS\":true,\"AllowDebugPrecompiles\":false,\"DataAvailabilityCommittee\":false,\"InitialArbOSVersion\":11,\"GenesisBlockNum\":0,\"MaxCodeSize\":24576,\"MaxInitCodeSize\":49152,\"InitialChainOwner\":\"0xd41996ED89bb5BF7dBfB181D8D93E8067446200B\"},\"chainId\":555371422},\"rollup\":{\"bridge\":\"0x1F4f5F72376a163B2e39db27d73CA029145d16f1\",\"inbox\":\"0x909f9B9aE47e28E4e37C06E47d848a6f49C3ed63\",\"sequencer-inbox\":\"0x4a063a85c0198887e6bA499a50e2226f8AE9F43b\",\"rollup\":\"0xC067884D8ED8EC03cB913e901A05C60532f63C02\",\"validator-utils\":\"0xB11EB62DD2B352886A4530A9106fE427844D515f\",\"validator-wallet-creator\":\"0xEb9885B6c0e117D339F47585cC06a2765AaE2E0b\",\"deployed-at\":27754620}}]",
        "name": "My Arbitrum L3 Chain"
      },
      "parent-chain": {
        "connection": {
          "url": "https://sepolia-rollup.arbitrum.io/rpc"
        }
      },
      "http": {
        "addr": "0.0.0.0",
        "port": 8449,
        "vhosts": [
          "*"
        ],
        "corsdomain": [
          "*"
        ],
        "api": [
          "eth",
          "net",
          "web3",
          "arb",
          "debug"
        ]
      },
      "node": {
        "sequencer": true,
        "delayed-sequencer": {
          "enable": true,
          "use-merge-finality": false,
          "finalize-distance": 1
        },
        "batch-poster": {
          "max-size": 90000,
          "enable": true,
          "parent-chain-wallet": {
            "private-key": "<Insert your private key here>"
          }
        },
        "staker": {
          "enable": true,
          "strategy": "MakeNodes",
          "parent-chain-wallet": {
            "private-key": "<Insert your private key here>"
          }
        },
        "dangerous": {
          "no-sequencer-coordinator": true
        },
        "avail": {
          "enable": true,
          "seed": "Enter a seed phrase here",
          "api-url": "wss://turing-rpc.avail.so/ws",
          "app-id": 1,
          "timeout":'100s',
          "vectorx": "0xA712dfec48AF3a78419A8FF90fE8f97Ae74680F0",
          "arbSepolia-rpc": "<Enter an arbSepolia RPC here>"
        }
      },
      "execution": {
        "forwarding-target": "",
        "sequencer": {
          "enable": true,
          "max-tx-data-size": 85000,
          "max-block-speed": "250ms"
        },
        "caching": {
          "archive": true
        }
      }
    }
     
  3. Update docker-compose file of orbit-setup-script

    ...
    nitro:
      image: avail-nitro-node-dev:v2.3.1
      ports:
    ...
  4. Run your chain

    cd orbit-setup-script
    docker-compose up -d

    A Nitro node and BlockScout explorer instance will be started. Visit http://localhost:4000/ (opens in a new tab) to access your BlockScout explorer instance - this will allow you to view your chain's transactions and blocks, which can be useful for debugging.

Hurray!

Congratulations, Your local Orbit chain with Avail DA is now running.