Skip to content

Commit

Permalink
Merge pull request ToucanProtocol#103 from pheuberger/fix-import-in-docs
Browse files Browse the repository at this point in the history
Fix a few mistakes in the README file
  • Loading branch information
pheuberger committed Nov 29, 2023
2 parents c0cc677 + 3aa916b commit ed806d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,16 +310,14 @@ If you do, that's also quite easy to pull off. You just replace the usage of the
```typescript
const retirementReceipt = await toucan.retireAndMintCertificate(
"Alice",
signer.address,
bobsAddress,
"Bob",
"Just helping the planet",
parseEther("3.0"),
tco2s[len - 1].address
);
```

Why do you see my name twice you ask? 🤔

Well, the first "Alice" represents the entity that is doing the retirement/offset. The second one represents the party that 'benefits' from it, in this case "Bob". We will also add Bob's address so now the relation of the certificate is set to that address instead of the retiring party.
"Alice" represents the entity that is doing the retirement/offset. The second name represents the party that 'benefits' from it, in this case "Bob". We will also add Bob's address so now the relation of the certificate is set to that address instead of the retiring party.

This useful in case you happen to be an entity that retires on behalf of someone else.
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ yarn add toucan-sdk
Instantiate the ToucanClient and set a `signer` & `provider` to interact with our infrastructure.

```typescript
import { ToucanClient } from "toucan-sdk";
import ToucanClient from "toucan-sdk";

const toucan = new ToucanClient("alfajores", provider, signer);
```

You could also set the signer/provider later if you prefer that. They are optional. But you will need to set them if you want to interact with contracts. The provider is read-only, while the signer allows both writing to and reading from the blockchain.

```typescript
import { ToucanClient } from "toucan-sdk";
import ToucanClient from "toucan-sdk";

const toucan = new ToucanClient("alfajores");
toucan.setProvider(provider);
Expand Down Expand Up @@ -140,7 +140,7 @@ Now you have quite some info on the project, including its address.
Toucan SDK offers a lot of pre-defined queries. Try them out!

```typescript
import { ToucanClient } from "toucan-sdk";
import ToucanClient from "toucan-sdk";

// here we don't need to set the signer or provider
const toucan = new ToucanClient("alfajores");
Expand Down Expand Up @@ -186,7 +186,7 @@ This allows you to fetch with your own queries and can be very powerful if you k

```typescript
import { gql } from "@urql/core";
import { ToucanClient } from "toucan-sdk";
import ToucanClient from "toucan-sdk";

const toucan = new ToucanClient("alfajores");

Expand Down

0 comments on commit ed806d1

Please sign in to comment.