Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
build: simplified README instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Nov 13, 2023
1 parent b1ce19d commit 3217de9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 29 deletions.
38 changes: 14 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,23 @@ TL;DR:
The Fungible Faucet Dapp sends tokens to a user's wallet when they
click the "Mint Fungible Tokens" button.

Install the [prerequisites](https://agoric.com/documentation/getting-started/before-using-agoric.html). Then checkout the latest `beta` release for the sdk:
```sh
cd agoric-sdk
git checkout beta
yarn && yarn build
```
Install the [prerequisites](https://agoric.com/documentation/getting-started/before-using-agoric.html).

Then in a first terminal in the directory where you want to put your dapp, install the dapp:
In the parent directory of where you want to put your dapp project, create your own (`my-fungible-faucet` in this example, based on the `dapp-fungible-faucet` repository):
```sh
agoric init --dapp-template dapp-fungible-faucet --dapp-branch beta my-fungible-faucet
cd my-fungible-faucet
# Start the Agoric platform
agoric install && agoric start --reset
yarn create @agoric/dapp --dapp-template dapp-fungible-faucet --dapp-branch beta my-fungible-faucet
```

In a second terminal, deploy this contract and the API server
```sh
agoric deploy contract/deploy.js
agoric deploy api/deploy.js
Install and run just like any other NPM application:
```

In a third terminal,
```sh
# Navigate to the `ui` directory and start a local server
cd ui && yarn start
# Enter the dapp folder
cd my-fungible-faucet
# Install dependencies
yarn install
# Start the Agoric platform with this dapp
yarn start
```

Then navigate to http://127.0.0.1:3000.

The Fungible Faucet Dapp is the simplest [Agoric
Expand All @@ -50,10 +41,9 @@ opposed to using a framework).

## Using the Dapp

1. Navigate to http://127.0.0.1:3000.
2. Enter `agoric open` in your terminal
3. A window for your wallet should open.
4. Under "Dapps" in the wallet, enable the FungibleFaucet Dapp:
1. Enter `yarn start:wallet` in your terminal to open the Wallet UI.
2. Navigate a fresh browser tab to http://127.0.0.1:3000 to go to the Dapp UI.
3. Under "Dapps" in the wallet, enable the FungibleFaucet Dapp:

![Enable Dapp](./readme-assets/enable-dapp.png)

Expand Down
16 changes: 11 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@
"ui"
],
"devDependencies": {
"@agoric/cosmic-swingset": "beta",
"@agoric/solo": "beta",
"@endo/eslint-plugin": "^0.3.24",
"@jessie.js/eslint-plugin": "^0.1.3",
"agoric": "beta",
"ava": "^4.3.1",
"concurrently": "^8.2.2",
"eslint": "^7.32.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-airbnb-base": "^14.2.0",
Expand All @@ -24,17 +28,19 @@
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"prettier": "^2.7.1",
"@agoric/solo": "beta",
"@agoric/cosmic-swingset": "beta"
"prettier": "^2.7.1"
},
"scripts": {
"preinstall": "node -e \"process.env.AGORIC_INSTALL && process.exit(0); console.warn('please use: agoric install . For details, see https://agoric.com/documentation/'); process.exit(1)\"",
"lint": "yarn workspaces run lint-fix",
"lint-check": "yarn workspaces run lint-check",
"test": "yarn workspaces run test",
"integration-test": "yarn ava",
"build": "yarn workspaces run build"
"build": "yarn workspaces run build",
"start:wallet": "agoric open",
"start:deploy": "agoric deploy contract/deploy.js api/deploy.js",
"start:sim": "agoric start --reset",
"start:ui": "cd ui && yarn start",
"start": "concurrently --kill-others -c \"bgBlue.bold,bgMagenta,bgYellow.bold\" --names \"SIM,DEP,UI \" \"yarn start:sim\" \"yarn start:deploy\" \"yarn start:ui\""
},
"dependencies": {
"agoric": "beta"
Expand Down

0 comments on commit 3217de9

Please sign in to comment.