Compare commits

...

40 Commits

Author SHA1 Message Date
Fabio Berger
3e70ab015b Publish
- 0x.js@1.0.3
 - @0xproject/connect@2.0.1
 - @0xproject/contract-wrappers@1.0.3
 - contracts@2.1.44
 - @0xproject/fill-scenarios@1.0.2
 - @0xproject/forwarder-helper@1.0.3
 - @0xproject/migrations@1.0.9
 - @0xproject/order-utils@1.0.2
 - @0xproject/order-watcher@1.0.3
 - @0xproject/testnet-faucets@1.0.46
 - @0xproject/website@0.0.49
2018-09-19 16:13:24 +01:00
Fabio Berger
dab7f1a739 Updated CHANGELOGS 2018-09-19 16:13:15 +01:00
Fabio Berger
f6438725eb Update changelog entries 2018-09-19 15:59:17 +01:00
Fabio Berger
83ffbd05be Merge pull request #1074 from 0xProject/reduceBundleSizes
Reduce published packages bundle sizes
2018-09-19 14:50:01 +01:00
Fabio Berger
88be6b5e0d Add back in evm.bytecode.object since it's needed to generate contract-wrappers 2018-09-19 13:55:09 +01:00
Fabio Berger
aa47f85f48 Make higher-order packages copy over trimmed down artifacts 2018-09-19 12:57:45 +01:00
Fabio Berger
fec9c8f1c6 Create trimmed artifacts of v2 contracts 2018-09-19 12:53:00 +01:00
Fabio Berger
e2559798df Publish
- 0x.js@1.0.2
 - @0xproject/contract-wrappers@1.0.2
 - @0xproject/forwarder-helper@1.0.2
 - @0xproject/migrations@1.0.8
 - @0xproject/order-watcher@1.0.2
 - @0xproject/testnet-faucets@1.0.45
 - @0xproject/website@0.0.48
2018-09-18 11:18:28 +01:00
Fabio Berger
ccc18620bf Updated CHANGELOGS 2018-09-18 11:18:19 +01:00
Fabio Berger
febe00db4f Merge pull request #1072 from 0xProject/addMissingEtherTokenConfig
Add missing mainnet addresses to ZRXToken & WETH artifacts
2018-09-18 11:05:28 +01:00
Fabio Berger
6f36048a8e Add CHANGELOG entries about bug fix 2018-09-18 10:43:18 +01:00
Fabio Berger
2457ecb7e7 Add missing mainnet addresses to ZRXToken & WETH artifacts 2018-09-18 10:29:27 +01:00
Jacob Evans
2378747570 Merge pull request #1063 from 0xProject/feature/0x.js/update-readme-import
0xjs README/website docs update
2018-09-17 23:59:27 +02:00
Jacob Evans
2df569b727 Folder 1.0.0 -> 1.0.1 2018-09-17 21:33:50 +00:00
Jacob Evans
65aecc0024 Rename to v1->v0 v2->v1 2018-09-17 23:23:27 +02:00
Fabio Berger
074082ec94 Fix forwarder package.json 2018-09-17 12:53:05 +01:00
Fabio Berger
6b9f0af828 Add 0x.js 2.0.0 async and installation sections 2018-09-17 12:52:25 +01:00
Fabio Berger
bfabf765e3 Update decoration error 2018-09-17 12:52:12 +01:00
Fabio Berger
e74f736eff Update 0x.js README 2018-09-17 12:52:04 +01:00
Fabio Berger
45483557a5 Remove doc commands from forwarder-helper package for now 2018-09-17 12:45:27 +01:00
Alex Browne
07942a7aec Merge pull request #1061 from 0xProject/feature/ci-resource-classes
Bump CircleCI resource class for build and test-publish
2018-09-13 14:49:11 +02:00
Jacob Evans
3d1b7c10e8 Remove note about RC versions 2018-09-13 14:32:46 +02:00
Jacob Evans
cf46d2c704 0xjs README/website docs update 2018-09-13 13:58:05 +02:00
Alex Browne
4434856add Bump CircleCI resource class for build and test-publish 2018-09-12 17:23:11 +02:00
fragosti
52d511df21 Change Davids description 2018-09-12 11:53:11 +02:00
fragosti
50f58f9121 Add images for David Sacks and Gene 2018-09-12 11:48:03 +02:00
fragosti
7a20c7b946 Fix David Sacks links 2018-09-12 11:46:42 +02:00
fragosti
ce0e60ed84 Merge branch 'feature/website/add-gene' into development 2018-09-12 11:43:16 +02:00
fragosti
4ad0a6c7b7 Add david sacks 2018-09-12 11:42:58 +02:00
fragosti
b8d8651e43 Add Gene info to website 2018-09-12 11:16:13 +02:00
Francesco Agosti
45b68832aa Merge pull request #1064 from 0xProject/patch/website/new-token-addresses
[website] Fix minting for new tokens on testnets
2018-09-07 16:12:50 +02:00
fragosti
6dfcaaf889 Clear localstorage 2018-09-07 13:12:53 +02:00
fragosti
8131c5d6bc Fix minting for new tokens on testnets 2018-09-07 13:05:11 +02:00
Amir Bandeali
df5779b6d1 Link bug bounty section to wiki 2018-09-05 12:10:39 -07:00
Amir Bandeali
4a5a0c8c78 Update README with directory structure and bug bounty 2018-09-05 11:37:48 -07:00
Jacob Evans
b3a17624c8 Merge pull request #1060 from 0xProject/feature/testnet-faucets/v2
[testnet-faucets] update to v2
2018-09-05 18:33:50 +01:00
Jacob Evans
e63841a604 Check token exists for network for user params 2018-09-05 18:11:57 +01:00
Jacob Evans
7ec95e8c29 Remove unused name and symbol 2018-09-05 16:04:52 +01:00
Jacob Evans
b217495465 Floor expiration time 2018-09-05 15:57:40 +01:00
Jacob Evans
db6ddc0c4b [testnet-faucets] update to v2 2018-09-05 15:13:21 +01:00
72 changed files with 6670 additions and 256 deletions

View File

@@ -2,6 +2,7 @@ version: 2
jobs:
build:
resource_class: medium+
docker:
- image: circleci/node:9
environment:
@@ -60,6 +61,7 @@ jobs:
# initialized
- run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test contracts
test-publish:
resource_class: medium+
docker:
- image: circleci/node:9
- image: verdaccio/verdaccio

View File

@@ -1,4 +1,22 @@
[
{
"version": "1.0.3",
"changes": [
{
"note": "Drastically reduce the bundle size by removing unused parts of included contract artifacts."
}
],
"timestamp": 1537369748
},
{
"version": "1.0.2",
"changes": [
{
"note": "Add ZRX & WETH mainnet contract addresses into the included artifacts"
}
],
"timestamp": 1537265493
},
{
"timestamp": 1536142250,
"version": "1.0.1",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.3 - _September 19, 2018_
* Drastically reduce the bundle size by removing unused parts of included contract artifacts.
## v1.0.2 - _September 18, 2018_
* Add ZRX & WETH mainnet contract addresses into the included artifacts
## v1.0.1 - _September 5, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
## 0x.js
A TypeScript/Javascript library for interacting with the 0x protocol.
A TypeScript/Javascript library for interacting with the 0x protocol. It is a high level package which combines a number of underlying packages such as order-utils and order-watcher.
### Read the [Documentation](https://0xproject.com/docs/0x.js).
@@ -19,7 +19,14 @@ npm install 0x.js --save
**Import**
```javascript
import { ZeroEx } from '0x.js';
import {
assetDataUtils,
BigNumber,
ContractWrappers,
generatePseudoRandomSalt,
orderHashUtils,
signatureUtils,
} from '0x.js';
```
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:

View File

@@ -1,6 +1,6 @@
{
"name": "0x.js",
"version": "1.0.1",
"version": "1.0.3",
"engines": {
"node": ">=6.12"
},
@@ -43,7 +43,7 @@
"devDependencies": {
"@0xproject/abi-gen": "^1.0.8",
"@0xproject/dev-utils": "^1.0.7",
"@0xproject/migrations": "^1.0.7",
"@0xproject/migrations": "^1.0.9",
"@0xproject/monorepo-scripts": "^1.0.8",
"@0xproject/tslint-config": "^1.0.7",
"@types/lodash": "4.14.104",
@@ -75,9 +75,9 @@
"dependencies": {
"@0xproject/assert": "^1.0.8",
"@0xproject/base-contract": "^2.0.2",
"@0xproject/contract-wrappers": "^1.0.1",
"@0xproject/order-utils": "^1.0.1",
"@0xproject/order-watcher": "^1.0.1",
"@0xproject/contract-wrappers": "^1.0.3",
"@0xproject/order-utils": "^1.0.2",
"@0xproject/order-watcher": "^1.0.3",
"@0xproject/subproviders": "^2.0.2",
"@0xproject/types": "^1.0.1",
"@0xproject/typescript-typings": "^2.0.0",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1537369748,
"version": "2.0.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "2.0.0",
"changes": [

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.0.1 - _September 19, 2018_
* Dependencies updated
## v2.0.0 - _September 5, 2018_
* Change `OrderConfigRequest` to use BigNumber instead of string for relevant fields. (#1058)

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/connect",
"version": "2.0.0",
"version": "2.0.1",
"engines": {
"node": ">=6.12"
},
@@ -45,7 +45,7 @@
"dependencies": {
"@0xproject/assert": "^1.0.8",
"@0xproject/json-schemas": "^1.0.1",
"@0xproject/order-utils": "^1.0.1",
"@0xproject/order-utils": "^1.0.2",
"@0xproject/types": "^1.0.1",
"@0xproject/typescript-typings": "^2.0.0",
"@0xproject/utils": "^1.0.8",

View File

@@ -1,4 +1,22 @@
[
{
"version": "1.0.3",
"changes": [
{
"note": "Drastically reduce the bundle size by removing unused parts of included contract artifacts."
}
],
"timestamp": 1537369748
},
{
"version": "1.0.2",
"changes": [
{
"note": "Add ZRX & WETH mainnet contract addresses into the included artifacts"
}
],
"timestamp": 1537265493
},
{
"version": "1.0.1",
"changes": [

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.3 - _September 19, 2018_
* Drastically reduce the bundle size by removing unused parts of included contract artifacts.
## v1.0.2 - _September 18, 2018_
* Add ZRX & WETH mainnet contract addresses into the included artifacts
## v1.0.1 - _September 5, 2018_
* Add `OrderValidatorWrapper`

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/contract-wrappers",
"version": "1.0.1",
"version": "1.0.3",
"description": "Smart TS wrappers for 0x smart contracts",
"keywords": [
"0xproject",
@@ -20,7 +20,7 @@
"rebuild_and_test": "run-s build test",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"update_artifacts": "for i in ${npm_package_config_contracts_v2}; do copyfiles -u 4 ../migrations/artifacts/2.0.0/$i.json src/artifacts; done;",
"update_artifacts": "for i in ${npm_package_config_contracts_v2}; do copyfiles -u 4 ../migrations/artifacts/2.0.0-trimmed/$i.json src/artifacts; done;",
"copy_artifacts": "copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts",
"clean": "shx rm -rf _bundles lib test_temp test/artifacts src/contract_wrappers/generated src/artifacts generated_docs",
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit",
@@ -43,7 +43,7 @@
"devDependencies": {
"@0xproject/abi-gen": "^1.0.8",
"@0xproject/dev-utils": "^1.0.7",
"@0xproject/migrations": "^1.0.7",
"@0xproject/migrations": "^1.0.9",
"@0xproject/subproviders": "^2.0.2",
"@0xproject/tslint-config": "^1.0.7",
"@types/lodash": "4.14.104",
@@ -74,9 +74,9 @@
"dependencies": {
"@0xproject/assert": "^1.0.8",
"@0xproject/base-contract": "^2.0.2",
"@0xproject/fill-scenarios": "^1.0.1",
"@0xproject/fill-scenarios": "^1.0.2",
"@0xproject/json-schemas": "^1.0.1",
"@0xproject/order-utils": "^1.0.1",
"@0xproject/order-utils": "^1.0.2",
"@0xproject/types": "^1.0.1",
"@0xproject/typescript-typings": "^2.0.0",
"@0xproject/utils": "^1.0.8",

View File

@@ -24,7 +24,7 @@ const contractCallErrorTransformer = (error: Error) => {
const schemaErrorTransformer = (error: Error) => {
if (_.includes(error.message, constants.INVALID_TAKER_FORMAT)) {
const errMsg =
'Order taker must be of type string. If you want anyone to be able to fill an order - pass ZeroEx.NULL_ADDRESS';
'Order taker must be of type string. If you want anyone to be able to fill an order - pass NULL_ADDRESS';
return new Error(errMsg);
}
return error;

View File

@@ -1,14 +1,35 @@
## Contracts
Smart contracts that implement the 0x protocol.
Smart contracts that implement the 0x protocol. Addresses of the deployed contracts can be found [here](https://0xproject.com/wiki#Deployed-Addresses).
## Usage
* [Docs](https://0xproject.com/docs/contracts)
* [Overview of 0x protocol architecture](https://0xproject.com/wiki#Architecture)
* [0x smart contract interactions](https://0xproject.com/wiki#Contract-Interactions)
* [Deployed smart contract addresses](https://0xproject.com/wiki#Deployed-Addresses)
* [0x protocol message format](https://0xproject.com/wiki#Message-Format)
### 2.0.0
Contracts that make up and interact with version 2.0.0 of the protocol can be found in the `src/2.0.0` directory. The contents of this directory are broken down into the following subdirectories:
* protocol
* This directory contains the contracts that make up version 2.0.0. A full specification can be found [here](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md).
* extensions
* This directory contains contracts that interact with the 2.0.0 contracts and will be used in production, such as the [Forwarder](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/forwarder-specification.md) contract.
* examples
* This directory contains example implementations of contracts that interact with the protocol but are _not_ intended for use in production. Examples include [filter](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#filter-contracts) contracts, a [Wallet](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#wallet) contract, and a [Validator](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#validator) contract, among others.
* tokens
* This directory contains implementations of different tokens and token standards, including [wETH](https://weth.io/), ZRX, [ERC20](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md), and [ERC721](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md).
* multisig
* This directory contains the [Gnosis MultiSigWallet](https://github.com/gnosis/MultiSigWallet) and a custom extension that adds a timelock to transactions within the MultiSigWallet.
* utils
* This directory contains libraries and utils that are shared across all of the other directories.
* test
* This directory contains mocks and other contracts that are used solely for testing contracts within the other directories.
### 1.0.0
Contracts that make up version 1.0.0 of the protocol can be found in `src/1.0.0`. These contracts are considered deprecated and will have limited support going forward.
## Bug bounty
A bug bounty for the 2.0.0 contracts is ongoing! Instructions can be found [here](https://0xproject.com/wiki#Bug-Bounty).
## Contributing

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "contracts",
"version": "2.1.43",
"version": "2.1.44",
"engines": {
"node": ">=6.12"
},
@@ -73,7 +73,7 @@
},
"dependencies": {
"@0xproject/base-contract": "^2.0.2",
"@0xproject/order-utils": "^1.0.1",
"@0xproject/order-utils": "^1.0.2",
"@0xproject/types": "^1.0.1",
"@0xproject/typescript-typings": "^2.0.0",
"@0xproject/utils": "^1.0.8",

View File

@@ -1,4 +1,13 @@
[
{
"version": "1.0.2",
"changes": [
{
"note": "Drastically reduce the bundle size by removing unused parts of included contract artifacts."
}
],
"timestamp": 1537369748
},
{
"timestamp": 1536142250,
"version": "1.0.1",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.2 - _September 19, 2018_
* Drastically reduce the bundle size by removing unused parts of included contract artifacts.
## v1.0.1 - _September 5, 2018_
* Dependencies updated

View File

@@ -1,13 +1,13 @@
{
"name": "@0xproject/fill-scenarios",
"version": "1.0.1",
"version": "1.0.2",
"description": "0x order fill scenario generator",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"build": "yarn pre_build && tsc -b",
"pre_build": "run-s update_artifacts generate_contract_wrappers",
"update_artifacts": "for i in ${npm_package_config_contracts}; do copyfiles -u 4 ../migrations/artifacts/2.0.0/$i.json lib/artifacts; done;",
"update_artifacts": "for i in ${npm_package_config_contracts}; do copyfiles -u 4 ../migrations/artifacts/2.0.0-trimmed/$i.json lib/artifacts; done;",
"generate_contract_wrappers": "abi-gen --abis 'lib/artifacts/@(Exchange|DummyERC20Token|DummyERC721Token).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers",
"copy_monorepo_scripts": "copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib src/generated_contract_wrappers",
@@ -38,7 +38,7 @@
},
"dependencies": {
"@0xproject/base-contract": "^2.0.2",
"@0xproject/order-utils": "^1.0.1",
"@0xproject/order-utils": "^1.0.2",
"@0xproject/types": "^1.0.1",
"@0xproject/typescript-typings": "^2.0.0",
"@0xproject/utils": "^1.0.8",

View File

@@ -1,4 +1,22 @@
[
{
"timestamp": 1537369748,
"version": "1.0.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1537265493,
"version": "1.0.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1536142250,
"version": "1.0.1",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.3 - _September 19, 2018_
* Dependencies updated
## v1.0.2 - _September 18, 2018_
* Dependencies updated
## v1.0.1 - _September 5, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/forwarder-helper",
"version": "1.0.1",
"version": "1.0.3",
"engines": {
"node": ">=6.12"
},
@@ -18,10 +18,7 @@
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit",
"clean": "shx rm -rf lib test_temp scripts",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
"docs:stage": "node scripts/stage_docs.js",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES",
"upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json"
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
},
"config": {
"postpublish": {
@@ -41,7 +38,7 @@
"dependencies": {
"@0xproject/assert": "^1.0.8",
"@0xproject/json-schemas": "^1.0.1",
"@0xproject/order-utils": "^1.0.1",
"@0xproject/order-utils": "^1.0.2",
"@0xproject/types": "^1.0.1",
"@0xproject/typescript-typings": "^2.0.0",
"@0xproject/utils": "^1.0.8",

View File

@@ -1,4 +1,22 @@
[
{
"timestamp": 1537369748,
"version": "1.0.9",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1537265493,
"version": "1.0.8",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1536142250,
"version": "1.0.7",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.9 - _September 19, 2018_
* Dependencies updated
## v1.0.8 - _September 18, 2018_
* Dependencies updated
## v1.0.7 - _September 5, 2018_
* Dependencies updated

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,189 @@
{
"schemaVersion": "2.0.0",
"contractName": "ERC20Token",
"compilerOutput": {
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"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"
},
{
"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"
}
],
"evm": {
"bytecode": {
"linkReferences": {},
"object":
"0x608060405234801561001057600080fd5b506106a0806100206000396000f3006080604052600436106100775763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461007c57806318160ddd146100c157806323b872dd146100e857806370a082311461011f578063a9059cbb1461014d578063dd62ed3e1461017e575b600080fd5b34801561008857600080fd5b506100ad73ffffffffffffffffffffffffffffffffffffffff600435166024356101b2565b604080519115158252519081900360200190f35b3480156100cd57600080fd5b506100d6610225565b60408051918252519081900360200190f35b3480156100f457600080fd5b506100ad73ffffffffffffffffffffffffffffffffffffffff6004358116906024351660443561022b565b34801561012b57600080fd5b506100d673ffffffffffffffffffffffffffffffffffffffff60043516610487565b34801561015957600080fd5b506100ad73ffffffffffffffffffffffffffffffffffffffff600435166024356104af565b34801561018a57600080fd5b506100d673ffffffffffffffffffffffffffffffffffffffff6004358116906024351661063c565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60025490565b73ffffffffffffffffffffffffffffffffffffffff83166000908152602081905260408120548211156102bf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45524332305f494e53554646494349454e545f42414c414e4345000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260016020908152604080832033845290915290205482111561035e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45524332305f494e53554646494349454e545f414c4c4f57414e434500000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205482810110156103f457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff80841660008181526020818152604080832080548801905593881680835284832080548890039055600182528483203384528252918490208054879003905583518681529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b3360009081526020819052604081205482111561052d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f45524332305f494e53554646494349454e545f42414c414e4345000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205482810110156105c357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b336000818152602081815260408083208054879003905573ffffffffffffffffffffffffffffffffffffffff871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600160209081526040808320939094168252919091522054905600a165627a7a72305820203a592c9390a8a005821d7dffa1c27ae97bf827d8ef17cfee3a8a70776b22d90029"
}
}
},
"networks": {}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,41 @@
{
"schemaVersion": "2.0.0",
"contractName": "IValidator",
"compilerOutput": {
"abi": [
{
"constant": true,
"inputs": [
{
"name": "hash",
"type": "bytes32"
},
{
"name": "signerAddress",
"type": "address"
},
{
"name": "signature",
"type": "bytes"
}
],
"name": "isValidSignature",
"outputs": [
{
"name": "isValid",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"evm": {
"bytecode": {
"object": "0x"
}
}
},
"networks": {}
}

View File

@@ -0,0 +1,37 @@
{
"schemaVersion": "2.0.0",
"contractName": "IWallet",
"compilerOutput": {
"abi": [
{
"constant": true,
"inputs": [
{
"name": "hash",
"type": "bytes32"
},
{
"name": "signature",
"type": "bytes"
}
],
"name": "isValidSignature",
"outputs": [
{
"name": "isValid",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"evm": {
"bytecode": {
"object": "0x"
}
}
},
"networks": {}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,314 @@
{
"schemaVersion": "2.0.0",
"contractName": "WETH9",
"compilerOutput": {
"abi": [
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "guy",
"type": "address"
},
{
"name": "wad",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "src",
"type": "address"
},
{
"name": "dst",
"type": "address"
},
{
"name": "wad",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "wad",
"type": "uint256"
}
],
"name": "withdraw",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "decimals",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "symbol",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "dst",
"type": "address"
},
{
"name": "wad",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "deposit",
"outputs": [],
"payable": true,
"stateMutability": "payable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
},
{
"name": "",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
},
{
"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"
},
{
"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"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Deposit",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Withdrawal",
"type": "event"
}
],
"evm": {
"bytecode": {
"linkReferences": {},
"object":
"0x60c0604052600d60808190527f577261707065642045746865720000000000000000000000000000000000000060a090815261003e91600091906100a3565b506040805180820190915260048082527f57455448000000000000000000000000000000000000000000000000000000006020909201918252610083916001916100a3565b506002805460ff1916601217905534801561009d57600080fd5b5061013e565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100e457805160ff1916838001178555610111565b82800160010185558215610111579182015b828111156101115782518255916020019190600101906100f6565b5061011d929150610121565b5090565b61013b91905b8082111561011d5760008155600101610127565b90565b6107688061014d6000396000f3006080604052600436106100ae5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100b8578063095ea7b31461014257806318160ddd1461018757806323b872dd146101ae5780632e1a7d4d146101e5578063313ce567146101fd57806370a082311461022857806395d89b4114610256578063a9059cbb1461026b578063d0e30db0146100ae578063dd62ed3e1461029c575b6100b66102d0565b005b3480156100c457600080fd5b506100cd61031f565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101075781810151838201526020016100ef565b50505050905090810190601f1680156101345780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561014e57600080fd5b5061017373ffffffffffffffffffffffffffffffffffffffff600435166024356103cb565b604080519115158252519081900360200190f35b34801561019357600080fd5b5061019c61043e565b60408051918252519081900360200190f35b3480156101ba57600080fd5b5061017373ffffffffffffffffffffffffffffffffffffffff60043581169060243516604435610443565b3480156101f157600080fd5b506100b66004356105e3565b34801561020957600080fd5b50610212610678565b6040805160ff9092168252519081900360200190f35b34801561023457600080fd5b5061019c73ffffffffffffffffffffffffffffffffffffffff60043516610681565b34801561026257600080fd5b506100cd610693565b34801561027757600080fd5b5061017373ffffffffffffffffffffffffffffffffffffffff6004351660243561070b565b3480156102a857600080fd5b5061019c73ffffffffffffffffffffffffffffffffffffffff6004358116906024351661071f565b33600081815260036020908152604091829020805434908101909155825190815291517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9281900390910190a2565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156103c35780601f10610398576101008083540402835291602001916103c3565b820191906000526020600020905b8154815290600101906020018083116103a657829003601f168201915b505050505081565b33600081815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b303190565b73ffffffffffffffffffffffffffffffffffffffff831660009081526003602052604081205482111561047557600080fd5b73ffffffffffffffffffffffffffffffffffffffff841633148015906104eb575073ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14155b156105655773ffffffffffffffffffffffffffffffffffffffff8416600090815260046020908152604080832033845290915290205482111561052d57600080fd5b73ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020805483900390555b73ffffffffffffffffffffffffffffffffffffffff808516600081815260036020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b336000908152600360205260409020548111156105ff57600080fd5b33600081815260036020526040808220805485900390555183156108fc0291849190818181858888f1935050505015801561063e573d6000803e3d6000fd5b5060408051828152905133917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65919081900360200190a250565b60025460ff1681565b60036020526000908152604090205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156103c35780601f10610398576101008083540402835291602001916103c3565b6000610718338484610443565b9392505050565b6004602090815260009283526040808420909152908252902054815600a165627a7a72305820228981f11f47ad9630080069b0a81423fcfba5aa8e0f478a579c4bc080ba7e820029"
}
}
},
"networks": {
"1": {
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"links": {},
"constructorArgs": "[]"
},
"3": {
"address": "0xc778417e063141139fce010982780140aa0cd5ab",
"links": {},
"constructorArgs": "[]"
},
"42": {
"address": "0xd0a1e359811322d97991e03f863a0c30c2cf029c",
"links": {},
"constructorArgs": "[]"
},
"50": {
"address": "0x0b1ba0af832d7c05fd64161e0db78e85978e8082",
"links": {},
"constructorArgs": "[]"
}
}
}

View File

@@ -0,0 +1,248 @@
{
"schemaVersion": "2.0.0",
"contractName": "ZRXToken",
"compilerOutput": {
"abi": [
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "decimals",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "symbol",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"inputs": [],
"payable": false,
"type": "constructor"
},
{
"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"
},
{
"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"
}
],
"evm": {
"bytecode": {
"linkReferences": {},
"object":
"0x60606040526b033b2e3c9fd0803ce8000000600355341561001c57fe5b5b600354600160a060020a0333166000908152602081905260409020555b5b61078d8061004a6000396000f300606060405236156100965763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610098578063095ea7b31461014657806318160ddd1461018657806323b872dd146101a8578063313ce567146101ee57806370a082311461021457806395d89b411461024f578063a9059cbb146102fd578063dd62ed3e1461033d575bfe5b34156100a057fe5b6100a861037e565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014e57fe5b61017273ffffffffffffffffffffffffffffffffffffffff600435166024356103b5565b604080519115158252519081900360200190f35b341561018e57fe5b61019661042d565b60408051918252519081900360200190f35b34156101b057fe5b61017273ffffffffffffffffffffffffffffffffffffffff60043581169060243516604435610433565b604080519115158252519081900360200190f35b34156101f657fe5b6101fe6105d4565b6040805160ff9092168252519081900360200190f35b341561021c57fe5b61019673ffffffffffffffffffffffffffffffffffffffff600435166105d9565b60408051918252519081900360200190f35b341561025757fe5b6100a8610605565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561030557fe5b61017273ffffffffffffffffffffffffffffffffffffffff6004351660243561063c565b604080519115158252519081900360200190f35b341561034557fe5b61019673ffffffffffffffffffffffffffffffffffffffff60043581169060243516610727565b60408051918252519081900360200190f35b60408051808201909152601181527f30782050726f746f636f6c20546f6b656e000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60035481565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906104835750828110155b80156104b6575073ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090205483810110155b156105c65773ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220805487019055918716815220805484900390557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156105585773ffffffffffffffffffffffffffffffffffffffff808616600090815260016020908152604080832033909416835292905220805484900390555b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191506105cb565b600091505b5b509392505050565b601281565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020545b919050565b60408051808201909152600381527f5a52580000000000000000000000000000000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff3316600090815260208190526040812054829010801590610699575073ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205482810110155b156107185773ffffffffffffffffffffffffffffffffffffffff33811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610427565b506000610427565b5b92915050565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600160209081526040808320938516835292905220545b929150505600a165627a7a723058201b5b70cf82a73dec658c2e60ab9a0f8e2ba01a74b66a6f5b0402f56d2ea0ffcf0029"
}
}
},
"networks": {
"1": {
"address": "0xe41d2489571d322189246dafa5ebde1f4699f498",
"links": {},
"constructorArgs": "[]"
},
"3": {
"address": "0xff67881f8d12f372d91baae9752eb3631ff0ed00",
"links": {},
"constructorArgs": "[\"0x Protocol Token\",\"ZRX\",\"18\",\"1000000000000000000000000000\"]"
},
"42": {
"address": "0x2002d3812f58e35f0ea1ffbf80a75a38c32175fa",
"links": {},
"constructorArgs": "[\"0x Protocol Token\",\"ZRX\",\"18\",\"1000000000000000000000000000\"]"
},
"50": {
"address": "0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c",
"links": {},
"constructorArgs": "[]"
}
}
}

View File

@@ -327,6 +327,11 @@
}
},
"networks": {
"1": {
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"links": {},
"constructorArgs": "[]"
},
"3": {
"address": "0xc778417e063141139fce010982780140aa0cd5ab",
"links": {},

View File

@@ -10022,6 +10022,11 @@
}
},
"networks": {
"1": {
"address": "0xe41d2489571d322189246dafa5ebde1f4699f498",
"links": {},
"constructorArgs": "[]"
},
"3": {
"address": "0xff67881f8d12f372d91baae9752eb3631ff0ed00",
"links": {},

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/migrations",
"version": "1.0.7",
"version": "1.0.9",
"engines": {
"node": ">=6.12"
},
@@ -45,7 +45,7 @@
},
"dependencies": {
"@0xproject/base-contract": "^2.0.2",
"@0xproject/order-utils": "^1.0.1",
"@0xproject/order-utils": "^1.0.2",
"@0xproject/sol-compiler": "^1.1.2",
"@0xproject/subproviders": "^2.0.2",
"@0xproject/typescript-typings": "^2.0.0",

View File

@@ -1,4 +1,13 @@
[
{
"version": "1.0.2",
"changes": [
{
"note": "Drastically reduce the bundle size by removing unused parts of included contract artifacts."
}
],
"timestamp": 1537369748
},
{
"version": "1.0.1",
"changes": [

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.2 - _September 19, 2018_
* Drastically reduce the bundle size by removing unused parts of included contract artifacts.
## v1.0.1 - _September 5, 2018_
* Export `orderParsingUtils` (#1044)

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/order-utils",
"version": "1.0.1",
"version": "1.0.2",
"engines": {
"node": ">=6.12"
},
@@ -11,7 +11,7 @@
"build": "yarn pre_build && tsc -b",
"pre_build": "run-s update_artifacts generate_contract_wrappers",
"generate_contract_wrappers": "abi-gen --abis 'lib/src/artifacts/@(Exchange|IWallet|IValidator|DummyERC20Token|ERC20Proxy|ERC20Token).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers",
"update_artifacts": "for i in ${npm_package_config_contracts_v2}; do copyfiles -u 4 ../migrations/artifacts/2.0.0/$i.json lib/src/artifacts; done;",
"update_artifacts": "for i in ${npm_package_config_contracts_v2}; do copyfiles -u 4 ../migrations/artifacts/2.0.0-trimmed/$i.json lib/src/artifacts; done;",
"test": "yarn run_mocha",
"rebuild_and_test": "run-s build test",
"test:circleci": "yarn test:coverage",

View File

@@ -1,4 +1,22 @@
[
{
"version": "1.0.3",
"changes": [
{
"note": "Drastically reduce the bundle size by removing unused parts of included contract artifacts."
}
],
"timestamp": 1537369748
},
{
"version": "1.0.2",
"changes": [
{
"note": "Add ZRX & WETH mainnet contract addresses into the included artifacts"
}
],
"timestamp": 1537265493
},
{
"timestamp": 1536142250,
"version": "1.0.1",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.0.3 - _September 19, 2018_
* Drastically reduce the bundle size by removing unused parts of included contract artifacts.
## v1.0.2 - _September 18, 2018_
* Add ZRX & WETH mainnet contract addresses into the included artifacts
## v1.0.1 - _September 5, 2018_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/order-watcher",
"version": "1.0.1",
"version": "1.0.3",
"description": "An order watcher daemon that watches for order validity",
"keywords": [
"0x",
@@ -22,7 +22,7 @@
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"copy_artifacts": "copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts",
"update_artifacts": "for i in ${npm_package_config_contracts_v2}; do copyfiles -u 4 ../migrations/artifacts/2.0.0/$i.json src/artifacts; done;",
"update_artifacts": "for i in ${npm_package_config_contracts_v2}; do copyfiles -u 4 ../migrations/artifacts/2.0.0-trimmed/$i.json src/artifacts; done;",
"clean": "shx rm -rf _bundles lib test_temp test/artifacts src/generated_contract_wrappers generated_docs",
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
@@ -44,7 +44,7 @@
"devDependencies": {
"@0xproject/abi-gen": "^1.0.8",
"@0xproject/dev-utils": "^1.0.7",
"@0xproject/migrations": "^1.0.7",
"@0xproject/migrations": "^1.0.9",
"@0xproject/tslint-config": "^1.0.7",
"@types/bintrees": "^1.0.2",
"@types/lodash": "4.14.104",
@@ -72,10 +72,10 @@
"dependencies": {
"@0xproject/assert": "^1.0.8",
"@0xproject/base-contract": "^2.0.2",
"@0xproject/contract-wrappers": "^1.0.1",
"@0xproject/fill-scenarios": "^1.0.1",
"@0xproject/contract-wrappers": "^1.0.3",
"@0xproject/fill-scenarios": "^1.0.2",
"@0xproject/json-schemas": "^1.0.1",
"@0xproject/order-utils": "^1.0.1",
"@0xproject/order-utils": "^1.0.2",
"@0xproject/types": "^1.0.1",
"@0xproject/typescript-typings": "^2.0.0",
"@0xproject/utils": "^1.0.8",

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "@0xproject/testnet-faucets",
"version": "1.0.44",
"version": "1.0.46",
"engines": {
"node": ">=6.12"
},
@@ -17,7 +17,7 @@
"author": "Fabio Berger",
"license": "Apache-2.0",
"dependencies": {
"0x.js": "0.38.5",
"0x.js": "^1.0.3",
"@0xproject/subproviders": "^2.0.2",
"@0xproject/typescript-typings": "^2.0.0",
"@0xproject/utils": "^1.0.8",

View File

@@ -1,13 +1,14 @@
import { ZeroEx } from '0x.js';
import { ERC20TokenWrapper } from '0x.js';
import { BigNumber, logUtils } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
import { configs } from './configs';
import { TOKENS_BY_NETWORK } from './tokens';
const DISPENSE_AMOUNT_ETHER = 0.1;
const DISPENSE_AMOUNT_TOKEN = 0.1;
const DISPENSE_MAX_AMOUNT_TOKEN = 2;
const DISPENSE_AMOUNT_TOKEN = 1;
const DISPENSE_MAX_AMOUNT_TOKEN = 100;
const DISPENSE_MAX_AMOUNT_ETHER = 2;
type AsyncTask = () => Promise<void>;
@@ -32,19 +33,27 @@ export const dispenseAssetTasks = {
logUtils.log(`Sent ${DISPENSE_AMOUNT_ETHER} ETH to ${recipientAddress} tx: ${txHash}`);
};
},
dispenseTokenTask(recipientAddress: string, tokenSymbol: string, zeroEx: ZeroEx): AsyncTask {
dispenseTokenTask(
recipientAddress: string,
tokenSymbol: string,
networkId: number,
erc20TokenWrapper: ERC20TokenWrapper,
): AsyncTask {
return async () => {
logUtils.log(`Processing ${tokenSymbol} ${recipientAddress}`);
const amountToDispense = new BigNumber(DISPENSE_AMOUNT_TOKEN);
const token = await zeroEx.tokenRegistry.getTokenBySymbolIfExistsAsync(tokenSymbol);
if (_.isUndefined(token)) {
const tokenIfExists = _.get(TOKENS_BY_NETWORK, [networkId, tokenSymbol]);
if (_.isUndefined(tokenIfExists)) {
throw new Error(`Unsupported asset type: ${tokenSymbol}`);
}
const baseUnitAmount = ZeroEx.toBaseUnitAmount(amountToDispense, token.decimals);
const userBalanceBaseUnits = await zeroEx.token.getBalanceAsync(token.address, recipientAddress);
const maxAmountBaseUnits = ZeroEx.toBaseUnitAmount(
const baseUnitAmount = Web3Wrapper.toBaseUnitAmount(amountToDispense, tokenIfExists.decimals);
const userBalanceBaseUnits = await erc20TokenWrapper.getBalanceAsync(
tokenIfExists.address,
recipientAddress,
);
const maxAmountBaseUnits = Web3Wrapper.toBaseUnitAmount(
new BigNumber(DISPENSE_MAX_AMOUNT_TOKEN),
token.decimals,
tokenIfExists.decimals,
);
if (userBalanceBaseUnits.greaterThanOrEqualTo(maxAmountBaseUnits)) {
logUtils.log(
@@ -52,13 +61,13 @@ export const dispenseAssetTasks = {
);
return;
}
const txHash = await zeroEx.token.transferAsync(
token.address,
const txHash = await erc20TokenWrapper.transferAsync(
tokenIfExists.address,
configs.DISPENSER_ADDRESS,
recipientAddress,
baseUnitAmount,
);
logUtils.log(`Sent ${amountToDispense} ZRX to ${recipientAddress} tx: ${txHash}`);
logUtils.log(`Sent ${amountToDispense} ${tokenSymbol} to ${recipientAddress} tx: ${txHash}`);
};
},
};

View File

@@ -1,27 +1,35 @@
import { Order, ZeroEx } from '0x.js';
import { BigNumber, logUtils } from '@0xproject/utils';
import {
assetDataUtils,
BigNumber,
ContractWrappers,
generatePseudoRandomSalt,
Order,
orderHashUtils,
Provider,
RPCSubprovider,
signatureUtils,
SignedOrder,
SignerType,
Web3ProviderEngine,
} from '0x.js';
import { NonceTrackerSubprovider, PrivateKeyWalletSubprovider } from '@0xproject/subproviders';
import { logUtils } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { Provider } from 'ethereum-types';
import * as express from 'express';
import * as _ from 'lodash';
import {
NonceTrackerSubprovider,
PrivateKeyWalletSubprovider,
RPCSubprovider,
Web3ProviderEngine,
} from '@0xproject/subproviders';
import { configs } from './configs';
import { constants } from './constants';
import { DispatchQueue } from './dispatch_queue';
import { dispenseAssetTasks } from './dispense_asset_tasks';
import { rpcUrls } from './rpc_urls';
import { TOKENS_BY_NETWORK } from './tokens';
interface NetworkConfig {
dispatchQueue: DispatchQueue;
web3Wrapper: Web3Wrapper;
zeroEx: ZeroEx;
contractWrappers: ContractWrappers;
networkId: number;
}
interface ItemByNetworkId<T> {
@@ -35,6 +43,9 @@ enum RequestedAssetType {
}
const FIVE_DAYS_IN_MS = 4.32e8; // TODO: make this configurable
const NULL_ADDRESS = '0x0000000000000000000000000000000000000000';
const ZERO = new BigNumber(0);
const ASSET_AMOUNT = new BigNumber(0.1);
export class Handler {
private readonly _networkConfigByNetworkId: ItemByNetworkId<NetworkConfig> = {};
@@ -50,18 +61,18 @@ export class Handler {
return engine;
}
constructor() {
_.forIn(rpcUrls, (rpcUrl: string, networkId: string) => {
_.forIn(rpcUrls, (rpcUrl: string, networkIdString: string) => {
const providerObj = Handler._createProviderEngine(rpcUrl);
const web3Wrapper = new Web3Wrapper(providerObj);
const zeroExConfig = {
networkId: +networkId,
};
const zeroEx = new ZeroEx(providerObj, zeroExConfig);
// tslint:disable-next-line:custom-no-magic-numbers
const networkId = parseInt(networkIdString, 10);
const contractWrappers = new ContractWrappers(providerObj, { networkId });
const dispatchQueue = new DispatchQueue();
this._networkConfigByNetworkId[networkId] = {
dispatchQueue,
web3Wrapper,
zeroEx,
contractWrappers,
networkId,
};
});
}
@@ -96,7 +107,11 @@ export class Handler {
private _dispenseAsset(req: express.Request, res: express.Response, requestedAssetType: RequestedAssetType): void {
const networkId = req.params.networkId;
const recipient = req.params.recipient;
const networkConfig = this._networkConfigByNetworkId[networkId];
const networkConfig = _.get(this._networkConfigByNetworkId, networkId);
if (_.isUndefined(networkConfig)) {
res.status(constants.BAD_REQUEST_STATUS).send('UNSUPPORTED_NETWORK_ID');
return;
}
let dispenserTask;
switch (requestedAssetType) {
case RequestedAssetType.ETH:
@@ -107,7 +122,8 @@ export class Handler {
dispenserTask = dispenseAssetTasks.dispenseTokenTask(
recipient,
requestedAssetType,
networkConfig.zeroEx,
networkConfig.networkId,
networkConfig.contractWrappers.erc20Token,
);
break;
default:
@@ -131,39 +147,47 @@ export class Handler {
res.status(constants.BAD_REQUEST_STATUS).send('UNSUPPORTED_NETWORK_ID');
return;
}
const zeroEx = networkConfig.zeroEx;
res.setHeader('Content-Type', 'application/json');
const makerToken = await zeroEx.tokenRegistry.getTokenBySymbolIfExistsAsync(requestedAssetType);
if (_.isUndefined(makerToken)) {
const makerTokenIfExists = _.get(TOKENS_BY_NETWORK, [networkConfig.networkId, requestedAssetType]);
if (_.isUndefined(makerTokenIfExists)) {
throw new Error(`Unsupported asset type: ${requestedAssetType}`);
}
const takerTokenSymbol =
requestedAssetType === RequestedAssetType.WETH ? RequestedAssetType.ZRX : RequestedAssetType.WETH;
const takerToken = await zeroEx.tokenRegistry.getTokenBySymbolIfExistsAsync(takerTokenSymbol);
if (_.isUndefined(takerToken)) {
throw new Error(`Unsupported asset type: ${requestedAssetType}`);
const takerTokenIfExists = _.get(TOKENS_BY_NETWORK, [networkConfig.networkId, takerTokenSymbol]);
if (_.isUndefined(takerTokenIfExists)) {
throw new Error(`Unsupported asset type: ${takerTokenSymbol}`);
}
const makerTokenAmount = ZeroEx.toBaseUnitAmount(new BigNumber(0.1), makerToken.decimals);
const takerTokenAmount = ZeroEx.toBaseUnitAmount(new BigNumber(0.1), takerToken.decimals);
const makerAssetAmount = Web3Wrapper.toBaseUnitAmount(ASSET_AMOUNT, makerTokenIfExists.decimals);
const takerAssetAmount = Web3Wrapper.toBaseUnitAmount(ASSET_AMOUNT, takerTokenIfExists.decimals);
const makerAssetData = assetDataUtils.encodeERC20AssetData(makerTokenIfExists.address);
const takerAssetData = assetDataUtils.encodeERC20AssetData(takerTokenIfExists.address);
const order: Order = {
maker: configs.DISPENSER_ADDRESS,
taker: req.params.recipient,
makerFee: new BigNumber(0),
takerFee: new BigNumber(0),
makerTokenAmount,
takerTokenAmount,
makerTokenAddress: makerToken.address,
takerTokenAddress: takerToken.address,
salt: ZeroEx.generatePseudoRandomSalt(),
exchangeContractAddress: zeroEx.exchange.getContractAddress(),
feeRecipient: ZeroEx.NULL_ADDRESS,
expirationUnixTimestampSec: new BigNumber(Date.now() + FIVE_DAYS_IN_MS),
makerAddress: configs.DISPENSER_ADDRESS,
takerAddress: req.params.recipient as string,
makerFee: ZERO,
takerFee: ZERO,
makerAssetAmount,
takerAssetAmount,
makerAssetData,
takerAssetData,
salt: generatePseudoRandomSalt(),
exchangeAddress: networkConfig.contractWrappers.exchange.getContractAddress(),
feeRecipientAddress: NULL_ADDRESS,
senderAddress: NULL_ADDRESS,
// tslint:disable-next-line:custom-no-magic-numbers
expirationTimeSeconds: new BigNumber(Date.now() + FIVE_DAYS_IN_MS).div(1000).floor(),
};
const orderHash = ZeroEx.getOrderHashHex(order);
const signature = await zeroEx.signOrderHashAsync(orderHash, configs.DISPENSER_ADDRESS, false);
const signedOrder = {
const orderHash = orderHashUtils.getOrderHashHex(order);
const signature = await signatureUtils.ecSignOrderHashAsync(
networkConfig.web3Wrapper.getProvider(),
orderHash,
configs.DISPENSER_ADDRESS,
SignerType.Default,
);
const signedOrder: SignedOrder = {
...order,
ecSignature: signature,
signature,
};
const payload = JSON.stringify(signedOrder);
logUtils.log(`Dispensed signed order: ${payload}`);

View File

@@ -2,7 +2,6 @@ import { configs } from './configs';
const productionRpcUrls = {
'3': `https://ropsten.infura.io/${configs.INFURA_API_KEY}`,
'4': `https://rinkeby.infura.io/${configs.INFURA_API_KEY}`,
'42': `https://kovan.infura.io/${configs.INFURA_API_KEY}`,
};

View File

@@ -0,0 +1,44 @@
interface TokensByNetwork {
[networkId: number]: { [tokenSymbol: string]: { address: string; decimals: number } };
}
export const tokens = {
ZRX: {
decimals: 18,
},
WETH: {
decimals: 18,
},
};
export const TOKENS_BY_NETWORK: TokensByNetwork = {
3: {
ZRX: {
...tokens.ZRX,
address: '0xff67881f8d12f372d91baae9752eb3631ff0ed00',
},
WETH: {
...tokens.WETH,
address: '0xc778417e063141139fce010982780140aa0cd5ab',
},
},
42: {
ZRX: {
...tokens.ZRX,
address: '0x2002d3812f58e35f0ea1ffbf80a75a38c32175fa',
},
WETH: {
...tokens.WETH,
address: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
},
},
50: {
ZRX: {
...tokens.ZRX,
address: '0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c',
},
WETH: {
...tokens.WETH,
address: '0x0b1ba0af832d7c05fd64161e0db78e85978e8082',
},
},
};

View File

@@ -0,0 +1,31 @@
0x packages are promise-based libraries. This means that whenever an asynchronous call is required, the library method will return a native Javascript promise. You can therefore choose between using `promise` or `async/await` syntax when calling our async methods.
_Async/await syntax (recommended):_
```javascript
try {
const signature = await signatureUtils.ecSignOrderHashAsync(
providerEngine,
orderHashHex,
maker,
SignerType.Default,
);
} catch (error) {
console.log('Caught error: ', error);
}
```
_Promise syntax:_
```javascript
signatureUtils
.ecSignOrderHashAsync(providerEngine, orderHashHex, maker, SignerType.Default)
.then(function(signature) {
console.log(signature);
})
.catch(function(error) {
console.log('Caught error: ', error);
});
```
As is the convention with promise-based libraries, if an error occurs, it is thrown. It is the callers responsibility to catch thrown errors and to handle them appropriately.

View File

@@ -0,0 +1,40 @@
0x.js ships as both a [UMD](https://github.com/umdjs/umd) module and a [CommonJS](https://en.wikipedia.org/wiki/CommonJS) package.
#### CommonJS _(recommended)_:
**Install**
```bash
npm install 0x.js --save
```
**Import**
```javascript
import {
assetDataUtils,
BigNumber,
ContractWrappers,
generatePseudoRandomSalt,
Order,
orderHashUtils,
signatureUtils,
SignerType,
} from '0x.js';
```
#### UMD:
**Install**
Download the UMD module from our [releases page](https://github.com/0xProject/0x-monorepo/releases) and add it to your project.
**Import**
```html
<script type="text/javascript" src="0x.js"></script>
```
### Wiki
Check out our [wiki](https://0xproject.com/wiki) for articles on how to get 0x.js setup with Ganache, Infura and more!

View File

@@ -1,3 +1 @@
<b>**NOTE:** Release candidate versions are meant to work with V2 of 0x protocol. To interact with V1, select a 0.X version.</b>
Welcome to the [0x.js](https://github.com/0xProject/0x-monorepo/tree/development/packages/0x.js) documentation! 0x.js is a Javascript library for interacting with the 0x protocol. With it, you can easily make calls to the 0x smart contracts as well as any token adhering to the token standards supported by the protocol (currently ERC20 & ERC721). Functionality includes generating, signing, filling and cancelling orders, verifying an orders signature, setting or checking a users ERC20/ERC721 token balance/allowance and much more.

View File

@@ -1 +1 @@
Since v1.0.0, this package adheres to the [Semantic Versioning 2.0.0](http://semver.org/) specification. The library's public interface includes all the methods, properties and types included in the documentation. We will publish with a major version bump for any breaking change to the public interface, use a minor version bump when introducing new features in a backwards-compatible way, and patch versions when introducing backwards-compatible bug fixes. Because of this, we recommend you import `0x.js` with a caret `^2.0.0` to take advantage of non-breaking bug fixes.
Since v1.0.0, this package adheres to the [Semantic Versioning 2.0.0](http://semver.org/) specification. The library's public interface includes all the methods, properties and types included in the documentation. We will publish with a major version bump for any breaking change to the public interface, use a minor version bump when introducing new features in a backwards-compatible way, and patch versions when introducing backwards-compatible bug fixes. Because of this, we recommend you import `0x.js` with a caret `^1.0.0` to take advantage of non-breaking bug fixes.

View File

@@ -0,0 +1,26 @@
0x.js is a promise-based library. This means that whenever an asynchronous call is required, the library method will return a native Javascript promise. You can therefore choose between using `promise` or `async/await` syntax when calling our async methods.
_Async/await syntax (recommended):_
```javascript
try {
var availableAddresses = await web3Wrapper.getAvailableAddressesAsync();
} catch (error) {
console.log('Caught error: ', error);
}
```
_Promise syntax:_
```javascript
web3Wrapper
.getAvailableAddressesAsync()
.then(function(availableAddresses) {
console.log(availableAddresses);
})
.catch(function(error) {
console.log('Caught error: ', error);
});
```
As is the convention with promise-based libraries, if an error occurs, it is thrown. It is the callers responsibility to catch thrown errors and to handle them appropriately.

View File

@@ -0,0 +1,38 @@
0x.js ships as both a [UMD](https://github.com/umdjs/umd) module and a [CommonJS](https://en.wikipedia.org/wiki/CommonJS) package.
#### CommonJS _(recommended)_:
**Install**
```bash
npm install 0x.js --save
```
**Import**
```javascript
import {
assetDataUtils,
BigNumber,
ContractWrappers,
generatePseudoRandomSalt,
orderHashUtils,
signatureUtils,
} from '0x.js';
```
#### UMD:
**Install**
Download the UMD module from our [releases page](https://github.com/0xProject/0x-monorepo/releases) and add it to your project.
**Import**
```html
<script type="text/javascript" src="0x.js"></script>
```
### Wiki
Check out our [wiki](https://0xproject.com/wiki) for articles on how to get 0x.js setup with TestRPC, Infura and more!

View File

@@ -1,6 +1,6 @@
{
"name": "@0xproject/website",
"version": "0.0.47",
"version": "0.0.49",
"engines": {
"node": ">=6.12"
},
@@ -19,8 +19,8 @@
"license": "Apache-2.0",
"dependencies": {
"0x.js": "^0.38.6",
"@0xproject/contract-wrappers": "^1.0.1",
"@0xproject/order-utils": "^1.0.1",
"@0xproject/contract-wrappers": "^1.0.3",
"@0xproject/order-utils": "^1.0.2",
"@0xproject/react-docs": "^1.0.8",
"@0xproject/react-shared": "^1.0.9",
"@0xproject/subproviders": "^2.0.2",

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -27,6 +27,7 @@ import * as _ from 'lodash';
import * as moment from 'moment';
import * as React from 'react';
import contract = require('truffle-contract');
import { tokenAddressOverrides } from 'ts/utils/token_address_overrides';
import { BlockchainWatcher } from 'ts/blockchain_watcher';
import { AssetSendCompleted } from 'ts/components/flash_messages/asset_send_completed';
@@ -223,7 +224,13 @@ export class Blockchain {
public async isAddressInTokenRegistryAsync(tokenAddress: string): Promise<boolean> {
utils.assert(!_.isUndefined(this._zeroEx), 'ZeroEx must be instantiated.');
const tokenIfExists = await this._zeroEx.tokenRegistry.getTokenIfExistsAsync(tokenAddress);
return !_.isUndefined(tokenIfExists);
// HACK: Override token addresses on testnets
const tokenSymbolToAddressOverrides = tokenAddressOverrides[this.networkId];
let isTokenAddressInOverrides = false;
if (!_.isUndefined(tokenSymbolToAddressOverrides)) {
isTokenAddressInOverrides = _.keys(tokenSymbolToAddressOverrides).includes(tokenAddress);
}
return !_.isUndefined(tokenIfExists) || isTokenAddressInOverrides;
}
public getLedgerDerivationPathIfExists(): string {
if (_.isUndefined(this._ledgerSubprovider)) {
@@ -771,6 +778,20 @@ export class Blockchain {
} else {
utils.assert(!_.isUndefined(this._zeroEx), 'ZeroEx must be instantiated.');
tokenRegistryTokens = await this._zeroEx.tokenRegistry.getTokensAsync();
const tokenSymbolToAddressOverrides = tokenAddressOverrides[this.networkId];
if (!_.isUndefined(tokenAddressOverrides)) {
// HACK: Override token addresses on testnets
tokenRegistryTokens = _.map(tokenRegistryTokens, (token: ZeroExToken) => {
const overrideIfExists = tokenSymbolToAddressOverrides[token.symbol];
if (!_.isUndefined(overrideIfExists)) {
return {
...token,
address: overrideIfExists,
};
}
return token;
});
}
}
const tokenByAddress: TokenByAddress = {};
_.each(tokenRegistryTokens, (t: ZeroExToken) => {

View File

@@ -337,14 +337,8 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
const isMintable =
(_.includes(configs.SYMBOLS_OF_MINTABLE_KOVAN_TOKENS, token.symbol) &&
this.props.networkId === sharedConstants.NETWORK_ID_BY_NAME[Networks.Kovan]) ||
(_.includes(configs.SYMBOLS_OF_MINTABLE_RINKEBY_ROPSTEN_TOKENS, token.symbol) &&
_.includes(
[
sharedConstants.NETWORK_ID_BY_NAME[Networks.Rinkeby],
sharedConstants.NETWORK_ID_BY_NAME[Networks.Ropsten],
],
this.props.networkId,
));
(_.includes(configs.SYMBOLS_OF_MINTABLE_ROPSTEN_TOKENS, token.symbol) &&
this.props.networkId === sharedConstants.NETWORK_ID_BY_NAME[Networks.Ropsten]);
return (
<TableRow key={token.address} style={{ height: TOKEN_TABLE_ROW_HEIGHT }}>
<TableRowColumn colSpan={tokenColSpan}>
@@ -392,14 +386,6 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
onClickAsyncFn={this._onMintTestTokensAsync.bind(this, token)}
/>
)}
{token.symbol === ZRX_TOKEN_SYMBOL && (
<LifeCycleRaisedButton
labelReady="Request"
labelLoading="Sending..."
labelComplete="Sent!"
onClickAsyncFn={this._faucetRequestAsync.bind(this, false)}
/>
)}
</TableRowColumn>
)}
{this.props.screenWidth !== ScreenWidths.Sm && (

View File

@@ -9,14 +9,18 @@ import { DocPackages } from 'ts/types';
import { Translate } from 'ts/utils/translate';
/* tslint:disable:no-var-requires */
const IntroMarkdownV1 = require('md/docs/0xjs/1.0.0/introduction');
const InstallationMarkdownV1 = require('md/docs/0xjs/1.0.0/installation');
const AsyncMarkdownV1 = require('md/docs/0xjs/1.0.0/async');
const ErrorsMarkdownV1 = require('md/docs/0xjs/1.0.0/errors');
const versioningMarkdownV1 = require('md/docs/0xjs/1.0.0/versioning');
const IntroMarkdownV0 = require('md/docs/0xjs/0.0.1/introduction');
const InstallationMarkdownV0 = require('md/docs/0xjs/0.0.1/installation');
const AsyncMarkdownV0 = require('md/docs/0xjs/0.0.1/async');
const ErrorsMarkdownV0 = require('md/docs/0xjs/0.0.1/errors');
const versioningMarkdownV0 = require('md/docs/0xjs/0.0.1/versioning');
const IntroMarkdownV1 = require('md/docs/0xjs/1.0.1/introduction');
const InstallationMarkdownV1 = require('md/docs/0xjs/1.0.1/installation');
const AsyncMarkdownV1 = require('md/docs/0xjs/1.0.1/async');
const ErrorsMarkdownV1 = ErrorsMarkdownV0;
const versioningMarkdownV1 = require('md/docs/0xjs/1.0.1/versioning');
const IntroMarkdownV2 = require('md/docs/0xjs/2.0.0/introduction');
const versioningMarkdownV2 = require('md/docs/0xjs/2.0.0/versioning');
/* tslint:enable:no-var-requires */
const markdownSections = {
@@ -41,17 +45,16 @@ const docsInfoConfig: DocsInfoConfig = {
},
sectionNameToMarkdownByVersion: {
'0.0.1': {
[markdownSections.introduction]: IntroMarkdownV0,
[markdownSections.installation]: InstallationMarkdownV0,
[markdownSections.versioning]: versioningMarkdownV0,
[markdownSections.async]: AsyncMarkdownV0,
[markdownSections.errors]: ErrorsMarkdownV0,
},
'1.0.1': {
[markdownSections.introduction]: IntroMarkdownV1,
[markdownSections.installation]: InstallationMarkdownV1,
[markdownSections.async]: AsyncMarkdownV1,
[markdownSections.errors]: ErrorsMarkdownV1,
[markdownSections.versioning]: versioningMarkdownV1,
},
'1.0.0-rc.1': {
[markdownSections.introduction]: IntroMarkdownV2,
[markdownSections.versioning]: versioningMarkdownV2,
// These are the same as for V1
[markdownSections.installation]: InstallationMarkdownV1,
[markdownSections.async]: AsyncMarkdownV1,
[markdownSections.errors]: ErrorsMarkdownV1,
},

View File

@@ -206,9 +206,17 @@ const teamRow7: ProfileInfo[] = [
image: 'images/team/matt.jpg',
linkedIn: 'https://www.linkedin.com/in/mattytay/',
},
{
name: 'Eugene Aumson',
title: 'Engineer',
description: `Developer Experience. Previously senior software engineer in foreign exchange applications at Bloomberg LP.`,
image: 'images/team/gene.jpg',
linkedIn: 'https://www.linkedin.com/in/aumson/',
github: 'https://github.com/feuGeneA',
},
];
const advisors: ProfileInfo[] = [
const advisors1: ProfileInfo[] = [
{
name: 'Fred Ehrsam',
description: 'Co-founder of Coinbase. Previously FX trader at Goldman Sachs.',
@@ -232,6 +240,9 @@ const advisors: ProfileInfo[] = [
github: 'https://github.com/joeykrug',
angellist: 'https://angel.co/joeykrug',
},
];
const advisors2: ProfileInfo[] = [
{
name: 'Linda Xie',
description: 'Co-founder of Scalar Capital. Previously PM at Coinbase.',
@@ -240,6 +251,14 @@ const advisors: ProfileInfo[] = [
medium: 'https://medium.com/@linda.xie',
twitter: 'https://twitter.com/ljxie',
},
{
name: 'David Sacks',
description: 'General Partner at Craft Ventures. Original COO of PayPal. Founder of Yammer.',
image: '/images/advisors/david.png',
linkedIn: 'https://www.linkedin.com/in/davidoliversacks/',
medium: 'https://medium.com/@davidsacks',
twitter: 'https://twitter.com/DavidSacks',
},
];
export interface AboutProps {
@@ -316,7 +335,8 @@ export class About extends React.Component<AboutProps, AboutState> {
>
Advisors:
</div>
<div className="clearfix">{this._renderProfiles(advisors)}</div>
<div className="clearfix">{this._renderProfiles(advisors1)}</div>
<div className="clearfix">{this._renderProfiles(advisors2)}</div>
</div>
<div className="mx-auto py4 sm-px3" style={{ maxWidth: 308 }}>
<div className="pb2" style={styles.weAreHiring}>

View File

@@ -18,7 +18,7 @@ export const configs = {
DOMAIN_PRODUCTION: '0xproject.com',
GOOGLE_ANALYTICS_ID: 'UA-98720122-1',
LAST_LOCAL_STORAGE_FILL_CLEARANCE_DATE: '2017-11-22',
LAST_LOCAL_STORAGE_TRACKED_TOKEN_CLEARANCE_DATE: '2018-7-5',
LAST_LOCAL_STORAGE_TRACKED_TOKEN_CLEARANCE_DATE: '2018-9-7',
OUTDATED_WRAPPED_ETHERS: [
{
42: {
@@ -44,27 +44,6 @@ export const configs = {
[3]: [`https://ropsten.infura.io/${INFURA_API_KEY}`],
[4]: [`https://rinkeby.infura.io/${INFURA_API_KEY}`],
} as PublicNodeUrlsByNetworkId,
SYMBOLS_OF_MINTABLE_KOVAN_TOKENS: ['MKR', 'MLN', 'GNT', 'DGD', 'REP'],
SYMBOLS_OF_MINTABLE_RINKEBY_ROPSTEN_TOKENS: [
'TKN0',
'TKN1',
'TKN2',
'TKN3',
'TKN4',
'TKN5',
'TKN6',
'TKN7',
'TKN8',
'TKN9',
'TKN10',
'TKN11',
'TKN12',
'TKN13',
'TKN14',
'TKN15',
'TKN16',
'TKN17',
'TKN18',
'TKN19',
],
SYMBOLS_OF_MINTABLE_KOVAN_TOKENS: ['ZRX', 'MKR', 'MLN', 'GNT', 'DGD', 'REP'],
SYMBOLS_OF_MINTABLE_ROPSTEN_TOKENS: ['ZRX', 'MKR', 'MLN', 'GNT', 'DGD', 'REP'],
};

View File

@@ -24,6 +24,7 @@ export const constants = {
NETWORK_ID_MAINNET: 1,
NETWORK_ID_KOVAN: 42,
NETWORK_ID_TESTRPC: 50,
NETWORK_ID_ROPSTEN: 3,
NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
PROVIDER_NAME_LEDGER: 'Ledger',
PROVIDER_NAME_METAMASK: 'MetaMask',

View File

@@ -0,0 +1,24 @@
import { ObjectMap } from 'ts/types';
import { constants } from 'ts/utils/constants';
// Map of networkId -> tokenSymbol -> tokenAddress
export type TokenOverrides = ObjectMap<ObjectMap<string>>;
export const tokenAddressOverrides: TokenOverrides = {
[constants.NETWORK_ID_KOVAN]: {
ZRX: '0x2002d3812f58e35f0ea1ffbf80a75a38c32175fa',
REP: '0x8cb3971b8eb709c14616bd556ff6683019e90d9c',
DGD: '0xa4f468c9c692eb6b4b8b06270dae7a2cfeedcde9',
GNT: '0x31fb614e223706f15d0d3c5f4b08bdf0d5c78623',
MKR: '0x7b6b10caa9e8e9552ba72638ea5b47c25afea1f3',
MLN: '0x17e394d1df6ce29d042195ea38411a98ff3ead94',
},
[constants.NETWORK_ID_ROPSTEN]: {
ZRX: '0xff67881f8d12f372d91baae9752eb3631ff0ed00',
REP: '0xb0b443fe0e8a04c4c85e8fda9c5c1ccc057d6653',
DGD: '0xc4895a5aafa2708d6bc1294e20ec839aad156b1d',
GNT: '0x7f8acc55a359ca4517c30510566ac35b800f7cac',
MKR: '0x06732516acd125b6e83c127752ed5f027e1b276e',
MLN: '0x823ebe83d39115536274a8617e00a1ff3544fd63',
},
};

107
yarn.lock
View File

@@ -2,23 +2,6 @@
# yarn lockfile v1
"0x.js@0.38.5":
version "0.38.5"
resolved "https://registry.yarnpkg.com/0x.js/-/0x.js-0.38.5.tgz#da4724e81e648279ea288cbac4b1a950a7cd7707"
dependencies:
"@0xproject/assert" "^0.2.13"
"@0xproject/base-contract" "^0.3.5"
"@0xproject/contract-wrappers" "^0.1.0"
"@0xproject/order-utils" "^0.0.8"
"@0xproject/order-watcher" "^0.0.7"
"@0xproject/sol-compiler" "^0.5.3"
"@0xproject/types" "^0.8.2"
"@0xproject/typescript-typings" "^0.4.2"
"@0xproject/utils" "^0.7.2"
"@0xproject/web3-wrapper" "^0.7.2"
ethers "3.0.22"
lodash "4.17.10"
"0x.js@^0.38.6":
version "0.38.6"
resolved "https://registry.yarnpkg.com/0x.js/-/0x.js-0.38.6.tgz#f6cb2b6ef9aea2ff7696c923095e0b794c1d84fc"
@@ -510,16 +493,6 @@
npmlog "^4.1.2"
write-file-atomic "^2.3.0"
"@0xproject/assert@^0.2.13":
version "0.2.13"
resolved "https://registry.yarnpkg.com/@0xproject/assert/-/assert-0.2.13.tgz#8eb0e16cd6d802eae1b0ab86d344360ea0038331"
dependencies:
"@0xproject/json-schemas" "^0.8.2"
"@0xproject/typescript-typings" "^0.4.2"
"@0xproject/utils" "^0.7.2"
lodash "4.17.10"
valid-url "1.0.9"
"@0xproject/assert@^0.2.14":
version "0.2.14"
resolved "https://registry.yarnpkg.com/@0xproject/assert/-/assert-0.2.14.tgz#7d5a373fedc8eb482716b730f4dddf3ef33bfa29"
@@ -530,7 +503,7 @@
lodash "4.17.10"
valid-url "1.0.9"
"@0xproject/base-contract@^0.3.5", "@0xproject/base-contract@^0.3.6":
"@0xproject/base-contract@^0.3.6":
version "0.3.6"
resolved "https://registry.yarnpkg.com/@0xproject/base-contract/-/base-contract-0.3.6.tgz#c6d742ce2904bdd9e77524d99ba2438d3aae8a40"
dependencies:
@@ -555,7 +528,7 @@
sinon "^4.0.0"
websocket "^1.0.25"
"@0xproject/contract-wrappers@^0.1.0", "@0xproject/contract-wrappers@^0.1.1":
"@0xproject/contract-wrappers@^0.1.1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@0xproject/contract-wrappers/-/contract-wrappers-0.1.1.tgz#8108d7ec051f202ef0cfa77c91c4ef994bf89881"
dependencies:
@@ -576,19 +549,6 @@
lodash "4.17.10"
uuid "3.2.1"
"@0xproject/fill-scenarios@^0.0.5":
version "0.0.5"
resolved "https://registry.yarnpkg.com/@0xproject/fill-scenarios/-/fill-scenarios-0.0.5.tgz#a62a240ae40423b9b73ecc0b1fc2abb58b76621c"
dependencies:
"@0xproject/base-contract" "^0.3.5"
"@0xproject/order-utils" "^0.0.8"
"@0xproject/types" "^0.8.2"
"@0xproject/typescript-typings" "^0.4.2"
"@0xproject/utils" "^0.7.2"
"@0xproject/web3-wrapper" "^0.7.2"
ethers "3.0.22"
lodash "4.17.10"
"@0xproject/fill-scenarios@^0.0.6":
version "0.0.6"
resolved "https://registry.yarnpkg.com/@0xproject/fill-scenarios/-/fill-scenarios-0.0.6.tgz#969a2c49122650af5a1bf7fe7c6d286a0e6f2de2"
@@ -602,15 +562,6 @@
ethers "3.0.22"
lodash "4.17.10"
"@0xproject/json-schemas@^0.8.2":
version "0.8.2"
resolved "https://registry.yarnpkg.com/@0xproject/json-schemas/-/json-schemas-0.8.2.tgz#9d3f446e546ce0c959cf7beb45d41ac60476a78c"
dependencies:
"@0xproject/typescript-typings" "^0.4.2"
"@types/node" "9.6.0"
jsonschema "1.2.2"
lodash.values "4.3.0"
"@0xproject/json-schemas@^0.8.3":
version "0.8.3"
resolved "https://registry.yarnpkg.com/@0xproject/json-schemas/-/json-schemas-0.8.3.tgz#455e6219a6bd05e990392165192a983a9ab89f26"
@@ -620,22 +571,6 @@
jsonschema "1.2.2"
lodash.values "4.3.0"
"@0xproject/order-utils@^0.0.8":
version "0.0.8"
resolved "https://registry.yarnpkg.com/@0xproject/order-utils/-/order-utils-0.0.8.tgz#72077749a22cae5f0c748a6af90d1d77f5ebf8c9"
dependencies:
"@0xproject/assert" "^0.2.13"
"@0xproject/json-schemas" "^0.8.2"
"@0xproject/types" "^0.8.2"
"@0xproject/typescript-typings" "^0.4.2"
"@0xproject/utils" "^0.7.2"
"@0xproject/web3-wrapper" "^0.7.2"
"@types/node" "9.6.0"
bn.js "4.11.7"
ethereumjs-abi "0.6.5"
ethereumjs-util "5.1.5"
lodash "4.17.10"
"@0xproject/order-utils@^0.0.9":
version "0.0.9"
resolved "https://registry.yarnpkg.com/@0xproject/order-utils/-/order-utils-0.0.9.tgz#75225dfbd87335d18810abf995d8e077b9a84868"
@@ -652,26 +587,6 @@
ethereumjs-util "5.1.5"
lodash "4.17.10"
"@0xproject/order-watcher@^0.0.7":
version "0.0.7"
resolved "https://registry.yarnpkg.com/@0xproject/order-watcher/-/order-watcher-0.0.7.tgz#fbe019aa33447781096b5d562e7a3a4ec91a1da2"
dependencies:
"@0xproject/assert" "^0.2.13"
"@0xproject/base-contract" "^0.3.5"
"@0xproject/contract-wrappers" "^0.1.0"
"@0xproject/fill-scenarios" "^0.0.5"
"@0xproject/json-schemas" "^0.8.2"
"@0xproject/order-utils" "^0.0.8"
"@0xproject/types" "^0.8.2"
"@0xproject/typescript-typings" "^0.4.2"
"@0xproject/utils" "^0.7.2"
"@0xproject/web3-wrapper" "^0.7.2"
bintrees "1.0.2"
ethereum-types "^0.0.2"
ethereumjs-blockstream "5.0.0"
ethers "3.0.22"
lodash "4.17.10"
"@0xproject/order-watcher@^0.0.8":
version "0.0.8"
resolved "https://registry.yarnpkg.com/@0xproject/order-watcher/-/order-watcher-0.0.8.tgz#cfba4c39ca8c5d39e076276479383d0aae022c6d"
@@ -692,7 +607,7 @@
ethers "3.0.22"
lodash "4.17.10"
"@0xproject/sol-compiler@^0.5.3", "@0xproject/sol-compiler@^0.5.4":
"@0xproject/sol-compiler@^0.5.4":
version "0.5.4"
resolved "https://registry.yarnpkg.com/@0xproject/sol-compiler/-/sol-compiler-0.5.4.tgz#3e0b04b0c02c5ec046ebb962b5ed20978c6b4cdd"
dependencies:
@@ -743,7 +658,7 @@
"@0xproject/types" "^0.5.0"
bignumber.js "~4.1.0"
"@0xproject/typescript-typings@^0.4.2", "@0xproject/typescript-typings@^0.4.3":
"@0xproject/typescript-typings@^0.4.3":
version "0.4.3"
resolved "https://registry.yarnpkg.com/@0xproject/typescript-typings/-/typescript-typings-0.4.3.tgz#f99f939a43f2764ad7182fcd78a71212a1d76d96"
dependencies:
@@ -751,7 +666,17 @@
bignumber.js "~4.1.0"
ethereum-types "^0.0.2"
"@0xproject/utils@^0.7.2", "@0xproject/utils@^0.7.3":
"@0xproject/typescript-typings@^1.0.3":
version "1.0.5"
resolved "https://registry.yarnpkg.com/@0xproject/typescript-typings/-/typescript-typings-1.0.5.tgz#a808443419f26a7b90d63d1afd3efbfb48644184"
dependencies:
"@types/bn.js" "^4.11.0"
"@types/react" "*"
bignumber.js "~4.1.0"
ethereum-types "^1.0.5"
popper.js "1.14.3"
"@0xproject/utils@^0.7.3":
version "0.7.3"
resolved "https://registry.yarnpkg.com/@0xproject/utils/-/utils-0.7.3.tgz#ffa7c6da9bf0dd3e13694f185dcfc48a8981ff05"
dependencies:
@@ -765,7 +690,7 @@
lodash "4.17.10"
web3 "0.20.6"
"@0xproject/web3-wrapper@^0.7.2", "@0xproject/web3-wrapper@^0.7.3":
"@0xproject/web3-wrapper@^0.7.3":
version "0.7.3"
resolved "https://registry.yarnpkg.com/@0xproject/web3-wrapper/-/web3-wrapper-0.7.3.tgz#9bd50b034b92fd505b6766b6e225f014b6d08b08"
dependencies: