Skip to content

Commit a9435e8

Browse files
authored
docs: Update README and doc (#5090)
doc: Update README and doc
1 parent 7b5dd29 commit a9435e8

File tree

8 files changed

+54
-181
lines changed

8 files changed

+54
-181
lines changed

README.md

+38-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# 🥞 Pancake Frontend
22

3+
<p align="center">
4+
<a href="https://pancakeswap.finance">
5+
<img src="https://pancakeswap.finance/logo.png" height="128">
6+
</a>
7+
</p>
8+
39
This project contains the main features of the pancake application.
410

511
If you want to contribute, please refer to the [contributing guidelines](./CONTRIBUTING.md) of this project.
@@ -9,11 +15,13 @@ If you want to contribute, please refer to the [contributing guidelines](./CONTR
915
- [Info](doc/Info.md)
1016
- [Cypress tests](doc/Cypress.md)
1117

18+
> Install dependencies using **yarn**
1219
13-
## Quick Start
14-
15-
install dependencies using **yarn**
16-
20+
## `apps/web`
21+
<details>
22+
<summary>
23+
How to start
24+
</summary>
1725
```sh
1826
yarn
1927
```
@@ -30,3 +38,29 @@ yarn build
3038
# start the application after build
3139
yarn start
3240
```
41+
</details>
42+
43+
## `apps/aptos`
44+
<details>
45+
<summary>
46+
How to start
47+
</summary>
48+
```sh
49+
yarn dev:aptos
50+
```
51+
```sh
52+
yarn turbo run build --filter=aptos-web
53+
```
54+
</details>
55+
56+
57+
## Packages
58+
59+
| Package | Description |
60+
|---------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|
61+
| [sdk](/packages/swap-sdk) | An SDK for building applications on top of Pancakeswap |
62+
| [aptos-swap-sdk](/packages/aptos-swap-sdk) | Aptos version of Swap SDK |
63+
| [swap-sdk-core](/packages/swap-sdk-core) | Swap SDK Shared code |
64+
| [wagmi](/packages/wagmi) | Extension for [wagmi](https://github.com/wagmi-dev/wagmi), including bsc chain and binance wallet connector |
65+
| [awgmi](/packages/awgmi) | connect to Aptos with similar wagmi React hooks. |
66+

cli/aptos-codegen/0xc7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850fa.ts

-164
This file was deleted.

doc/Farms.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## How to add a new farm
44

5-
- Add an entry in `/config/constants/farms.ts`, below the farm with the pid 0
5+
- Add an entry in `packages/farms/constants/[chainId].ts`, below the farm with the pid 0
66
- Insert informations, with the LP address and the correct tokens (See [Tokens](./Tokens.md))
77
- Run `yarn test:config` to make sure the data you set in the config match the data on chain
88

doc/Info.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ A brief overview how Info part of PancakeSwap website works.
44

55
## Code structure
66

7-
In terms of React components Info section is just another view (located in [src/views/Info](../src/views/Info)) that is assigned route (in [App.tsx](../src/App.tsx)).
8-
There are also some Info-related components inside [src/components](../src/components) (InfoNav, InfoCharts, InfoTables and InfoSearch at the time of writing).
7+
In terms of React components Info section is just another view (located in [apps/web/src/views/Info](../apps/web/src/views/Info)) that is assigned route (in [pages](../apps/web/src/pages)).
8+
There are also some Info-related components inside [apps/web/src/components](../apps/web/src/components) (InfoNav, InfoCharts, InfoTables and InfoSearch at the time of writing).
99

10-
There are helper functions to handle data formatting and requests - [src/utils/infoDataHelpers.ts](../src/utils/infoDataHelpers.ts) and [src/utils/infoQueryHelpers.ts](../src/utils/infoQueryHelpers.ts)
10+
There are helper functions to handle data formatting and requests - [apps/web/src/views/Info/utils/infoDataHelpers.ts](../apps/web/src/views/Info/utils/infoDataHelpers.ts) and [apps/web/src/views/Info/utils/infoQueryHelpers.ts](../apps/web/src/views/Info/utils/infoQueryHelpers.ts)
1111

12-
Info section has it's own reducer in Redux store - [src/state/info](../src/state/info). It handles all data about pools, tokens and overall protocol. The only exception is token/pool watchlist that is stored under [src/state/user](../src/state/user) reducer.
12+
Info section has it's own reducer in Redux store - [apps/web/src/state/info](../apps/web/src/state/info). It handles all data about pools, tokens and overall protocol. The only exception is token/pool watchlist that is stored under [src/state/user](../apps/web/src/state/user) reducer.
1313

14-
GraphQL request logic lives under [src/state/info/queries](../src/state/info/queries) directory. Code over there handles firing requests to StreamingFast subgraph as well as formatting returned values and calculating all the derived data we need.
14+
GraphQL request logic lives under [apps/web/src/state/info/queries](../apps/web/src/state/info/queries) directory. Code over there handles firing requests to StreamingFast subgraph as well as formatting returned values and calculating all the derived data we need.
1515

1616
## Requests flow
1717

1818
When user visits Info page the following requests are fired (names as declared in [src/state/info/queries](../src/state/info/queries)):
1919

20-
`overview` - gets basic protocol data like volume, liquidity and transaction count. 3 requests are fired for current, 24h ago and 48h ago data.
21-
`overviewCharts` - gets data to show liquidity and volume charts on overview page.
20+
`overview` - gets basic protocol data like volume, liquidity and transaction count. 3 requests are fired for current, 24h ago and 48h ago data.
21+
`overviewCharts` - gets data to show liquidity and volume charts on overview page.
2222
`overviewTransactions` - gets data to show transaction table on overview page
2323

2424
`prices` - gets BNB prices (current, 24h, 48 and 7d ago) used in calculations (see [src/hooks/useBnbPrices.ts](../src/hooks/useBnbPrices.ts))
@@ -31,6 +31,6 @@ When user visits Info page the following requests are fired (names as declared i
3131

3232
There are also multiple `blocks` queries to retrieve block numbers at different timestamps.
3333

34-
The flow is controlled by [src/state/info/updaters.ts](../src/state/info/updaters.ts). When user navigates through the site more pools and tokens are automatically loaded, (e.g. you click on BNB token and pools for BNB are loaded automatically, if you click on BNB-BTCB then BTCB token will be loaded, etc)
34+
The flow is controlled by [apps/web/src/state/info/updaters.ts](../apps/web/src/state/info/updaters.ts). When user navigates through the site more pools and tokens are automatically loaded, (e.g. you click on BNB token and pools for BNB are loaded automatically, if you click on BNB-BTCB then BTCB token will be loaded, etc)
3535

3636
There are additional requests for price chart and search that are fired when user uses these features.

doc/Pools.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
## How to add a new pool
44

5-
- Add an entry in `/config/constants/pools.ts`, below the pool with the id 0
5+
- Add an entry in `apps/web/src/config/constants/pools.tsx`, below the pool with the id 0
66
- Insert informations, with the contract address and the correct tokens (See [Tokens](./Tokens.md))
77
- Run `yarn test:config` to make sure the data you set in the config match the data on chain
88

99
Pools APRs depend on farm data to compute prices
1010

1111
## Pools data
1212

13-
Data are stored in the global redux state (`/state/pools`).
13+
Data are stored in the global redux state (`apps/web/src/state/pools`).

doc/Tokens.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Tokens management
22

3-
All the tokens are in `/config/constans/tokens.ts`. They are instances of the `Token` class defined in the SDK.
3+
All the tokens are in `/packages/tokens/src/[chainId].ts`. They are instances of the `Token` class defined in the SDK.
44
Before adding a new **farm** or **pool** you need to make sure the Tokens are in this file.
55
To add a Token to the exchange lists:
66

packages/aptos-swap-sdk/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# PancakeSwap Aptos Swap SDK
2+
3+
You can refer to the Uniswap SDK documentation [uniswap.org](https://docs.uniswap.org/sdk/2.0.0/).

packages/swap-sdk/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Pancakeswap SDK
1+
# PancakeSwap SDK
22

33
Forked from the [Uniswap SDK](https://github.com/Uniswap/uniswap-v2-sdk/commit/a88048e9c4198a5bdaea00883ca00c8c8e582605).
44

0 commit comments

Comments
 (0)