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

Add USDC token addresses and networkIds #611

Merged
merged 5 commits into from
Jul 15, 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/shy-seas-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@colony/core": minor
---

This adds USDC token addresses and an enum with all supported network ids.
13 changes: 7 additions & 6 deletions packages/colony-js/docs/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- [MetaTxBroadCasterEndpoint](enums/MetaTxBroadCasterEndpoint.md)
- [MotionState](enums/MotionState.md)
- [Network](enums/Network.md)
- [NetworkId](enums/NetworkId.md)
- [ReputationOracleEndpoint](enums/ReputationOracleEndpoint.md)
- [TokenClientType](enums/TokenClientType.md)
- [UserLabelSuffix](enums/UserLabelSuffix.md)
Expand Down Expand Up @@ -337,15 +338,15 @@ Latest versions of all extension contracts

| Name | Type |
| :------ | :------ |
| `FundingQueue` | ``1`` \| ``2`` \| ``3`` \| ``4`` \| ``5`` \| ``6`` \| ``7`` |
| `IVotingReputation` | ``1`` \| ``2`` \| ``3`` \| ``4`` \| ``5`` \| ``6`` \| ``7`` \| ``8`` \| ``9`` \| ``10`` \| ``11`` |
| `OneTxPayment` | ``1`` \| ``2`` \| ``3`` \| ``4`` \| ``5`` \| ``6`` \| ``7`` |
| `FundingQueue` | ``1`` \| ``5`` \| ``2`` \| ``3`` \| ``4`` \| ``6`` \| ``7`` |
| `IVotingReputation` | ``1`` \| ``5`` \| ``2`` \| ``3`` \| ``4`` \| ``6`` \| ``7`` \| ``8`` \| ``9`` \| ``10`` \| ``11`` |
| `OneTxPayment` | ``1`` \| ``5`` \| ``2`` \| ``3`` \| ``4`` \| ``6`` \| ``7`` |
| `ReputationBootstrapper` | ``1`` \| ``2`` \| ``3`` \| ``4`` |
| `StagedExpenditure` | ``1`` \| ``2`` |
| `StakedExpenditure` | ``1`` \| ``2`` \| ``3`` \| ``4`` \| ``5`` |
| `StakedExpenditure` | ``1`` \| ``5`` \| ``2`` \| ``3`` \| ``4`` |
| `StreamingPayments` | ``1`` \| ``2`` \| ``3`` \| ``4`` |
| `TokenSupplier` | ``1`` \| ``2`` \| ``3`` \| ``4`` \| ``5`` \| ``6`` \| ``7`` |
| `VotingReputation` | ``1`` \| ``2`` \| ``3`` \| ``4`` \| ``5`` \| ``6`` \| ``7`` \| ``8`` \| ``9`` \| ``10`` \| ``11`` |
| `TokenSupplier` | ``1`` \| ``5`` \| ``2`` \| ``3`` \| ``4`` \| ``6`` \| ``7`` |
| `VotingReputation` | ``1`` \| ``5`` \| ``2`` \| ``3`` \| ``4`` \| ``6`` \| ``7`` \| ``8`` \| ``9`` \| ``10`` \| ``11`` |

___

Expand Down
65 changes: 65 additions & 0 deletions packages/colony-js/docs/api/enums/NetworkId.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Enumeration: NetworkId

## Enumeration Members

### ArbitrumOne

• **ArbitrumOne** = ``42161``

Arbitrum One Mainnet

___

### ArbitrumSepolia

• **ArbitrumSepolia** = ``421614``

Arbitrum Testnet

___

### Custom

• **Custom** = ``0``

Use this to specify an own main ColonyNetwork address in the options

___

### Gnosis

• **Gnosis** = ``100``

Gnosis chain

___

### Goerli

• **Goerli** = ``5``

Goerli testnet

___

### Mainnet

• **Mainnet** = ``1``

Ethereum Mainnet

___

### Xdai

• **Xdai** = ``100``

Gnosis chain (alias)

___

### XdaiQa

• **XdaiQa** = ``100``

Gnosis chain custom fork
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Enumeration: Arbitrum
# Enumeration: ArbitrumOne

[Tokens](../modules/Tokens.md).Arbitrum
[Tokens](../modules/Tokens.md).ArbitrumOne

Tokens deployed on Arbitrum One

Expand All @@ -19,3 +19,11 @@ ___
• **ETH** = ``"0x0000000000000000000000000000000000000000"``

ETH on Arbitrum One

___

### USDC

• **USDC** = ``"0xaf88d065e77c8cC2239327C5EDb3A432268e5831"``

USDC on Arbitrum One
8 changes: 8 additions & 0 deletions packages/colony-js/docs/api/enums/Tokens.Gnosis.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ CLNY on Gnosis Chain

___

### USDC

• **USDC** = ``"0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"``

USDC on Gnosis Chain

___

### XDAI

• **XDAI** = ``"0x0000000000000000000000000000000000000000"``
Expand Down
14 changes: 11 additions & 3 deletions packages/colony-js/docs/api/enums/Tokens.Mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ Tokens deployed on Mainnet

## Enumeration Members

### CLNY

• **CLNY** = ``"0x3E828ac5C480069D4765654Fb4b8733b910b13b2"``

CLNY on Mainnet

___

### ETH

• **ETH** = ``"0x0000000000000000000000000000000000000000"``
Expand All @@ -14,8 +22,8 @@ ETH on Mainnet

___

### Mainnet
### USDC

• **Mainnet** = ``"0x3E828ac5C480069D4765654Fb4b8733b910b13b2"``
• **USDC** = ``"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"``

CLNY on Mainnet
USDC on Mainnet
2 changes: 1 addition & 1 deletion packages/colony-js/docs/api/modules/Tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Shortcut to common token addresses

## Enumerations

- [Arbitrum](../enums/Tokens.Arbitrum.md)
- [ArbitrumOne](../enums/Tokens.ArbitrumOne.md)
- [Gnosis](../enums/Tokens.Gnosis.md)
- [Mainnet](../enums/Tokens.Mainnet.md)
30 changes: 27 additions & 3 deletions packages/core/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,25 @@ export enum Network {
ArbitrumSepolia = 'ArbitrumSepolia',
}

export enum NetworkId {
/** Use this to specify an own main ColonyNetwork address in the options */
Custom = 0x0,
/** Ethereum Mainnet */
Mainnet = 0x1,
/** Goerli testnet */
Goerli = 0x5,
/** Gnosis chain */
Gnosis = 0x64,
/** Gnosis chain (alias) */
Xdai = 0x64,
/** Gnosis chain custom fork */
XdaiQa = 0x64,
/** Arbitrum Testnet */
ArbitrumSepolia = 0x66eee,
/** Arbitrum One Mainnet */
ArbitrumOne = 0xa4b1,
}

/**
* Addresses of the deployed ColonyNetwork EtherRouter contracts in all networks
*/
Expand Down Expand Up @@ -128,30 +147,35 @@ export enum UserLabelSuffix {
/**
* Shortcut to common token addresses
*/
// TODO: add more tokens like USDC, USDT?
// eslint-disable-next-line @typescript-eslint/no-namespace
export namespace Tokens {
/** Tokens deployed on Mainnet */
export enum Mainnet {
/** ETH on Mainnet */
ETH = '0x0000000000000000000000000000000000000000',
/** CLNY on Mainnet */
Mainnet = '0x3E828ac5C480069D4765654Fb4b8733b910b13b2',
CLNY = '0x3E828ac5C480069D4765654Fb4b8733b910b13b2',
/** USDC on Mainnet */
USDC = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
}
/** Tokens deployed on Gnosis Chain */
export enum Gnosis {
/** XDAI on Gnosis Chain */
XDAI = '0x0000000000000000000000000000000000000000',
/** CLNY on Gnosis Chain */
CLNY = '0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C',
/** USDC on Gnosis Chain */
USDC = '0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83',
}

/** Tokens deployed on Arbitrum One */
export enum Arbitrum {
export enum ArbitrumOne {
/** ETH on Arbitrum One */
ETH = '0x0000000000000000000000000000000000000000',
/** CLNY on Arbitrum One */
CLNY = '0xcccccdcc0ccf6c708d860e19353c5f9a49accccc',
/** USDC on Arbitrum One */
USDC = '0xaf88d065e77c8cC2239327C5EDb3A432268e5831',
}
}

Expand Down
12 changes: 6 additions & 6 deletions packages/sdk/docs/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,15 @@ Latest versions of all extension contracts

| Name | Type |
| :------ | :------ |
| `FundingQueue` | ``1`` \| ``2`` \| ``3`` \| ``4`` \| ``5`` \| ``6`` \| ``7`` |
| `IVotingReputation` | ``1`` \| ``2`` \| ``3`` \| ``4`` \| ``5`` \| ``6`` \| ``7`` \| ``8`` \| ``9`` \| ``10`` \| ``11`` |
| `OneTxPayment` | ``1`` \| ``2`` \| ``3`` \| ``4`` \| ``5`` \| ``6`` \| ``7`` |
| `FundingQueue` | ``1`` \| ``5`` \| ``2`` \| ``3`` \| ``4`` \| ``6`` \| ``7`` |
| `IVotingReputation` | ``1`` \| ``5`` \| ``2`` \| ``3`` \| ``4`` \| ``6`` \| ``7`` \| ``8`` \| ``9`` \| ``10`` \| ``11`` |
| `OneTxPayment` | ``1`` \| ``5`` \| ``2`` \| ``3`` \| ``4`` \| ``6`` \| ``7`` |
| `ReputationBootstrapper` | ``1`` \| ``2`` \| ``3`` \| ``4`` |
| `StagedExpenditure` | ``1`` \| ``2`` |
| `StakedExpenditure` | ``1`` \| ``2`` \| ``3`` \| ``4`` \| ``5`` |
| `StakedExpenditure` | ``1`` \| ``5`` \| ``2`` \| ``3`` \| ``4`` |
| `StreamingPayments` | ``1`` \| ``2`` \| ``3`` \| ``4`` |
| `TokenSupplier` | ``1`` \| ``2`` \| ``3`` \| ``4`` \| ``5`` \| ``6`` \| ``7`` |
| `VotingReputation` | ``1`` \| ``2`` \| ``3`` \| ``4`` \| ``5`` \| ``6`` \| ``7`` \| ``8`` \| ``9`` \| ``10`` \| ``11`` |
| `TokenSupplier` | ``1`` \| ``5`` \| ``2`` \| ``3`` \| ``4`` \| ``6`` \| ``7`` |
| `VotingReputation` | ``1`` \| ``5`` \| ``2`` \| ``3`` \| ``4`` \| ``6`` \| ``7`` \| ``8`` \| ``9`` \| ``10`` \| ``11`` |

___

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Enumeration: Arbitrum
# Enumeration: ArbitrumOne

[Tokens](../modules/Tokens.md).Arbitrum
[Tokens](../modules/Tokens.md).ArbitrumOne

Tokens deployed on Arbitrum One

Expand All @@ -19,3 +19,11 @@ ___
• **ETH** = ``"0x0000000000000000000000000000000000000000"``

ETH on Arbitrum One

___

### USDC

• **USDC** = ``"0xaf88d065e77c8cC2239327C5EDb3A432268e5831"``

USDC on Arbitrum One
8 changes: 8 additions & 0 deletions packages/sdk/docs/api/enums/Tokens.Gnosis.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ CLNY on Gnosis Chain

___

### USDC

• **USDC** = ``"0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"``

USDC on Gnosis Chain

___

### XDAI

• **XDAI** = ``"0x0000000000000000000000000000000000000000"``
Expand Down
14 changes: 11 additions & 3 deletions packages/sdk/docs/api/enums/Tokens.Mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ Tokens deployed on Mainnet

## Enumeration Members

### CLNY

• **CLNY** = ``"0x3E828ac5C480069D4765654Fb4b8733b910b13b2"``

CLNY on Mainnet

___

### ETH

• **ETH** = ``"0x0000000000000000000000000000000000000000"``
Expand All @@ -14,8 +22,8 @@ ETH on Mainnet

___

### Mainnet
### USDC

• **Mainnet** = ``"0x3E828ac5C480069D4765654Fb4b8733b910b13b2"``
• **USDC** = ``"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"``

CLNY on Mainnet
USDC on Mainnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Interface: BridgeSetEventObject

[ColonyNetworkEvents](../modules/ColonyNetworkEvents.md).BridgeSetEventObject

## Properties

### bridgeAddress

• **bridgeAddress**: `string`
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ ___
| :------ | :------ |
| `AuctionCreated` | (`auction?`: ``null``, `token?`: ``null``, `quantity?`: ``null``) => [`AuctionCreatedEventFilter`](../modules/ColonyNetworkEvents.md#auctioncreatedeventfilter) |
| `AuctionCreated(address,address,uint256)` | (`auction?`: ``null``, `token?`: ``null``, `quantity?`: ``null``) => [`AuctionCreatedEventFilter`](../modules/ColonyNetworkEvents.md#auctioncreatedeventfilter) |
| `BridgeSet` | (`bridgeAddress?`: ``null``) => [`BridgeSetEventFilter`](../modules/ColonyNetworkEvents.md#bridgeseteventfilter) |
| `BridgeSet(address)` | (`bridgeAddress?`: ``null``) => [`BridgeSetEventFilter`](../modules/ColonyNetworkEvents.md#bridgeseteventfilter) |
| `ColonyAdded` | (`colonyId?`: ``null`` \| `BigNumberish`, `colonyAddress?`: ``null`` \| `string`, `token?`: ``null``) => [`ColonyAddedEventFilter`](../modules/ColonyNetworkEvents.md#colonyaddedeventfilter) |
| `ColonyAdded(uint256,address,address)` | (`colonyId?`: ``null`` \| `BigNumberish`, `colonyAddress?`: ``null`` \| `string`, `token?`: ``null``) => [`ColonyAddedEventFilter`](../modules/ColonyNetworkEvents.md#colonyaddedeventfilter) |
| `ColonyLabelRegistered` | (`colony?`: ``null`` \| `string`, `label?`: ``null``) => [`ColonyLabelRegisteredEventFilter`](../modules/ColonyNetworkEvents.md#colonylabelregisteredeventfilter) |
Expand Down Expand Up @@ -146,8 +148,22 @@ ___
| `ReputationMiningRewardSet(uint256)` | (`amount?`: ``null``) => [`ReputationMiningRewardSetEventFilter`](../modules/ColonyNetworkEvents.md#reputationminingrewardseteventfilter) |
| `ReputationRootHashSet` | (`newHash?`: ``null``, `newNNodes?`: ``null``, `stakers?`: ``null``, `reward?`: ``null``) => [`ReputationRootHashSetEventFilter`](../modules/ColonyNetworkEvents.md#reputationroothashseteventfilter) |
| `ReputationRootHashSet(bytes32,uint256,address[],uint256)` | (`newHash?`: ``null``, `newNNodes?`: ``null``, `stakers?`: ``null``, `reward?`: ``null``) => [`ReputationRootHashSetEventFilter`](../modules/ColonyNetworkEvents.md#reputationroothashseteventfilter) |
| `ReputationUpdateAddedFromBridge` | (`chainId?`: ``null``, `colony?`: ``null``, `updateNumber?`: ``null``) => [`ReputationUpdateAddedFromBridgeEventFilter`](../modules/ColonyNetworkEvents.md#reputationupdateaddedfrombridgeeventfilter) |
| `ReputationUpdateAddedFromBridge(uint256,address,uint256)` | (`chainId?`: ``null``, `colony?`: ``null``, `updateNumber?`: ``null``) => [`ReputationUpdateAddedFromBridgeEventFilter`](../modules/ColonyNetworkEvents.md#reputationupdateaddedfrombridgeeventfilter) |
| `ReputationUpdateSentToBridge` | (`colony?`: ``null``, `count?`: ``null``) => [`ReputationUpdateSentToBridgeEventFilter`](../modules/ColonyNetworkEvents.md#reputationupdatesenttobridgeeventfilter) |
| `ReputationUpdateSentToBridge(address,uint256)` | (`colony?`: ``null``, `count?`: ``null``) => [`ReputationUpdateSentToBridgeEventFilter`](../modules/ColonyNetworkEvents.md#reputationupdatesenttobridgeeventfilter) |
| `ReputationUpdateStored` | (`colony?`: ``null``, `count?`: ``null``) => [`ReputationUpdateStoredEventFilter`](../modules/ColonyNetworkEvents.md#reputationupdatestoredeventfilter) |
| `ReputationUpdateStored(address,uint256)` | (`colony?`: ``null``, `count?`: ``null``) => [`ReputationUpdateStoredEventFilter`](../modules/ColonyNetworkEvents.md#reputationupdatestoredeventfilter) |
| `ReputationUpdateStoredFromBridge` | (`chainId?`: ``null``, `colony?`: ``null``, `updateNumber?`: ``null``) => [`ReputationUpdateStoredFromBridgeEventFilter`](../modules/ColonyNetworkEvents.md#reputationupdatestoredfrombridgeeventfilter) |
| `ReputationUpdateStoredFromBridge(uint256,address,uint256)` | (`chainId?`: ``null``, `colony?`: ``null``, `updateNumber?`: ``null``) => [`ReputationUpdateStoredFromBridgeEventFilter`](../modules/ColonyNetworkEvents.md#reputationupdatestoredfrombridgeeventfilter) |
| `SkillAdded` | (`skillId?`: ``null``, `parentSkillId?`: ``null``) => [`SkillAddedEventFilter`](../modules/ColonyNetworkEvents.md#skilladdedeventfilter) |
| `SkillAdded(uint256,uint256)` | (`skillId?`: ``null``, `parentSkillId?`: ``null``) => [`SkillAddedEventFilter`](../modules/ColonyNetworkEvents.md#skilladdedeventfilter) |
| `SkillAddedFromBridge` | (`skillId?`: ``null``) => [`SkillAddedFromBridgeEventFilter`](../modules/ColonyNetworkEvents.md#skilladdedfrombridgeeventfilter) |
| `SkillAddedFromBridge(uint256)` | (`skillId?`: ``null``) => [`SkillAddedFromBridgeEventFilter`](../modules/ColonyNetworkEvents.md#skilladdedfrombridgeeventfilter) |
| `SkillCreationStored` | (`skillId?`: ``null``) => [`SkillCreationStoredEventFilter`](../modules/ColonyNetworkEvents.md#skillcreationstoredeventfilter) |
| `SkillCreationStored(uint256)` | (`skillId?`: ``null``) => [`SkillCreationStoredEventFilter`](../modules/ColonyNetworkEvents.md#skillcreationstoredeventfilter) |
| `SkillStoredFromBridge` | (`skillId?`: ``null``) => [`SkillStoredFromBridgeEventFilter`](../modules/ColonyNetworkEvents.md#skillstoredfrombridgeeventfilter) |
| `SkillStoredFromBridge(uint256)` | (`skillId?`: ``null``) => [`SkillStoredFromBridgeEventFilter`](../modules/ColonyNetworkEvents.md#skillstoredfrombridgeeventfilter) |
| `TokenAuthorityDeployed` | (`tokenAuthorityAddress?`: ``null``) => [`TokenAuthorityDeployedEventFilter`](../modules/ColonyNetworkEvents.md#tokenauthoritydeployedeventfilter) |
| `TokenAuthorityDeployed(address)` | (`tokenAuthorityAddress?`: ``null``) => [`TokenAuthorityDeployedEventFilter`](../modules/ColonyNetworkEvents.md#tokenauthoritydeployedeventfilter) |
| `TokenDeployed` | (`tokenAddress?`: ``null``) => [`TokenDeployedEventFilter`](../modules/ColonyNetworkEvents.md#tokendeployedeventfilter) |
Expand Down
Loading