TL;DR:
The Baseball Card Store Dapp sells baseball cards as NFT tokens in exchange for money.
Install the prerequisites.
Checkout the latest beta release for the sdk:
cd agoric-sdk
git checkout beta
yarn && yarn build
Then in a first terminal in the directory where you want to put your dapp, install the dapp:
agoric init --dapp-template dapp-card-store --dapp-branch beta my-card-store
cd my-card-store
agoric install
# If the Agoric platform has not been started
agoric start --reset --verbose
In a second terminal, enter agoric open
in a terminal window to open a wallet.
When the UI changes from gray to white (be patient), transfer some funds from the Agoric RUN currency purse to the Zoe fees purse.
agoric deploy contract/deploy.js api/deploy.js
In a third terminal,
# Navigate to the `ui` directory and start a local server
cd ui && yarn start
yarn start
will open a page at http://127.0.0.1:3001.- A window for your wallet should open.
- Under "Dapps" in the wallet, enable the CardStore Dapp.
- Now you should be able to click on a card to make an offer to buy it.
- Approve the offer in your wallet
- View the card in your wallet.
To learn more about how to build Agoric Dapps, please see the Dapp Guide.
See the Dapp Deployment Guide for how to deploy this Dapp on a public website, such as https://cardstore.testnet.agoric.com/