Skip to content
A kitchen sink example of how to build private dApps using AZTEC
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
client Update dependancies May 17, 2019
config Initial Commit May 15, 2019
contracts
graph Don't use volumes with docker May 23, 2019
migrations Save notional as Note entity and view request as NoteAccess in graph May 16, 2019
scripts Show hint for running build script May 16, 2019
test Save notional as Note entity and view request as NoteAccess in graph May 16, 2019
.editorconfig Initial Commit May 15, 2019
.env.test Save notional as Note entity and view request as NoteAccess in graph May 16, 2019
.eslintrc.js Initial Commit May 15, 2019
.gitignore Initial Commit May 15, 2019
LICENSE Initial Commit May 15, 2019
README.md Update README.md May 17, 2019
babel.config.js Initial Commit May 15, 2019
package.json Update dependancies May 17, 2019
subgraph.yaml Save notional as Note entity and view request as NoteAccess in graph May 16, 2019
truffle-config.js Initial Commit May 15, 2019
yarn.lock Add babel-eslint May 16, 2019

README.md

loan-dapp-starter-kit

This dapp is accompanied by a series of Medium articles to help developers get started with AZTEC.

DEMO: https://youtu.be/LRt1SKB2514

The code base is split into 3 main folders.

  1. client (The frontend react code that interfaces with web3 and graph-ql)
  2. contracts (The solidity contracts deployed to ganache that interact with AZTEC)
  3. graph (The graph-node mappings that index the local blockchain)

This repo requires the following minimum versions installed in the developer enviroment:

Truffle v5.0.12 (core: 5.0.12)

Solidity - 0.5.4 (solc-js)

Node v11.13.0

Web3.js v1.0.0-beta.37

Yarn - 1.15

Getting started:

  1. git clone git@github.com:AztecProtocol/loan-dapp-starter-kit.git

  2. cd loan-dapp-starter-kit

  3. cp .env.test .env

This copies the local file to a local .env file that ganache will use to deterministically create test accounts to make local development easier.

  1. yarn install

  2. cd client && yarn install

  3. cd .. && yarn start

The start script will do the following:

  • Start ganache, importing any accounts from the .env file
  • Compile and migrate both the dApp contracts and AZTEC and deploy the contracts the the local blockchain
  • Start a docker container that runs the graph-node
  • Build the graph-node mappings and deploy them to the graph-node
  • Copy the truffle build artefacts to the client for interaction with the contracts (ABIs)
  1. In a new terminal window yarn client

This command will run the create-react-app and host the client at localhost:3000

Navigate to http://localhost:3000 and click the restore account button.

Ganache has been started with 3 deterministic development accounts, each funded with 1000 ETH (Wahoo). You can restore the first account by using the seed phrase office shallow practice favorite diary review floor quote faith initial foot squeeze.

Enter any password to encrypt the hot-wallet keystore vault and press restore to enter the dApp!

You can’t perform that action at this time.