Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to docusaurus v3 #826

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion docs/contracts/v2/reference/API/02-entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ for more information on amounts.

The Bundle is used as a global store of derived ETH price in USD. Because there is
no guaranteed common base token across pairs, a global reference of USD price is useful
for deriving other USD values. The Bundle entity stores an updated weighted average of ETH<->Stablecoin pair prices. This provides a strong estimate for the USD price of ETH that can
for deriving other USD values. The Bundle entity stores an updated weighted average of ETH\<-\>Stablecoin pair prices. This provides a strong estimate for the USD price of ETH that can
be used in other places in the subgraph.

| Field Name | Value Type | Description |
Expand Down
16 changes: 8 additions & 8 deletions docs/contracts/v2/reference/smart-contracts/05-router01.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ Adds liquidity to an ERC-20⇄ERC-20 pool.
| :------------- | :-------- | :------------------------------------------------------------------------------------------------------------- |
| tokenA | `address` | A pool token. |
| tokenB | `address` | A pool token. |
| amountADesired | `uint` | The amount of tokenA to add as liquidity if the B/A price is <= amountBDesired/amountADesired (A depreciates). |
| amountBDesired | `uint` | The amount of tokenB to add as liquidity if the A/B price is <= amountADesired/amountBDesired (B depreciates). |
| amountAMin | `uint` | Bounds the extent to which the B/A price can go up before the transaction reverts. Must be <= amountADesired. |
| amountBMin | `uint` | Bounds the extent to which the A/B price can go up before the transaction reverts. Must be <= amountBDesired. |
| amountADesired | `uint` | The amount of tokenA to add as liquidity if the B/A price is \<= amountBDesired/amountADesired (A depreciates). |
| amountBDesired | `uint` | The amount of tokenB to add as liquidity if the A/B price is \<= amountADesired/amountBDesired (B depreciates). |
| amountAMin | `uint` | Bounds the extent to which the B/A price can go up before the transaction reverts. Must be \<= amountADesired. |
| amountBMin | `uint` | Bounds the extent to which the A/B price can go up before the transaction reverts. Must be \<= amountBDesired. |
| to | `address` | Recipient of the liquidity tokens. |
| deadline | `uint` | Unix timestamp after which the transaction will revert. |
| | | |
Expand Down Expand Up @@ -93,10 +93,10 @@ Adds liquidity to an ERC-20⇄WETH pool with ETH.
| Name | Type | |
| :----------------------------- | :-------- | :------------------------------------------------------------------------------------------------------------------------ |
| token | `address` | A pool token. |
| amountTokenDesired | `uint` | The amount of token to add as liquidity if the WETH/token price is <= `msg.value`/amountTokenDesired (token depreciates). |
| `msg.value` (amountETHDesired) | `uint` | The amount of ETH to add as liquidity if the token/WETH price is <= amountTokenDesired/`msg.value` (WETH depreciates). |
| amountTokenMin | `uint` | Bounds the extent to which the WETH/token price can go up before the transaction reverts. Must be <= amountTokenDesired. |
| amountETHMin | `uint` | Bounds the extent to which the token/WETH price can go up before the transaction reverts. Must be <= `msg.value`. |
| amountTokenDesired | `uint` | The amount of token to add as liquidity if the WETH/token price is \<= `msg.value`/amountTokenDesired (token depreciates). |
| `msg.value` (amountETHDesired) | `uint` | The amount of ETH to add as liquidity if the token/WETH price is \<= amountTokenDesired/`msg.value` (WETH depreciates). |
| amountTokenMin | `uint` | Bounds the extent to which the WETH/token price can go up before the transaction reverts. Must be \<= amountTokenDesired. |
| amountETHMin | `uint` | Bounds the extent to which the token/WETH price can go up before the transaction reverts. Must be \<= `msg.value`. |
| to | `address` | Recipient of the liquidity tokens. |
| deadline | `uint` | Unix timestamp after which the transaction will revert. |
| | | |
Expand Down
16 changes: 8 additions & 8 deletions docs/contracts/v2/reference/smart-contracts/06-router02.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ Adds liquidity to an ERC-20⇄ERC-20 pool.
| :------------- | :-------- | :------------------------------------------------------------------------------------------------------------- |
| tokenA | `address` | A pool token. |
| tokenB | `address` | A pool token. |
| amountADesired | `uint` | The amount of tokenA to add as liquidity if the B/A price is <= amountBDesired/amountADesired (A depreciates). |
| amountBDesired | `uint` | The amount of tokenB to add as liquidity if the A/B price is <= amountADesired/amountBDesired (B depreciates). |
| amountAMin | `uint` | Bounds the extent to which the B/A price can go up before the transaction reverts. Must be <= amountADesired. |
| amountBMin | `uint` | Bounds the extent to which the A/B price can go up before the transaction reverts. Must be <= amountBDesired. |
| amountADesired | `uint` | The amount of tokenA to add as liquidity if the B/A price is \<= amountBDesired/amountADesired (A depreciates). |
| amountBDesired | `uint` | The amount of tokenB to add as liquidity if the A/B price is \<= amountADesired/amountBDesired (B depreciates). |
| amountAMin | `uint` | Bounds the extent to which the B/A price can go up before the transaction reverts. Must be \<= amountADesired. |
| amountBMin | `uint` | Bounds the extent to which the A/B price can go up before the transaction reverts. Must be \<= amountBDesired. |
| to | `address` | Recipient of the liquidity tokens. |
| deadline | `uint` | Unix timestamp after which the transaction will revert. |
| | | |
Expand Down Expand Up @@ -121,10 +121,10 @@ Adds liquidity to an ERC-20⇄WETH pool with ETH.
| Name | Type | |
| :----------------------------- | :-------- | :------------------------------------------------------------------------------------------------------------------------ |
| token | `address` | A pool token. |
| amountTokenDesired | `uint` | The amount of token to add as liquidity if the WETH/token price is <= `msg.value`/amountTokenDesired (token depreciates). |
| `msg.value` (amountETHDesired) | `uint` | The amount of ETH to add as liquidity if the token/WETH price is <= amountTokenDesired/`msg.value` (WETH depreciates). |
| amountTokenMin | `uint` | Bounds the extent to which the WETH/token price can go up before the transaction reverts. Must be <= amountTokenDesired. |
| amountETHMin | `uint` | Bounds the extent to which the token/WETH price can go up before the transaction reverts. Must be <= `msg.value`. |
| amountTokenDesired | `uint` | The amount of token to add as liquidity if the WETH/token price is \<= `msg.value`/amountTokenDesired (token depreciates). |
| `msg.value` (amountETHDesired) | `uint` | The amount of ETH to add as liquidity if the token/WETH price is \<= amountTokenDesired/`msg.value` (WETH depreciates). |
| amountTokenMin | `uint` | Bounds the extent to which the WETH/token price can go up before the transaction reverts. Must be \<= amountTokenDesired. |
| amountETHMin | `uint` | Bounds the extent to which the token/WETH price can go up before the transaction reverts. Must be \<= `msg.value`. |
| to | `address` | Recipient of the liquidity tokens. |
| deadline | `uint` | Unix timestamp after which the transaction will revert. |
| | | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Gets the next sqrt price given a delta of token1
Always rounds down, because in the exact output case (decreasing price) we need to move the price at least
far enough to get the desired output amount, and in the exact input case (increasing price) we need to move the
price less in order to not send too much output.
The formula we compute is within <1 wei of the lossless version: *sqrtPX96 +- amount / liquidity*
The formula we compute is within \<1 wei of the lossless version: *sqrtPX96 +- amount / liquidity*

#### Parameters:

Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/v3/reference/core/libraries/TickMath.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ at the given tick
) internal pure returns (int24 tick)
```

Calculates the greatest tick value such that getRatioAtTick(tick) <= ratio
Calculates the greatest tick value such that getRatioAtTick(tick) \<= ratio

Throws in case sqrtPriceX96 < MIN_SQRT_RATIO, as MIN_SQRT_RATIO is the lowest value getRatioAtTick may
ever return.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Ends an incentive after the incentive end time has passed and all stakes have be
Upon receiving a Uniswap V3 ERC721, creates the token deposit setting owner to `from`. Also stakes token
in one or more incentives if properly formatted `data` has a length > 0.

Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
Whenever an \{IERC721\} `tokenId` token is transferred to this contract via \{IERC721-safeTransferFrom\}
by `operator` from `from`, this function is called.
It must return its Solidity selector to confirm the token transfer.
If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Gets the next sqrt price given a delta of currency1
*Always rounds down, because in the exact output case (decreasing price) we need to move the price at least
far enough to get the desired output amount, and in the exact input case (increasing price) we need to move the
price less in order to not send too much output.
The formula we compute is within <1 wei of the lossless version: sqrtPX96 +- amount / liquidity*
The formula we compute is within \<1 wei of the lossless version: sqrtPX96 +- amount / liquidity*


```solidity
Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/v4/reference/core/libraries/TickMath.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function getSqrtPriceAtTick(int24 tick) internal pure returns (uint160 sqrtPrice

### getTickAtSqrtPrice

Calculates the greatest tick value such that getSqrtPriceAtTick(tick) <= sqrtPriceX96
Calculates the greatest tick value such that getSqrtPriceAtTick(tick) \<= sqrtPriceX96
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flagging for myself -- the markdown files in v4/reference/* are generated with forge doc and copied to this repo's directory structure in uniswap/docs/scripts/v4-forge-doc.sh

I'll update the script and use sed to make sure we're escaping docusaurus v3 special characters


this shouldnt block our upgrade to docusaurus v3 tho

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could i get a ✅


*Throws in case sqrtPriceX96 < MIN_SQRT_PRICE, as MIN_SQRT_PRICE is the lowest value getSqrtPriceAtTick may
ever return.*
Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/v4/reference/periphery/base/Multicall_v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Enables calling multiple methods in a single call to the contract
Call multiple functions in the current contract and return the data from all of them if they all succeed

*The `msg.value` is passed onto all subcalls, even if a previous subcall has consumed the ether.
Subcalls can instead use `address(this).value` to see the available ETH, and consume it using {value: x}.*
Subcalls can instead use `address(this).value` to see the available ETH, and consume it using \{value: x\}.*


```solidity
Expand Down
4 changes: 2 additions & 2 deletions docs/contracts/v4/reference/periphery/base/NativeWrapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ constructor(IWETH9 _weth9);

### _wrap

*The amount should already be <= the current balance in this contract.*
*The amount should already be \<= the current balance in this contract.*


```solidity
Expand All @@ -36,7 +36,7 @@ function _wrap(uint256 amount) internal;

### _unwrap

*The amount should already be <= the current balance in this contract.*
*The amount should already be \<= the current balance in this contract.*


```solidity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Enables calling multiple methods in a single call to the contract
Call multiple functions in the current contract and return the data from all of them if they all succeed

*The `msg.value` is passed onto all subcalls, even if a previous subcall has consumed the ether.
Subcalls can instead use `address(this).value` to see the available ETH, and consume it using {value: x}.*
Subcalls can instead use `address(this).value` to see the available ETH, and consume it using \{value: x\}.*


```solidity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ uint128 internal constant OPEN_DELTA = 0;

### CONTRACT_BALANCE
used to signal that an action should use the contract's entire balance of a currency
This value is equivalent to 1<<255, i.e. a singular 1 in the most significant bit.
This value is equivalent to 1\<\<255, i.e. a singular 1 in the most significant bit.


```solidity
Expand Down
36 changes: 18 additions & 18 deletions docs/sdk/core/reference/classes/CurrencyAmount.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[@uniswap/sdk-core](../README.md) / [Exports](../modules.md) / CurrencyAmount

# Class: CurrencyAmount<T\>
# Class: CurrencyAmount\<T\>

## Type parameters

Expand Down Expand Up @@ -54,7 +54,7 @@

### constructor

• `Protected` **new CurrencyAmount**<`T`\>(`currency`, `numerator`, `denominator?`)
• `Protected` **new CurrencyAmount**\<`T`\>(`currency`, `numerator`, `denominator?`)

#### Type parameters

Expand Down Expand Up @@ -186,11 +186,11 @@ ___

### wrapped

• `get` **wrapped**(): [`CurrencyAmount`](CurrencyAmount.md)<[`Token`](Token.md)\>
• `get` **wrapped**(): [`CurrencyAmount`](CurrencyAmount.md)\<[`Token`](Token.md)\>

#### Returns

[`CurrencyAmount`](CurrencyAmount.md)<[`Token`](Token.md)\>
[`CurrencyAmount`](CurrencyAmount.md)\<[`Token`](Token.md)\>

#### Defined in

Expand All @@ -200,17 +200,17 @@ ___

### add

▸ **add**(`other`): [`CurrencyAmount`](CurrencyAmount.md)<`T`\>
▸ **add**(`other`): [`CurrencyAmount`](CurrencyAmount.md)\<`T`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `other` | [`CurrencyAmount`](CurrencyAmount.md)<`T`\> |
| `other` | [`CurrencyAmount`](CurrencyAmount.md)\<`T`\> |

#### Returns

[`CurrencyAmount`](CurrencyAmount.md)<`T`\>
[`CurrencyAmount`](CurrencyAmount.md)\<`T`\>

#### Overrides

Expand All @@ -224,7 +224,7 @@ ___

### divide

▸ **divide**(`other`): [`CurrencyAmount`](CurrencyAmount.md)<`T`\>
▸ **divide**(`other`): [`CurrencyAmount`](CurrencyAmount.md)\<`T`\>

#### Parameters

Expand All @@ -234,7 +234,7 @@ ___

#### Returns

[`CurrencyAmount`](CurrencyAmount.md)<`T`\>
[`CurrencyAmount`](CurrencyAmount.md)\<`T`\>

#### Overrides

Expand Down Expand Up @@ -338,7 +338,7 @@ ___

### multiply

▸ **multiply**(`other`): [`CurrencyAmount`](CurrencyAmount.md)<`T`\>
▸ **multiply**(`other`): [`CurrencyAmount`](CurrencyAmount.md)\<`T`\>

#### Parameters

Expand All @@ -348,7 +348,7 @@ ___

#### Returns

[`CurrencyAmount`](CurrencyAmount.md)<`T`\>
[`CurrencyAmount`](CurrencyAmount.md)\<`T`\>

#### Overrides

Expand All @@ -362,17 +362,17 @@ ___

### subtract

▸ **subtract**(`other`): [`CurrencyAmount`](CurrencyAmount.md)<`T`\>
▸ **subtract**(`other`): [`CurrencyAmount`](CurrencyAmount.md)\<`T`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `other` | [`CurrencyAmount`](CurrencyAmount.md)<`T`\> |
| `other` | [`CurrencyAmount`](CurrencyAmount.md)\<`T`\> |

#### Returns

[`CurrencyAmount`](CurrencyAmount.md)<`T`\>
[`CurrencyAmount`](CurrencyAmount.md)\<`T`\>

#### Overrides

Expand Down Expand Up @@ -458,7 +458,7 @@ ___

### fromFractionalAmount

▸ `Static` **fromFractionalAmount**<`T`\>(`currency`, `numerator`, `denominator`): [`CurrencyAmount`](CurrencyAmount.md)<`T`\>
▸ `Static` **fromFractionalAmount**\<`T`\>(`currency`, `numerator`, `denominator`): [`CurrencyAmount`](CurrencyAmount.md)\<`T`\>

Construct a currency amount with a denominator that is not equal to 1

Expand All @@ -478,7 +478,7 @@ Construct a currency amount with a denominator that is not equal to 1

#### Returns

[`CurrencyAmount`](CurrencyAmount.md)<`T`\>
[`CurrencyAmount`](CurrencyAmount.md)\<`T`\>

#### Defined in

Expand All @@ -488,7 +488,7 @@ ___

### fromRawAmount

▸ `Static` **fromRawAmount**<`T`\>(`currency`, `rawAmount`): [`CurrencyAmount`](CurrencyAmount.md)<`T`\>
▸ `Static` **fromRawAmount**\<`T`\>(`currency`, `rawAmount`): [`CurrencyAmount`](CurrencyAmount.md)\<`T`\>

Returns a new currency amount instance from the unitless amount of token, i.e. the raw amount

Expand All @@ -507,7 +507,7 @@ Returns a new currency amount instance from the unitless amount of token, i.e. t

#### Returns

[`CurrencyAmount`](CurrencyAmount.md)<`T`\>
[`CurrencyAmount`](CurrencyAmount.md)\<`T`\>

#### Defined in

Expand Down
Loading