From 1488e66140210b8744f74cdaa3d7906950654698 Mon Sep 17 00:00:00 2001 From: Michalis Kargakis Date: Wed, 21 Aug 2024 15:06:44 +0200 Subject: [PATCH] README updates Fix a few typos, broken links, and update a few pool token references to be agnostic to a specific pool. --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d244d58..82b0936 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Before you can make Subgraph queries, you need to set `GRAPH_API_KEY` in your `. Instantiate the ToucanClient and set a `signer` & `provider` to interact with our infrastructure. -We recommend using to use [ethers.js ^5.6.4](https://docs.ethers.org/v5/api/signer/) for the signer and provider. When you are considering using [wagmi](https://0.3.x.wagmi.sh/docs/hooks/useSigner), only versions under 1.0 will work as this library has not yet been upgraded to viem. +We recommend using [ethers.js ^5.6.4](https://docs.ethers.org/v5/api/signer/) for the signer and provider. When you are considering using [wagmi](https://0.3.x.wagmi.sh/docs/hooks/useSigner), only versions under 1.0 will work as this library has not yet been upgraded to viem. ### [ethers.js](https://docs.ethers.org/v5/api/signer/) @@ -76,7 +76,7 @@ toucan.setSigner(signer); If you don't have a signer nor a provider set, you can only interact with the subgraph. -## Fetch pool prices from a Dex +## Fetch pool prices from a DEX IMPORTANT: _Fetching pool prices is currently not working. We are working on a fix for this._ @@ -102,7 +102,7 @@ The object returned by the above method will look like this: # Interact with Toucan's Contracts? -You can always access any method or property of the BCT, NCT and TCO2 [contracts](https://github.com/ToucanProtocol/contracts) by first getting and storing them in a variable, like this: +You can always access any method or property of the pool and TCO2 [contracts](https://github.com/ToucanProtocol/contracts) by first getting and storing them in a variable, like this: ```typescript toucan.setSigner(signer); @@ -119,7 +119,7 @@ It's important to note that, if you want to use write methods you need to have a ## Example to retire Carbon Credits -To retire Carbon Credits on mainnet, you will have to get Carbon Pool Tokens from a DEX like [Uniswap](https://uniswap.org), which you need to redeem for TCO2s. You can then retire these and get a certificate for that. If you already own NCTs, you can follow this example. In case you don't and are developing on testnet, you can also just get some at the [Toucan Faucet](https://faucet.toucan.earth). You can find more ways to retire in our [documentation](https://docs.toucan.earth/toucan/dev-resources/smart-contracts/tco2). +To retire Carbon Credits on mainnet, you will have to get Carbon Pool Tokens from a DEX like [Uniswap](https://uniswap.org), which you need to redeem for TCO2s. You can then retire TCO2s and get a certificate for the retirement. If you already own NCTs, you can follow this example. In case you don't and are developing on testnet, you can also just get some at the [Toucan Faucet](https://faucet.toucan.earth). You can find more ways to retire in our [documentation](https://docs.toucan.earth/developers/smart-contracts/tco2). **Redeem your Pool Tokens and get an array of redeemed TCO2s** @@ -139,7 +139,7 @@ Now, the above example of selective retirement is only useful in specific cases. **What if you only have the name or symbol of the project?** -That's where subgraph queries come in handy. (and we have plenty of those 😉) - But feel free to also [create your own](#custom-queries). +That's where subgraph queries come in handy (and we have plenty of those 😉) - but feel free to also [create your own](#custom-queries). **_Make sure all addresses are input in lowercase letters, as the queries are case sensitive._** @@ -213,7 +213,7 @@ await toucan.fetchAggregations(); Now that you have an overview of our pre-build queries, let's have a look at the `fetchCustomQuery` method. -This allows you to fetch with your own queries and can be very powerful if you know graphQL. You can also check out a lot of example queries in our Subgraph playgrounds: +This allows you to fetch with your own queries and can be very powerful if you know GraphQL. You can also check out a lot of example queries in our Subgraph playgrounds: - [Matic](https://thegraph.com/explorer/subgraphs/FU5APMSSCqcRy9jy56aXJiGV3PQmFQHg2tzukvSJBgwW) - [Celo](https://thegraph.com/explorer/subgraphs/BWmN569zDopYXp3nzDukJsGDHqRstYAFULFPH8rxyVBk) @@ -253,7 +253,7 @@ const result = await toucan.fetchCustomQuery(query, { id: "1" }); Using the OffsetHelper methods is the easiest way to offset CO2 right now as it handles the whole process for you. -_(Uses Ubeswap/SushiSwap to acquire BCT/NCT, redeems it for TCO2s and retires them)_ +_(Uses Ubeswap/SushiSwap to acquire pool tokens, redeems pool tokens for TCO2s and retires TCO2s)_ This is how you do that when you want to use ETH (or the network's native currency) in your balance. @@ -280,9 +280,9 @@ const offsetReceipt = await toucan.autoOffsetExactInToken( ); ``` -### Offset with your own BCT/NCT +### Offset with your pool tokens -If you already have BCT/NCT, you can use `autoOffsetPoolToken()` like this: +If you already have pool tokens (eg. NCT,) you can use `autoOffsetPoolToken()` like this: ```typescript const offsetReceipt = await toucan.autoOffsetPoolToken(