Skip to content

The dapp-agoric-basics Tutorial


In this tutorial you will install the dapp-agoric-basics dapp. This dapp allows a user to purchase concert tickets for an event. This event has three types of tickets:

  • Tickets near the front are the most expensive
  • Tickets in the middle are priced between expensive and cheap tickets
  • Tickets in the back are the cheapest priced tickets

To begin, you will need an environment with the pre-requisite components installed as outlined in the Getting Started guide. If you have already completed the Getting Started tutorial you can use the same environment.

Downloading the dapp

Pull down the dapp from Github:

yarn create @agoric/dapp --dapp-template dapp-agoric-basics agoric-basics

Installing dapp components

Next, run the yarn install command from the agoric-basics directory:

cd agoric-basics
yarn install

Starting the Docker Container

Start the Docker container:

yarn start:docker

After a few minutes, check to make sure blocks are being produced by viewing the Docker logs:

yarn docker:logs

Starting the dapp

Start the dapp-agoric-basics contract:

yarn start:contract

Start the user interface:

yarn start:ui

Next, open a browser and navigate to localhost:5173: Screenshot: The dapp-agoric-basics UI

From the UI, select the 'Connect Wallet' option. Choose 'Keplr' from the 'Select your wallet' screen: dapp-agoric-basics-002 Screenshot: Connecting your wallet

Approve the connection in Keplr: dapp-agoric-basics-003 Screenshot: Approve the connection in Keplr

Select a ticket to purchase and click the 'Mint` button to mint a ticket. Approve the transaction in Keplr: Screenshot: Approving the ticket purchase

Once the transaction has completed, you will notice the tickets in your wallet: Screenshot: Tickets in Keplr wallet