Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update QUICK_START.md #733

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions docs/QUICK_START.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Ensure you have the following tools installed:

- [ioctl](https://docs.iotex.io/builders/reference-docs/ioctl-client#install-latest-release-build): For interacting with the IoTeX blockchain.
- [ioctl](https://docs.iotex.io/builders/reference-docs/ioctl-client#install-latest-release-build): For interacting with the IoTeX blockchain (please [build the latest dev branch](https://docs.iotex.io/builders/reference-docs/ioctl-client#build-the-current-development-branch)).
- [Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html): Required for building the prover code.
- [curl](https://curl.se/): For sending messages to the API node.

Expand All @@ -16,16 +16,26 @@ Start by creating an IoTeX developer wallet and funding it with test tokens.

```sh
ioctl account createadd devaccount

# Display account info
ioctl account info devaccount
```

Note the 0x wallet address provided. You can claim test IOTX tokens on the Developer portal at <https://developers.iotex.io/faucet>

```sh
# Query account balance
ioctl account balance devaccount
# Export the private key if needed
ioctl account export devaccount
```

## Step 2: Register a new DePIN Project on IoTeX

To register a new project:
To register a new project:

```sh
ioctl ioid register "your project unique name"
ioctl ioid register "your_project_unique_name"
```

Take note of your `Project ID` and set it as an environment variable:
Expand All @@ -43,20 +53,21 @@ git clone https://github.com/iotexproject/w3bstream

cd w3bstream/examples/risc0-circuit

ioctl ws project update --id $PROJECT_ID --path range_prover.json
ioctl ws project update --id $PROJECT_ID --path range-prover.json
```

## Step 4: Link Your Project to the Dummy DApp Contract

Bind your project to a sample DApp contract to ensure it receives your ZK proofs:

```sh
ioctl ws router bind --project-id $PROJECT_ID --dapp 0xba0104cD02672840Da55Bb14bebdd047Dfbfc02B
ioctl ws router bind --project-id $PROJECT_ID --dapp 0xe48eF7D13805487B74CDFC47BDC174446C31f541
```

<details>
<summary> Learn more</summary>
The "dummy dapp" is a simple contract that will store ZK-Proofs from W3bstream without further processing. This can be useful for debugging proof generation if your Dapp is experiencing issues.
find the [source code here](https://github.com/iotexproject/w3bstream/blob/develop/examples/risc0-circuit/contract/Risc0Dapp.sol)
</details>

## Step 5: Activate Your Project
Expand All @@ -82,14 +93,14 @@ curl --location 'https://dragonfruit-testnet.w3bstream.com/message' \
}'
```

Record the Task ID from the response, wait a few minutes, and then check its status:
Record the Task ID from the response, wait a few minutes, and then check its status (customise the Task ID field):

```sh
curl --location --request GET 'https://dragonfruit-testnet.w3bstream.com/task' \
curl --location --request GET 'https://dragonfruit-testnet.w3bstream.com/task' \
--header 'Content-Type: application/json' \
--data '{
"projectID": '"$PROJECT_ID"',
"taskID": "YOUR TASK ID HERE"
"taskID": "YOUR_TASK_ID_HERE"
}' | jq
```

Expand Down
Loading