Compare commits
81 Commits
developmen
...
@0x/sol-co
Author | SHA1 | Date | |
---|---|---|---|
|
bbd3c03969 | ||
|
a4405c3d39 | ||
|
0fe4f587d8 | ||
|
d3c714bd17 | ||
|
c399b7a7d5 | ||
|
b9234e94fb | ||
|
417bb87785 | ||
|
0233ae3134 | ||
|
eed0c5dd59 | ||
|
2b3b167095 | ||
|
5d91d19808 | ||
|
0f374ddee9 | ||
|
a65a9913cd | ||
|
1ead32c666 | ||
|
d1af9fc780 | ||
|
0f06737fb6 | ||
|
1676231532 | ||
|
b1caf697c8 | ||
|
51481065fe | ||
|
e367da710c | ||
|
f493d6524d | ||
|
e1b85da2a7 | ||
|
22c6548ed1 | ||
|
afb32c087d | ||
|
bbc1ed1c64 | ||
|
3a46f1a27a | ||
|
90cd364780 | ||
|
6795e6f078 | ||
|
cfb3404349 | ||
|
0212f3ee78 | ||
|
6b2995a4ee | ||
|
09e7ac54d4 | ||
|
f69009d4a8 | ||
|
206802ae33 | ||
|
91d4138fb8 | ||
|
cb455f951a | ||
|
5f25d20cd0 | ||
|
1f0e2cd910 | ||
|
1749d02701 | ||
|
55ace3179c | ||
|
7866d9ccb4 | ||
|
51f73d07fa | ||
|
63d84674ab | ||
|
14066997b2 | ||
|
28561e765a | ||
|
453fbbdc5d | ||
|
1e1e5ec10d | ||
|
2088b0e459 | ||
|
58400d9e01 | ||
|
ac9375f1d2 | ||
|
db061c9355 | ||
|
d5ce6c464b | ||
|
b06205bb7f | ||
|
f528a3e1de | ||
|
bddfdacfad | ||
|
d3cdd3f235 | ||
|
41ae45ea40 | ||
|
657e0895ea | ||
|
b2592d1cc2 | ||
|
aa3524c3b2 | ||
|
39deb1a05f | ||
|
302d08e290 | ||
|
05489dd7f1 | ||
|
55bd076602 | ||
|
7a224fe08f | ||
|
3bdeb82097 | ||
|
f49ab3f919 | ||
|
42d5bdd3ab | ||
|
7228cbfe92 | ||
|
11e2fc5bc4 | ||
|
3e88f820b8 | ||
|
163750f8c2 | ||
|
4aabc5d791 | ||
|
c9a7b9dcc1 | ||
|
98075b5653 | ||
|
57ae5be916 | ||
|
8caf62997f | ||
|
f8656ad376 | ||
|
29c6c2a2ad | ||
|
f2db67ef02 | ||
|
72b8ef33d9 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -133,9 +133,6 @@ python-packages/contract_wrappers/src/zero_ex/contract_wrappers/order_validator/
|
||||
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/weth9/__init__.py
|
||||
python-packages/contract_wrappers/src/zero_ex/contract_wrappers/zrx_token/__init__.py
|
||||
|
||||
# cli test output
|
||||
packages/abi-gen/test-cli/output
|
||||
|
||||
# solc-bin in sol-compiler
|
||||
packages/sol-compiler/solc_bin/
|
||||
|
||||
|
@@ -109,7 +109,7 @@ These packages are all under development. See [/contracts/README.md](/contracts/
|
||||
|
||||
## Usage
|
||||
|
||||
Node version >= 6.12 is required.
|
||||
Node version 6.x or 8.x is required.
|
||||
|
||||
Most of the packages require additional typings for external dependencies.
|
||||
You can include those by prepending the `@0x/typescript-typings` package to your [`typeRoots`](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html) config.
|
||||
@@ -138,6 +138,8 @@ Then install dependencies
|
||||
yarn install
|
||||
```
|
||||
|
||||
You will also need to have Python 3 installed, in order to build and run the tests of `abi-gen`'s command-line interface, which is integrated with the yarn build, yarn test, and yarn lint commands described below. More specifically, your local pip should resolve to the Python 3 version of pip, not a Python 2.x version.
|
||||
|
||||
### Build
|
||||
|
||||
To build all packages:
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "2.2.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
"version": "2.2.5",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.2.6 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.2.5 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-asset-proxy",
|
||||
"version": "2.2.5",
|
||||
"version": "2.2.6",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/protocol/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.1.0",
|
||||
"@0x/abi-gen": "^4.1.1",
|
||||
"@0x/contracts-gen": "^1.0.13",
|
||||
"@0x/contracts-test-utils": "^3.1.13",
|
||||
"@0x/dev-utils": "^2.3.0",
|
||||
"@0x/sol-compiler": "^3.1.12",
|
||||
"@0x/contracts-test-utils": "^3.1.14",
|
||||
"@0x/dev-utils": "^2.3.1",
|
||||
"@0x/sol-compiler": "^3.1.13",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,16 +69,16 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.1",
|
||||
"@0x/contracts-erc1155": "^1.1.12",
|
||||
"@0x/contracts-erc20": "^2.2.11",
|
||||
"@0x/contracts-erc721": "^2.1.12",
|
||||
"@0x/contracts-utils": "^3.2.1",
|
||||
"@0x/order-utils": "^8.2.5",
|
||||
"@0x/base-contract": "^5.3.2",
|
||||
"@0x/contracts-erc1155": "^1.1.13",
|
||||
"@0x/contracts-erc20": "^2.2.12",
|
||||
"@0x/contracts-erc721": "^2.1.13",
|
||||
"@0x/contracts-utils": "^3.2.2",
|
||||
"@0x/order-utils": "^8.3.0",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"ethereum-types": "^2.1.4",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "2.0.11",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
"version": "2.0.10",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.11 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.10 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-coordinator",
|
||||
"version": "2.0.10",
|
||||
"version": "2.0.11",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.1.0",
|
||||
"@0x/abi-gen": "^4.1.1",
|
||||
"@0x/contracts-gen": "^1.0.13",
|
||||
"@0x/contracts-test-utils": "^3.1.13",
|
||||
"@0x/dev-utils": "^2.3.0",
|
||||
"@0x/sol-compiler": "^3.1.12",
|
||||
"@0x/contracts-test-utils": "^3.1.14",
|
||||
"@0x/dev-utils": "^2.3.1",
|
||||
"@0x/sol-compiler": "^3.1.13",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,17 +69,17 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.1",
|
||||
"@0x/contracts-asset-proxy": "^2.2.5",
|
||||
"@0x/contracts-erc20": "^2.2.11",
|
||||
"@0x/contracts-exchange": "^2.1.11",
|
||||
"@0x/contracts-exchange-libs": "^3.0.5",
|
||||
"@0x/contracts-utils": "^3.2.1",
|
||||
"@0x/order-utils": "^8.2.5",
|
||||
"@0x/base-contract": "^5.3.2",
|
||||
"@0x/contracts-asset-proxy": "^2.2.6",
|
||||
"@0x/contracts-erc20": "^2.2.12",
|
||||
"@0x/contracts-exchange": "^2.1.12",
|
||||
"@0x/contracts-exchange-libs": "^3.0.6",
|
||||
"@0x/contracts-utils": "^3.2.2",
|
||||
"@0x/order-utils": "^8.3.0",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"ethereum-types": "^2.1.4",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "0.0.8",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
"version": "0.0.7",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.0.8 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.0.7 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-dev-utils",
|
||||
"version": "0.0.7",
|
||||
"version": "0.0.8",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/dev-utils/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.1.0",
|
||||
"@0x/abi-gen": "^4.1.1",
|
||||
"@0x/contracts-gen": "^1.0.13",
|
||||
"@0x/contracts-test-utils": "^3.1.13",
|
||||
"@0x/dev-utils": "^2.3.0",
|
||||
"@0x/sol-compiler": "^3.1.12",
|
||||
"@0x/contracts-test-utils": "^3.1.14",
|
||||
"@0x/dev-utils": "^2.3.1",
|
||||
"@0x/sol-compiler": "^3.1.13",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,19 +69,19 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.1",
|
||||
"@0x/contracts-asset-proxy": "^2.2.5",
|
||||
"@0x/contracts-erc1155": "^1.1.12",
|
||||
"@0x/contracts-erc20": "^2.2.11",
|
||||
"@0x/contracts-erc721": "^2.1.12",
|
||||
"@0x/contracts-exchange": "^2.1.11",
|
||||
"@0x/contracts-exchange-libs": "^3.0.5",
|
||||
"@0x/contracts-utils": "^3.2.1",
|
||||
"@0x/order-utils": "^8.2.5",
|
||||
"@0x/base-contract": "^5.3.2",
|
||||
"@0x/contracts-asset-proxy": "^2.2.6",
|
||||
"@0x/contracts-erc1155": "^1.1.13",
|
||||
"@0x/contracts-erc20": "^2.2.12",
|
||||
"@0x/contracts-erc721": "^2.1.13",
|
||||
"@0x/contracts-exchange": "^2.1.12",
|
||||
"@0x/contracts-exchange-libs": "^3.0.6",
|
||||
"@0x/contracts-utils": "^3.2.2",
|
||||
"@0x/order-utils": "^8.3.0",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"ethereum-types": "^2.1.4",
|
||||
"ethereumjs-util": "^5.1.1"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "1.1.13",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
"version": "1.1.12",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.1.13 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.1.12 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-erc1155",
|
||||
"version": "1.1.12",
|
||||
"version": "1.1.13",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,10 +47,10 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.1.0",
|
||||
"@0x/abi-gen": "^4.1.1",
|
||||
"@0x/contracts-gen": "^1.0.13",
|
||||
"@0x/dev-utils": "^2.3.0",
|
||||
"@0x/sol-compiler": "^3.1.12",
|
||||
"@0x/dev-utils": "^2.3.1",
|
||||
"@0x/sol-compiler": "^3.1.13",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -68,13 +68,13 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.1",
|
||||
"@0x/contracts-test-utils": "^3.1.13",
|
||||
"@0x/contracts-utils": "^3.2.1",
|
||||
"@0x/base-contract": "^5.3.2",
|
||||
"@0x/contracts-test-utils": "^3.1.14",
|
||||
"@0x/contracts-utils": "^3.2.2",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"ethereum-types": "^2.1.4",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "2.2.12",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
"version": "2.2.11",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.2.12 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.2.11 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-erc20",
|
||||
"version": "2.2.11",
|
||||
"version": "2.2.12",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.1.0",
|
||||
"@0x/abi-gen": "^4.1.1",
|
||||
"@0x/contracts-gen": "^1.0.13",
|
||||
"@0x/contracts-test-utils": "^3.1.13",
|
||||
"@0x/dev-utils": "^2.3.0",
|
||||
"@0x/sol-compiler": "^3.1.12",
|
||||
"@0x/contracts-test-utils": "^3.1.14",
|
||||
"@0x/dev-utils": "^2.3.1",
|
||||
"@0x/sol-compiler": "^3.1.13",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,12 +69,12 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.1",
|
||||
"@0x/contracts-utils": "^3.2.1",
|
||||
"@0x/base-contract": "^5.3.2",
|
||||
"@0x/contracts-utils": "^3.2.2",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"ethereum-types": "^2.1.4",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "2.1.13",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
"version": "2.1.12",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.1.13 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.1.12 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-erc721",
|
||||
"version": "2.1.12",
|
||||
"version": "2.1.13",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.1.0",
|
||||
"@0x/abi-gen": "^4.1.1",
|
||||
"@0x/contracts-gen": "^1.0.13",
|
||||
"@0x/contracts-test-utils": "^3.1.13",
|
||||
"@0x/dev-utils": "^2.3.0",
|
||||
"@0x/sol-compiler": "^3.1.12",
|
||||
"@0x/contracts-test-utils": "^3.1.14",
|
||||
"@0x/dev-utils": "^2.3.1",
|
||||
"@0x/sol-compiler": "^3.1.13",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,12 +69,12 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.1",
|
||||
"@0x/contracts-utils": "^3.2.1",
|
||||
"@0x/base-contract": "^5.3.2",
|
||||
"@0x/contracts-utils": "^3.2.2",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"ethereum-types": "^2.1.4",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "3.0.10",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
"version": "3.0.9",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v3.0.10 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v3.0.9 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-exchange-forwarder",
|
||||
"version": "3.0.9",
|
||||
"version": "3.0.10",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -46,11 +46,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.1.0",
|
||||
"@0x/abi-gen": "^4.1.1",
|
||||
"@0x/contracts-gen": "^1.0.13",
|
||||
"@0x/contracts-test-utils": "^3.1.13",
|
||||
"@0x/dev-utils": "^2.3.0",
|
||||
"@0x/sol-compiler": "^3.1.12",
|
||||
"@0x/contracts-test-utils": "^3.1.14",
|
||||
"@0x/dev-utils": "^2.3.1",
|
||||
"@0x/sol-compiler": "^3.1.13",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -68,18 +68,18 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.1",
|
||||
"@0x/contracts-asset-proxy": "^2.2.5",
|
||||
"@0x/contracts-erc20": "^2.2.11",
|
||||
"@0x/contracts-erc721": "^2.1.12",
|
||||
"@0x/contracts-exchange": "^2.1.11",
|
||||
"@0x/contracts-exchange-libs": "^3.0.5",
|
||||
"@0x/contracts-utils": "^3.2.1",
|
||||
"@0x/order-utils": "^8.2.5",
|
||||
"@0x/base-contract": "^5.3.2",
|
||||
"@0x/contracts-asset-proxy": "^2.2.6",
|
||||
"@0x/contracts-erc20": "^2.2.12",
|
||||
"@0x/contracts-erc721": "^2.1.13",
|
||||
"@0x/contracts-exchange": "^2.1.12",
|
||||
"@0x/contracts-exchange-libs": "^3.0.6",
|
||||
"@0x/contracts-utils": "^3.2.2",
|
||||
"@0x/order-utils": "^8.3.0",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"ethereum-types": "^2.1.4",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "3.0.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
"version": "3.0.5",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v3.0.6 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v3.0.5 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-exchange-libs",
|
||||
"version": "3.0.5",
|
||||
"version": "3.0.6",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/libs/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.1.0",
|
||||
"@0x/abi-gen": "^4.1.1",
|
||||
"@0x/contracts-gen": "^1.0.13",
|
||||
"@0x/contracts-test-utils": "^3.1.13",
|
||||
"@0x/dev-utils": "^2.3.0",
|
||||
"@0x/sol-compiler": "^3.1.12",
|
||||
"@0x/contracts-test-utils": "^3.1.14",
|
||||
"@0x/dev-utils": "^2.3.1",
|
||||
"@0x/sol-compiler": "^3.1.13",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,13 +69,13 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.1",
|
||||
"@0x/contracts-utils": "^3.2.1",
|
||||
"@0x/order-utils": "^8.2.5",
|
||||
"@0x/base-contract": "^5.3.2",
|
||||
"@0x/contracts-utils": "^3.2.2",
|
||||
"@0x/order-utils": "^8.3.0",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"ethereum-types": "^2.1.4",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "2.1.12",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
"version": "2.1.11",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.1.12 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.1.11 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -21,7 +21,7 @@ pragma solidity ^0.5.5;
|
||||
import "../src/interfaces/IValidator.sol";
|
||||
|
||||
|
||||
contract Validator is
|
||||
contract Validator is
|
||||
IValidator
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ contract Validator is
|
||||
/// @param hash Message hash that is signed.
|
||||
/// @param signerAddress Address that should have signed the given hash.
|
||||
/// @param signature Proof of signing.
|
||||
/// @return Validity of signature.
|
||||
/// @return Returns a known magic value if the signature is valid.
|
||||
// solhint-disable no-unused-vars
|
||||
function isValidSignature(
|
||||
bytes32 hash,
|
||||
@@ -48,9 +48,11 @@ contract Validator is
|
||||
)
|
||||
external
|
||||
view
|
||||
returns (bool isValid)
|
||||
returns (bytes4)
|
||||
{
|
||||
return (signerAddress == VALID_SIGNER);
|
||||
require(signerAddress == VALID_SIGNER, "INVALID_SIGNER");
|
||||
bytes4 magicValue = bytes4(keccak256("isValidValidatorSignature(address,bytes32,address,bytes)"));
|
||||
return magicValue;
|
||||
}
|
||||
// solhint-enable no-unused-vars
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@ import "../src/interfaces/IWallet.sol";
|
||||
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
|
||||
|
||||
|
||||
contract Wallet is
|
||||
contract Wallet is
|
||||
IWallet
|
||||
{
|
||||
using LibBytes for bytes;
|
||||
@@ -41,14 +41,14 @@ contract Wallet is
|
||||
/// The signer must match the owner of this wallet.
|
||||
/// @param hash Message hash that is signed.
|
||||
/// @param eip712Signature Proof of signing.
|
||||
/// @return Validity of signature.
|
||||
/// @return Returns a known magic value if the signature is valid.
|
||||
function isValidSignature(
|
||||
bytes32 hash,
|
||||
bytes calldata eip712Signature
|
||||
)
|
||||
external
|
||||
view
|
||||
returns (bool isValid)
|
||||
returns (bytes4)
|
||||
{
|
||||
require(
|
||||
eip712Signature.length == 65,
|
||||
@@ -59,7 +59,8 @@ contract Wallet is
|
||||
bytes32 r = eip712Signature.readBytes32(1);
|
||||
bytes32 s = eip712Signature.readBytes32(33);
|
||||
address recoveredAddress = ecrecover(hash, v, r, s);
|
||||
isValid = WALLET_OWNER == recoveredAddress;
|
||||
return isValid;
|
||||
require(WALLET_OWNER == recoveredAddress, "INVALID_SIGNATURE");
|
||||
bytes4 magicValue = bytes4(keccak256("isValidWalletSignature(bytes32,address,bytes)"));
|
||||
return magicValue;
|
||||
}
|
||||
}
|
||||
|
@@ -73,10 +73,12 @@ contract Whitelist is
|
||||
)
|
||||
external
|
||||
view
|
||||
returns (bool isValid)
|
||||
returns (bytes4)
|
||||
{
|
||||
// solhint-disable-next-line avoid-tx-origin
|
||||
return signerAddress == tx.origin;
|
||||
require(signerAddress == tx.origin, "INVALID_SIGNER");
|
||||
bytes4 magicValue = bytes4(keccak256("isValidValidatorSignature(address,bytes32,address,bytes)"));
|
||||
return magicValue;
|
||||
}
|
||||
// solhint-enable no-unused-vars
|
||||
|
||||
|
@@ -32,7 +32,7 @@ contract MixinSignatureValidator is
|
||||
MTransactions
|
||||
{
|
||||
using LibBytes for bytes;
|
||||
|
||||
|
||||
// Mapping of hash => signer => signed
|
||||
mapping (bytes32 => mapping (address => bool)) public preSigned;
|
||||
|
||||
@@ -197,7 +197,7 @@ contract MixinSignatureValidator is
|
||||
} else if (signatureType == SignatureType.Validator) {
|
||||
// Pop last 20 bytes off of signature byte array.
|
||||
address validatorAddress = signature.popLast20Bytes();
|
||||
|
||||
|
||||
// Ensure signer has approved validator.
|
||||
if (!allowedValidators[signerAddress][validatorAddress]) {
|
||||
return false;
|
||||
@@ -224,7 +224,8 @@ contract MixinSignatureValidator is
|
||||
revert("SIGNATURE_UNSUPPORTED");
|
||||
}
|
||||
|
||||
/// @dev Verifies signature using logic defined by Wallet contract.
|
||||
/// @dev Verifies signature using logic defined by Wallet contract. Wallet contract
|
||||
/// must return `bytes4(keccak256("isValidWalletSignature(bytes32,address,bytes)"))`
|
||||
/// @param hash Any 32 byte hash.
|
||||
/// @param walletAddress Address that should have signed the given hash
|
||||
/// and defines its own signature verification method.
|
||||
@@ -244,7 +245,19 @@ contract MixinSignatureValidator is
|
||||
hash,
|
||||
signature
|
||||
);
|
||||
// bytes4 0xb0671381
|
||||
bytes32 magicValue = bytes32(bytes4(keccak256("isValidWalletSignature(bytes32,address,bytes)")));
|
||||
assembly {
|
||||
// extcodesize added as an extra safety measure
|
||||
if iszero(extcodesize(walletAddress)) {
|
||||
// Revert with `Error("WALLET_ERROR")`
|
||||
mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
|
||||
mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
|
||||
mstore(64, 0x0000000c57414c4c45545f4552524f5200000000000000000000000000000000)
|
||||
mstore(96, 0)
|
||||
revert(0, 100)
|
||||
}
|
||||
|
||||
let cdStart := add(callData, 32)
|
||||
let success := staticcall(
|
||||
gas, // forward all gas
|
||||
@@ -255,6 +268,15 @@ contract MixinSignatureValidator is
|
||||
32 // output size is 32 bytes
|
||||
)
|
||||
|
||||
if iszero(eq(returndatasize(), 32)) {
|
||||
// Revert with `Error("WALLET_ERROR")`
|
||||
mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
|
||||
mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
|
||||
mstore(64, 0x0000000c57414c4c45545f4552524f5200000000000000000000000000000000)
|
||||
mstore(96, 0)
|
||||
revert(0, 100)
|
||||
}
|
||||
|
||||
switch success
|
||||
case 0 {
|
||||
// Revert with `Error("WALLET_ERROR")`
|
||||
@@ -266,13 +288,17 @@ contract MixinSignatureValidator is
|
||||
}
|
||||
case 1 {
|
||||
// Signature is valid if call did not revert and returned true
|
||||
isValid := mload(cdStart)
|
||||
isValid := eq(
|
||||
and(mload(cdStart), 0xffffffff00000000000000000000000000000000000000000000000000000000),
|
||||
and(magicValue, 0xffffffff00000000000000000000000000000000000000000000000000000000)
|
||||
)
|
||||
}
|
||||
}
|
||||
return isValid;
|
||||
}
|
||||
|
||||
/// @dev Verifies signature using logic defined by Validator contract.
|
||||
/// Validator must return `bytes4(keccak256("isValidValidatorSignature(address,bytes32,address,bytes)"))`
|
||||
/// @param validatorAddress Address of validator contract.
|
||||
/// @param hash Any 32 byte hash.
|
||||
/// @param signerAddress Address that should have signed the given hash.
|
||||
@@ -294,7 +320,19 @@ contract MixinSignatureValidator is
|
||||
signerAddress,
|
||||
signature
|
||||
);
|
||||
// bytes4 0x42b38674
|
||||
bytes32 magicValue = bytes32(bytes4(keccak256("isValidValidatorSignature(address,bytes32,address,bytes)")));
|
||||
assembly {
|
||||
// extcodesize added as an extra safety measure
|
||||
if iszero(extcodesize(validatorAddress)) {
|
||||
// Revert with `Error("VALIDATOR_ERROR")`
|
||||
mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
|
||||
mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
|
||||
mstore(64, 0x0000000f56414c494441544f525f4552524f5200000000000000000000000000)
|
||||
mstore(96, 0)
|
||||
revert(0, 100)
|
||||
}
|
||||
|
||||
let cdStart := add(callData, 32)
|
||||
let success := staticcall(
|
||||
gas, // forward all gas
|
||||
@@ -305,6 +343,15 @@ contract MixinSignatureValidator is
|
||||
32 // output size is 32 bytes
|
||||
)
|
||||
|
||||
if iszero(eq(returndatasize(), 32)) {
|
||||
// Revert with `Error("VALIDATOR_ERROR")`
|
||||
mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
|
||||
mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
|
||||
mstore(64, 0x0000000f56414c494441544f525f4552524f5200000000000000000000000000)
|
||||
mstore(96, 0)
|
||||
revert(0, 100)
|
||||
}
|
||||
|
||||
switch success
|
||||
case 0 {
|
||||
// Revert with `Error("VALIDATOR_ERROR")`
|
||||
@@ -316,7 +363,10 @@ contract MixinSignatureValidator is
|
||||
}
|
||||
case 1 {
|
||||
// Signature is valid if call did not revert and returned true
|
||||
isValid := mload(cdStart)
|
||||
isValid := eq(
|
||||
and(mload(cdStart), 0xffffffff00000000000000000000000000000000000000000000000000000000),
|
||||
and(magicValue, 0xffffffff00000000000000000000000000000000000000000000000000000000)
|
||||
)
|
||||
}
|
||||
}
|
||||
return isValid;
|
||||
|
@@ -25,7 +25,8 @@ contract IValidator {
|
||||
/// @param hash Message hash that is signed.
|
||||
/// @param signerAddress Address that should have signed the given hash.
|
||||
/// @param signature Proof of signing.
|
||||
/// @return Validity of order signature.
|
||||
/// @return Magic bytes4 value if the signature is valid.
|
||||
/// Magic value is bytes4(keccak256("isValidValidatorSignature(address,bytes32,address,bytes)"))
|
||||
function isValidSignature(
|
||||
bytes32 hash,
|
||||
address signerAddress,
|
||||
@@ -33,5 +34,5 @@ contract IValidator {
|
||||
)
|
||||
external
|
||||
view
|
||||
returns (bool isValid);
|
||||
returns (bytes4);
|
||||
}
|
||||
|
@@ -24,12 +24,13 @@ contract IWallet {
|
||||
/// @dev Verifies that a signature is valid.
|
||||
/// @param hash Message hash that is signed.
|
||||
/// @param signature Proof of signing.
|
||||
/// @return Validity of order signature.
|
||||
/// @return Magic bytes4 value if the signature is valid.
|
||||
/// Magic value is bytes4(keccak256("isValidWalletSignature(bytes32,address,bytes)"))
|
||||
function isValidSignature(
|
||||
bytes32 hash,
|
||||
bytes calldata signature
|
||||
)
|
||||
external
|
||||
view
|
||||
returns (bool isValid);
|
||||
returns (bytes4);
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-exchange",
|
||||
"version": "2.1.11",
|
||||
"version": "2.1.12",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/protocol/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.1.0",
|
||||
"@0x/abi-gen": "^4.1.1",
|
||||
"@0x/contracts-gen": "^1.0.13",
|
||||
"@0x/contracts-test-utils": "^3.1.13",
|
||||
"@0x/dev-utils": "^2.3.0",
|
||||
"@0x/sol-compiler": "^3.1.12",
|
||||
"@0x/contracts-test-utils": "^3.1.14",
|
||||
"@0x/dev-utils": "^2.3.1",
|
||||
"@0x/sol-compiler": "^3.1.13",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,18 +69,18 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.1",
|
||||
"@0x/contracts-asset-proxy": "^2.2.5",
|
||||
"@0x/contracts-erc1155": "^1.1.12",
|
||||
"@0x/contracts-erc20": "^2.2.11",
|
||||
"@0x/contracts-erc721": "^2.1.12",
|
||||
"@0x/contracts-exchange-libs": "^3.0.5",
|
||||
"@0x/contracts-utils": "^3.2.1",
|
||||
"@0x/order-utils": "^8.2.5",
|
||||
"@0x/base-contract": "^5.3.2",
|
||||
"@0x/contracts-asset-proxy": "^2.2.6",
|
||||
"@0x/contracts-erc1155": "^1.1.13",
|
||||
"@0x/contracts-erc20": "^2.2.12",
|
||||
"@0x/contracts-erc721": "^2.1.13",
|
||||
"@0x/contracts-exchange-libs": "^3.0.6",
|
||||
"@0x/contracts-utils": "^3.2.2",
|
||||
"@0x/order-utils": "^8.3.0",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"ethereum-types": "^2.1.4",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
|
@@ -100,6 +100,12 @@ describe('MixinSignatureValidator', () => {
|
||||
),
|
||||
constants.AWAIT_TRANSACTION_MINED_MS,
|
||||
);
|
||||
await web3Wrapper.awaitTransactionSuccessAsync(
|
||||
await signatureValidator.setSignatureValidatorApproval.sendTransactionAsync(testValidator.address, true, {
|
||||
from: notSignerAddress,
|
||||
}),
|
||||
constants.AWAIT_TRANSACTION_MINED_MS,
|
||||
);
|
||||
|
||||
const defaultOrderParams = {
|
||||
...constants.STATIC_ORDER_PARAMS,
|
||||
@@ -307,7 +313,7 @@ describe('MixinSignatureValidator', () => {
|
||||
expect(isValidSignature).to.be.true();
|
||||
});
|
||||
|
||||
it('should return false when SignatureType=Wallet and signature is invalid', async () => {
|
||||
it('should revert when SignatureType=Wallet and signature is invalid', async () => {
|
||||
// Create EIP712 signature using a private key that does not belong to the wallet owner.
|
||||
const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
|
||||
const orderHashBuffer = ethUtil.toBuffer(orderHashHex);
|
||||
@@ -322,12 +328,10 @@ describe('MixinSignatureValidator', () => {
|
||||
]);
|
||||
const signatureHex = ethUtil.bufferToHex(signature);
|
||||
// Validate signature
|
||||
const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
|
||||
orderHashHex,
|
||||
testWallet.address,
|
||||
signatureHex,
|
||||
return expectContractCallFailedAsync(
|
||||
signatureValidator.publicIsValidSignature.callAsync(orderHashHex, testWallet.address, signatureHex),
|
||||
RevertReason.WalletError,
|
||||
);
|
||||
expect(isValidSignature).to.be.false();
|
||||
});
|
||||
|
||||
it('should revert when `isValidSignature` attempts to update state and SignatureType=Wallet', async () => {
|
||||
@@ -365,6 +369,15 @@ describe('MixinSignatureValidator', () => {
|
||||
signatureHex,
|
||||
);
|
||||
expect(isValidSignature).to.be.true();
|
||||
|
||||
const isValidSignatureTs = await signatureUtils.isValidSignatureAsync(
|
||||
provider,
|
||||
orderHashHex,
|
||||
signatureHex,
|
||||
signerAddress,
|
||||
signatureValidator.address,
|
||||
);
|
||||
expect(isValidSignatureTs).to.be.true();
|
||||
});
|
||||
|
||||
it('should return false when SignatureType=Validator, signature is invalid and validator is approved', async () => {
|
||||
@@ -375,12 +388,19 @@ describe('MixinSignatureValidator', () => {
|
||||
const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
|
||||
// This will return false because we signed the message with `signerAddress`, but
|
||||
// are validating against `notSignerAddress`
|
||||
const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
|
||||
orderHashHex,
|
||||
notSignerAddress,
|
||||
signatureHex,
|
||||
await expectContractCallFailedAsync(
|
||||
signatureValidator.publicIsValidSignature.callAsync(orderHashHex, notSignerAddress, signatureHex),
|
||||
RevertReason.ValidatorError,
|
||||
);
|
||||
expect(isValidSignature).to.be.false();
|
||||
|
||||
const isValidSignatureTs = await signatureUtils.isValidSignatureAsync(
|
||||
provider,
|
||||
orderHashHex,
|
||||
signatureHex,
|
||||
notSignerAddress,
|
||||
signatureValidator.address,
|
||||
);
|
||||
expect(isValidSignatureTs).to.be.false();
|
||||
});
|
||||
|
||||
it('should revert when `isValidSignature` attempts to update state and SignatureType=Validator', async () => {
|
||||
@@ -416,6 +436,16 @@ describe('MixinSignatureValidator', () => {
|
||||
signatureHex,
|
||||
);
|
||||
expect(isValidSignature).to.be.false();
|
||||
|
||||
expect(
|
||||
signatureUtils.isValidSignatureAsync(
|
||||
provider,
|
||||
orderHashHex,
|
||||
signatureHex,
|
||||
signerAddress,
|
||||
signatureValidator.address,
|
||||
),
|
||||
).to.be.rejected();
|
||||
});
|
||||
|
||||
it('should return true when SignatureType=Presigned and signer has presigned hash', async () => {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "4.0.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
"version": "4.0.5",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v4.0.6 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v4.0.5 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-extensions",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.6",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.1.0",
|
||||
"@0x/abi-gen": "^4.1.1",
|
||||
"@0x/contracts-gen": "^1.0.13",
|
||||
"@0x/contracts-test-utils": "^3.1.13",
|
||||
"@0x/dev-utils": "^2.3.0",
|
||||
"@0x/sol-compiler": "^3.1.12",
|
||||
"@0x/contracts-test-utils": "^3.1.14",
|
||||
"@0x/dev-utils": "^2.3.1",
|
||||
"@0x/sol-compiler": "^3.1.13",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,18 +69,18 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.1",
|
||||
"@0x/contracts-asset-proxy": "^2.2.5",
|
||||
"@0x/contracts-erc20": "^2.2.11",
|
||||
"@0x/contracts-erc721": "^2.1.12",
|
||||
"@0x/contracts-exchange": "^2.1.11",
|
||||
"@0x/contracts-exchange-libs": "^3.0.5",
|
||||
"@0x/contracts-utils": "^3.2.1",
|
||||
"@0x/order-utils": "^8.2.5",
|
||||
"@0x/base-contract": "^5.3.2",
|
||||
"@0x/contracts-asset-proxy": "^2.2.6",
|
||||
"@0x/contracts-erc20": "^2.2.12",
|
||||
"@0x/contracts-erc721": "^2.1.13",
|
||||
"@0x/contracts-exchange": "^2.1.12",
|
||||
"@0x/contracts-exchange-libs": "^3.0.6",
|
||||
"@0x/contracts-utils": "^3.2.2",
|
||||
"@0x/order-utils": "^8.3.0",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"ethereum-types": "^2.1.4",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "3.1.12",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
"version": "3.1.11",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v3.1.12 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v3.1.11 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-multisig",
|
||||
"version": "3.1.11",
|
||||
"version": "3.1.12",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/multisig/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.1.0",
|
||||
"@0x/abi-gen": "^4.1.1",
|
||||
"@0x/contracts-gen": "^1.0.13",
|
||||
"@0x/contracts-test-utils": "^3.1.13",
|
||||
"@0x/dev-utils": "^2.3.0",
|
||||
"@0x/sol-compiler": "^3.1.12",
|
||||
"@0x/contracts-test-utils": "^3.1.14",
|
||||
"@0x/dev-utils": "^2.3.1",
|
||||
"@0x/sol-compiler": "^3.1.13",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -69,14 +69,14 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.1",
|
||||
"@0x/contracts-asset-proxy": "^2.2.5",
|
||||
"@0x/contracts-erc20": "^2.2.11",
|
||||
"@0x/base-contract": "^5.3.2",
|
||||
"@0x/contracts-asset-proxy": "^2.2.6",
|
||||
"@0x/contracts-erc20": "^2.2.12",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"ethereum-types": "^2.1.4",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "3.1.14",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
"version": "3.1.13",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v3.1.14 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v3.1.13 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-test-utils",
|
||||
"version": "3.1.13",
|
||||
"version": "3.1.14",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -42,18 +42,18 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/dev-utils": "^2.3.0",
|
||||
"@0x/order-utils": "^8.2.5",
|
||||
"@0x/sol-compiler": "^3.1.12",
|
||||
"@0x/sol-coverage": "^3.0.9",
|
||||
"@0x/sol-profiler": "^3.1.11",
|
||||
"@0x/sol-trace": "^2.0.17",
|
||||
"@0x/subproviders": "^5.0.1",
|
||||
"@0x/dev-utils": "^2.3.1",
|
||||
"@0x/order-utils": "^8.3.0",
|
||||
"@0x/sol-compiler": "^3.1.13",
|
||||
"@0x/sol-coverage": "^3.0.10",
|
||||
"@0x/sol-profiler": "^3.1.12",
|
||||
"@0x/sol-trace": "^2.0.18",
|
||||
"@0x/subproviders": "^5.0.2",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"@types/bn.js": "^4.11.0",
|
||||
"@types/js-combinatorics": "^0.5.29",
|
||||
"@types/lodash": "4.14.104",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "3.2.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
"version": "3.2.1",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v3.2.2 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v3.2.1 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-utils",
|
||||
"version": "3.2.1",
|
||||
"version": "3.2.2",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -47,11 +47,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/utils/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.1.0",
|
||||
"@0x/abi-gen": "^4.1.1",
|
||||
"@0x/contracts-gen": "^1.0.13",
|
||||
"@0x/contracts-test-utils": "^3.1.13",
|
||||
"@0x/dev-utils": "^2.3.0",
|
||||
"@0x/sol-compiler": "^3.1.12",
|
||||
"@0x/contracts-test-utils": "^3.1.14",
|
||||
"@0x/dev-utils": "^2.3.1",
|
||||
"@0x/sol-compiler": "^3.1.13",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/bn.js": "^4.11.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
@@ -70,12 +70,12 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.1",
|
||||
"@0x/order-utils": "^8.2.5",
|
||||
"@0x/base-contract": "^5.3.2",
|
||||
"@0x/order-utils": "^8.3.0",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereum-types": "^2.1.4",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
|
1
env/.Python
vendored
Symbolic link
1
env/.Python
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/Python
|
84
env/bin/activate
vendored
Normal file
84
env/bin/activate
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
# This file must be used with "source bin/activate" *from bash*
|
||||
# you cannot run it directly
|
||||
|
||||
|
||||
if [ "${BASH_SOURCE-}" = "$0" ]; then
|
||||
echo "You must source this script: \$ source $0" >&2
|
||||
exit 33
|
||||
fi
|
||||
|
||||
deactivate () {
|
||||
unset -f pydoc >/dev/null 2>&1
|
||||
|
||||
# reset old environment variables
|
||||
# ! [ -z ${VAR+_} ] returns true if VAR is declared at all
|
||||
if ! [ -z "${_OLD_VIRTUAL_PATH:+_}" ] ; then
|
||||
PATH="$_OLD_VIRTUAL_PATH"
|
||||
export PATH
|
||||
unset _OLD_VIRTUAL_PATH
|
||||
fi
|
||||
if ! [ -z "${_OLD_VIRTUAL_PYTHONHOME+_}" ] ; then
|
||||
PYTHONHOME="$_OLD_VIRTUAL_PYTHONHOME"
|
||||
export PYTHONHOME
|
||||
unset _OLD_VIRTUAL_PYTHONHOME
|
||||
fi
|
||||
|
||||
# This should detect bash and zsh, which have a hash command that must
|
||||
# be called to get it to forget past commands. Without forgetting
|
||||
# past commands the $PATH changes we made may not be respected
|
||||
if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then
|
||||
hash -r 2>/dev/null
|
||||
fi
|
||||
|
||||
if ! [ -z "${_OLD_VIRTUAL_PS1+_}" ] ; then
|
||||
PS1="$_OLD_VIRTUAL_PS1"
|
||||
export PS1
|
||||
unset _OLD_VIRTUAL_PS1
|
||||
fi
|
||||
|
||||
unset VIRTUAL_ENV
|
||||
if [ ! "${1-}" = "nondestructive" ] ; then
|
||||
# Self destruct!
|
||||
unset -f deactivate
|
||||
fi
|
||||
}
|
||||
|
||||
# unset irrelevant variables
|
||||
deactivate nondestructive
|
||||
|
||||
VIRTUAL_ENV="/Users/jacob/projects/ethdev/0x/workspace-remote/workspace/0x-monorepo/env"
|
||||
export VIRTUAL_ENV
|
||||
|
||||
_OLD_VIRTUAL_PATH="$PATH"
|
||||
PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
export PATH
|
||||
|
||||
# unset PYTHONHOME if set
|
||||
if ! [ -z "${PYTHONHOME+_}" ] ; then
|
||||
_OLD_VIRTUAL_PYTHONHOME="$PYTHONHOME"
|
||||
unset PYTHONHOME
|
||||
fi
|
||||
|
||||
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" ] ; then
|
||||
_OLD_VIRTUAL_PS1="${PS1-}"
|
||||
if [ "x" != x ] ; then
|
||||
PS1="${PS1-}"
|
||||
else
|
||||
PS1="(`basename \"$VIRTUAL_ENV\"`) ${PS1-}"
|
||||
fi
|
||||
export PS1
|
||||
fi
|
||||
|
||||
# Make sure to unalias pydoc if it's already there
|
||||
alias pydoc 2>/dev/null >/dev/null && unalias pydoc || true
|
||||
|
||||
pydoc () {
|
||||
python -m pydoc "$@"
|
||||
}
|
||||
|
||||
# This should detect bash and zsh, which have a hash command that must
|
||||
# be called to get it to forget past commands. Without forgetting
|
||||
# past commands the $PATH changes we made may not be respected
|
||||
if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then
|
||||
hash -r 2>/dev/null
|
||||
fi
|
55
env/bin/activate.csh
vendored
Normal file
55
env/bin/activate.csh
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
# This file must be used with "source bin/activate.csh" *from csh*.
|
||||
# You cannot run it directly.
|
||||
# Created by Davide Di Blasi <davidedb@gmail.com>.
|
||||
|
||||
set newline='\
|
||||
'
|
||||
|
||||
alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH:q" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT:q" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; test "\!:*" != "nondestructive" && unalias deactivate && unalias pydoc'
|
||||
|
||||
# Unset irrelevant variables.
|
||||
deactivate nondestructive
|
||||
|
||||
setenv VIRTUAL_ENV "/Users/jacob/projects/ethdev/0x/workspace-remote/workspace/0x-monorepo/env"
|
||||
|
||||
set _OLD_VIRTUAL_PATH="$PATH:q"
|
||||
setenv PATH "$VIRTUAL_ENV:q/bin:$PATH:q"
|
||||
|
||||
|
||||
|
||||
if ("" != "") then
|
||||
set env_name = ""
|
||||
else
|
||||
set env_name = '('"$VIRTUAL_ENV:t:q"') '
|
||||
endif
|
||||
|
||||
if ( $?VIRTUAL_ENV_DISABLE_PROMPT ) then
|
||||
if ( $VIRTUAL_ENV_DISABLE_PROMPT == "" ) then
|
||||
set do_prompt = "1"
|
||||
else
|
||||
set do_prompt = "0"
|
||||
endif
|
||||
else
|
||||
set do_prompt = "1"
|
||||
endif
|
||||
|
||||
if ( $do_prompt == "1" ) then
|
||||
# Could be in a non-interactive environment,
|
||||
# in which case, $prompt is undefined and we wouldn't
|
||||
# care about the prompt anyway.
|
||||
if ( $?prompt ) then
|
||||
set _OLD_VIRTUAL_PROMPT="$prompt:q"
|
||||
if ( "$prompt:q" =~ *"$newline:q"* ) then
|
||||
:
|
||||
else
|
||||
set prompt = "$env_name:q$prompt:q"
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
unset env_name
|
||||
unset do_prompt
|
||||
|
||||
alias pydoc python -m pydoc
|
||||
|
||||
rehash
|
102
env/bin/activate.fish
vendored
Normal file
102
env/bin/activate.fish
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
# This file must be used using `source bin/activate.fish` *within a running fish ( http://fishshell.com ) session*.
|
||||
# Do not run it directly.
|
||||
|
||||
function _bashify_path -d "Converts a fish path to something bash can recognize"
|
||||
set fishy_path $argv
|
||||
set bashy_path $fishy_path[1]
|
||||
for path_part in $fishy_path[2..-1]
|
||||
set bashy_path "$bashy_path:$path_part"
|
||||
end
|
||||
echo $bashy_path
|
||||
end
|
||||
|
||||
function _fishify_path -d "Converts a bash path to something fish can recognize"
|
||||
echo $argv | tr ':' '\n'
|
||||
end
|
||||
|
||||
function deactivate -d 'Exit virtualenv mode and return to the normal environment.'
|
||||
# reset old environment variables
|
||||
if test -n "$_OLD_VIRTUAL_PATH"
|
||||
# https://github.com/fish-shell/fish-shell/issues/436 altered PATH handling
|
||||
if test (echo $FISH_VERSION | tr "." "\n")[1] -lt 3
|
||||
set -gx PATH (_fishify_path $_OLD_VIRTUAL_PATH)
|
||||
else
|
||||
set -gx PATH $_OLD_VIRTUAL_PATH
|
||||
end
|
||||
set -e _OLD_VIRTUAL_PATH
|
||||
end
|
||||
|
||||
if test -n "$_OLD_VIRTUAL_PYTHONHOME"
|
||||
set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME
|
||||
set -e _OLD_VIRTUAL_PYTHONHOME
|
||||
end
|
||||
|
||||
if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
|
||||
and functions -q _old_fish_prompt
|
||||
# Set an empty local `$fish_function_path` to allow the removal of `fish_prompt` using `functions -e`.
|
||||
set -l fish_function_path
|
||||
|
||||
# Erase virtualenv's `fish_prompt` and restore the original.
|
||||
functions -e fish_prompt
|
||||
functions -c _old_fish_prompt fish_prompt
|
||||
functions -e _old_fish_prompt
|
||||
set -e _OLD_FISH_PROMPT_OVERRIDE
|
||||
end
|
||||
|
||||
set -e VIRTUAL_ENV
|
||||
|
||||
if test "$argv[1]" != 'nondestructive'
|
||||
# Self-destruct!
|
||||
functions -e pydoc
|
||||
functions -e deactivate
|
||||
functions -e _bashify_path
|
||||
functions -e _fishify_path
|
||||
end
|
||||
end
|
||||
|
||||
# Unset irrelevant variables.
|
||||
deactivate nondestructive
|
||||
|
||||
set -gx VIRTUAL_ENV "/Users/jacob/projects/ethdev/0x/workspace-remote/workspace/0x-monorepo/env"
|
||||
|
||||
# https://github.com/fish-shell/fish-shell/issues/436 altered PATH handling
|
||||
if test (echo $FISH_VERSION | tr "." "\n")[1] -lt 3
|
||||
set -gx _OLD_VIRTUAL_PATH (_bashify_path $PATH)
|
||||
else
|
||||
set -gx _OLD_VIRTUAL_PATH $PATH
|
||||
end
|
||||
set -gx PATH "$VIRTUAL_ENV/bin" $PATH
|
||||
|
||||
# Unset `$PYTHONHOME` if set.
|
||||
if set -q PYTHONHOME
|
||||
set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME
|
||||
set -e PYTHONHOME
|
||||
end
|
||||
|
||||
function pydoc
|
||||
python -m pydoc $argv
|
||||
end
|
||||
|
||||
if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
|
||||
# Copy the current `fish_prompt` function as `_old_fish_prompt`.
|
||||
functions -c fish_prompt _old_fish_prompt
|
||||
|
||||
function fish_prompt
|
||||
# Save the current $status, for fish_prompts that display it.
|
||||
set -l old_status $status
|
||||
|
||||
# Prompt override provided?
|
||||
# If not, just prepend the environment name.
|
||||
if test -n ""
|
||||
printf '%s%s' "" (set_color normal)
|
||||
else
|
||||
printf '%s(%s) ' (set_color normal) (basename "$VIRTUAL_ENV")
|
||||
end
|
||||
|
||||
# Restore the original $status
|
||||
echo "exit $old_status" | source
|
||||
_old_fish_prompt
|
||||
end
|
||||
|
||||
set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
|
||||
end
|
67
env/bin/activate.ps1
vendored
Normal file
67
env/bin/activate.ps1
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
# This file must be dot sourced from PoSh; you cannot run it directly. Do this: . ./activate.ps1
|
||||
|
||||
if (@($null,"Internal") -notcontains $myinvocation.commandorigin) {
|
||||
Write-Host -Foreground red "You must 'source' this script: PS> . $($myinvocation.invocationname)"
|
||||
exit 33
|
||||
}
|
||||
|
||||
$script:THIS_PATH = $myinvocation.mycommand.path
|
||||
$script:BASE_DIR = Split-Path (Resolve-Path "$THIS_PATH/..") -Parent
|
||||
|
||||
function global:deactivate([switch] $NonDestructive) {
|
||||
if (Test-Path variable:_OLD_VIRTUAL_PATH) {
|
||||
$env:PATH = $variable:_OLD_VIRTUAL_PATH
|
||||
Remove-Variable "_OLD_VIRTUAL_PATH" -Scope global
|
||||
}
|
||||
|
||||
if (Test-Path function:_old_virtual_prompt) {
|
||||
$function:prompt = $function:_old_virtual_prompt
|
||||
Remove-Item function:\_old_virtual_prompt
|
||||
}
|
||||
|
||||
if ($env:VIRTUAL_ENV) {
|
||||
Remove-Item env:VIRTUAL_ENV -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
if (!$NonDestructive) {
|
||||
# Self destruct!
|
||||
Remove-Item function:deactivate
|
||||
Remove-Item function:pydoc
|
||||
}
|
||||
}
|
||||
|
||||
function global:pydoc {
|
||||
python -m pydoc $args
|
||||
}
|
||||
|
||||
# unset irrelevant variables
|
||||
deactivate -nondestructive
|
||||
|
||||
$VIRTUAL_ENV = $BASE_DIR
|
||||
$env:VIRTUAL_ENV = $VIRTUAL_ENV
|
||||
|
||||
New-Variable -Scope global -Name _OLD_VIRTUAL_PATH -Value $env:PATH
|
||||
|
||||
$env:PATH = "$env:VIRTUAL_ENV/bin:" + $env:PATH
|
||||
if (!$env:VIRTUAL_ENV_DISABLE_PROMPT) {
|
||||
function global:_old_virtual_prompt {
|
||||
""
|
||||
}
|
||||
$function:_old_virtual_prompt = $function:prompt
|
||||
|
||||
if ("" -ne "") {
|
||||
function global:prompt {
|
||||
# Add the custom prefix to the existing prompt
|
||||
$previous_prompt_value = & $function:_old_virtual_prompt
|
||||
("" + $previous_prompt_value)
|
||||
}
|
||||
}
|
||||
else {
|
||||
function global:prompt {
|
||||
# Add a prefix to the current prompt, but don't discard it.
|
||||
$previous_prompt_value = & $function:_old_virtual_prompt
|
||||
$new_prompt_value = "($( Split-Path $env:VIRTUAL_ENV -Leaf )) "
|
||||
($new_prompt_value + $previous_prompt_value)
|
||||
}
|
||||
}
|
||||
}
|
46
env/bin/activate.xsh
vendored
Normal file
46
env/bin/activate.xsh
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"""Xonsh activate script for virtualenv"""
|
||||
from xonsh.tools import get_sep as _get_sep
|
||||
|
||||
def _deactivate(args):
|
||||
if "pydoc" in aliases:
|
||||
del aliases["pydoc"]
|
||||
|
||||
if ${...}.get("_OLD_VIRTUAL_PATH", ""):
|
||||
$PATH = $_OLD_VIRTUAL_PATH
|
||||
del $_OLD_VIRTUAL_PATH
|
||||
|
||||
if ${...}.get("_OLD_VIRTUAL_PYTHONHOME", ""):
|
||||
$PYTHONHOME = $_OLD_VIRTUAL_PYTHONHOME
|
||||
del $_OLD_VIRTUAL_PYTHONHOME
|
||||
|
||||
if "VIRTUAL_ENV" in ${...}:
|
||||
del $VIRTUAL_ENV
|
||||
|
||||
if "VIRTUAL_ENV_PROMPT" in ${...}:
|
||||
del $VIRTUAL_ENV_PROMPT
|
||||
|
||||
if "nondestructive" not in args:
|
||||
# Self destruct!
|
||||
del aliases["deactivate"]
|
||||
|
||||
|
||||
# unset irrelevant variables
|
||||
_deactivate(["nondestructive"])
|
||||
aliases["deactivate"] = _deactivate
|
||||
|
||||
$VIRTUAL_ENV = r"/Users/jacob/projects/ethdev/0x/workspace-remote/workspace/0x-monorepo/env"
|
||||
|
||||
$_OLD_VIRTUAL_PATH = $PATH
|
||||
$PATH = $PATH[:]
|
||||
$PATH.add($VIRTUAL_ENV + _get_sep() + "bin", front=True, replace=True)
|
||||
|
||||
if ${...}.get("PYTHONHOME", ""):
|
||||
# unset PYTHONHOME if set
|
||||
$_OLD_VIRTUAL_PYTHONHOME = $PYTHONHOME
|
||||
del $PYTHONHOME
|
||||
|
||||
$VIRTUAL_ENV_PROMPT = ""
|
||||
if not $VIRTUAL_ENV_PROMPT:
|
||||
del $VIRTUAL_ENV_PROMPT
|
||||
|
||||
aliases["pydoc"] = ["python", "-m", "pydoc"]
|
46
env/bin/activate_this.py
vendored
Normal file
46
env/bin/activate_this.py
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"""Activate virtualenv for current interpreter:
|
||||
|
||||
Use exec(open(this_file).read(), {'__file__': this_file}).
|
||||
|
||||
This can be used when you must use an existing Python interpreter, not the virtualenv bin/python.
|
||||
"""
|
||||
import os
|
||||
import site
|
||||
import sys
|
||||
|
||||
try:
|
||||
__file__
|
||||
except NameError:
|
||||
raise AssertionError("You must use exec(open(this_file).read(), {'__file__': this_file}))")
|
||||
|
||||
# prepend bin to PATH (this file is inside the bin directory)
|
||||
bin_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
os.environ["PATH"] = os.pathsep.join([bin_dir] + os.environ.get("PATH", "").split(os.pathsep))
|
||||
|
||||
base = os.path.dirname(bin_dir)
|
||||
|
||||
# virtual env is right above bin directory
|
||||
os.environ["VIRTUAL_ENV"] = base
|
||||
|
||||
# add the virtual environments site-package to the host python import mechanism
|
||||
IS_PYPY = hasattr(sys, "pypy_version_info")
|
||||
IS_JYTHON = sys.platform.startswith("java")
|
||||
if IS_JYTHON:
|
||||
site_packages = os.path.join(base, "Lib", "site-packages")
|
||||
elif IS_PYPY:
|
||||
site_packages = os.path.join(base, "site-packages")
|
||||
else:
|
||||
IS_WIN = sys.platform == "win32"
|
||||
if IS_WIN:
|
||||
site_packages = os.path.join(base, "Lib", "site-packages")
|
||||
else:
|
||||
site_packages = os.path.join(base, "lib", "python{}.{}".format(*sys.version_info), "site-packages")
|
||||
|
||||
prev = set(sys.path)
|
||||
site.addsitedir(site_packages)
|
||||
sys.real_prefix = sys.prefix
|
||||
sys.prefix = base
|
||||
|
||||
# Move the added items to the front of the path, in place
|
||||
new = list(sys.path)
|
||||
sys.path[:] = [i for i in new if i not in prev] + [i for i in new if i in prev]
|
10
env/bin/black
vendored
Executable file
10
env/bin/black
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/Users/jacob/projects/ethdev/0x/workspace-remote/workspace/0x-monorepo/env/bin/python3.7
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
|
||||
from black import patched_main
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(patched_main())
|
10
env/bin/blackd
vendored
Executable file
10
env/bin/blackd
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/Users/jacob/projects/ethdev/0x/workspace-remote/workspace/0x-monorepo/env/bin/python3.7
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
|
||||
from blackd import patched_main
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(patched_main())
|
10
env/bin/easy_install
vendored
Executable file
10
env/bin/easy_install
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/Users/jacob/projects/ethdev/0x/workspace-remote/workspace/0x-monorepo/env/bin/python3.7
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
|
||||
from setuptools.command.easy_install import main
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
10
env/bin/easy_install-3.7
vendored
Executable file
10
env/bin/easy_install-3.7
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/Users/jacob/projects/ethdev/0x/workspace-remote/workspace/0x-monorepo/env/bin/python3.7
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
|
||||
from setuptools.command.easy_install import main
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
10
env/bin/pip
vendored
Executable file
10
env/bin/pip
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/Users/jacob/projects/ethdev/0x/workspace-remote/workspace/0x-monorepo/env/bin/python3.7
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
|
||||
from pip._internal import main
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
10
env/bin/pip3
vendored
Executable file
10
env/bin/pip3
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/Users/jacob/projects/ethdev/0x/workspace-remote/workspace/0x-monorepo/env/bin/python3.7
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
|
||||
from pip._internal import main
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
10
env/bin/pip3.7
vendored
Executable file
10
env/bin/pip3.7
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/Users/jacob/projects/ethdev/0x/workspace-remote/workspace/0x-monorepo/env/bin/python3.7
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
|
||||
from pip._internal import main
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
1
env/bin/python
vendored
Symbolic link
1
env/bin/python
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
python3.7
|
78
env/bin/python-config
vendored
Executable file
78
env/bin/python-config
vendored
Executable file
@@ -0,0 +1,78 @@
|
||||
#!/Users/jacob/projects/ethdev/0x/workspace-remote/workspace/0x-monorepo/env/bin/python
|
||||
|
||||
import sys
|
||||
import getopt
|
||||
import sysconfig
|
||||
|
||||
valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
|
||||
'ldflags', 'help']
|
||||
|
||||
if sys.version_info >= (3, 2):
|
||||
valid_opts.insert(-1, 'extension-suffix')
|
||||
valid_opts.append('abiflags')
|
||||
if sys.version_info >= (3, 3):
|
||||
valid_opts.append('configdir')
|
||||
|
||||
|
||||
def exit_with_usage(code=1):
|
||||
sys.stderr.write("Usage: {0} [{1}]\n".format(
|
||||
sys.argv[0], '|'.join('--'+opt for opt in valid_opts)))
|
||||
sys.exit(code)
|
||||
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], '', valid_opts)
|
||||
except getopt.error:
|
||||
exit_with_usage()
|
||||
|
||||
if not opts:
|
||||
exit_with_usage()
|
||||
|
||||
pyver = sysconfig.get_config_var('VERSION')
|
||||
getvar = sysconfig.get_config_var
|
||||
|
||||
opt_flags = [flag for (flag, val) in opts]
|
||||
|
||||
if '--help' in opt_flags:
|
||||
exit_with_usage(code=0)
|
||||
|
||||
for opt in opt_flags:
|
||||
if opt == '--prefix':
|
||||
print(sysconfig.get_config_var('prefix'))
|
||||
|
||||
elif opt == '--exec-prefix':
|
||||
print(sysconfig.get_config_var('exec_prefix'))
|
||||
|
||||
elif opt in ('--includes', '--cflags'):
|
||||
flags = ['-I' + sysconfig.get_path('include'),
|
||||
'-I' + sysconfig.get_path('platinclude')]
|
||||
if opt == '--cflags':
|
||||
flags.extend(getvar('CFLAGS').split())
|
||||
print(' '.join(flags))
|
||||
|
||||
elif opt in ('--libs', '--ldflags'):
|
||||
abiflags = getattr(sys, 'abiflags', '')
|
||||
libs = ['-lpython' + pyver + abiflags]
|
||||
libs += getvar('LIBS').split()
|
||||
libs += getvar('SYSLIBS').split()
|
||||
# add the prefix/lib/pythonX.Y/config dir, but only if there is no
|
||||
# shared library in prefix/lib/.
|
||||
if opt == '--ldflags':
|
||||
if not getvar('Py_ENABLE_SHARED'):
|
||||
libs.insert(0, '-L' + getvar('LIBPL'))
|
||||
if not getvar('PYTHONFRAMEWORK'):
|
||||
libs.extend(getvar('LINKFORSHARED').split())
|
||||
print(' '.join(libs))
|
||||
|
||||
elif opt == '--extension-suffix':
|
||||
ext_suffix = sysconfig.get_config_var('EXT_SUFFIX')
|
||||
if ext_suffix is None:
|
||||
ext_suffix = sysconfig.get_config_var('SO')
|
||||
print(ext_suffix)
|
||||
|
||||
elif opt == '--abiflags':
|
||||
if not getattr(sys, 'abiflags', None):
|
||||
exit_with_usage()
|
||||
print(sys.abiflags)
|
||||
|
||||
elif opt == '--configdir':
|
||||
print(sysconfig.get_config_var('LIBPL'))
|
1
env/bin/python3
vendored
Symbolic link
1
env/bin/python3
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
python3.7
|
BIN
env/bin/python3.7
vendored
Executable file
BIN
env/bin/python3.7
vendored
Executable file
Binary file not shown.
10
env/bin/wheel
vendored
Executable file
10
env/bin/wheel
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/Users/jacob/projects/ethdev/0x/workspace-remote/workspace/0x-monorepo/env/bin/python3.7
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
|
||||
from wheel.cli import main
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
1
env/include/python3.7m
vendored
Symbolic link
1
env/include/python3.7m
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m
|
@@ -2,6 +2,10 @@
|
||||
{
|
||||
"version": "7.0.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Add optional `exchangeAddress` parameter to `signatureUtils.isValidSignatureAsync` to fix `Validator` type signatures.",
|
||||
"pr": 2017
|
||||
},
|
||||
{
|
||||
"note": "Removed @0x/order-watcher"
|
||||
},
|
||||
@@ -9,7 +13,8 @@
|
||||
"note": "Update to latest @0x/contract-wrappers v11",
|
||||
"pr": 2068
|
||||
}
|
||||
]
|
||||
],
|
||||
"timestamp": 1566446343
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
|
@@ -5,6 +5,12 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v7.0.0 - _August 22, 2019_
|
||||
|
||||
* Add optional `exchangeAddress` parameter to `signatureUtils.isValidSignatureAsync` to fix `Validator` type signatures. (#2017)
|
||||
* Removed @0x/order-watcher
|
||||
* Update to latest @0x/contract-wrappers v11 (#2068)
|
||||
|
||||
## v6.0.15 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "0x.js",
|
||||
"version": "6.0.15",
|
||||
"version": "7.0.0",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -43,9 +43,9 @@
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@0x/contract-addresses": "^3.0.3",
|
||||
"@0x/dev-utils": "^2.3.0",
|
||||
"@0x/migrations": "^4.2.0",
|
||||
"@0x/contract-addresses": "^3.1.0",
|
||||
"@0x/dev-utils": "^2.3.1",
|
||||
"@0x/migrations": "^4.3.0",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
@@ -72,16 +72,16 @@
|
||||
"webpack": "^4.20.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/assert": "^2.1.3",
|
||||
"@0x/asset-swapper": "^1.0.1",
|
||||
"@0x/base-contract": "^5.3.1",
|
||||
"@0x/contract-wrappers": "^11.0.0",
|
||||
"@0x/order-utils": "^8.2.5",
|
||||
"@0x/subproviders": "^5.0.1",
|
||||
"@0x/assert": "^2.1.4",
|
||||
"@0x/asset-swapper": "^1.0.2",
|
||||
"@0x/base-contract": "^5.3.2",
|
||||
"@0x/contract-wrappers": "^11.1.0",
|
||||
"@0x/order-utils": "^8.3.0",
|
||||
"@0x/subproviders": "^5.0.2",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"@types/web3-provider-engine": "^14.0.0",
|
||||
"ethereum-types": "^2.1.4",
|
||||
"ethers": "~4.0.4",
|
||||
|
@@ -85,6 +85,7 @@ export {
|
||||
SignatureType,
|
||||
ZeroExTransaction,
|
||||
SignedZeroExTransaction,
|
||||
ValidatorSignature,
|
||||
} from '@0x/types';
|
||||
|
||||
export {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "2.4.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
"version": "2.4.1",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.4.2 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.4.1 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/abi-gen-templates",
|
||||
"version": "2.4.1",
|
||||
"version": "2.4.2",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
|
@@ -6,7 +6,8 @@
|
||||
"note": "Added DevUtils",
|
||||
"pr": 2060
|
||||
}
|
||||
]
|
||||
],
|
||||
"timestamp": 1566446343
|
||||
},
|
||||
{
|
||||
"version": "5.2.0",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v5.3.0 - _August 22, 2019_
|
||||
|
||||
* Added DevUtils (#2060)
|
||||
|
||||
## v5.2.0 - _August 8, 2019_
|
||||
|
||||
* Updated to include `getABIDecodedTransactionData` and `getABIDecodedReturnData` (#2018)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/abi-gen-wrappers",
|
||||
"version": "5.2.0",
|
||||
"version": "5.3.0",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -34,23 +34,23 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-wrappers/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^4.1.0",
|
||||
"@0x/abi-gen-templates": "^2.4.1",
|
||||
"@0x/assert": "^2.1.3",
|
||||
"@0x/json-schemas": "^3.1.13",
|
||||
"@0x/abi-gen": "^4.1.1",
|
||||
"@0x/abi-gen-templates": "^2.4.2",
|
||||
"@0x/assert": "^2.1.4",
|
||||
"@0x/json-schemas": "^4.0.0",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"ethereum-types": "^2.1.4",
|
||||
"ethers": "~4.0.4",
|
||||
"lodash": "^4.17.11",
|
||||
"shx": "^0.2.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.3.1",
|
||||
"@0x/contract-addresses": "^3.0.3",
|
||||
"@0x/contract-artifacts": "^2.0.4"
|
||||
"@0x/base-contract": "^5.3.2",
|
||||
"@0x/contract-addresses": "^3.1.0",
|
||||
"@0x/contract-artifacts": "^2.2.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
@@ -38,7 +38,7 @@ export class IValidatorContract extends BaseContract {
|
||||
* @param hash Message hash that is signed.
|
||||
* @param signerAddress Address that should have signed the given hash.
|
||||
* @param signature Proof of signing.
|
||||
* @returns Validity of order signature.
|
||||
* @returns Magic bytes4 value if the signature is valid. Magic value is bytes4(keccak256("isValidValidatorSignature(address,bytes32,address,bytes)"))
|
||||
*/
|
||||
async callAsync(
|
||||
hash: string,
|
||||
@@ -46,7 +46,7 @@ export class IValidatorContract extends BaseContract {
|
||||
signature: string,
|
||||
callData: Partial<CallData> = {},
|
||||
defaultBlock?: BlockParam,
|
||||
): Promise<boolean> {
|
||||
): Promise<string> {
|
||||
assert.isString('hash', hash);
|
||||
assert.isString('signerAddress', signerAddress);
|
||||
assert.isString('signature', signature);
|
||||
@@ -80,7 +80,7 @@ export class IValidatorContract extends BaseContract {
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,address,bytes)');
|
||||
// tslint:disable boolean-naming
|
||||
const result = abiEncoder.strictDecodeReturnValue<boolean>(rawCallResult);
|
||||
const result = abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
|
||||
// tslint:enable boolean-naming
|
||||
return result;
|
||||
},
|
||||
@@ -104,18 +104,18 @@ export class IValidatorContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as IValidatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,address,bytes)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as IValidatorContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,address,bytes)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<boolean>(returnData);
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<string>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
};
|
||||
@@ -207,8 +207,8 @@ export class IValidatorContract extends BaseContract {
|
||||
name: 'isValidSignature',
|
||||
outputs: [
|
||||
{
|
||||
name: 'isValid',
|
||||
type: 'bool',
|
||||
name: '',
|
||||
type: 'bytes4',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
|
@@ -37,14 +37,14 @@ export class IWalletContract extends BaseContract {
|
||||
* since they don't modify state.
|
||||
* @param hash Message hash that is signed.
|
||||
* @param signature Proof of signing.
|
||||
* @returns Validity of order signature.
|
||||
* @returns Magic bytes4 value if the signature is valid. Magic value is bytes4(keccak256("isValidWalletSignature(bytes32,address,bytes)"))
|
||||
*/
|
||||
async callAsync(
|
||||
hash: string,
|
||||
signature: string,
|
||||
callData: Partial<CallData> = {},
|
||||
defaultBlock?: BlockParam,
|
||||
): Promise<boolean> {
|
||||
): Promise<string> {
|
||||
assert.isString('hash', hash);
|
||||
assert.isString('signature', signature);
|
||||
assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
|
||||
@@ -73,7 +73,7 @@ export class IWalletContract extends BaseContract {
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,bytes)');
|
||||
// tslint:disable boolean-naming
|
||||
const result = abiEncoder.strictDecodeReturnValue<boolean>(rawCallResult);
|
||||
const result = abiEncoder.strictDecodeReturnValue<string>(rawCallResult);
|
||||
// tslint:enable boolean-naming
|
||||
return result;
|
||||
},
|
||||
@@ -94,18 +94,18 @@ export class IWalletContract extends BaseContract {
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
getABIDecodedTransactionData(callData: string): boolean {
|
||||
getABIDecodedTransactionData(callData: string): string {
|
||||
const self = (this as any) as IWalletContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,bytes)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<boolean>(callData);
|
||||
const abiDecodedCallData = abiEncoder.strictDecode<string>(callData);
|
||||
return abiDecodedCallData;
|
||||
},
|
||||
getABIDecodedReturnData(returnData: string): boolean {
|
||||
getABIDecodedReturnData(returnData: string): string {
|
||||
const self = (this as any) as IWalletContract;
|
||||
const abiEncoder = self._lookupAbiEncoder('isValidSignature(bytes32,bytes)');
|
||||
// tslint:disable boolean-naming
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<boolean>(returnData);
|
||||
const abiDecodedReturnData = abiEncoder.strictDecodeReturnValue<string>(returnData);
|
||||
return abiDecodedReturnData;
|
||||
},
|
||||
};
|
||||
@@ -193,8 +193,8 @@ export class IWalletContract extends BaseContract {
|
||||
name: 'isValidSignature',
|
||||
outputs: [
|
||||
{
|
||||
name: 'isValid',
|
||||
type: 'bool',
|
||||
name: '',
|
||||
type: 'bytes4',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "4.1.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "4.1.0",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v4.1.1 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v4.1.0 - _August 8, 2019_
|
||||
|
||||
* Updated expected typescript output for cli tests to include `getABIDecodedTransactionData` and `getABIDecodedReturnData` (#2018)
|
||||
|
@@ -1,10 +1,10 @@
|
||||
# ABI Gen
|
||||
|
||||
This package allows you to generate TypeScript contract wrappers from ABI files.
|
||||
This package allows you to generate TypeScript or Python contract wrappers from ABI files.
|
||||
It's heavily inspired by [Geth abigen](https://github.com/ethereum/go-ethereum/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts) but takes a different approach.
|
||||
You can write your custom handlebars templates which will allow you to seamlessly integrate the generated code into your existing codebase with existing conventions.
|
||||
|
||||
[Here](https://github.com/0xProject/0x-monorepo/tree/development/packages/0x.js/abi-gen-templates) are the templates used to generate the contract wrappers used by 0x.js.e
|
||||
[Here](https://github.com/0xProject/0x-monorepo/tree/development/packages/0x.js/abi-gen-templates) are the templates used to generate the contract wrappers used by 0x.js.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -13,7 +13,7 @@ You can write your custom handlebars templates which will allow you to seamlessl
|
||||
## Usage
|
||||
|
||||
```
|
||||
abi-gen
|
||||
$ abi-gen --help
|
||||
Options:
|
||||
--help Show help [boolean]
|
||||
--version Show version number [boolean]
|
||||
@@ -23,12 +23,24 @@ Options:
|
||||
--partials Glob pattern for the partial template files [string]
|
||||
--template Path for the main template file that will be used to
|
||||
generate each contract [string] [required]
|
||||
--backend The backing Ethereum library your app uses. Either 'web3'
|
||||
or 'ethers'. Ethers auto-converts small ints to numbers
|
||||
whereas Web3 doesn't.
|
||||
--backend The backing Ethereum library your app uses. For
|
||||
TypeScript, either 'web3' or 'ethers'. Ethers
|
||||
auto-converts small ints to numbers whereas Web3 doesn't.
|
||||
For Python, the only possibility is Web3.py
|
||||
[string] [choices: "web3", "ethers"] [default: "web3"]
|
||||
--network-id ID of the network where contract ABIs are nested in
|
||||
artifacts [number] [default: 50]
|
||||
--language Language of output file to generate
|
||||
[string] [choices: "TypeScript", "Python"] [default: "TypeScript"]
|
||||
|
||||
Examples:
|
||||
abi-gen --abis 'src/artifacts/**/*.json' Full usage example
|
||||
--out 'src/contracts/generated/'
|
||||
--partials
|
||||
'src/templates/partials/**/*.handlebars'
|
||||
--template
|
||||
'src/templates/contract.handlebars'
|
||||
|
||||
```
|
||||
|
||||
You're required to pass a [glob](<https://en.wikipedia.org/wiki/Glob_(programming)>) template where your abi files are located.
|
||||
@@ -55,7 +67,9 @@ See the [type definition](https://github.com/0xProject/0x-monorepo/tree/developm
|
||||
|
||||
## Output files
|
||||
|
||||
Output files will be generated within an output folder with names converted to camel case and taken from abi file names. If you already have some files in that folder they will be overwritten.
|
||||
Output files will be generated within the specified output folder. If you already have some files in that folder they will be overwritten.
|
||||
|
||||
Names of files, classes and methods will be converted to the standard naming conventions for the given target language.
|
||||
|
||||
## Contributing
|
||||
|
||||
@@ -77,6 +91,8 @@ Then install dependencies
|
||||
yarn install
|
||||
```
|
||||
|
||||
You will also need to have Python 3 installed in order to build and run the tests of the command-line interface, which is integrated with the `yarn build`, `yarn test`, and `yarn lint` commands described below. More specifically, your local `pip` should resolve to the Python 3 version of `pip`, not a Python 2.x version.
|
||||
|
||||
### Build
|
||||
|
||||
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
|
||||
@@ -105,15 +121,17 @@ yarn lint
|
||||
|
||||
### CLI tests
|
||||
|
||||
The files in `test-cli/` are used to test the CLI output against a set of dummy contracts.
|
||||
The files in `test-cli/` are used to test the output generated by running the command-line tool against a set of fixture contracts. These tests are integrated with `yarn build`, `yarn test`, etc, but can be run independently per the instructions below.
|
||||
|
||||
Compile dummy contracts and generate wrappers:
|
||||
Compile fixture contracts:
|
||||
|
||||
```
|
||||
yarn compile:sol
|
||||
```
|
||||
|
||||
Build generated wrappers and unit tests:
|
||||
Compiling the fixture contracts into ABI is done ahead of time, and the ABI is checked in to `git`, in order to speed up test run time. Therefore, this compilation does not happen automatically as part of `yarn build`, and must be run explicitly after making any changes to the fixture contracts; and, any proposed changes to the fixture contracts should be accompanied by changes to the corresponding compilation artifacts.
|
||||
|
||||
Generate wrappers (and build them, in the case of TypeScript), and build unit tests:
|
||||
|
||||
```
|
||||
yarn test_cli:build
|
||||
@@ -126,3 +144,9 @@ yarn test_cli
|
||||
```
|
||||
|
||||
Known-good wrappers have been previously committed and are kept in `test-cli/expected-output/{language}`. They are intended to provide sample output and should be kept in sync with the generating code. When making changes to this project or `@0x/abi-gen-templates`, run `yarn test_cli:prebuild` to generate fresh code into `test-cli/output/{language}`, and then manually copy it to `test-cli/expected-output/{language}`.
|
||||
|
||||
Run linters against generated code:
|
||||
|
||||
```
|
||||
yarn test_cli:lint
|
||||
```
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/abi-gen",
|
||||
"version": "4.1.0",
|
||||
"version": "4.1.1",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -38,7 +38,7 @@
|
||||
"generate_contract_wrappers": "run-p gen_typescript gen_python",
|
||||
"gen_typescript": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/abi-gen-templates/contract.handlebars --partials '../../node_modules/@0x/abi-gen-templates/partials/**/*.handlebars' --output ./test-cli/output/typescript --backend ethers",
|
||||
"gen_python": "pip install black && abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/abi-gen-templates/Python/contract.handlebars --partials '../../node_modules/@0x/abi-gen-templates/Python/partials/**/*.handlebars' --output ./test-cli/output/python --language Python",
|
||||
"diff_contract_wrappers": "test-cli/diff.sh ./test-cli/expected-output ./test-cli/output",
|
||||
"diff_contract_wrappers": "git diff --exit-code ./test-cli/output",
|
||||
"coverage:report:text": "istanbul report text",
|
||||
"coverage:report:html": "istanbul report html && open coverage/index.html",
|
||||
"profiler:report:html": "istanbul report html && open coverage/index.html",
|
||||
@@ -79,13 +79,13 @@
|
||||
"yargs": "^10.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0x/base-contract": "^5.3.1",
|
||||
"@0x/base-contract": "^5.3.2",
|
||||
"@0x/contracts-gen": "^1.0.13",
|
||||
"@0x/dev-utils": "^2.3.0",
|
||||
"@0x/sol-compiler": "^3.1.12",
|
||||
"@0x/subproviders": "^5.0.1",
|
||||
"@0x/dev-utils": "^2.3.1",
|
||||
"@0x/sol-compiler": "^3.1.13",
|
||||
"@0x/subproviders": "^5.0.2",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"@types/glob": "5.0.35",
|
||||
"@types/mkdirp": "^0.5.2",
|
||||
"@types/mocha": "^5.2.7",
|
||||
|
@@ -1,7 +0,0 @@
|
||||
diff -r -U 5 $1 $2
|
||||
# -r tells diff to compare folders recursively.
|
||||
# "-U 5" tells diff to output a "unified" format, with 5 lines of context.
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Freshly generated output does not match expected output. If you're confident that the expected output should be updated, copy it in there and commit it."
|
||||
exit 1
|
||||
fi
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "2.1.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
"version": "2.1.3",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.1.4 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.1.3 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/assert",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -45,7 +45,7 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/json-schemas": "^3.1.13",
|
||||
"@0x/json-schemas": "^4.0.0",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"lodash": "^4.17.11",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "6.1.12",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
"version": "6.1.11",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v6.1.12 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v6.1.11 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/asset-buyer",
|
||||
"version": "6.1.11",
|
||||
"version": "6.1.12",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -37,16 +37,16 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/asset-buyer/README.md",
|
||||
"dependencies": {
|
||||
"@0x/assert": "^2.1.3",
|
||||
"@0x/connect": "^5.0.16",
|
||||
"@0x/contract-wrappers": "^11.0.0",
|
||||
"@0x/json-schemas": "^3.1.13",
|
||||
"@0x/order-utils": "^8.2.5",
|
||||
"@0x/subproviders": "^5.0.1",
|
||||
"@0x/assert": "^2.1.4",
|
||||
"@0x/connect": "^5.0.17",
|
||||
"@0x/contract-wrappers": "^11.1.0",
|
||||
"@0x/json-schemas": "^4.0.0",
|
||||
"@0x/order-utils": "^8.3.0",
|
||||
"@0x/subproviders": "^5.0.2",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"ethereum-types": "^2.1.4",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1566446343,
|
||||
"version": "1.0.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1565296576,
|
||||
"version": "1.0.1",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.2 - _August 22, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.1 - _August 8, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/asset-swapper",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -37,20 +37,20 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/asset-buyer/README.md",
|
||||
"dependencies": {
|
||||
"@0x/assert": "^2.1.3",
|
||||
"@0x/connect": "^5.0.16",
|
||||
"@0x/contract-addresses": "^3.0.3",
|
||||
"@0x/contract-wrappers": "^11.0.0",
|
||||
"@0x/dev-utils": "^2.3.0",
|
||||
"@0x/fill-scenarios": "^3.0.16",
|
||||
"@0x/json-schemas": "^3.1.13",
|
||||
"@0x/migrations": "^4.2.0",
|
||||
"@0x/order-utils": "^8.2.5",
|
||||
"@0x/subproviders": "^5.0.1",
|
||||
"@0x/assert": "^2.1.4",
|
||||
"@0x/connect": "^5.0.17",
|
||||
"@0x/contract-addresses": "^3.1.0",
|
||||
"@0x/contract-wrappers": "^11.1.0",
|
||||
"@0x/dev-utils": "^2.3.1",
|
||||
"@0x/fill-scenarios": "^3.0.17",
|
||||
"@0x/json-schemas": "^4.0.0",
|
||||
"@0x/migrations": "^4.3.0",
|
||||
"@0x/order-utils": "^8.3.0",
|
||||
"@0x/subproviders": "^5.0.2",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
"@0x/utils": "^4.5.0",
|
||||
"@0x/web3-wrapper": "^6.0.10",
|
||||
"@0x/web3-wrapper": "^6.0.11",
|
||||
"ethereum-types": "^2.1.4",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user