Below are the instructions for deploying the contracts with the Semaphore SDK:

  1. Clone the Semaphore repo: https://github.com/semaphore-protocol/semaphore

    git clone <https://github.com/semaphore-protocol/semaphore.git>
    
  2. Install the dependencies:

    cd semaphore && yarn
    
  3. Build the libraries:

    yarn build:libraries
    
  4. Create a .env file and set your BACKEND_PRIVATE_KEY.

  5. Go to the packages/contracts folder and run:

    yarn deploy --network sepolia
    

    You can specify other networks. Take a look here to check the supported ones.

  6. If you want to verify the contracts you deployed on Etherscan you need to set the ETHERSCAN_API_KEY variable in the .env file and run:

    yarn verify --network sepolia
    
  7. Deploy the new subgraphs by running:

    yarn codegen <network>
    

    And:

    yarn auth <access-token> && yarn deploy <subgraph-name>
    

    Please, remember to update the README file.

  8. Finally, update the subgraph URL in the following file: packages/data/src/getURL.ts.