Skip to content

Commit

Permalink
update deployment guide
Browse files Browse the repository at this point in the history
  • Loading branch information
capossele committed Feb 15, 2024
1 parent 6ed3ce6 commit 9956586
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions deployment-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,19 @@ You can deploy your contracts and run an end-to-end test or demo as follows:
export ETH_WALLET_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
export BONSAI_API_KEY="YOUR_API_KEY" # see form linked in the previous section
export BONSAI_API_URL="BONSAI_API_URL" # provided with your api key
export RISC0_USE_DOCKER=1 # enable reproducible build via Docker
```

3. Deploy your contract by running:
By setting *RISC0_USE_DOCKER=1* the build process will build your guest binary within a deterministic environment, resulting in a reproducible build. This is helpful because it allows third-parties to independently build the guest binary and generate the same [image ID]. For more details, see [reproducible build].
> ***Note:*** *This requires having Docker installed. To install Docker see [Get Docker](https://docs.docker.com/get-docker/).*

3. Build your project:

```bash
cargo build
```

4. Deploy your contract by running:

```bash
forge script --rpc-url http://localhost:8545 --broadcast script/Deploy.s.sol
Expand Down Expand Up @@ -98,9 +108,19 @@ You can deploy your contracts on a testnet such as `Sepolia` and run an end-to-e
export BONSAI_API_URL="BONSAI_API_URL" # provided with your api key
export ALCHEMY_API_KEY="YOUR_ALCHEMY_API_KEY" # the API_KEY provided with an alchemy account
export ETH_WALLET_PRIVATE_KEY="YOUR_WALLET_PRIVATE_KEY" # the private key of your Ethereum testnet wallet e.g., Sepolia
export RISC0_USE_DOCKER=1 # enable reproducible build via Docker
```

2. Deploy your contract by running:
By setting *RISC0_USE_DOCKER=1* the build process will build your guest binary within a deterministic environment, resulting in a reproducible build. This is helpful because it allows third-parties to independently build the guest binary and generate the same [image ID]. For more details, see [reproducible build].
> ***Note:*** *This requires having Docker installed. To install Docker see [Get Docker](https://docs.docker.com/get-docker/).*

2. Build your project:

```bash
cargo build
```

3. Deploy your contract by running:

```bash
forge script script/Deploy.s.sol --rpc-url https://eth-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY:?} --broadcast
Expand Down Expand Up @@ -157,4 +177,6 @@ You can deploy your contracts on a testnet such as `Sepolia` and run an end-to-e
[contracts]: ./contracts/
[tested]: ./README.md#run-the-tests
[Deploy your project to a local network]: #deploy-your-project-on-a-local-network
[Deploy to a testnet]: #deploy-your-project-on-a-testnet
[Deploy to a testnet]: #deploy-your-project-on-a-testnet
[image ID]: https://dev.risczero.com/terminology#image-id
[reproducible build]: TODO

0 comments on commit 9956586

Please sign in to comment.