diff options
author | Hsuan Lee <hsuan@cobinhood.com> | 2019-01-19 18:42:04 +0800 |
---|---|---|
committer | Hsuan Lee <hsuan@cobinhood.com> | 2019-01-19 18:42:04 +0800 |
commit | 7ae38906926dc09bc10670c361af0d2bf0050426 (patch) | |
tree | 5fb10ae366b987db09e4ddb4bc3ba0f75404ad08 /packages/contract-addresses | |
parent | b5fd3c72a08aaa6957917d74c333387a16edf66b (diff) | |
download | dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.gz dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.bz2 dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.lz dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.xz dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.zst dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.zip |
Update dependency packages
Diffstat (limited to 'packages/contract-addresses')
-rw-r--r-- | packages/contract-addresses/CHANGELOG.json | 73 | ||||
-rw-r--r-- | packages/contract-addresses/CHANGELOG.md | 35 | ||||
-rw-r--r-- | packages/contract-addresses/README.md | 68 | ||||
-rw-r--r-- | packages/contract-addresses/package.json | 37 | ||||
-rw-r--r-- | packages/contract-addresses/src/index.ts | 98 | ||||
-rw-r--r-- | packages/contract-addresses/tsconfig.json | 8 | ||||
-rw-r--r-- | packages/contract-addresses/tslint.json | 3 |
7 files changed, 0 insertions, 322 deletions
diff --git a/packages/contract-addresses/CHANGELOG.json b/packages/contract-addresses/CHANGELOG.json deleted file mode 100644 index 8800f2f73..000000000 --- a/packages/contract-addresses/CHANGELOG.json +++ /dev/null @@ -1,73 +0,0 @@ -[ - { - "version": "2.2.0", - "changes": [ - { - "note": "Added migration for `MultiAssetProxy` contract", - "pr": 1503 - } - ], - "timestamp": 1547561734 - }, - { - "version": "2.1.0", - "changes": [ - { - "note": "Added testnet entries for Dutch Auction contract (kovan,rinkeby,ropsten)", - "pr": 1465 - } - ], - "timestamp": 1547040760 - }, - { - "version": "2.0.0", - "changes": [ - { - "note": "Redeployed Rinkeby with testnet Exchange artifact", - "pr": 1318 - }, - { - "note": "Added Ganache snapshot addresses for network 50", - "pr": 1318 - } - ], - "timestamp": 1543401373 - }, - { - "version": "1.2.0", - "changes": [ - { - "note": "Rinkeby Deployment" - } - ], - "timestamp": 1542821676 - }, - { - "version": "1.1.0", - "changes": [ - { - "pr": 1192, - "note": "Update Forwarder addresses" - } - ], - "timestamp": 1541740904 - }, - { - "version": "1.0.1", - "changes": [ - { - "pr": 1105, - "note": "Initial release" - } - ], - "timestamp": 1539871071 - }, - { - "version": "1.0.0", - "changes": [ - { - "note": "Unpublished Package" - } - ] - } -] diff --git a/packages/contract-addresses/CHANGELOG.md b/packages/contract-addresses/CHANGELOG.md deleted file mode 100644 index 1f3d187a4..000000000 --- a/packages/contract-addresses/CHANGELOG.md +++ /dev/null @@ -1,35 +0,0 @@ -<!-- -changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly. -Edit the package's CHANGELOG.json file only. ---> - -CHANGELOG - -## v2.2.0 - _January 15, 2019_ - - * Added migration for `MultiAssetProxy` contract (#1503) - -## v2.1.0 - _January 9, 2019_ - - * Added testnet entries for Dutch Auction contract (kovan,rinkeby,ropsten) (#1465) - -## v2.0.0 - _November 28, 2018_ - - * Redeployed Rinkeby with testnet Exchange artifact (#1318) - * Added Ganache snapshot addresses for network 50 (#1318) - -## v1.2.0 - _November 21, 2018_ - - * Rinkeby Deployment - -## v1.1.0 - _November 9, 2018_ - - * Update Forwarder addresses (#1192) - -## v1.0.1 - _October 18, 2018_ - - * Initial release (#1105) - -## v1.0.0 - _Invalid date_ - - * Unpublished Package diff --git a/packages/contract-addresses/README.md b/packages/contract-addresses/README.md deleted file mode 100644 index a4040cb54..000000000 --- a/packages/contract-addresses/README.md +++ /dev/null @@ -1,68 +0,0 @@ -## @0x/contract-addresses - -A tiny utility library for getting known deployed contract addresses for a -particular network. - -## Installation - -```bash -yarn add @0x/contract-addresses -``` - -**Import** - -```typescript -import { getContractAddressesForNetworkOrThrow } from '@0x/contract-addresses'; -``` - -or - -```javascript -var getContractAddressesForNetworkOrThrow = require('@0x/contract-addresses').getContractAddressesForNetworkOrThrow; -``` - -## Contributing - -We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. - -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. - -### Install dependencies - -If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: - -```bash -yarn config set workspaces-experimental true -``` - -Then install dependencies - -```bash -yarn install -``` - -### Build - -To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: - -```bash -PKG=@0x/contract-addresses yarn build -``` - -### Clean - -```bash -yarn clean -``` - -### Lint - -```bash -yarn lint -``` - -### Run Tests - -```bash -yarn test -``` diff --git a/packages/contract-addresses/package.json b/packages/contract-addresses/package.json deleted file mode 100644 index 260322081..000000000 --- a/packages/contract-addresses/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "@0x/contract-addresses", - "version": "2.2.0", - "engines": { - "node": ">=6.12" - }, - "description": "Used to get known addresses of deployed 0x contracts", - "main": "lib/src/index.js", - "directories": { - "test": "test" - }, - "scripts": { - "build": "yarn tsc -b", - "build:ci": "yarn build", - "clean": "shx rm -rf lib" - }, - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x-monorepo.git" - }, - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/0xProject/0x-monorepo/issues" - }, - "homepage": "https://github.com/0xProject/0x-monorepo/packages/contract-addresses/README.md", - "devDependencies": { - "@types/lodash": "4.14.104", - "shx": "^0.2.2", - "typescript": "3.0.1" - }, - "dependencies": { - "lodash": "^4.17.5" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/packages/contract-addresses/src/index.ts b/packages/contract-addresses/src/index.ts deleted file mode 100644 index 4f580e825..000000000 --- a/packages/contract-addresses/src/index.ts +++ /dev/null @@ -1,98 +0,0 @@ -import * as _ from 'lodash'; - -export interface ContractAddresses { - erc20Proxy: string; - erc721Proxy: string; - zrxToken: string; - etherToken: string; - exchange: string; - assetProxyOwner: string; - forwarder: string; - orderValidator: string; - dutchAuction: string; -} - -export enum NetworkId { - Mainnet = 1, - Ropsten = 3, - Rinkeby = 4, - Kovan = 42, - Ganache = 50, -} - -const NULL_ADDRESS = '0x0000000000000000000000000000000000000000'; - -const networkToAddresses: { [networkId: number]: ContractAddresses } = { - 1: { - erc20Proxy: '0x2240dab907db71e64d3e0dba4800c83b5c502d4e', - erc721Proxy: '0x208e41fb445f1bb1b6780d58356e81405f3e6127', - zrxToken: '0xe41d2489571d322189246dafa5ebde1f4699f498', - etherToken: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', - exchange: '0x4f833a24e1f95d70f028921e27040ca56e09ab0b', - assetProxyOwner: '0x17992e4ffb22730138e4b62aaa6367fa9d3699a6', - forwarder: '0x5468a1dc173652ee28d249c271fa9933144746b1', - orderValidator: '0x9463e518dea6810309563c81d5266c1b1d149138', - // @todo hysz/dekz: Add mainnet address once deployed. - dutchAuction: NULL_ADDRESS, - }, - 3: { - erc20Proxy: '0xb1408f4c245a23c31b98d2c626777d4c0d766caa', - erc721Proxy: '0xe654aac058bfbf9f83fcaee7793311dd82f6ddb4', - zrxToken: '0xff67881f8d12f372d91baae9752eb3631ff0ed00', - etherToken: '0xc778417e063141139fce010982780140aa0cd5ab', - exchange: '0x4530c0483a1633c7a1c97d2c53721caff2caaaaf', - assetProxyOwner: '0xf5fa5b5fed2727a0e44ac67f6772e97977aa358b', - forwarder: '0x2240dab907db71e64d3e0dba4800c83b5c502d4e', - orderValidator: '0x90431a90516ab49af23a0530e04e8c7836e7122f', - dutchAuction: '0x2df6b59309f35ada230ec7d61d7d97355017a1df', - }, - 4: { - exchange: '0xbce0b5f6eb618c565c3e5f5cd69652bbc279f44e', - erc20Proxy: '0x2f5ae4f6106e89b4147651688a92256885c5f410', - erc721Proxy: '0x7656d773e11ff7383a14dcf09a9c50990481cd10', - zrxToken: '0x8080c7e4b81ecf23aa6f877cfbfd9b0c228c6ffa', - etherToken: '0xc778417e063141139fce010982780140aa0cd5ab', - assetProxyOwner: '0xe1703da878afcebff5b7624a826902af475b9c03', - forwarder: '0x2d40589abbdee84961f3a7656b9af7adb0ee5ab4', - orderValidator: '0x0c5173a51e26b29d6126c686756fb9fbef71f762', - dutchAuction: '0xdd7bd6437e67c422879364740ab5855fe3dc41f7', - }, - 42: { - erc20Proxy: '0xf1ec01d6236d3cd881a0bf0130ea25fe4234003e', - erc721Proxy: '0x2a9127c745688a165106c11cd4d647d2220af821', - zrxToken: '0x2002d3812f58e35f0ea1ffbf80a75a38c32175fa', - etherToken: '0xd0a1e359811322d97991e03f863a0c30c2cf029c', - exchange: '0x35dd2932454449b14cee11a94d3674a936d5d7b2', - assetProxyOwner: '0x2c824d2882baa668e0d5202b1e7f2922278703f8', - forwarder: '0x17992e4ffb22730138e4b62aaa6367fa9d3699a6', - orderValidator: '0xb389da3d204b412df2f75c6afb3d0a7ce0bc283d', - dutchAuction: '0xe11667fb51f34c5367f40d7e379327ce32ee7150', - }, - // NetworkId 50 represents our Ganache snapshot generated from migrations. - 50: { - erc20Proxy: '0x1dc4c1cefef38a777b15aa20260a54e584b16c48', - erc721Proxy: '0x1d7022f5b17d2f8b695918fb48fa1089c9f85401', - zrxToken: '0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c', - etherToken: '0x0b1ba0af832d7c05fd64161e0db78e85978e8082', - exchange: '0x48bacb9266a570d521063ef5dd96e61686dbe788', - assetProxyOwner: '0x04b5dadd2c0d6a261bfafbc964e0cac48585def3', - forwarder: '0x6000eca38b8b5bba64986182fe2a69c57f6b5414', - orderValidator: '0x32eecaf51dfea9618e9bc94e9fbfddb1bbdcba15', - dutchAuction: '0x7e3f4e1deb8d3a05d9d2da87d9521268d0ec3239', - }, -}; - -/** - * Used to get addresses of contracts that have been deployed to either the - * Ethereum mainnet or a supported testnet. Throws if there are no known - * contracts deployed on the corresponding network. - * @param networkId The desired networkId. - * @returns The set of addresses for contracts which have been deployed on the - * given networkId. - */ -export function getContractAddressesForNetworkOrThrow(networkId: NetworkId): ContractAddresses { - if (_.isUndefined(networkToAddresses[networkId])) { - throw new Error(`Unknown network id (${networkId}). No known 0x contracts have been deployed on this network.`); - } - return networkToAddresses[networkId]; -} diff --git a/packages/contract-addresses/tsconfig.json b/packages/contract-addresses/tsconfig.json deleted file mode 100644 index 233008d61..000000000 --- a/packages/contract-addresses/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig", - "compilerOptions": { - "outDir": "lib", - "rootDir": "." - }, - "include": ["./src/**/*"] -} diff --git a/packages/contract-addresses/tslint.json b/packages/contract-addresses/tslint.json deleted file mode 100644 index dd9053357..000000000 --- a/packages/contract-addresses/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["@0x/tslint-config"] -} |