Nitro User Manual

  1. Download and install official solana CLI tool

    sh -c "$(curl -sSfL <>)"
    export PATH="/root/.local/share/solana/install/active_release/bin:$PATH"
  2. Configure your sei key

    # change to anything you like
    export ACCOUNT_NAME=admin
    export ACCOUNT_PASSWORD=12345678
    printf $ACCOUNT_PASSWORD"\n"$ACCOUNT_PASSWORD"\ny\n" | seid keys add $ACCOUNT_NAME
  3. Config sei and nitro public rpc node address on your local laptop

    1. Devnet:

      1. nitro public RPC:

    2. Atlantic-1

      1. TBA

    # find a public rpc endpoint of a sei node
    export ENDPOINT=tcp://
    export CHAIN_ID=sei-devnet-1
    # find a public rpc endpoint of the nitro node
    export NITRO_ENDPOINT=
  4. Create your account and program account

    # replace this with the path you'd like to use
    export PATH_TO_STORE_KEY = $HOME/mykey.json
    # create account
    solana-keygen new --no-passphrase -fso $PATH_TO_STORE_KEY
    # get public key
  5. Fund yourself

    1. sei-devnet-1 bridge contract address: sei12wrtrzqt7atsen2wsl9k5hu82jsj6739h7pck20gtdd24mqyxv6qpj0rnt

    2. atlantic-1 bridge contract address: TBA

    # get usei from Sei faucet: <>
    # lock fund on L1 contract
    LOCK_FUND_TX_HASH=$(printf $ACCOUNT_PASSWORD"\n" | ~/go/bin/seid tx wasm execute \\
      sei12wrtrzqt7atsen2wsl9k5hu82jsj6739h7pck20gtdd24mqyxv6qpj0rnt \\
      '{"lock":{"nitro_pubkey": "'$NITRO_PUBKEY'"}}' \\
      --amount=10000usei --from=$ACCOUNT_NAME --node $ENDPOINT --chain-id $CHAIN_ID --fees=1000usei -y \\
      --gas=500000 --broadcast-mode=block --output json | jq ".txhash")
    # notify listener (on L2)
    curl $NITRO_ENDPOINT/UnlockFund/ -X POST -d '{"tx_hash":"'$LOCK_FUND_TX_HASH'"}' -H "Content-Type: application/json"
    # verify if your account is funeded
    solana balance $ACCOUNT_PUBKEY --url $NITRO_ENDPOINT
  6. Deploy your own Solana program to the Nitro devnet

    # create an id for your program
    export PROGRAM_ID = $HOME/myprogram.json
    # create program account
    solana-keygen new --no-passphrase -fso $PROGRAM_ID
    PROGRAM_PUBKEY=$(solana address -k $PROGRAM_ID -u $NITRO_ENDPOINT)
    export PROGRAM_PATH=<path to your program build>
    solana program deploy $PROGRAM_PATH  -k $PATH_TO_STORE_KEY -u $NITRO_ENDPOINT --program-id $PROGRAM_ID
    # verify if the program is deployed successfully
    solana program show $PROGRAM_PUBKEY
  7. You can now use the RPC endpoint specified above to interact with your program!

Last updated