diff options
author | Leonid <logvinov.leon@gmail.com> | 2017-09-29 00:18:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-29 00:18:19 +0800 |
commit | cbc9e87d65171ae01a844f160f0b47f790bc3524 (patch) | |
tree | 9722f4823738d5396de61d92c84ce8b3ef8402cf | |
parent | a0af2719963df3313b0eae40952203319ee1e64f (diff) | |
parent | db419ffcc76eb4e11f84aad3a51efe7fa900ef57 (diff) | |
download | dexon-sol-tools-cbc9e87d65171ae01a844f160f0b47f790bc3524.tar dexon-sol-tools-cbc9e87d65171ae01a844f160f0b47f790bc3524.tar.gz dexon-sol-tools-cbc9e87d65171ae01a844f160f0b47f790bc3524.tar.bz2 dexon-sol-tools-cbc9e87d65171ae01a844f160f0b47f790bc3524.tar.lz dexon-sol-tools-cbc9e87d65171ae01a844f160f0b47f790bc3524.tar.xz dexon-sol-tools-cbc9e87d65171ae01a844f160f0b47f790bc3524.tar.zst dexon-sol-tools-cbc9e87d65171ae01a844f160f0b47f790bc3524.zip |
Merge pull request #173 from 0xProject/feature/ropsten-support
Add Ropsten support
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | src/artifacts/EtherToken.json | 51 | ||||
-rw-r--r-- | src/artifacts/Exchange.json | 135 | ||||
-rw-r--r-- | src/artifacts/TokenRegistry.json | 171 | ||||
-rw-r--r-- | test/artifacts_test.ts | 17 | ||||
-rw-r--r-- | test/utils/constants.ts | 3 |
6 files changed, 377 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5adde941c..ac2588278 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +v0.18.1 - _September 28, 2017_ + * Added Ropsten testnet support (#173) + v0.18.0 - _September 26, 2017_ * Added `zeroEx.exchange.validateOrderFillableOrThrowAsync` to simplify orderbook pruning (#170) diff --git a/src/artifacts/EtherToken.json b/src/artifacts/EtherToken.json index 54b5a032e..91b23bc94 100644 --- a/src/artifacts/EtherToken.json +++ b/src/artifacts/EtherToken.json @@ -286,6 +286,57 @@ "updated_at": 1502488087000, "address": "0x2956356cd2a2bf3202f771f50d3d14a367b48070" }, + "3": { + "links": {}, + "events": { + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "name": "_spender", + "type": "address" + }, + { + "indexed": false, + "name": "_value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + }, + "updated_at": 1506602007000, + "address": "0xc00fd9820cd2898cc4c054b7bf142de637ad129a" + }, "42": { "links": {}, "events": { diff --git a/src/artifacts/Exchange.json b/src/artifacts/Exchange.json index 2445f13ad..734c8f9c7 100644 --- a/src/artifacts/Exchange.json +++ b/src/artifacts/Exchange.json @@ -725,6 +725,139 @@ "updated_at": 1502480340000, "address": "0x12459c951127e0c374ff9105dda097662a027093" }, + "3": { + "links": {}, + "events": { + "0x0d0b9391970d9a25552f37d436d2aae2925e2bfe1b2a923754bada030c498cb3": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "maker", + "type": "address" + }, + { + "indexed": false, + "name": "taker", + "type": "address" + }, + { + "indexed": true, + "name": "feeRecipient", + "type": "address" + }, + { + "indexed": false, + "name": "makerToken", + "type": "address" + }, + { + "indexed": false, + "name": "takerToken", + "type": "address" + }, + { + "indexed": false, + "name": "filledMakerTokenAmount", + "type": "uint256" + }, + { + "indexed": false, + "name": "filledTakerTokenAmount", + "type": "uint256" + }, + { + "indexed": false, + "name": "paidMakerFee", + "type": "uint256" + }, + { + "indexed": false, + "name": "paidTakerFee", + "type": "uint256" + }, + { + "indexed": true, + "name": "tokens", + "type": "bytes32" + }, + { + "indexed": false, + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "LogFill", + "type": "event" + }, + "0x67d66f160bc93d925d05dae1794c90d2d6d6688b29b84ff069398a9b04587131": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "maker", + "type": "address" + }, + { + "indexed": true, + "name": "feeRecipient", + "type": "address" + }, + { + "indexed": false, + "name": "makerToken", + "type": "address" + }, + { + "indexed": false, + "name": "takerToken", + "type": "address" + }, + { + "indexed": false, + "name": "cancelledMakerTokenAmount", + "type": "uint256" + }, + { + "indexed": false, + "name": "cancelledTakerTokenAmount", + "type": "uint256" + }, + { + "indexed": true, + "name": "tokens", + "type": "bytes32" + }, + { + "indexed": false, + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "LogCancel", + "type": "event" + }, + "0x36d86c59e00bd73dc19ba3adfe068e4b64ac7e92be35546adeddf1b956a87e90": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "errorId", + "type": "uint8" + }, + { + "indexed": true, + "name": "orderHash", + "type": "bytes32" + } + ], + "name": "LogError", + "type": "event" + } + }, + "updated_at": 1506602007000, + "address": "0x479cc461fecd078f766ecc58533d6f69580cf3ac" + }, "42": { "links": {}, "events": { @@ -994,4 +1127,4 @@ }, "schema_version": "0.0.5", "updated_at": 1503318938231 -}
\ No newline at end of file +} diff --git a/src/artifacts/TokenRegistry.json b/src/artifacts/TokenRegistry.json index e244a496a..5a0564a69 100644 --- a/src/artifacts/TokenRegistry.json +++ b/src/artifacts/TokenRegistry.json @@ -698,6 +698,175 @@ "updated_at": 1502488442000, "address": "0x926a74c5c36adf004c87399e65f75628b0f98d2c" }, + "3": { + "links": {}, + "events": { + "0xd8d928b0b50ca11d9dc273236b46f3526515b03602f71f3a6af4f45bd9fa9144": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "name", + "type": "string" + }, + { + "indexed": false, + "name": "symbol", + "type": "string" + }, + { + "indexed": false, + "name": "decimals", + "type": "uint8" + }, + { + "indexed": false, + "name": "ipfsHash", + "type": "bytes" + }, + { + "indexed": false, + "name": "swarmHash", + "type": "bytes" + } + ], + "name": "LogAddToken", + "type": "event" + }, + "0x32c54f1e2ea75844ded7517e7dbcd3895da7cd0c28f9ab9f9cf6ecf5f83762c6": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "name", + "type": "string" + }, + { + "indexed": false, + "name": "symbol", + "type": "string" + }, + { + "indexed": false, + "name": "decimals", + "type": "uint8" + }, + { + "indexed": false, + "name": "ipfsHash", + "type": "bytes" + }, + { + "indexed": false, + "name": "swarmHash", + "type": "bytes" + } + ], + "name": "LogRemoveToken", + "type": "event" + }, + "0x4a6dbfc867b179991dec22ff19960f0a94d8d9d891fc556f547764670340e8ae": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "oldName", + "type": "string" + }, + { + "indexed": false, + "name": "newName", + "type": "string" + } + ], + "name": "LogTokenNameChange", + "type": "event" + }, + "0x53d878a6530e56c9bc96548fa0a8cae4f1d1f49c86b0e934c086b992ebb6998f": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "oldSymbol", + "type": "string" + }, + { + "indexed": false, + "name": "newSymbol", + "type": "string" + } + ], + "name": "LogTokenSymbolChange", + "type": "event" + }, + "0x5b19f79ac4e8cfa820815502e11615f1a449e28155dc289ec5cac1a11f908694": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "oldIpfsHash", + "type": "bytes" + }, + { + "indexed": false, + "name": "newIpfsHash", + "type": "bytes" + } + ], + "name": "LogTokenIpfsHashChange", + "type": "event" + }, + "0xc3168fdc13112e44a031057dbf6c609b33353addb4d8037d24543e22cbfe2acd": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "oldSwarmHash", + "type": "bytes" + }, + { + "indexed": false, + "name": "newSwarmHash", + "type": "bytes" + } + ], + "name": "LogTokenSwarmHashChange", + "type": "event" + } + }, + "updated_at": 1506602007000, + "address": "0x6b1a50f0bb5a7995444bd3877b22dc89c62843ed" + }, "42": { "links": {}, "events": { @@ -1039,4 +1208,4 @@ }, "schema_version": "0.0.5", "updated_at": 1503318938228 -}
\ No newline at end of file +} diff --git a/test/artifacts_test.ts b/test/artifacts_test.ts index bd34a6b91..b2866a1d6 100644 --- a/test/artifacts_test.ts +++ b/test/artifacts_test.ts @@ -29,4 +29,21 @@ describe('Artifacts', () => { await zeroEx.exchange.getContractAddressAsync(); }).timeout(TIMEOUT); }); + describe('contracts are deployed on ropsten', () => { + const ropstenRpcUrl = constants.ROPSTEN_RPC_URL; + const packageJSONContent = fs.readFileSync('package.json', 'utf-8'); + const packageJSON = JSON.parse(packageJSONContent); + const mnemonic = packageJSON.config.mnemonic; + const web3Provider = new HDWalletProvider(mnemonic, ropstenRpcUrl); + const zeroEx = new ZeroEx(web3Provider); + it('token registry contract is deployed', async () => { + await (zeroEx.tokenRegistry as any)._getTokenRegistryContractAsync(); + }).timeout(TIMEOUT); + it('proxy contract is deployed', async () => { + await (zeroEx.token as any)._getTokenTransferProxyAddressAsync(); + }).timeout(TIMEOUT); + it('exchange contract is deployed', async () => { + await zeroEx.exchange.getContractAddressAsync(); + }).timeout(TIMEOUT); + }); }); diff --git a/test/utils/constants.ts b/test/utils/constants.ts index b677d7361..c7d3aebca 100644 --- a/test/utils/constants.ts +++ b/test/utils/constants.ts @@ -3,5 +3,6 @@ export const constants = { RPC_HOST: 'localhost', RPC_PORT: 8545, TESTRPC_NETWORK_ID: 50, - KOVAN_RPC_URL: 'https://kovan.0xproject.com', + KOVAN_RPC_URL: 'https://kovan.infura.io', + ROPSTEN_RPC_URL: 'https://ropsten.infura.io', }; |