Chromia
Start Building

10 / 19Module 2 – DappAdvanced

Dapp: setup and run

Setup and run the dapp

Once your verification keys exist, point your local Chromia node at them.

The keys go in rell/chromia.yml. Copy the contents of each .json file from the previous step into that chromia.yml file by hand.

rell/chromia.yml
gtx:  modules:    - "net.postchain.zkp.ZKPGTXModule"zkp:  plonk:    verification_keys:      shield_operation:        # Copy contents from shield_operation_verification_key.json      unshield_operation:        # Copy contents from unshield_operation_verification_key.json        private_transfer:        # Copy contents from verification_key.json

If you prefer, use the pre-generated keys from the example repository.

Then start a local directory node with Docker:

bash
docker run --rm -it -p 7740:7740/tcp registry.gitlab.com/chromaway/example-projects/directory1-example/managed-single:0.7.1
bash
cd rell

Create a keypair for the provider:

bash
chr keygen -f provider-keypair

Deploy the dapp to your local network:

bash
chr deployment create -y -d local --secret provider-keypair

You should see output similar to this:

bash
deployments:  local:    chains:      zkp_demo: x"3E339D3D2AB109....EC3CD97681134"

DAPP_BRID = E339D3D2AB109....EC3CD97681134

Written for this site from Chromia’s public course. Code samples are the course’s own.