Skip to content

Commit

Permalink
global prettier write
Browse files Browse the repository at this point in the history
  • Loading branch information
Yorkemartin committed Apr 12, 2022
1 parent d314348 commit dbf20b3
Show file tree
Hide file tree
Showing 210 changed files with 4,216 additions and 4,295 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/search.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: Algolia Search

on:
schedule:
- cron: "0 10 * * *"
- cron: '0 10 * * *'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run Scraper
run: |
brew install jq
docker run -e "APPLICATION_ID=${{ secrets.ALGOLIA_APP_ID }}" -e "API_KEY=${{ secrets.API_KEY }}" -e "CONFIG=$(cat ./config.json | jq -r tostring)" algolia/docsearch-scraper
- uses: actions/checkout@v2
- name: Run Scraper
run: |
brew install jq
docker run -e "APPLICATION_ID=${{ secrets.ALGOLIA_APP_ID }}" -e "API_KEY=${{ secrets.API_KEY }}" -e "CONFIG=$(cat ./config.json | jq -r tostring)" algolia/docsearch-scraper
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.

# Contributing to Uniswap Docs

Contributing to the docs site is a great way to get involved in the dev community and help other devs along the way! Check out our guidelines [here](https://github.com/Uniswap/uniswap-docs/blob/main/CONTRIBUTING.md).

# How to generate markdown files from solidity Natspec comments
Expand Down Expand Up @@ -40,7 +41,6 @@ Edit config.json file with

Create a markdown file in its respective versioned docs, or versioned SDK, directory.


## Installation

```console
Expand Down
9 changes: 4 additions & 5 deletions SDK_versioned_docs/version-1.0.0/guides/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"label": "Guides",
"position": 1,
"collapsed": false

}
"label": "Guides",
"position": 1,
"collapsed": false
}
11 changes: 4 additions & 7 deletions SDK_versioned_docs/version-1.0.0/reference/02-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This function fetches Uniswap reserve data for a given token address on a given
export async function getTokenReserves(
tokenAddress: string,
chainIdOrProvider: ChainIdOrProvider = 1
): Promise<TokenReservesNormalized>;
): Promise<TokenReservesNormalized>
```

## Input Parameters
Expand All @@ -29,13 +29,10 @@ export async function getTokenReserves(
## Example Usage

```typescript
const tokenAddress = "0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359"; // DAI Mainnet
const chainIdOrProvider: ChainIdOrProvider = 1; // could be e.g. window.ethereum instead
const tokenAddress = '0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359' // DAI Mainnet
const chainIdOrProvider: ChainIdOrProvider = 1 // could be e.g. window.ethereum instead
const tokenReserves: TokenReservesNormalized = await getTokenReserves(
tokenAddress,
chainIdOrProvider
);
const tokenReserves: TokenReservesNormalized = await getTokenReserves(tokenAddress, chainIdOrProvider)
/*
{
Expand Down
22 changes: 9 additions & 13 deletions SDK_versioned_docs/version-1.0.0/reference/03-computation.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This function computes market details for the passed reserves data. Markets are
export function getMarketDetails(
optionalReservesInput: OptionalReserves,
optionalReservesOutput: OptionalReserves
): MarketDetails;
): MarketDetails
```

## Input Parameters
Expand All @@ -30,9 +30,9 @@ export function getMarketDetails(
## Example Usage

```typescript
const reserves: ChainIdOrProvider = await getTokenReserves(tokenAddress);
const reserves: ChainIdOrProvider = await getTokenReserves(tokenAddress)
const marketDetails: MarketDetails = getMarketDetails(undefined, reserves); // ETH<>ERC20
const marketDetails: MarketDetails = getMarketDetails(undefined, reserves) // ETH<>ERC20
/*
{
Expand Down Expand Up @@ -75,7 +75,7 @@ export function getTradeDetails(
tradeExact: TRADE_EXACT,
_tradeAmount: BigNumberish,
marketDetails: MarketDetails
): TradeDetails;
): TradeDetails
```

## Input Parameters
Expand All @@ -89,17 +89,13 @@ export function getTradeDetails(
## Example Usage

```typescript
const _purchaseAmount: BigNumber = new BigNumber("2.5");
const _decimals: number = 18;
const tradeAmount: BigNumber = _purchaseAmount.multipliedBy(10 ** _decimals);
const marketDetails: MarketDetails = getMarketDetails(undefined, reserves); // ETH<>ERC20
const _purchaseAmount: BigNumber = new BigNumber('2.5')
const _decimals: number = 18
const tradeAmount: BigNumber = _purchaseAmount.multipliedBy(10 ** _decimals)
const marketDetails: MarketDetails = getMarketDetails(undefined, reserves) // ETH<>ERC20
// buy exactly 2.5 of an 18 decimal ERC20 with ETH
const tradeDetails: TradeDetails = getTradeDetails(
TRADE_EXACT.OUTPUT,
tradeAmount,
marketDetails
);
const tradeDetails: TradeDetails = getTradeDetails(TRADE_EXACT.OUTPUT, tradeAmount, marketDetails)
/*
{
Expand Down
30 changes: 10 additions & 20 deletions SDK_versioned_docs/version-1.0.0/reference/04-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ This function formats values to a specified number of significant digits.
## Function Signature

```typescript
export function formatSignificant(
bigNumberish: BigNumberish,
options?: FormatSignificantOptions
): string;
export function formatSignificant(bigNumberish: BigNumberish, options?: FormatSignificantOptions): string
```

## Input Parameters
Expand All @@ -26,7 +23,7 @@ export function formatSignificant(
## Example Usage

```typescript
const formatted: string = formatSignificant("123456", { significantDigits: 3 }); // 1.23
const formatted: string = formatSignificant('123456', { significantDigits: 3 }) // 1.23
```

# formatSignificantDecimals
Expand All @@ -40,7 +37,7 @@ export function formatSignificantDecimals(
bigNumberish: BigNumberish,
decimals: number,
options?: FormatSignificantOptions
): string;
): string
```

## Input Parameters
Expand All @@ -54,9 +51,9 @@ export function formatSignificantDecimals(
## Example Usage

```typescript
const formatted: string = formatSignificantDecimals("1234560000000000000", 18, {
const formatted: string = formatSignificantDecimals('1234560000000000000', 18, {
significantDigits: 3,
}); // 1.23
}) // 1.23
```

# formatFixed
Expand All @@ -66,10 +63,7 @@ This function formats values to a specified number of decimal places.
## Function Signature

```typescript
export function formatFixed(
bigNumberish: BigNumberish,
options?: FormatFixedOptions
): string;
export function formatFixed(bigNumberish: BigNumberish, options?: FormatFixedOptions): string
```

## Input Parameters
Expand All @@ -82,7 +76,7 @@ export function formatFixed(
## Example Usage

```typescript
const formatted: string = formatFixed("1.2345", { decimalPlaces: 2 }); // 1.23
const formatted: string = formatFixed('1.2345', { decimalPlaces: 2 }) // 1.23
```

# formatFixedDecimals
Expand All @@ -92,11 +86,7 @@ This function formats token and ethereum values to a specified number of decimal
## Function Signature

```typescript
export function formatFixedDecimals(
bigNumberish: BigNumberish,
decimals: number,
options?: FormatFixedOptions
): string;
export function formatFixedDecimals(bigNumberish: BigNumberish, decimals: number, options?: FormatFixedOptions): string
```

## Input Parameters
Expand All @@ -110,7 +100,7 @@ export function formatFixedDecimals(
## Example Usage

```typescript
const formatted: string = formatFixedDecimals("1234560000000000000", 18, {
const formatted: string = formatFixedDecimals('1234560000000000000', 18, {
decimalPlaces: 2,
}); // 1.23
}) // 1.23
```
Loading

0 comments on commit dbf20b3

Please sign in to comment.