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

Remove references to Exchange contract #107

Merged
merged 3 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions .changeset/silly-moose-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@celo/contractkit': major
---

Remove all references to now defunkt mento exchange contracts
36 changes: 17 additions & 19 deletions packages/docs/command-line-interface/exchange.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
`celocli exchange`
==================

Exchange Celo Dollars and CELO via the stability mechanism
Exchange Celo Dollars and CELO via Mento

* [`celocli exchange:celo`](#celocli-exchangecelo)
* [`celocli exchange:dollars`](#celocli-exchangedollars)
Expand All @@ -13,7 +13,7 @@ Exchange Celo Dollars and CELO via the stability mechanism

## `celocli exchange:celo`

Exchange CELO for StableTokens via the stability mechanism. (Note: this is the equivalent of the old exchange:gold)
Exchange CELO for StableTokens via Mento. (Note: this is the equivalent of the old exchange:gold)

```
USAGE
Expand All @@ -35,8 +35,8 @@ FLAGS
exchange for a StableToken

DESCRIPTION
Exchange CELO for StableTokens via the stability mechanism. (Note: this is the
equivalent of the old exchange:gold)
Exchange CELO for StableTokens via Mento. (Note: this is the equivalent of the old
exchange:gold)

EXAMPLES
celo --value 5000000000000 --from 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d
Expand All @@ -48,7 +48,7 @@ _See code: [src/commands/exchange/celo.ts](https://github.com/celo-org/developer

## `celocli exchange:dollars`

Exchange Celo Dollars for CELO via the stability mechanism
Exchange Celo Dollars for CELO via Mento

```
USAGE
Expand All @@ -65,7 +65,7 @@ FLAGS
Dollars to exchange for CELO

DESCRIPTION
Exchange Celo Dollars for CELO via the stability mechanism
Exchange Celo Dollars for CELO via Mento

EXAMPLES
dollars --value 10000000000000 --from 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d
Expand All @@ -77,7 +77,7 @@ _See code: [src/commands/exchange/dollars.ts](https://github.com/celo-org/develo

## `celocli exchange:euros`

Exchange Celo Euros for CELO via the stability mechanism
Exchange Celo Euros for CELO via Mento

```
USAGE
Expand All @@ -94,7 +94,7 @@ FLAGS
to exchange for CELO

DESCRIPTION
Exchange Celo Euros for CELO via the stability mechanism
Exchange Celo Euros for CELO via Mento

EXAMPLES
euros --value 10000000000000 --from 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d
Expand All @@ -106,7 +106,7 @@ _See code: [src/commands/exchange/euros.ts](https://github.com/celo-org/develope

## `celocli exchange:gold`

Exchange CELO for StableTokens via the stability mechanism. *DEPRECATION WARNING* Use the "exchange:celo" command instead
Exchange CELO for StableTokens via Mento. *DEPRECATION WARNING* Use the "exchange:celo" command instead

```
USAGE
Expand All @@ -128,20 +128,18 @@ FLAGS
exchange for a StableToken

DESCRIPTION
Exchange CELO for StableTokens via the stability mechanism. *DEPRECATION WARNING* Use
the "exchange:celo" command instead
Exchange CELO for StableTokens via Mento. *DEPRECATION WARNING* Use the
"exchange:celo" command instead

EXAMPLES
gold --value 5000000000000 --from 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d

gold --value 5000000000000 --forAtLeast 100000000000000 --from 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d --stableToken cUSD
```

_See code: [src/commands/exchange/gold.ts](https://github.com/celo-org/developer-tooling/tree/master/packages/cli/src/commands/exchange/gold.ts)_

## `celocli exchange:reals`

Exchange Celo Brazilian Real (cREAL) for CELO via the stability mechanism
Exchange Celo Brazilian Real (cREAL) for CELO via Mento

```
USAGE
Expand All @@ -158,7 +156,7 @@ FLAGS
Brazilian Real to exchange for CELO

DESCRIPTION
Exchange Celo Brazilian Real (cREAL) for CELO via the stability mechanism
Exchange Celo Brazilian Real (cREAL) for CELO via Mento

EXAMPLES
reals --value 10000000000000 --from 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d
Expand All @@ -170,7 +168,7 @@ _See code: [src/commands/exchange/reals.ts](https://github.com/celo-org/develope

## `celocli exchange:show`

Show the current exchange rates offered by the Exchange
Show the current exchange rates offered by the Broker

```
USAGE
Expand All @@ -182,7 +180,7 @@ FLAGS
--globalHelp View all available global flags

DESCRIPTION
Show the current exchange rates offered by the Exchange
Show the current exchange rates offered by the Broker

EXAMPLES
list
Expand All @@ -192,7 +190,7 @@ _See code: [src/commands/exchange/show.ts](https://github.com/celo-org/developer

## `celocli exchange:stable`

Exchange Stable Token for CELO via the stability mechanism
Exchange Stable Token for CELO via Mento

```
USAGE
Expand All @@ -213,7 +211,7 @@ FLAGS
Tokens to exchange for CELO

DESCRIPTION
Exchange Stable Token for CELO via the stability mechanism
Exchange Stable Token for CELO via Mento

EXAMPLES
stable --value 10000000000000 --from 0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d --stableToken cStableTokenSymbol
Expand Down
4 changes: 1 addition & 3 deletions packages/docs/sdk/docs/contractkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ There are many core contracts.
- EpochRewardsWrapper
- Erc20Wrapper
- EscrowWrapper
- ExchangeWrapper
- FreezerWrapper
- GasPriceMinimumWrapper
- GoldTokenWrapper
Expand Down Expand Up @@ -195,7 +194,7 @@ Some user might want to access web3 native contract wrappers.
To do so, you can:

```ts
const web3Exchange = await kit._web3Contracts.getExchange()
const feeCurrencyWhitelist = await kit._web3Contracts.getFeeCurrencyWhitelist()
```

We expose native wrappers for all Celo core contracts.
Expand All @@ -206,7 +205,6 @@ The complete list of Celo Core contracts is:
- Attestations
- LockedGold
- Escrow
- Exchange
- FeeCurrencyWhitelist
- GasPriceMinimum
- GoldToken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ A helper class to interact with all Celo tokens, ie CELO and stable tokens
- [getAddress](celo_tokens.CeloTokens.md#getaddress)
- [getAddresses](celo_tokens.CeloTokens.md#getaddresses)
- [getContract](celo_tokens.CeloTokens.md#getcontract)
- [getExchangeContract](celo_tokens.CeloTokens.md#getexchangecontract)
- [getExchangesConfigs](celo_tokens.CeloTokens.md#getexchangesconfigs)
- [getFeeCurrencyAddress](celo_tokens.CeloTokens.md#getfeecurrencyaddress)
- [getStablesConfigs](celo_tokens.CeloTokens.md#getstablesconfigs)
- [getWrapper](celo_tokens.CeloTokens.md#getwrapper)
Expand Down Expand Up @@ -55,7 +53,7 @@ A helper class to interact with all Celo tokens, ie CELO and stable tokens

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:62](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L62)
[packages/sdk/contractkit/src/celo-tokens.ts:58](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L58)

## Properties

Expand All @@ -65,7 +63,7 @@ A helper class to interact with all Celo tokens, ie CELO and stable tokens

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:62](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L62)
[packages/sdk/contractkit/src/celo-tokens.ts:58](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L58)

___

Expand All @@ -89,7 +87,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:272](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L272)
[packages/sdk/contractkit/src/celo-tokens.ts:248](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L248)

___

Expand All @@ -99,7 +97,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:62](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L62)
[packages/sdk/contractkit/src/celo-tokens.ts:58](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L58)

## Methods

Expand All @@ -124,7 +122,7 @@ a promise resolving to an object containing the address's balance

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:70](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L70)
[packages/sdk/contractkit/src/celo-tokens.ts:66](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L66)

___

Expand Down Expand Up @@ -156,7 +154,7 @@ an object containing the resolved value the call to fn for each

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:120](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L120)
[packages/sdk/contractkit/src/celo-tokens.ts:106](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L106)

___

Expand Down Expand Up @@ -188,7 +186,7 @@ an object containing the resolved value the call to fn for each

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:143](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L143)
[packages/sdk/contractkit/src/celo-tokens.ts:129](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L129)

___

Expand All @@ -212,7 +210,7 @@ A promise resolving to the address of the token's contract

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:247](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L247)
[packages/sdk/contractkit/src/celo-tokens.ts:223](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L223)

___

Expand All @@ -230,7 +228,7 @@ an promise resolving to an object containing the address for each celo token pro

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:89](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L89)
[packages/sdk/contractkit/src/celo-tokens.ts:85](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L85)

___

Expand All @@ -254,51 +252,7 @@ The contract for the token

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:228](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L228)

___

### getExchangeContract

▸ **getExchangeContract**(`token`): [`ExchangeContract`](../modules/base.md#exchangecontract)

Gets the exchange contract for the provided stable token

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `token` | [`StableToken`](../enums/celo_tokens.StableToken.md) | the stable token to get exchange contract of |

#### Returns

[`ExchangeContract`](../modules/base.md#exchangecontract)

The exchange contract for the token

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:238](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L238)

___

### getExchangesConfigs

▸ **getExchangesConfigs**(`humanReadable?`): `Promise`\<[`EachCeloToken`](../modules/celo_tokens.md#eachcelotoken)\<[`ExchangeConfig`](../interfaces/wrappers_Exchange.ExchangeConfig.md) \| \{ `lastBucketUpdate`: `string` ; `minimumReports`: `BigNumber` ; `reserveFraction`: `BigNumber` ; `spread`: `BigNumber` ; `updateFrequency`: `string` }\>\>

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `humanReadable` | `boolean` | `false` |

#### Returns

`Promise`\<[`EachCeloToken`](../modules/celo_tokens.md#eachcelotoken)\<[`ExchangeConfig`](../interfaces/wrappers_Exchange.ExchangeConfig.md) \| \{ `lastBucketUpdate`: `string` ; `minimumReports`: `BigNumber` ; `reserveFraction`: `BigNumber` ; `spread`: `BigNumber` ; `updateFrequency`: `string` }\>\>

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:103](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L103)
[packages/sdk/contractkit/src/celo-tokens.ts:213](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L213)

___

Expand All @@ -323,7 +277,7 @@ If not CELO, the address of the token's contract. If CELO, undefined.

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:255](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L255)
[packages/sdk/contractkit/src/celo-tokens.ts:231](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L231)

___

Expand All @@ -343,7 +297,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:93](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L93)
[packages/sdk/contractkit/src/celo-tokens.ts:89](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L89)

___

Expand All @@ -367,7 +321,7 @@ an promise resolving to the wrapper for the token

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:216](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L216)
[packages/sdk/contractkit/src/celo-tokens.ts:201](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L201)

▸ **getWrapper**(`token`): `Promise`\<[`GoldTokenWrapper`](wrappers_GoldTokenWrapper.GoldTokenWrapper.md)\>

Expand All @@ -383,7 +337,7 @@ an promise resolving to the wrapper for the token

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:217](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L217)
[packages/sdk/contractkit/src/celo-tokens.ts:202](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L202)

▸ **getWrapper**(`token`): `Promise`\<[`CeloTokenWrapper`](../modules/celo_tokens.md#celotokenwrapper)\>

Expand All @@ -399,7 +353,7 @@ an promise resolving to the wrapper for the token

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:218](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L218)
[packages/sdk/contractkit/src/celo-tokens.ts:203](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L203)

___

Expand All @@ -417,7 +371,7 @@ an promise resolving to an object containing the wrapper for each celo token.

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:81](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L81)
[packages/sdk/contractkit/src/celo-tokens.ts:77](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L77)

___

Expand All @@ -441,7 +395,7 @@ if token is a StableToken

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:267](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L267)
[packages/sdk/contractkit/src/celo-tokens.ts:243](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L243)

___

Expand All @@ -455,7 +409,7 @@ ___

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:176](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L176)
[packages/sdk/contractkit/src/celo-tokens.ts:162](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L162)

___

Expand All @@ -469,4 +423,4 @@ ___

#### Defined in

[packages/sdk/contractkit/src/celo-tokens.ts:193](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L193)
[packages/sdk/contractkit/src/celo-tokens.ts:179](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/contractkit/src/celo-tokens.ts#L179)
Loading
Loading