Skip to main content

Getting Started

Dependencies

Before installing City Rollup, you should check that all of the following tools are installed.

Then you should download a pre-generated file for bls12_381.

wget https://city.qed.me/alpha/v1/cr-trusted-setup.zip 
rm -rf ~/.city-rollup/keystore
mkdir -p ~/.city-rollup/keystore
unzip cr-trusted-setup.zip -d ~/.city-rollup/keystore
#rm cr-trusted-setup.zip

After completing the above preparations, clone the City Rollup repo:

git clone https://github.com/QEDProtocol/city-rollup
cd city-rollup
make build

After compiling City Rollup, you can start the smallest instance of City Rollup with the following command:

Note: You need to run the last three commands in different terminal windows.

make relaunch
make run-rpc-server
make run-orchestrator
make run-l2-worker

Now that City Rollup is up and running, you can use it by following the example below, or reading the documentation on User Wallet/CLI

  • Send command to produce the next block and dispatch proving tasks to workers
make cr_produce_block
  • Register two users on L2
make cr_register_user
  • Deposit funds from Dogecoin to L2
make cr_l1_deposit #please copy the txid
  • Produce another block to mark the deposits as claimable on L2
make cr_produce_block
  • Claim deposited funds
make TXID=... cr_claim_deposit #no 0x prefix
  • Transfer claimed funds from to another
make cr_token_transfer
  • Produce another block
make cr_produce_block