Skip to content

Commit

Permalink
feat: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bartosz-lipinski committed Feb 16, 2021
1 parent 08c7929 commit c58d8f1
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
# dapp-scaffold
Scaffolding for a dapp built on Solana


# Directory structure

## src/actions

Setup here actions that will interact with Solana programs using sendTransaction function

## src/contexts

React context objects that are used propagate state of accounts across the application

## src/hooks

Generic react hooks to interact with token program:
* useAccountByMint
* useTokenName
* useUserAccounts
* useUserBalance


## src/views

3 changes: 0 additions & 3 deletions src/actions/README.md

This file was deleted.

8 changes: 8 additions & 0 deletions src/views/home/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { LAMPORTS_PER_SOL } from "@solana/web3.js";
import { Button } from "antd";
import React, { useEffect, useMemo } from "react";
import { Link } from "react-router-dom";
import { ConnectButton } from "../../components/ConnectButton";
import { useNativeAccount } from "../../contexts/accounts";
import { useConnectionConfig } from "../../contexts/connection";
import { useMarkets } from "../../contexts/market";
Expand Down Expand Up @@ -32,6 +35,11 @@ export const HomeView = () => {
<div className="flexColumn">
TODO:
Your balance: {balance} SOL

<ConnectButton />
<Link to="/faucet">
<Button>Faucet</Button>
</Link>
2. Link to faucet
</div>
);
Expand Down

0 comments on commit c58d8f1

Please sign in to comment.