From b662f8523d8b99cf8d360f47fed2c96c51f47d48 Mon Sep 17 00:00:00 2001 From: Danny Daniil Date: Tue, 13 Dec 2022 15:33:38 -0500 Subject: [PATCH] feat:examples-folder (#520) --- .../v3/guides/providing-liquidity/the-full-contract.md | 2 +- docs/sdk/v3/guides/04-fetching-prices.md | 2 +- docs/sdk/v3/guides/liquidity/06-removing-liquidity.md | 2 +- {sdk-examples => examples/sdk}/AddAndRemoveLiquidity.tsx | 0 .../smart-contracts}/LiquidityExamples.sol | 0 .../smart-contracts}/SwapExamples.sol | 0 6 files changed, 3 insertions(+), 3 deletions(-) rename {sdk-examples => examples/sdk}/AddAndRemoveLiquidity.tsx (100%) rename {smart_contract_examples => examples/smart-contracts}/LiquidityExamples.sol (100%) rename {smart_contract_examples => examples/smart-contracts}/SwapExamples.sol (100%) diff --git a/docs/contracts/v3/guides/providing-liquidity/the-full-contract.md b/docs/contracts/v3/guides/providing-liquidity/the-full-contract.md index db448a8df3..1044a0eacb 100644 --- a/docs/contracts/v3/guides/providing-liquidity/the-full-contract.md +++ b/docs/contracts/v3/guides/providing-liquidity/the-full-contract.md @@ -4,7 +4,7 @@ title: The Full Contract sidebar_position: 6 --- -Below we have the complete functioning code example: a contract that can custody Uniswap V3 position NFT's and manipulate the positions and liquidity therein by collecting fees, increasing or decreasing liquidity, and minting new positions. View on github [here](https://github.com/Uniswap/uniswap-docs/blob/main/smart_contract_examples/LiquidityExamples.sol). +Below we have the complete functioning code example: a contract that can custody Uniswap V3 position NFT's and manipulate the positions and liquidity therein by collecting fees, increasing or decreasing liquidity, and minting new positions. View on github [here](https://github.com/Uniswap/uniswap-docs/blob/main/examples/smart-contracts/LiquidityExamples.sol). ```solidity // SPDX-License-Identifier: GPL-2.0-or-later diff --git a/docs/sdk/v3/guides/04-fetching-prices.md b/docs/sdk/v3/guides/04-fetching-prices.md index c2f81f716c..2e641a417e 100644 --- a/docs/sdk/v3/guides/04-fetching-prices.md +++ b/docs/sdk/v3/guides/04-fetching-prices.md @@ -9,7 +9,7 @@ This guide will teach you how to fetch the current market price of any token on ### Calling the functions -Similar to other examples, you first must set up your pool. If you’re unsure how to collect all the parameters necessary in creating a `Pool` instance see [Creating a Pool Instance](../guides/03-creating-a-pool.md) or look at this typescript [example](https://github.com/Uniswap/uniswap-docs/blob/main/sdk-examples/AddAndRemoveLiquidity.tsx). The `Pool` class contains two getter methods `token0Price` and `token1Price` which will return the prices of each token respectively as a `Price`. +Similar to other examples, you first must set up your pool. If you’re unsure how to collect all the parameters necessary in creating a `Pool` instance see [Creating a Pool Instance](../guides/03-creating-a-pool.md) or look at this typescript [example](https://github.com/Uniswap/uniswap-docs/blob/main/examples/sdk/AddAndRemoveLiquidity.tsx). The `Pool` class contains two getter methods `token0Price` and `token1Price` which will return the prices of each token respectively as a `Price`. After constructing the pool, you can save the token prices as constants: diff --git a/docs/sdk/v3/guides/liquidity/06-removing-liquidity.md b/docs/sdk/v3/guides/liquidity/06-removing-liquidity.md index ff96f7dee3..9a2f0e651a 100644 --- a/docs/sdk/v3/guides/liquidity/06-removing-liquidity.md +++ b/docs/sdk/v3/guides/liquidity/06-removing-liquidity.md @@ -102,4 +102,4 @@ const { calldata, value } = NonfungiblePositionManager.removeCallParameters(posi ## The example code -You now know how to mint a liquidity position, add liquidity, and remove liquidity. Here's the [full example code](https://github.com/Uniswap/uniswap-docs/blob/main/sdk-examples/AddAndRemoveLiquidity.tsx) for reference. +You now know how to mint a liquidity position, add liquidity, and remove liquidity. Here's the [full example code](https://github.com/Uniswap/uniswap-docs/blob/main/examples/sdk/AddAndRemoveLiquidity.tsx) for reference. diff --git a/sdk-examples/AddAndRemoveLiquidity.tsx b/examples/sdk/AddAndRemoveLiquidity.tsx similarity index 100% rename from sdk-examples/AddAndRemoveLiquidity.tsx rename to examples/sdk/AddAndRemoveLiquidity.tsx diff --git a/smart_contract_examples/LiquidityExamples.sol b/examples/smart-contracts/LiquidityExamples.sol similarity index 100% rename from smart_contract_examples/LiquidityExamples.sol rename to examples/smart-contracts/LiquidityExamples.sol diff --git a/smart_contract_examples/SwapExamples.sol b/examples/smart-contracts/SwapExamples.sol similarity index 100% rename from smart_contract_examples/SwapExamples.sol rename to examples/smart-contracts/SwapExamples.sol