Compare commits
50 Commits
0x.js@1.0.
...
@0xproject
Author | SHA1 | Date | |
---|---|---|---|
|
29f6adc2ed | ||
|
5446de6308 | ||
|
9540db2aad | ||
|
7dd28d6fab | ||
|
ba59879e7f | ||
|
c10807c4e3 | ||
|
4e8ec2359d | ||
|
cbd72b6e3d | ||
|
90e28220fa | ||
|
abd308455a | ||
|
3e70ab015b | ||
|
dab7f1a739 | ||
|
f6438725eb | ||
|
83ffbd05be | ||
|
88be6b5e0d | ||
|
aa47f85f48 | ||
|
fec9c8f1c6 | ||
|
e2559798df | ||
|
ccc18620bf | ||
|
febe00db4f | ||
|
6f36048a8e | ||
|
2457ecb7e7 | ||
|
2378747570 | ||
|
2df569b727 | ||
|
65aecc0024 | ||
|
074082ec94 | ||
|
6b9f0af828 | ||
|
bfabf765e3 | ||
|
e74f736eff | ||
|
45483557a5 | ||
|
07942a7aec | ||
|
3d1b7c10e8 | ||
|
cf46d2c704 | ||
|
4434856add | ||
|
52d511df21 | ||
|
50f58f9121 | ||
|
7a20c7b946 | ||
|
ce0e60ed84 | ||
|
4ad0a6c7b7 | ||
|
b8d8651e43 | ||
|
45b68832aa | ||
|
6dfcaaf889 | ||
|
8131c5d6bc | ||
|
df5779b6d1 | ||
|
4a5a0c8c78 | ||
|
b3a17624c8 | ||
|
e63841a604 | ||
|
7ec95e8c29 | ||
|
b217495465 | ||
|
db6ddc0c4b |
@@ -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
|
||||
|
@@ -1,4 +1,31 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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",
|
||||
|
@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.4 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## 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
|
||||
|
@@ -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`:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "0x.js",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.4",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -41,14 +41,14 @@
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^1.0.8",
|
||||
"@0xproject/dev-utils": "^1.0.7",
|
||||
"@0xproject/migrations": "^1.0.7",
|
||||
"@0xproject/monorepo-scripts": "^1.0.8",
|
||||
"@0xproject/abi-gen": "^1.0.9",
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/migrations": "^1.0.10",
|
||||
"@0xproject/monorepo-scripts": "^1.0.9",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^2.2.42",
|
||||
"@types/node": "^8.0.53",
|
||||
"@types/node": "*",
|
||||
"@types/sinon": "^2.2.2",
|
||||
"@types/web3-provider-engine": "^14.0.0",
|
||||
"awesome-typescript-loader": "^3.1.3",
|
||||
@@ -73,17 +73,17 @@
|
||||
"webpack": "^3.1.0"
|
||||
},
|
||||
"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/subproviders": "^2.0.2",
|
||||
"@0xproject/types": "^1.0.1",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/web3-wrapper": "^2.0.2",
|
||||
"ethereum-types": "^1.0.6",
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/base-contract": "^2.0.3",
|
||||
"@0xproject/contract-wrappers": "^1.0.4",
|
||||
"@0xproject/order-utils": "^1.0.3",
|
||||
"@0xproject/order-watcher": "^1.0.4",
|
||||
"@0xproject/subproviders": "^2.0.3",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethers": "3.0.22",
|
||||
"lodash": "^4.17.5",
|
||||
"web3-provider-engine": "14.0.6"
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.9",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1536142250,
|
||||
"version": "1.0.8",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.9 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.8 - _September 5, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/abi-gen",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -30,10 +30,10 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md",
|
||||
"dependencies": {
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"chalk": "^2.3.0",
|
||||
"ethereum-types": "^1.0.6",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"glob": "^7.1.2",
|
||||
"handlebars": "^4.0.11",
|
||||
"lodash": "^4.17.5",
|
||||
@@ -48,7 +48,7 @@
|
||||
"@types/glob": "5.0.35",
|
||||
"@types/handlebars": "^4.0.36",
|
||||
"@types/mkdirp": "^0.5.1",
|
||||
"@types/node": "^8.0.53",
|
||||
"@types/node": "*",
|
||||
"@types/sleep": "^0.0.7",
|
||||
"@types/tmp": "^0.0.33",
|
||||
"@types/yargs": "^10.0.0",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.9",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1536142250,
|
||||
"version": "1.0.8",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.9 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.8 - _September 5, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/assert",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -44,9 +44,9 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/json-schemas": "^1.0.1",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/json-schemas": "^1.0.2",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"lodash": "^4.17.5",
|
||||
"valid-url": "^1.0.9"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "2.0.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1536142250,
|
||||
"version": "2.0.2",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.3 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.2 - _September 5, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/base-contract",
|
||||
"version": "2.0.2",
|
||||
"version": "2.0.3",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -40,10 +40,10 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/web3-wrapper": "^2.0.2",
|
||||
"ethereum-types": "^1.0.6",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethers": "3.0.22",
|
||||
"lodash": "^4.17.5"
|
||||
},
|
||||
|
@@ -1,4 +1,22 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "2.0.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537369748,
|
||||
"version": "2.0.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.2 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## 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)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/connect",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.2",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -43,12 +43,12 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md",
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^1.0.8",
|
||||
"@0xproject/json-schemas": "^1.0.1",
|
||||
"@0xproject/order-utils": "^1.0.1",
|
||||
"@0xproject/types": "^1.0.1",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/json-schemas": "^1.0.2",
|
||||
"@0xproject/order-utils": "^1.0.3",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"lodash": "^4.17.5",
|
||||
"query-string": "^5.0.1",
|
||||
"sinon": "^4.0.0",
|
||||
|
@@ -1,4 +1,31 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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": [
|
||||
|
@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.4 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## 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`
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/contract-wrappers",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.4",
|
||||
"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",
|
||||
@@ -41,14 +41,14 @@
|
||||
"node": ">=6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^1.0.8",
|
||||
"@0xproject/dev-utils": "^1.0.7",
|
||||
"@0xproject/migrations": "^1.0.7",
|
||||
"@0xproject/subproviders": "^2.0.2",
|
||||
"@0xproject/abi-gen": "^1.0.9",
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/migrations": "^1.0.10",
|
||||
"@0xproject/subproviders": "^2.0.3",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^2.2.42",
|
||||
"@types/node": "^8.0.53",
|
||||
"@types/node": "*",
|
||||
"@types/sinon": "^2.2.2",
|
||||
"@types/uuid": "^3.4.2",
|
||||
"@types/web3-provider-engine": "^14.0.0",
|
||||
@@ -72,16 +72,16 @@
|
||||
"web3-provider-engine": "14.0.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^1.0.8",
|
||||
"@0xproject/base-contract": "^2.0.2",
|
||||
"@0xproject/fill-scenarios": "^1.0.1",
|
||||
"@0xproject/json-schemas": "^1.0.1",
|
||||
"@0xproject/order-utils": "^1.0.1",
|
||||
"@0xproject/types": "^1.0.1",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/web3-wrapper": "^2.0.2",
|
||||
"ethereum-types": "^1.0.6",
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/base-contract": "^2.0.3",
|
||||
"@0xproject/fill-scenarios": "^1.0.3",
|
||||
"@0xproject/json-schemas": "^1.0.2",
|
||||
"@0xproject/order-utils": "^1.0.3",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethereumjs-blockstream": "5.0.0",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"ethers": "3.0.22",
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "contracts",
|
||||
"version": "2.1.43",
|
||||
"version": "2.1.45",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -45,16 +45,16 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^1.0.8",
|
||||
"@0xproject/dev-utils": "^1.0.7",
|
||||
"@0xproject/sol-compiler": "^1.1.2",
|
||||
"@0xproject/sol-cov": "^2.1.2",
|
||||
"@0xproject/subproviders": "^2.0.2",
|
||||
"@0xproject/abi-gen": "^1.0.9",
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/sol-compiler": "^1.1.3",
|
||||
"@0xproject/sol-cov": "^2.1.3",
|
||||
"@0xproject/subproviders": "^2.0.3",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@types/bn.js": "^4.11.0",
|
||||
"@types/ethereumjs-abi": "^0.6.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "^8.0.53",
|
||||
"@types/node": "*",
|
||||
"@types/yargs": "^10.0.0",
|
||||
"chai": "^4.0.1",
|
||||
"chai-as-promised": "^7.1.0",
|
||||
@@ -72,15 +72,15 @@
|
||||
"yargs": "^10.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/base-contract": "^2.0.2",
|
||||
"@0xproject/order-utils": "^1.0.1",
|
||||
"@0xproject/types": "^1.0.1",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/web3-wrapper": "^2.0.2",
|
||||
"@0xproject/base-contract": "^2.0.3",
|
||||
"@0xproject/order-utils": "^1.0.3",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@types/js-combinatorics": "^0.5.29",
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereum-types": "^1.0.6",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethereumjs-abi": "0.6.5",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"ethers": "3.0.22",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.8",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1536142250,
|
||||
"version": "1.0.7",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.8 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.7 - _September 5, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/dev-utils",
|
||||
"version": "1.0.7",
|
||||
"version": "1.0.8",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -42,12 +42,12 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/subproviders": "^2.0.2",
|
||||
"@0xproject/types": "^1.0.1",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/web3-wrapper": "^2.0.2",
|
||||
"ethereum-types": "^1.0.6",
|
||||
"@0xproject/subproviders": "^2.0.3",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"lodash": "^4.17.5"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.7",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1536142250,
|
||||
"version": "1.0.6",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.7 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.6 - _September 5, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ethereum-types",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.7",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -36,7 +36,7 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": "^8.0.53",
|
||||
"@types/node": "*",
|
||||
"bignumber.js": "~4.1.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -238,7 +238,7 @@ export enum AbiType {
|
||||
Fallback = 'fallback',
|
||||
}
|
||||
|
||||
export type ContractEventArg = string | BigNumber | number | boolean;
|
||||
export type ContractEventArg = any;
|
||||
|
||||
export interface DecodedLogArgs {
|
||||
[argName: string]: ContractEventArg;
|
||||
|
@@ -1,4 +1,22 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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",
|
||||
|
@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.3 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## 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
|
||||
|
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "@0xproject/fill-scenarios",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.3",
|
||||
"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",
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/fill-scenarios/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^1.0.8",
|
||||
"@0xproject/abi-gen": "^1.0.9",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@types/lodash": "4.14.104",
|
||||
"copyfiles": "^2.0.0",
|
||||
@@ -37,13 +37,13 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/base-contract": "^2.0.2",
|
||||
"@0xproject/order-utils": "^1.0.1",
|
||||
"@0xproject/types": "^1.0.1",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/web3-wrapper": "^2.0.2",
|
||||
"ethereum-types": "^1.0.6",
|
||||
"@0xproject/base-contract": "^2.0.3",
|
||||
"@0xproject/order-utils": "^1.0.3",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethers": "3.0.22",
|
||||
"lodash": "^4.17.5"
|
||||
},
|
||||
|
@@ -1,4 +1,31 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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",
|
||||
|
@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.4 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.3 - _September 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.2 - _September 18, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.1 - _September 5, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/forwarder-helper",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.4",
|
||||
"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": {
|
||||
@@ -39,13 +36,13 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/forwarder-helper/README.md",
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^1.0.8",
|
||||
"@0xproject/json-schemas": "^1.0.1",
|
||||
"@0xproject/order-utils": "^1.0.1",
|
||||
"@0xproject/types": "^1.0.1",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@types/node": "^8.0.53",
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/json-schemas": "^1.0.2",
|
||||
"@0xproject/order-utils": "^1.0.3",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@types/node": "*",
|
||||
"lodash": "^4.17.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1536142250,
|
||||
"version": "1.0.1",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.2 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.1 - _September 5, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/json-schemas",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -38,14 +38,14 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/json-schemas/README.md",
|
||||
"dependencies": {
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@types/node": "^8.0.53",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@types/node": "*",
|
||||
"jsonschema": "^1.2.0",
|
||||
"lodash.values": "^4.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@types/lodash.foreach": "^4.5.3",
|
||||
"@types/lodash.values": "^4.3.3",
|
||||
"@types/mocha": "^2.2.42",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/metacoin",
|
||||
"version": "0.0.18",
|
||||
"version": "0.0.19",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -28,25 +28,25 @@
|
||||
"author": "",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@0xproject/abi-gen": "^1.0.8",
|
||||
"@0xproject/base-contract": "^2.0.2",
|
||||
"@0xproject/sol-cov": "^2.1.2",
|
||||
"@0xproject/subproviders": "^2.0.2",
|
||||
"@0xproject/abi-gen": "^1.0.9",
|
||||
"@0xproject/base-contract": "^2.0.3",
|
||||
"@0xproject/sol-cov": "^2.1.3",
|
||||
"@0xproject/subproviders": "^2.0.3",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@0xproject/types": "^1.0.1",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/web3-wrapper": "^2.0.2",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@types/mocha": "^5.2.2",
|
||||
"copyfiles": "^2.0.0",
|
||||
"ethereum-types": "^1.0.6",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethers": "3.0.22",
|
||||
"lodash": "^4.17.5",
|
||||
"run-s": "^0.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/dev-utils": "^1.0.7",
|
||||
"@0xproject/sol-compiler": "^1.1.2",
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/sol-compiler": "^1.1.3",
|
||||
"chai": "^4.0.1",
|
||||
"chai-as-promised": "^7.1.0",
|
||||
"chai-bignumber": "^2.0.1",
|
||||
|
@@ -1,4 +1,31 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.10",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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",
|
||||
|
@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.10 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.9 - _September 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.8 - _September 18, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.7 - _September 5, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
724
packages/migrations/artifacts/2.0.0-trimmed/AssetProxyOwner.json
Normal file
724
packages/migrations/artifacts/2.0.0-trimmed/AssetProxyOwner.json
Normal file
File diff suppressed because one or more lines are too long
345
packages/migrations/artifacts/2.0.0-trimmed/DummyERC20Token.json
Normal file
345
packages/migrations/artifacts/2.0.0-trimmed/DummyERC20Token.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
216
packages/migrations/artifacts/2.0.0-trimmed/ERC20Proxy.json
Normal file
216
packages/migrations/artifacts/2.0.0-trimmed/ERC20Proxy.json
Normal file
File diff suppressed because one or more lines are too long
189
packages/migrations/artifacts/2.0.0-trimmed/ERC20Token.json
Normal file
189
packages/migrations/artifacts/2.0.0-trimmed/ERC20Token.json
Normal 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": {}
|
||||
}
|
216
packages/migrations/artifacts/2.0.0-trimmed/ERC721Proxy.json
Normal file
216
packages/migrations/artifacts/2.0.0-trimmed/ERC721Proxy.json
Normal file
File diff suppressed because one or more lines are too long
268
packages/migrations/artifacts/2.0.0-trimmed/ERC721Token.json
Normal file
268
packages/migrations/artifacts/2.0.0-trimmed/ERC721Token.json
Normal file
File diff suppressed because one or more lines are too long
1997
packages/migrations/artifacts/2.0.0-trimmed/Exchange.json
Normal file
1997
packages/migrations/artifacts/2.0.0-trimmed/Exchange.json
Normal file
File diff suppressed because one or more lines are too long
473
packages/migrations/artifacts/2.0.0-trimmed/Forwarder.json
Normal file
473
packages/migrations/artifacts/2.0.0-trimmed/Forwarder.json
Normal file
File diff suppressed because one or more lines are too long
41
packages/migrations/artifacts/2.0.0-trimmed/IValidator.json
Normal file
41
packages/migrations/artifacts/2.0.0-trimmed/IValidator.json
Normal 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": {}
|
||||
}
|
37
packages/migrations/artifacts/2.0.0-trimmed/IWallet.json
Normal file
37
packages/migrations/artifacts/2.0.0-trimmed/IWallet.json
Normal 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": {}
|
||||
}
|
597
packages/migrations/artifacts/2.0.0-trimmed/OrderValidator.json
Normal file
597
packages/migrations/artifacts/2.0.0-trimmed/OrderValidator.json
Normal file
File diff suppressed because one or more lines are too long
314
packages/migrations/artifacts/2.0.0-trimmed/WETH9.json
Normal file
314
packages/migrations/artifacts/2.0.0-trimmed/WETH9.json
Normal 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": "[]"
|
||||
}
|
||||
}
|
||||
}
|
248
packages/migrations/artifacts/2.0.0-trimmed/ZRXToken.json
Normal file
248
packages/migrations/artifacts/2.0.0-trimmed/ZRXToken.json
Normal 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": "[]"
|
||||
}
|
||||
}
|
||||
}
|
@@ -327,6 +327,11 @@
|
||||
}
|
||||
},
|
||||
"networks": {
|
||||
"1": {
|
||||
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
|
||||
"links": {},
|
||||
"constructorArgs": "[]"
|
||||
},
|
||||
"3": {
|
||||
"address": "0xc778417e063141139fce010982780140aa0cd5ab",
|
||||
"links": {},
|
||||
|
@@ -10022,6 +10022,11 @@
|
||||
}
|
||||
},
|
||||
"networks": {
|
||||
"1": {
|
||||
"address": "0xe41d2489571d322189246dafa5ebde1f4699f498",
|
||||
"links": {},
|
||||
"constructorArgs": "[]"
|
||||
},
|
||||
"3": {
|
||||
"address": "0xff67881f8d12f372d91baae9752eb3631ff0ed00",
|
||||
"links": {},
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/migrations",
|
||||
"version": "1.0.7",
|
||||
"version": "1.0.10",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -30,10 +30,10 @@
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^1.0.8",
|
||||
"@0xproject/dev-utils": "^1.0.7",
|
||||
"@0xproject/abi-gen": "^1.0.9",
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@0xproject/types": "^1.0.1",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@types/yargs": "^10.0.0",
|
||||
"copyfiles": "^2.0.0",
|
||||
"make-promises-safe": "^1.1.0",
|
||||
@@ -44,15 +44,15 @@
|
||||
"yargs": "^10.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/base-contract": "^2.0.2",
|
||||
"@0xproject/order-utils": "^1.0.1",
|
||||
"@0xproject/sol-compiler": "^1.1.2",
|
||||
"@0xproject/subproviders": "^2.0.2",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/web3-wrapper": "^2.0.2",
|
||||
"@0xproject/base-contract": "^2.0.3",
|
||||
"@0xproject/order-utils": "^1.0.3",
|
||||
"@0xproject/sol-compiler": "^1.1.3",
|
||||
"@0xproject/subproviders": "^2.0.3",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@ledgerhq/hw-app-eth": "^4.3.0",
|
||||
"ethereum-types": "^1.0.6",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethers": "3.0.22",
|
||||
"lodash": "^4.17.5"
|
||||
},
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@0xproject/monorepo-scripts",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -33,7 +33,7 @@
|
||||
"devDependencies": {
|
||||
"@types/glob": "^5.0.33",
|
||||
"@types/mkdirp": "^0.5.2",
|
||||
"@types/node": "^8.0.53",
|
||||
"@types/node": "*",
|
||||
"@types/opn": "^5.1.0",
|
||||
"@types/rimraf": "^2.0.2",
|
||||
"@types/semver": "5.5.0",
|
||||
|
@@ -1,4 +1,22 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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": [
|
||||
|
@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.3 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## 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)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/order-utils",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.3",
|
||||
"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",
|
||||
@@ -38,7 +38,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/order-utils/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/dev-utils": "^1.0.7",
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@types/bn.js": "^4.11.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
@@ -57,16 +57,16 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^1.0.8",
|
||||
"@0xproject/base-contract": "^2.0.2",
|
||||
"@0xproject/json-schemas": "^1.0.1",
|
||||
"@0xproject/types": "^1.0.1",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/web3-wrapper": "^2.0.2",
|
||||
"@types/node": "^8.0.53",
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/base-contract": "^2.0.3",
|
||||
"@0xproject/json-schemas": "^1.0.2",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@types/node": "*",
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereum-types": "^1.0.6",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethereumjs-abi": "0.6.5",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"ethers": "3.0.22",
|
||||
|
@@ -1,4 +1,31 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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",
|
||||
|
@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.4 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## 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
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/order-watcher",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.4",
|
||||
"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"
|
||||
@@ -42,14 +42,14 @@
|
||||
"node": ">=6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^1.0.8",
|
||||
"@0xproject/dev-utils": "^1.0.7",
|
||||
"@0xproject/migrations": "^1.0.7",
|
||||
"@0xproject/abi-gen": "^1.0.9",
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/migrations": "^1.0.10",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@types/bintrees": "^1.0.2",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^2.2.42",
|
||||
"@types/node": "^8.0.53",
|
||||
"@types/node": "*",
|
||||
"@types/sinon": "^2.2.2",
|
||||
"awesome-typescript-loader": "^3.1.3",
|
||||
"chai": "^4.0.1",
|
||||
@@ -70,18 +70,18 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"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/json-schemas": "^1.0.1",
|
||||
"@0xproject/order-utils": "^1.0.1",
|
||||
"@0xproject/types": "^1.0.1",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/web3-wrapper": "^2.0.2",
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/base-contract": "^2.0.3",
|
||||
"@0xproject/contract-wrappers": "^1.0.4",
|
||||
"@0xproject/fill-scenarios": "^1.0.3",
|
||||
"@0xproject/json-schemas": "^1.0.2",
|
||||
"@0xproject/order-utils": "^1.0.3",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"bintrees": "^1.0.2",
|
||||
"ethereum-types": "^1.0.6",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethereumjs-blockstream": "5.0.0",
|
||||
"ethers": "3.0.22",
|
||||
"lodash": "^4.17.5"
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.9",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1536142250,
|
||||
"version": "1.0.8",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.9 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.8 - _September 5, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/react-docs",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -23,7 +23,7 @@
|
||||
"url": "https://github.com/0xProject/0x-monorepo.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/dev-utils": "^1.0.7",
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@types/compare-versions": "^3.0.0",
|
||||
"copyfiles": "^2.0.0",
|
||||
@@ -33,11 +33,11 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/react-shared": "^1.0.9",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/react-shared": "^1.0.10",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/material-ui": "^0.20.0",
|
||||
"@types/node": "^8.0.53",
|
||||
"@types/node": "*",
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"@types/react-scroll": "1.5.3",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.10",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1536142250,
|
||||
"version": "1.0.9",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.10 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.9 - _September 5, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/react-shared",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -24,7 +24,7 @@
|
||||
"url": "https://github.com/0xProject/0x-monorepo.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/dev-utils": "^1.0.7",
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"copyfiles": "^2.0.0",
|
||||
"make-promises-safe": "^1.1.0",
|
||||
@@ -37,7 +37,7 @@
|
||||
"@types/is-mobile": "0.3.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/material-ui": "0.18.0",
|
||||
"@types/node": "^8.0.53",
|
||||
"@types/node": "*",
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"@types/react-scroll": "1.5.3",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.1.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1536142250,
|
||||
"version": "1.1.2",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.1.3 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.1.2 - _September 5, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/sol-compiler",
|
||||
"version": "1.1.2",
|
||||
"version": "1.1.3",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -41,7 +41,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-compiler/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/dev-utils": "^1.0.7",
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@types/mkdirp": "^0.5.2",
|
||||
"@types/require-from-string": "^1.2.0",
|
||||
@@ -64,16 +64,16 @@
|
||||
"zeppelin-solidity": "1.8.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^1.0.8",
|
||||
"@0xproject/json-schemas": "^1.0.1",
|
||||
"@0xproject/sol-resolver": "^1.0.8",
|
||||
"@0xproject/types": "^1.0.1",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/web3-wrapper": "^2.0.2",
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/json-schemas": "^1.0.2",
|
||||
"@0xproject/sol-resolver": "^1.0.9",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@types/yargs": "^11.0.0",
|
||||
"chalk": "^2.3.0",
|
||||
"ethereum-types": "^1.0.6",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"lodash": "^4.17.5",
|
||||
"mkdirp": "^0.5.1",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "2.1.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1536142250,
|
||||
"version": "2.1.2",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.1.3 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.1.2 - _September 5, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/sol-cov",
|
||||
"version": "2.1.2",
|
||||
"version": "2.1.3",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -41,13 +41,13 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x.js/packages/sol-cov/README.md",
|
||||
"dependencies": {
|
||||
"@0xproject/dev-utils": "^1.0.7",
|
||||
"@0xproject/sol-compiler": "^1.1.2",
|
||||
"@0xproject/subproviders": "^2.0.2",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/web3-wrapper": "^2.0.2",
|
||||
"ethereum-types": "^1.0.6",
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/sol-compiler": "^1.1.3",
|
||||
"@0xproject/subproviders": "^2.0.3",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"glob": "^7.1.2",
|
||||
"istanbul": "^0.4.5",
|
||||
@@ -64,7 +64,7 @@
|
||||
"@types/loglevel": "^1.5.3",
|
||||
"@types/mkdirp": "^0.5.1",
|
||||
"@types/mocha": "^2.2.42",
|
||||
"@types/node": "^8.0.53",
|
||||
"@types/node": "*",
|
||||
"@types/rimraf": "^2.0.2",
|
||||
"@types/solidity-parser-antlr": "^0.2.0",
|
||||
"chai": "^4.0.1",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.9",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1536142250,
|
||||
"version": "1.0.8",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.9 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.8 - _September 5, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/sol-resolver",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -30,8 +30,8 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/types": "^1.0.1",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"lodash": "^4.17.5"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.9",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1536142250,
|
||||
"version": "1.0.8",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.9 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.8 - _September 5, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/sra-report",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -33,13 +33,13 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-report/README.md",
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^1.0.8",
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/connect": "1.0.4",
|
||||
"@0xproject/json-schemas": "^0.8.3",
|
||||
"@0xproject/order-utils": "^0.0.9",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"chalk": "^2.3.0",
|
||||
"lodash": "^4.17.5",
|
||||
"newman": "^3.9.3",
|
||||
@@ -51,7 +51,7 @@
|
||||
"@types/mocha": "^2.2.48",
|
||||
"@types/newman": "^3.9.0",
|
||||
"@types/nock": "^9.1.2",
|
||||
"@types/node": "^8.0.53",
|
||||
"@types/node": "*",
|
||||
"@types/yargs": "^10.0.0",
|
||||
"chai": "^4.0.1",
|
||||
"chai-as-promised": "^7.1.0",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1536142250,
|
||||
"version": "1.0.1",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.2 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.1 - _September 5, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/sra-spec",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -34,7 +34,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-spec/README.md",
|
||||
"dependencies": {
|
||||
"@0xproject/json-schemas": "^1.0.1"
|
||||
"@0xproject/json-schemas": "^1.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "2.0.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1536142250,
|
||||
"version": "2.0.2",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.3 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.2 - _September 5, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/subproviders",
|
||||
"version": "2.0.2",
|
||||
"version": "2.0.3",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -28,11 +28,11 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^1.0.8",
|
||||
"@0xproject/types": "^1.0.1",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/web3-wrapper": "^2.0.2",
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@ledgerhq/hw-app-eth": "^4.3.0",
|
||||
"@ledgerhq/hw-transport-u2f": "^4.3.0",
|
||||
"@types/eth-lightwallet": "^3.0.0",
|
||||
@@ -41,7 +41,7 @@
|
||||
"bip39": "^2.5.0",
|
||||
"bn.js": "^4.11.8",
|
||||
"eth-lightwallet": "^3.0.1",
|
||||
"ethereum-types": "^1.0.6",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethereumjs-tx": "^1.3.5",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"ganache-core": "0xProject/ganache-core#monorepo-dep",
|
||||
@@ -59,7 +59,7 @@
|
||||
"@types/hdkey": "^0.7.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^2.2.42",
|
||||
"@types/node": "^8.0.53",
|
||||
"@types/node": "*",
|
||||
"@types/sinon": "^2.2.2",
|
||||
"@types/web3-provider-engine": "^14.0.0",
|
||||
"chai": "^4.0.1",
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@0xproject/testnet-faucets",
|
||||
"version": "1.0.44",
|
||||
"version": "1.0.47",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -17,13 +17,13 @@
|
||||
"author": "Fabio Berger",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"0x.js": "0.38.5",
|
||||
"@0xproject/subproviders": "^2.0.2",
|
||||
"@0xproject/typescript-typings": "^2.0.0",
|
||||
"@0xproject/utils": "^1.0.8",
|
||||
"@0xproject/web3-wrapper": "^2.0.2",
|
||||
"0x.js": "^1.0.4",
|
||||
"@0xproject/subproviders": "^2.0.3",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"body-parser": "^1.17.1",
|
||||
"ethereum-types": "^1.0.6",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethereumjs-tx": "^1.3.5",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"express": "^4.15.2",
|
||||
|
@@ -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}`);
|
||||
};
|
||||
},
|
||||
};
|
||||
|
@@ -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}`);
|
||||
|
@@ -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}`,
|
||||
};
|
||||
|
||||
|
44
packages/testnet-faucets/src/ts/tokens.ts
Normal file
44
packages/testnet-faucets/src/ts/tokens.ts
Normal 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',
|
||||
},
|
||||
},
|
||||
};
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "1.0.1",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.2 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.1 - _September 5, 2018_
|
||||
|
||||
* Add AssetProxyOwner revert reasons (#1041)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/types",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -30,9 +30,9 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": "^8.0.53",
|
||||
"@types/node": "*",
|
||||
"bignumber.js": "~4.1.0",
|
||||
"ethereum-types": "^1.0.6"
|
||||
"ethereum-types": "^1.0.7"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "2.0.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.1 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.0 - _September 5, 2018_
|
||||
|
||||
* Remove types for web3-provider-engine, newman, ganache-core, detect-node, eth-lightwallet (#1052)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user