Skip to content

The dapp-agoric-basics Tutorial ​

Introduction ​

In this tutorial you will install the dapp-agoric-basics dapp. This dapp is a collection of basic use cases for Agoric smart contracts.

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:

bash
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:

bash
cd agoric-basics
yarn install

Starting the Docker Container ​

Start the Docker container:

bash
yarn start:docker

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

bash
yarn docker:logs

Starting the dapp ​

Start the dapp-agoric-basics contract:

bash
yarn start:contract

Start the user interface:

bash
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