nitro-stack/stack-orchestrator/stacks/nitro-contracts
nabarun 034778ebeb Remove the use of L2 chain & contracts for running nitro nodes (#11)
Part of [Create bridge channel in go-nitro](https://www.notion.so/Create-bridge-channel-in-go-nitro-22ce80a0d8ae4edb80020a8f250ea270)
- Remove L2 stack setup from demo steps
- Remove steps to deploy l2 contract

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
Co-authored-by: Neeraj <neeraj.rtly@gmail.com>
Reviewed-on: #11
2024-09-30 04:24:38 +00:00
..
README.md Remove the use of L2 chain & contracts for running nitro nodes (#11) 2024-09-30 04:24:38 +00:00
stack.yml Add demo steps for running nitro nodes with payment and defund (#5) 2024-08-26 14:00:02 +00:00

nitro-contracts

Setup

  • Clone the stack repo:

    laconic-so fetch-stack git.vdb.to/cerc-io/nitro-stack
    
  • Clone required repositories:

    laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-contracts setup-repositories
    
  • Build container images:

    laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-contracts build-containers
    

Create a deployment

  • Create a spec file

    laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-contracts deploy init --output nitro-contracts-spec.yml
    
  • Create deployment

    laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-contracts deploy create --spec-file nitro-contracts-spec.yml --deployment-dir nitro-contracts-deployment
    

Configuration

  • Inside the nitro-contracts-deployment deployment directory, open config.env file and set following env variables:

    # URL endpoint of the L1 chain (Example: http://host.docker.internal:8545)
    GETH_URL=
    
    # Private key of the account on chain that is used for deploying L1 contracts
    GETH_DEPLOYER_PK=
    
    TOKEN_NAME=TestToken
    
    TOKEN_SYMBOL=TST
    
    INITIAL_TOKEN_SUPPLY=129600
    

Start the deployment

laconic-so deployment --dir nitro-contracts-deployment start