Skip to content

Commit

Permalink
quick readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
ajb413 committed Apr 28, 2023
1 parent 5617953 commit 05ddfd7
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const toAddress = '0xa0df350d2637096571F7A701CBc1C5fdE30dF76A';

## Compound Protocol

Simple methods for using the Compound protocol (v2).
Simple methods for using the Compound protocol.

```js
const compound = new Compound(window.ethereum); // in a web browser
Expand All @@ -74,15 +74,6 @@ const compound = new Compound(window.ethereum); // in a web browser
})().catch(console.error);
```

### Comet

Compound III (Comet) object initialization. The constructor accepts the same parameters as the `Compound` constructor. An error will be thrown initially and whenever a method is called if the provider does not match the network of the specific Comet deployment. The SDK constants as well as a method in the Comet documentation note the Comet deployments that Compound.js supports.

```js
var compound = new Compound(window.ethereum);
var comet = compound.comet.MAINNET_USDC(); // provider from `compound` will be used unless on is explicitly passed
```

## Install / Import

Web Browser
Expand Down Expand Up @@ -115,7 +106,7 @@ See the docblock comments above each function definition or the official [Compou

## Instance Creation

The following are valid Ethereum providers for initialization of the SDK.
The following are valid Ethereum providers for initialization of the SDK (v2 and Comet instance).

```js
var compound = new Compound(window.ethereum); // web browser
Expand All @@ -137,6 +128,15 @@ var compound = new Compound('mainnet' {
});
```

### Comet

Compound III (Comet) object initialization. The constructor accepts the same parameters as the `Compound` constructor. An error will be thrown initially and whenever a method is called if the provider does not match the network of the specific Comet deployment. The SDK constants as well as a method in the Comet documentation note the Comet deployments that Compound.js supports.

```js
var compound = new Compound(window.ethereum);
var comet = compound.comet.MAINNET_USDC(); // provider from `compound` will be used unless on is explicitly passed
```

## Constants and Contract Addresses

Names of contracts, their addresses, ABIs, token decimals, and more can be found in `/src/constants.ts`. Addresses, for all networks, can be easily fetched using the `getAddress` function, combined with contract name constants.
Expand Down

0 comments on commit 05ddfd7

Please sign in to comment.