Compare commits
222 Commits
@0x/assert
...
@0x/contra
Author | SHA1 | Date | |
---|---|---|---|
|
5934eb0559 | ||
|
b998d719a6 | ||
|
33832244cf | ||
|
df8ea3b65c | ||
|
7067d4a499 | ||
|
3e764eafd9 | ||
|
4169a41eda | ||
|
379eab19ad | ||
|
6cba1f3b61 | ||
|
5dad2404d3 | ||
|
a1b20eea2c | ||
|
af075e7b8b | ||
|
ef0a699919 | ||
|
8279ef0e05 | ||
|
c1cee8e951 | ||
|
4c17373311 | ||
|
c20972de3f | ||
|
64401f1031 | ||
|
1f895d0f27 | ||
|
5aa8ea10c3 | ||
|
b1fd3429ae | ||
|
dc161ef08d | ||
|
9502e789b3 | ||
|
a71aed0233 | ||
|
eda8dc278b | ||
|
23a7ffb167 | ||
|
ab11aaa694 | ||
|
83b5a2709d | ||
|
f67f94fd6b | ||
|
4e8ae037bb | ||
|
04d8f46ff3 | ||
|
047de370d6 | ||
|
e21dc5f026 | ||
|
78da033441 | ||
|
b51038b9e7 | ||
|
44e0b58c66 | ||
|
3f7d5274a2 | ||
|
c8f5f6045e | ||
|
6bcc2064a2 | ||
|
3f9872d8b3 | ||
|
5814cd5fae | ||
|
44f8c7c548 | ||
|
c2549308fe | ||
|
cf1a3bf4e7 | ||
|
b7bd4e5c51 | ||
|
ceb651fdd1 | ||
|
8fa0f4a232 | ||
|
297f3da5db | ||
|
ec4d634677 | ||
|
0ddec99704 | ||
|
64cec1de3b | ||
|
fdaf5d1fc8 | ||
|
6baf71dca5 | ||
|
9d75a72a02 | ||
|
4bf66d6a63 | ||
|
8d9a550107 | ||
|
a076278026 | ||
|
998dac44ee | ||
|
871e81bd71 | ||
|
d892d16b51 | ||
|
4cbf2781e5 | ||
|
69653b1c7c | ||
|
39390865da | ||
|
4952cd5afb | ||
|
e86df96bfe | ||
|
ef5195db90 | ||
|
bc7e62db9f | ||
|
154e7a6a8a | ||
|
ba56019f2d | ||
|
31d289c504 | ||
|
a42b22966a | ||
|
17db62d463 | ||
|
d6d40ea839 | ||
|
eca8410dbb | ||
|
eb3a530e6c | ||
|
26e17074c2 | ||
|
6b775628d5 | ||
|
13eb9103a7 | ||
|
1fa82c1077 | ||
|
426190181b | ||
|
1232a9a03d | ||
|
e643c13292 | ||
|
522736e367 | ||
|
12fd9c29f0 | ||
|
0c871b67ca | ||
|
379e828fc1 | ||
|
fe1e8575ea | ||
|
8f14099adc | ||
|
852c1396ae | ||
|
b0f9195b57 | ||
|
98236736e0 | ||
|
8b93a2816c | ||
|
76d8a991c0 | ||
|
9186af1433 | ||
|
6a473f4c57 | ||
|
42224ab534 | ||
|
20bcf09459 | ||
|
5d1dd536e9 | ||
|
169b8807f7 | ||
|
5acdab849e | ||
|
2417084145 | ||
|
c16e62b5bf | ||
|
6fa7d90f1f | ||
|
1a3fd0227d | ||
|
2259b7dfcf | ||
|
33fd70d0e1 | ||
|
fc906bcaae | ||
|
184e111e39 | ||
|
ab62f50f5c | ||
|
3eac854356 | ||
|
f7892cd86b | ||
|
6e0260385c | ||
|
44300dabb0 | ||
|
580c3038c8 | ||
|
2a9175e964 | ||
|
5db20bbbe8 | ||
|
ae144dff39 | ||
|
9f533efc92 | ||
|
76e15c4166 | ||
|
62bb2daf16 | ||
|
59e292030a | ||
|
533fc7e444 | ||
|
e5c5338eb6 | ||
|
9463acb131 | ||
|
e69749350b | ||
|
42749187ff | ||
|
d5c2038d58 | ||
|
5843a61c9f | ||
|
ecde2c9d7f | ||
|
abd597c7a6 | ||
|
b35e1d350b | ||
|
918399458d | ||
|
72d9b7028b | ||
|
ed9790c840 | ||
|
fd04bc4820 | ||
|
58a213b7f9 | ||
|
7f8bbfb4bd | ||
|
8a3e64b3cd | ||
|
572de86d06 | ||
|
88c33fa4d4 | ||
|
ee1c6a1ce1 | ||
|
09e90bea8b | ||
|
bf758412c1 | ||
|
0bbbf5b431 | ||
|
87b2236cfb | ||
|
855d2bb87f | ||
|
13b54a3b4d | ||
|
5d24ef4849 | ||
|
b2da451e8d | ||
|
139b66fa76 | ||
|
390ed5d7f1 | ||
|
16b5fb6b56 | ||
|
6205d6c885 | ||
|
e5ea65da82 | ||
|
9caa5feff5 | ||
|
7f616356d2 | ||
|
155b5dd42f | ||
|
41aaf428bf | ||
|
a17cdf33ea | ||
|
3d5e879d5f | ||
|
1a73ad3a32 | ||
|
abb5e7cd39 | ||
|
cdae6de52e | ||
|
910fe77ca3 | ||
|
b9a93c82d7 | ||
|
1c040bd616 | ||
|
166c537938 | ||
|
79c8de5fd0 | ||
|
7e6d2102a5 | ||
|
4f7d6132fc | ||
|
b7fcc70cd9 | ||
|
43ad27931c | ||
|
68dc3f75eb | ||
|
e67eb6d5b4 | ||
|
2e060bc85f | ||
|
22f80e4b19 | ||
|
1ef434f95e | ||
|
5676702da6 | ||
|
2fe0539600 | ||
|
13df5adecd | ||
|
f33f808dc7 | ||
|
82ed9ef25e | ||
|
0aa26d791d | ||
|
255f278f5e | ||
|
1c76f9a0ff | ||
|
9a308e25a3 | ||
|
4b52f8c823 | ||
|
8f7145f80a | ||
|
eb17f053f7 | ||
|
304e714331 | ||
|
525685f942 | ||
|
e2477b66c6 | ||
|
58d51e039c | ||
|
cb5b5167fc | ||
|
7d68378c3c | ||
|
87da6a947d | ||
|
0e644da6ac | ||
|
d61a7c360e | ||
|
ab286d851d | ||
|
e8b60ab292 | ||
|
1cb7e70b42 | ||
|
25b9c22845 | ||
|
47166104fa | ||
|
d0e0622058 | ||
|
87c75a1e43 | ||
|
d1cc08f1d9 | ||
|
6619626486 | ||
|
1681ba090c | ||
|
c36e1ad056 | ||
|
d79c7f70be | ||
|
b7eb2e4746 | ||
|
4db9b8b0e3 | ||
|
f3a537d5c2 | ||
|
6a704b8a77 | ||
|
df896877f8 | ||
|
3cb2d3dfff | ||
|
d5f5e79661 | ||
|
82dffe9d0e | ||
|
d7825dd7db | ||
|
c0a2f429b6 | ||
|
8c8cab9309 | ||
|
7ad4cb0078 |
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "1.0.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "1.0.5",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.6 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.5 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -2,6 +2,7 @@
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"isOfflineMode": false,
|
||||
"compilerSettings": {
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-asset-proxy",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -46,10 +46,10 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/protocol/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^2.0.3",
|
||||
"@0x/contracts-gen": "^1.0.2",
|
||||
"@0x/dev-utils": "^2.1.0",
|
||||
"@0x/sol-compiler": "^3.0.3",
|
||||
"@0x/abi-gen": "^2.0.4",
|
||||
"@0x/contracts-gen": "^1.0.3",
|
||||
"@0x/dev-utils": "^2.1.1",
|
||||
"@0x/sol-compiler": "^3.1.0",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
@@ -66,17 +66,17 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^4.0.3",
|
||||
"@0x/base-contract": "^5.0.0",
|
||||
"@0x/contracts-erc20": "1.0.2",
|
||||
"@0x/contracts-erc721": "1.0.2",
|
||||
"@0x/contracts-test-utils": "^3.0.4",
|
||||
"@0x/contracts-test-utils": "^3.0.5",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/order-utils": "^6.1.0",
|
||||
"@0x/types": "^2.0.2",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.1.0",
|
||||
"@0x/web3-wrapper": "^5.0.0",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"@0x/order-utils": "^7.0.0",
|
||||
"@0x/types": "^2.1.0",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.0",
|
||||
"@0x/web3-wrapper": "^6.0.0",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -1,8 +1,7 @@
|
||||
import { constants, ERC20BalancesByOwner, txDefaults } from '@0x/contracts-test-utils';
|
||||
import { constants, ERC20BalancesByOwner, txDefaults, Web3ProviderEngine } from '@0x/contracts-test-utils';
|
||||
import { assetDataUtils } from '@0x/order-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { Provider } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, DummyERC20TokenContract, ERC20ProxyContract } from '../../src';
|
||||
@@ -11,7 +10,7 @@ export class ERC20Wrapper {
|
||||
private readonly _tokenOwnerAddresses: string[];
|
||||
private readonly _contractOwnerAddress: string;
|
||||
private readonly _web3Wrapper: Web3Wrapper;
|
||||
private readonly _provider: Provider;
|
||||
private readonly _provider: Web3ProviderEngine;
|
||||
private readonly _dummyTokenContracts: DummyERC20TokenContract[];
|
||||
private _proxyContract?: ERC20ProxyContract;
|
||||
private _proxyIdIfExists?: string;
|
||||
@@ -22,7 +21,7 @@ export class ERC20Wrapper {
|
||||
* @param contractOwnerAddress Desired owner of the contract
|
||||
* Instance of ERC20Wrapper
|
||||
*/
|
||||
constructor(provider: Provider, tokenOwnerAddresses: string[], contractOwnerAddress: string) {
|
||||
constructor(provider: Web3ProviderEngine, tokenOwnerAddresses: string[], contractOwnerAddress: string) {
|
||||
this._dummyTokenContracts = [];
|
||||
this._web3Wrapper = new Web3Wrapper(provider);
|
||||
this._provider = provider;
|
||||
|
@@ -1,8 +1,7 @@
|
||||
import { constants, ERC721TokenIdsByOwner, txDefaults } from '@0x/contracts-test-utils';
|
||||
import { constants, ERC721TokenIdsByOwner, txDefaults, Web3ProviderEngine } from '@0x/contracts-test-utils';
|
||||
import { generatePseudoRandomSalt } from '@0x/order-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { Provider } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, DummyERC721TokenContract, ERC721ProxyContract } from '../../src';
|
||||
@@ -11,12 +10,12 @@ export class ERC721Wrapper {
|
||||
private readonly _tokenOwnerAddresses: string[];
|
||||
private readonly _contractOwnerAddress: string;
|
||||
private readonly _web3Wrapper: Web3Wrapper;
|
||||
private readonly _provider: Provider;
|
||||
private readonly _provider: Web3ProviderEngine;
|
||||
private readonly _dummyTokenContracts: DummyERC721TokenContract[];
|
||||
private _proxyContract?: ERC721ProxyContract;
|
||||
private _proxyIdIfExists?: string;
|
||||
private _initialTokenIdsByOwner: ERC721TokenIdsByOwner = {};
|
||||
constructor(provider: Provider, tokenOwnerAddresses: string[], contractOwnerAddress: string) {
|
||||
constructor(provider: Web3ProviderEngine, tokenOwnerAddresses: string[], contractOwnerAddress: string) {
|
||||
this._web3Wrapper = new Web3Wrapper(provider);
|
||||
this._provider = provider;
|
||||
this._dummyTokenContracts = [];
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "1.0.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "1.0.5",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.6 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.5 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -2,6 +2,7 @@
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"isOfflineMode": false,
|
||||
"compilerSettings": {
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-erc20",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -46,11 +46,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^2.0.3",
|
||||
"@0x/contracts-gen": "^1.0.2",
|
||||
"@0x/contracts-test-utils": "^3.0.4",
|
||||
"@0x/dev-utils": "^2.1.0",
|
||||
"@0x/sol-compiler": "^3.0.3",
|
||||
"@0x/abi-gen": "^2.0.4",
|
||||
"@0x/contracts-gen": "^1.0.3",
|
||||
"@0x/contracts-test-utils": "^3.0.5",
|
||||
"@0x/dev-utils": "^2.1.1",
|
||||
"@0x/sol-compiler": "^3.1.0",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
@@ -67,14 +67,14 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^4.0.3",
|
||||
"@0x/base-contract": "^5.0.0",
|
||||
"@0x/contracts-exchange-libs": "1.0.2",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/types": "^2.0.2",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.1.0",
|
||||
"@0x/web3-wrapper": "^5.0.0",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"@0x/types": "^2.1.0",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.0",
|
||||
"@0x/web3-wrapper": "^6.0.0",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "1.0.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "1.0.5",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.6 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.5 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -2,6 +2,7 @@
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"isOfflineMode": false,
|
||||
"compilerSettings": {
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-erc721",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -46,11 +46,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^2.0.3",
|
||||
"@0x/contracts-gen": "^1.0.2",
|
||||
"@0x/contracts-test-utils": "^3.0.4",
|
||||
"@0x/dev-utils": "^2.1.0",
|
||||
"@0x/sol-compiler": "^3.0.3",
|
||||
"@0x/abi-gen": "^2.0.4",
|
||||
"@0x/contracts-gen": "^1.0.3",
|
||||
"@0x/contracts-test-utils": "^3.0.5",
|
||||
"@0x/dev-utils": "^2.1.1",
|
||||
"@0x/sol-compiler": "^3.1.0",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
@@ -67,13 +67,13 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^4.0.3",
|
||||
"@0x/base-contract": "^5.0.0",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/types": "^2.0.2",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.1.0",
|
||||
"@0x/web3-wrapper": "^5.0.0",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"@0x/types": "^2.1.0",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.0",
|
||||
"@0x/web3-wrapper": "^6.0.0",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "1.0.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "1.0.5",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.6 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.5 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -2,6 +2,7 @@
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"isOfflineMode": false,
|
||||
"compilerSettings": {
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-exchange-forwarder",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -46,12 +46,12 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^2.0.3",
|
||||
"@0x/contract-wrappers": "^7.1.0",
|
||||
"@0x/contracts-gen": "^1.0.2",
|
||||
"@0x/contracts-test-utils": "^3.0.4",
|
||||
"@0x/dev-utils": "^2.1.0",
|
||||
"@0x/sol-compiler": "^3.0.3",
|
||||
"@0x/abi-gen": "^2.0.4",
|
||||
"@0x/contract-wrappers": "^8.0.0",
|
||||
"@0x/contracts-gen": "^1.0.3",
|
||||
"@0x/contracts-test-utils": "^3.0.5",
|
||||
"@0x/dev-utils": "^2.1.1",
|
||||
"@0x/sol-compiler": "^3.1.0",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
@@ -68,19 +68,19 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^4.0.3",
|
||||
"@0x/base-contract": "^5.0.0",
|
||||
"@0x/contracts-asset-proxy": "1.0.2",
|
||||
"@0x/contracts-erc20": "1.0.2",
|
||||
"@0x/contracts-erc721": "1.0.2",
|
||||
"@0x/contracts-exchange": "1.0.2",
|
||||
"@0x/contracts-exchange-libs": "1.0.2",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/order-utils": "^6.1.0",
|
||||
"@0x/types": "^2.0.2",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.1.0",
|
||||
"@0x/web3-wrapper": "^5.0.0",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"@0x/order-utils": "^7.0.0",
|
||||
"@0x/types": "^2.1.0",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.0",
|
||||
"@0x/web3-wrapper": "^6.0.0",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { constants, formatters, LogDecoder, MarketSellOrders } from '@0x/contracts-test-utils';
|
||||
import { constants, formatters, LogDecoder, MarketSellOrders, Web3ProviderEngine } from '@0x/contracts-test-utils';
|
||||
import { SignedOrder } from '@0x/types';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { Provider, TransactionReceiptWithDecodedLogs, TxDataPayable } from 'ethereum-types';
|
||||
import { TransactionReceiptWithDecodedLogs, TxDataPayable } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { ForwarderContract } from '../../generated-wrappers/forwarder';
|
||||
@@ -55,7 +55,7 @@ export class ForwarderWrapper {
|
||||
const params = formatters.createMarketSellOrders(signedOrders, constants.ZERO_AMOUNT);
|
||||
return params;
|
||||
}
|
||||
constructor(contractInstance: ForwarderContract, provider: Provider) {
|
||||
constructor(contractInstance: ForwarderContract, provider: Web3ProviderEngine) {
|
||||
this._forwarderContract = contractInstance;
|
||||
this._web3Wrapper = new Web3Wrapper(provider);
|
||||
this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts);
|
||||
|
@@ -1,4 +1,18 @@
|
||||
[
|
||||
{
|
||||
"version": "1.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Upgrade contracts to Solidity 0.5.3",
|
||||
"pr": 1604
|
||||
},
|
||||
{
|
||||
"note": "Make constants internal",
|
||||
"pr": 1604
|
||||
}
|
||||
],
|
||||
"timestamp": 1551130135
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "1.0.5",
|
||||
|
@@ -5,6 +5,11 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.1.0 - _February 25, 2019_
|
||||
|
||||
* Upgrade contracts to Solidity 0.5.3 (#1604)
|
||||
* Make constants internal (#1604)
|
||||
|
||||
## v1.0.5 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -2,6 +2,7 @@
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"isOfflineMode": false,
|
||||
"compilerSettings": {
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
import "./LibOrder.sol";
|
||||
|
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
// solhint-disable
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
|
||||
/// @dev This contract documents the revert reasons used in the AssetProxy contracts.
|
||||
@@ -25,14 +25,14 @@ pragma solidity ^0.4.24;
|
||||
contract LibAssetProxyErrors {
|
||||
|
||||
/// Authorizable errors ///
|
||||
string constant SENDER_NOT_AUTHORIZED = "SENDER_NOT_AUTHORIZED"; // Sender not authorized to call this method.
|
||||
string constant TARGET_NOT_AUTHORIZED = "TARGET_NOT_AUTHORIZED"; // Target address not authorized to call this method.
|
||||
string constant TARGET_ALREADY_AUTHORIZED = "TARGET_ALREADY_AUTHORIZED"; // Target address must not already be authorized.
|
||||
string constant INDEX_OUT_OF_BOUNDS = "INDEX_OUT_OF_BOUNDS"; // Specified array index is out of bounds.
|
||||
string constant AUTHORIZED_ADDRESS_MISMATCH = "AUTHORIZED_ADDRESS_MISMATCH"; // Address at index does not match given target address.
|
||||
string constant internal SENDER_NOT_AUTHORIZED = "SENDER_NOT_AUTHORIZED"; // Sender not authorized to call this method.
|
||||
string constant internal TARGET_NOT_AUTHORIZED = "TARGET_NOT_AUTHORIZED"; // Target address not authorized to call this method.
|
||||
string constant internal TARGET_ALREADY_AUTHORIZED = "TARGET_ALREADY_AUTHORIZED"; // Target address must not already be authorized.
|
||||
string constant internal INDEX_OUT_OF_BOUNDS = "INDEX_OUT_OF_BOUNDS"; // Specified array index is out of bounds.
|
||||
string constant internal AUTHORIZED_ADDRESS_MISMATCH = "AUTHORIZED_ADDRESS_MISMATCH"; // Address at index does not match given target address.
|
||||
|
||||
/// Transfer errors ///
|
||||
string constant INVALID_AMOUNT = "INVALID_AMOUNT"; // Transfer amount must equal 1.
|
||||
string constant TRANSFER_FAILED = "TRANSFER_FAILED"; // Transfer failed.
|
||||
string constant LENGTH_GREATER_THAN_131_REQUIRED = "LENGTH_GREATER_THAN_131_REQUIRED"; // Byte array must have a length greater than 0.
|
||||
string constant internal INVALID_AMOUNT = "INVALID_AMOUNT"; // Transfer amount must equal 1.
|
||||
string constant internal TRANSFER_FAILED = "TRANSFER_FAILED"; // Transfer failed.
|
||||
string constant internal LENGTH_GREATER_THAN_131_REQUIRED = "LENGTH_GREATER_THAN_131_REQUIRED"; // Byte array must have a length greater than 0.
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
|
||||
// solhint-disable max-line-length
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
|
||||
contract LibEIP712 {
|
||||
@@ -50,7 +50,7 @@ contract LibEIP712 {
|
||||
EIP712_DOMAIN_SEPARATOR_SCHEMA_HASH,
|
||||
keccak256(bytes(EIP712_DOMAIN_NAME)),
|
||||
keccak256(bytes(EIP712_DOMAIN_VERSION)),
|
||||
bytes32(address(this))
|
||||
uint256(address(this))
|
||||
));
|
||||
}
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
// solhint-disable
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
|
||||
/// @dev This contract documents the revert reasons used in the Exchange contract.
|
||||
@@ -25,46 +25,46 @@ pragma solidity ^0.4.24;
|
||||
contract LibExchangeErrors {
|
||||
|
||||
/// Order validation errors ///
|
||||
string constant ORDER_UNFILLABLE = "ORDER_UNFILLABLE"; // Order cannot be filled.
|
||||
string constant INVALID_MAKER = "INVALID_MAKER"; // Invalid makerAddress.
|
||||
string constant INVALID_TAKER = "INVALID_TAKER"; // Invalid takerAddress.
|
||||
string constant INVALID_SENDER = "INVALID_SENDER"; // Invalid `msg.sender`.
|
||||
string constant INVALID_ORDER_SIGNATURE = "INVALID_ORDER_SIGNATURE"; // Signature validation failed.
|
||||
string constant internal ORDER_UNFILLABLE = "ORDER_UNFILLABLE"; // Order cannot be filled.
|
||||
string constant internal INVALID_MAKER = "INVALID_MAKER"; // Invalid makerAddress.
|
||||
string constant internal INVALID_TAKER = "INVALID_TAKER"; // Invalid takerAddress.
|
||||
string constant internal INVALID_SENDER = "INVALID_SENDER"; // Invalid `msg.sender`.
|
||||
string constant internal INVALID_ORDER_SIGNATURE = "INVALID_ORDER_SIGNATURE"; // Signature validation failed.
|
||||
|
||||
/// fillOrder validation errors ///
|
||||
string constant INVALID_TAKER_AMOUNT = "INVALID_TAKER_AMOUNT"; // takerAssetFillAmount cannot equal 0.
|
||||
string constant ROUNDING_ERROR = "ROUNDING_ERROR"; // Rounding error greater than 0.1% of takerAssetFillAmount.
|
||||
string constant internal INVALID_TAKER_AMOUNT = "INVALID_TAKER_AMOUNT"; // takerAssetFillAmount cannot equal 0.
|
||||
string constant internal ROUNDING_ERROR = "ROUNDING_ERROR"; // Rounding error greater than 0.1% of takerAssetFillAmount.
|
||||
|
||||
/// Signature validation errors ///
|
||||
string constant INVALID_SIGNATURE = "INVALID_SIGNATURE"; // Signature validation failed.
|
||||
string constant SIGNATURE_ILLEGAL = "SIGNATURE_ILLEGAL"; // Signature type is illegal.
|
||||
string constant SIGNATURE_UNSUPPORTED = "SIGNATURE_UNSUPPORTED"; // Signature type unsupported.
|
||||
string constant internal INVALID_SIGNATURE = "INVALID_SIGNATURE"; // Signature validation failed.
|
||||
string constant internal SIGNATURE_ILLEGAL = "SIGNATURE_ILLEGAL"; // Signature type is illegal.
|
||||
string constant internal SIGNATURE_UNSUPPORTED = "SIGNATURE_UNSUPPORTED"; // Signature type unsupported.
|
||||
|
||||
/// cancelOrdersUptTo errors ///
|
||||
string constant INVALID_NEW_ORDER_EPOCH = "INVALID_NEW_ORDER_EPOCH"; // Specified salt must be greater than or equal to existing orderEpoch.
|
||||
string constant internal INVALID_NEW_ORDER_EPOCH = "INVALID_NEW_ORDER_EPOCH"; // Specified salt must be greater than or equal to existing orderEpoch.
|
||||
|
||||
/// fillOrKillOrder errors ///
|
||||
string constant COMPLETE_FILL_FAILED = "COMPLETE_FILL_FAILED"; // Desired takerAssetFillAmount could not be completely filled.
|
||||
string constant internal COMPLETE_FILL_FAILED = "COMPLETE_FILL_FAILED"; // Desired takerAssetFillAmount could not be completely filled.
|
||||
|
||||
/// matchOrders errors ///
|
||||
string constant NEGATIVE_SPREAD_REQUIRED = "NEGATIVE_SPREAD_REQUIRED"; // Matched orders must have a negative spread.
|
||||
string constant internal NEGATIVE_SPREAD_REQUIRED = "NEGATIVE_SPREAD_REQUIRED"; // Matched orders must have a negative spread.
|
||||
|
||||
/// Transaction errors ///
|
||||
string constant REENTRANCY_ILLEGAL = "REENTRANCY_ILLEGAL"; // Recursive reentrancy is not allowed.
|
||||
string constant INVALID_TX_HASH = "INVALID_TX_HASH"; // Transaction has already been executed.
|
||||
string constant INVALID_TX_SIGNATURE = "INVALID_TX_SIGNATURE"; // Signature validation failed.
|
||||
string constant FAILED_EXECUTION = "FAILED_EXECUTION"; // Transaction execution failed.
|
||||
string constant internal REENTRANCY_ILLEGAL = "REENTRANCY_ILLEGAL"; // Recursive reentrancy is not allowed.
|
||||
string constant internal INVALID_TX_HASH = "INVALID_TX_HASH"; // Transaction has already been executed.
|
||||
string constant internal INVALID_TX_SIGNATURE = "INVALID_TX_SIGNATURE"; // Signature validation failed.
|
||||
string constant internal FAILED_EXECUTION = "FAILED_EXECUTION"; // Transaction execution failed.
|
||||
|
||||
/// registerAssetProxy errors ///
|
||||
string constant ASSET_PROXY_ALREADY_EXISTS = "ASSET_PROXY_ALREADY_EXISTS"; // AssetProxy with same id already exists.
|
||||
string constant internal ASSET_PROXY_ALREADY_EXISTS = "ASSET_PROXY_ALREADY_EXISTS"; // AssetProxy with same id already exists.
|
||||
|
||||
/// dispatchTransferFrom errors ///
|
||||
string constant ASSET_PROXY_DOES_NOT_EXIST = "ASSET_PROXY_DOES_NOT_EXIST"; // No assetProxy registered at given id.
|
||||
string constant TRANSFER_FAILED = "TRANSFER_FAILED"; // Asset transfer unsuccesful.
|
||||
string constant internal ASSET_PROXY_DOES_NOT_EXIST = "ASSET_PROXY_DOES_NOT_EXIST"; // No assetProxy registered at given id.
|
||||
string constant internal TRANSFER_FAILED = "TRANSFER_FAILED"; // Asset transfer unsuccesful.
|
||||
|
||||
/// Length validation errors ///
|
||||
string constant LENGTH_GREATER_THAN_0_REQUIRED = "LENGTH_GREATER_THAN_0_REQUIRED"; // Byte array must have a length greater than 0.
|
||||
string constant LENGTH_GREATER_THAN_3_REQUIRED = "LENGTH_GREATER_THAN_3_REQUIRED"; // Byte array must have a length greater than 3.
|
||||
string constant LENGTH_0_REQUIRED = "LENGTH_0_REQUIRED"; // Byte array must have a length of 0.
|
||||
string constant LENGTH_65_REQUIRED = "LENGTH_65_REQUIRED"; // Byte array must have a length of 65.
|
||||
string constant internal LENGTH_GREATER_THAN_0_REQUIRED = "LENGTH_GREATER_THAN_0_REQUIRED"; // Byte array must have a length greater than 0.
|
||||
string constant internal LENGTH_GREATER_THAN_3_REQUIRED = "LENGTH_GREATER_THAN_3_REQUIRED"; // Byte array must have a length greater than 3.
|
||||
string constant internal LENGTH_0_REQUIRED = "LENGTH_0_REQUIRED"; // Byte array must have a length of 0.
|
||||
string constant internal LENGTH_65_REQUIRED = "LENGTH_65_REQUIRED"; // Byte array must have a length of 65.
|
||||
}
|
||||
|
@@ -16,137 +16,137 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
|
||||
contract LibExchangeSelectors {
|
||||
|
||||
// solhint-disable max-line-length
|
||||
// allowedValidators
|
||||
bytes4 constant public ALLOWED_VALIDATORS_SELECTOR = 0x7b8e3514;
|
||||
bytes4 constant public ALLOWED_VALIDATORS_SELECTOR_GENERATOR = bytes4(keccak256("allowedValidators(address,address)"));
|
||||
bytes4 constant internal ALLOWED_VALIDATORS_SELECTOR = 0x7b8e3514;
|
||||
bytes4 constant internal ALLOWED_VALIDATORS_SELECTOR_GENERATOR = bytes4(keccak256("allowedValidators(address,address)"));
|
||||
|
||||
// assetProxies
|
||||
bytes4 constant public ASSET_PROXIES_SELECTOR = 0x3fd3c997;
|
||||
bytes4 constant public ASSET_PROXIES_SELECTOR_GENERATOR = bytes4(keccak256("assetProxies(bytes4)"));
|
||||
bytes4 constant internal ASSET_PROXIES_SELECTOR = 0x3fd3c997;
|
||||
bytes4 constant internal ASSET_PROXIES_SELECTOR_GENERATOR = bytes4(keccak256("assetProxies(bytes4)"));
|
||||
|
||||
// batchCancelOrders
|
||||
bytes4 constant public BATCH_CANCEL_ORDERS_SELECTOR = 0x4ac14782;
|
||||
bytes4 constant public BATCH_CANCEL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])"));
|
||||
bytes4 constant internal BATCH_CANCEL_ORDERS_SELECTOR = 0x4ac14782;
|
||||
bytes4 constant internal BATCH_CANCEL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])"));
|
||||
|
||||
// batchFillOrKillOrders
|
||||
bytes4 constant public BATCH_FILL_OR_KILL_ORDERS_SELECTOR = 0x4d0ae546;
|
||||
bytes4 constant public BATCH_FILL_OR_KILL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])"));
|
||||
bytes4 constant internal BATCH_FILL_OR_KILL_ORDERS_SELECTOR = 0x4d0ae546;
|
||||
bytes4 constant internal BATCH_FILL_OR_KILL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])"));
|
||||
|
||||
// batchFillOrders
|
||||
bytes4 constant public BATCH_FILL_ORDERS_SELECTOR = 0x297bb70b;
|
||||
bytes4 constant public BATCH_FILL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])"));
|
||||
bytes4 constant internal BATCH_FILL_ORDERS_SELECTOR = 0x297bb70b;
|
||||
bytes4 constant internal BATCH_FILL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])"));
|
||||
|
||||
// batchFillOrdersNoThrow
|
||||
bytes4 constant public BATCH_FILL_ORDERS_NO_THROW_SELECTOR = 0x50dde190;
|
||||
bytes4 constant public BATCH_FILL_ORDERS_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])"));
|
||||
bytes4 constant internal BATCH_FILL_ORDERS_NO_THROW_SELECTOR = 0x50dde190;
|
||||
bytes4 constant internal BATCH_FILL_ORDERS_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])"));
|
||||
|
||||
// cancelOrder
|
||||
bytes4 constant public CANCEL_ORDER_SELECTOR = 0xd46b02c3;
|
||||
bytes4 constant public CANCEL_ORDER_SELECTOR_GENERATOR = bytes4(keccak256("cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))"));
|
||||
bytes4 constant internal CANCEL_ORDER_SELECTOR = 0xd46b02c3;
|
||||
bytes4 constant internal CANCEL_ORDER_SELECTOR_GENERATOR = bytes4(keccak256("cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))"));
|
||||
|
||||
// cancelOrdersUpTo
|
||||
bytes4 constant public CANCEL_ORDERS_UP_TO_SELECTOR = 0x4f9559b1;
|
||||
bytes4 constant public CANCEL_ORDERS_UP_TO_SELECTOR_GENERATOR = bytes4(keccak256("cancelOrdersUpTo(uint256)"));
|
||||
bytes4 constant internal CANCEL_ORDERS_UP_TO_SELECTOR = 0x4f9559b1;
|
||||
bytes4 constant internal CANCEL_ORDERS_UP_TO_SELECTOR_GENERATOR = bytes4(keccak256("cancelOrdersUpTo(uint256)"));
|
||||
|
||||
// cancelled
|
||||
bytes4 constant public CANCELLED_SELECTOR = 0x2ac12622;
|
||||
bytes4 constant public CANCELLED_SELECTOR_GENERATOR = bytes4(keccak256("cancelled(bytes32)"));
|
||||
bytes4 constant internal CANCELLED_SELECTOR = 0x2ac12622;
|
||||
bytes4 constant internal CANCELLED_SELECTOR_GENERATOR = bytes4(keccak256("cancelled(bytes32)"));
|
||||
|
||||
// currentContextAddress
|
||||
bytes4 constant public CURRENT_CONTEXT_ADDRESS_SELECTOR = 0xeea086ba;
|
||||
bytes4 constant public CURRENT_CONTEXT_ADDRESS_SELECTOR_GENERATOR = bytes4(keccak256("currentContextAddress()"));
|
||||
bytes4 constant internal CURRENT_CONTEXT_ADDRESS_SELECTOR = 0xeea086ba;
|
||||
bytes4 constant internal CURRENT_CONTEXT_ADDRESS_SELECTOR_GENERATOR = bytes4(keccak256("currentContextAddress()"));
|
||||
|
||||
// executeTransaction
|
||||
bytes4 constant public EXECUTE_TRANSACTION_SELECTOR = 0xbfc8bfce;
|
||||
bytes4 constant public EXECUTE_TRANSACTION_SELECTOR_GENERATOR = bytes4(keccak256("executeTransaction(uint256,address,bytes,bytes)"));
|
||||
bytes4 constant internal EXECUTE_TRANSACTION_SELECTOR = 0xbfc8bfce;
|
||||
bytes4 constant internal EXECUTE_TRANSACTION_SELECTOR_GENERATOR = bytes4(keccak256("executeTransaction(uint256,address,bytes,bytes)"));
|
||||
|
||||
// fillOrKillOrder
|
||||
bytes4 constant public FILL_OR_KILL_ORDER_SELECTOR = 0x64a3bc15;
|
||||
bytes4 constant public FILL_OR_KILL_ORDER_SELECTOR_GENERATOR = bytes4(keccak256("fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)"));
|
||||
bytes4 constant internal FILL_OR_KILL_ORDER_SELECTOR = 0x64a3bc15;
|
||||
bytes4 constant internal FILL_OR_KILL_ORDER_SELECTOR_GENERATOR = bytes4(keccak256("fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)"));
|
||||
|
||||
// fillOrder
|
||||
bytes4 constant public FILL_ORDER_SELECTOR = 0xb4be83d5;
|
||||
bytes4 constant public FILL_ORDER_SELECTOR_GENERATOR = bytes4(keccak256("fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)"));
|
||||
bytes4 constant internal FILL_ORDER_SELECTOR = 0xb4be83d5;
|
||||
bytes4 constant internal FILL_ORDER_SELECTOR_GENERATOR = bytes4(keccak256("fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)"));
|
||||
|
||||
// fillOrderNoThrow
|
||||
bytes4 constant public FILL_ORDER_NO_THROW_SELECTOR = 0x3e228bae;
|
||||
bytes4 constant public FILL_ORDER_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("fillOrderNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)"));
|
||||
bytes4 constant internal FILL_ORDER_NO_THROW_SELECTOR = 0x3e228bae;
|
||||
bytes4 constant internal FILL_ORDER_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("fillOrderNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)"));
|
||||
|
||||
// filled
|
||||
bytes4 constant public FILLED_SELECTOR = 0x288cdc91;
|
||||
bytes4 constant public FILLED_SELECTOR_GENERATOR = bytes4(keccak256("filled(bytes32)"));
|
||||
bytes4 constant internal FILLED_SELECTOR = 0x288cdc91;
|
||||
bytes4 constant internal FILLED_SELECTOR_GENERATOR = bytes4(keccak256("filled(bytes32)"));
|
||||
|
||||
// getAssetProxy
|
||||
bytes4 constant public GET_ASSET_PROXY_SELECTOR = 0x60704108;
|
||||
bytes4 constant public GET_ASSET_PROXY_SELECTOR_GENERATOR = bytes4(keccak256("getAssetProxy(bytes4)"));
|
||||
bytes4 constant internal GET_ASSET_PROXY_SELECTOR = 0x60704108;
|
||||
bytes4 constant internal GET_ASSET_PROXY_SELECTOR_GENERATOR = bytes4(keccak256("getAssetProxy(bytes4)"));
|
||||
|
||||
// getOrderInfo
|
||||
bytes4 constant public GET_ORDER_INFO_SELECTOR = 0xc75e0a81;
|
||||
bytes4 constant public GET_ORDER_INFO_SELECTOR_GENERATOR = bytes4(keccak256("getOrderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))"));
|
||||
bytes4 constant internal GET_ORDER_INFO_SELECTOR = 0xc75e0a81;
|
||||
bytes4 constant internal GET_ORDER_INFO_SELECTOR_GENERATOR = bytes4(keccak256("getOrderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))"));
|
||||
|
||||
// getOrdersInfo
|
||||
bytes4 constant public GET_ORDERS_INFO_SELECTOR = 0x7e9d74dc;
|
||||
bytes4 constant public GET_ORDERS_INFO_SELECTOR_GENERATOR = bytes4(keccak256("getOrdersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])"));
|
||||
bytes4 constant internal GET_ORDERS_INFO_SELECTOR = 0x7e9d74dc;
|
||||
bytes4 constant internal GET_ORDERS_INFO_SELECTOR_GENERATOR = bytes4(keccak256("getOrdersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])"));
|
||||
|
||||
// isValidSignature
|
||||
bytes4 constant public IS_VALID_SIGNATURE_SELECTOR = 0x93634702;
|
||||
bytes4 constant public IS_VALID_SIGNATURE_SELECTOR_GENERATOR = bytes4(keccak256("isValidSignature(bytes32,address,bytes)"));
|
||||
bytes4 constant internal IS_VALID_SIGNATURE_SELECTOR = 0x93634702;
|
||||
bytes4 constant internal IS_VALID_SIGNATURE_SELECTOR_GENERATOR = bytes4(keccak256("isValidSignature(bytes32,address,bytes)"));
|
||||
|
||||
// marketBuyOrders
|
||||
bytes4 constant public MARKET_BUY_ORDERS_SELECTOR = 0xe5fa431b;
|
||||
bytes4 constant public MARKET_BUY_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("marketBuyOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
|
||||
bytes4 constant internal MARKET_BUY_ORDERS_SELECTOR = 0xe5fa431b;
|
||||
bytes4 constant internal MARKET_BUY_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("marketBuyOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
|
||||
|
||||
// marketBuyOrdersNoThrow
|
||||
bytes4 constant public MARKET_BUY_ORDERS_NO_THROW_SELECTOR = 0xa3e20380;
|
||||
bytes4 constant public MARKET_BUY_ORDERS_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
|
||||
bytes4 constant internal MARKET_BUY_ORDERS_NO_THROW_SELECTOR = 0xa3e20380;
|
||||
bytes4 constant internal MARKET_BUY_ORDERS_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
|
||||
|
||||
// marketSellOrders
|
||||
bytes4 constant public MARKET_SELL_ORDERS_SELECTOR = 0x7e1d9808;
|
||||
bytes4 constant public MARKET_SELL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("marketSellOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
|
||||
bytes4 constant internal MARKET_SELL_ORDERS_SELECTOR = 0x7e1d9808;
|
||||
bytes4 constant internal MARKET_SELL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("marketSellOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
|
||||
|
||||
// marketSellOrdersNoThrow
|
||||
bytes4 constant public MARKET_SELL_ORDERS_NO_THROW_SELECTOR = 0xdd1c7d18;
|
||||
bytes4 constant public MARKET_SELL_ORDERS_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
|
||||
bytes4 constant internal MARKET_SELL_ORDERS_NO_THROW_SELECTOR = 0xdd1c7d18;
|
||||
bytes4 constant internal MARKET_SELL_ORDERS_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
|
||||
|
||||
// matchOrders
|
||||
bytes4 constant public MATCH_ORDERS_SELECTOR = 0x3c28d861;
|
||||
bytes4 constant public MATCH_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)"));
|
||||
bytes4 constant internal MATCH_ORDERS_SELECTOR = 0x3c28d861;
|
||||
bytes4 constant internal MATCH_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes,bytes)"));
|
||||
|
||||
// orderEpoch
|
||||
bytes4 constant public ORDER_EPOCH_SELECTOR = 0xd9bfa73e;
|
||||
bytes4 constant public ORDER_EPOCH_SELECTOR_GENERATOR = bytes4(keccak256("orderEpoch(address,address)"));
|
||||
bytes4 constant internal ORDER_EPOCH_SELECTOR = 0xd9bfa73e;
|
||||
bytes4 constant internal ORDER_EPOCH_SELECTOR_GENERATOR = bytes4(keccak256("orderEpoch(address,address)"));
|
||||
|
||||
// owner
|
||||
bytes4 constant public OWNER_SELECTOR = 0x8da5cb5b;
|
||||
bytes4 constant public OWNER_SELECTOR_GENERATOR = bytes4(keccak256("owner()"));
|
||||
bytes4 constant internal OWNER_SELECTOR = 0x8da5cb5b;
|
||||
bytes4 constant internal OWNER_SELECTOR_GENERATOR = bytes4(keccak256("owner()"));
|
||||
|
||||
// preSign
|
||||
bytes4 constant public PRE_SIGN_SELECTOR = 0x3683ef8e;
|
||||
bytes4 constant public PRE_SIGN_SELECTOR_GENERATOR = bytes4(keccak256("preSign(bytes32,address,bytes)"));
|
||||
bytes4 constant internal PRE_SIGN_SELECTOR = 0x3683ef8e;
|
||||
bytes4 constant internal PRE_SIGN_SELECTOR_GENERATOR = bytes4(keccak256("preSign(bytes32,address,bytes)"));
|
||||
|
||||
// preSigned
|
||||
bytes4 constant public PRE_SIGNED_SELECTOR = 0x82c174d0;
|
||||
bytes4 constant public PRE_SIGNED_SELECTOR_GENERATOR = bytes4(keccak256("preSigned(bytes32,address)"));
|
||||
bytes4 constant internal PRE_SIGNED_SELECTOR = 0x82c174d0;
|
||||
bytes4 constant internal PRE_SIGNED_SELECTOR_GENERATOR = bytes4(keccak256("preSigned(bytes32,address)"));
|
||||
|
||||
// registerAssetProxy
|
||||
bytes4 constant public REGISTER_ASSET_PROXY_SELECTOR = 0xc585bb93;
|
||||
bytes4 constant public REGISTER_ASSET_PROXY_SELECTOR_GENERATOR = bytes4(keccak256("registerAssetProxy(address)"));
|
||||
bytes4 constant internal REGISTER_ASSET_PROXY_SELECTOR = 0xc585bb93;
|
||||
bytes4 constant internal REGISTER_ASSET_PROXY_SELECTOR_GENERATOR = bytes4(keccak256("registerAssetProxy(address)"));
|
||||
|
||||
// setSignatureValidatorApproval
|
||||
bytes4 constant public SET_SIGNATURE_VALIDATOR_APPROVAL_SELECTOR = 0x77fcce68;
|
||||
bytes4 constant public SET_SIGNATURE_VALIDATOR_APPROVAL_SELECTOR_GENERATOR = bytes4(keccak256("setSignatureValidatorApproval(address,bool)"));
|
||||
bytes4 constant internal SET_SIGNATURE_VALIDATOR_APPROVAL_SELECTOR = 0x77fcce68;
|
||||
bytes4 constant internal SET_SIGNATURE_VALIDATOR_APPROVAL_SELECTOR_GENERATOR = bytes4(keccak256("setSignatureValidatorApproval(address,bool)"));
|
||||
|
||||
// transactions
|
||||
bytes4 constant public TRANSACTIONS_SELECTOR = 0x642f2eaf;
|
||||
bytes4 constant public TRANSACTIONS_SELECTOR_GENERATOR = bytes4(keccak256("transactions(bytes32)"));
|
||||
bytes4 constant internal TRANSACTIONS_SELECTOR = 0x642f2eaf;
|
||||
bytes4 constant internal TRANSACTIONS_SELECTOR_GENERATOR = bytes4(keccak256("transactions(bytes32)"));
|
||||
|
||||
// transferOwnership
|
||||
bytes4 constant public TRANSFER_OWNERSHIP_SELECTOR = 0xf2fde38b;
|
||||
bytes4 constant public TRANSFER_OWNERSHIP_SELECTOR_GENERATOR = bytes4(keccak256("transferOwnership(address)"));
|
||||
bytes4 constant internal TRANSFER_OWNERSHIP_SELECTOR = 0xf2fde38b;
|
||||
bytes4 constant internal TRANSFER_OWNERSHIP_SELECTOR_GENERATOR = bytes4(keccak256("transferOwnership(address)"));
|
||||
}
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
import "@0x/contracts-utils/contracts/src/SafeMath.sol";
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
import "@0x/contracts-utils/contracts/src/SafeMath.sol";
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
import "./LibEIP712.sol";
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity 0.4.24;
|
||||
pragma solidity 0.5.3;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
import "../src/LibMath.sol";
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-exchange-libs",
|
||||
"version": "1.0.5",
|
||||
"version": "1.1.0",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -46,11 +46,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/libs/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^2.0.3",
|
||||
"@0x/contracts-gen": "^1.0.2",
|
||||
"@0x/contracts-test-utils": "^3.0.4",
|
||||
"@0x/dev-utils": "^2.1.0",
|
||||
"@0x/sol-compiler": "^3.0.3",
|
||||
"@0x/abi-gen": "^2.0.4",
|
||||
"@0x/contracts-gen": "^1.0.3",
|
||||
"@0x/contracts-test-utils": "^3.0.5",
|
||||
"@0x/dev-utils": "^2.1.1",
|
||||
"@0x/sol-compiler": "^3.1.0",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
@@ -67,14 +67,14 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^4.0.3",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/order-utils": "^6.1.0",
|
||||
"@0x/types": "^2.0.2",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.1.0",
|
||||
"@0x/web3-wrapper": "^5.0.0",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"@0x/base-contract": "^5.0.0",
|
||||
"@0x/contracts-utils": "^2.0.5",
|
||||
"@0x/order-utils": "^7.0.0",
|
||||
"@0x/types": "^2.1.0",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.0",
|
||||
"@0x/web3-wrapper": "^6.0.0",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "1.0.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "1.0.5",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.6 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.5 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -2,6 +2,7 @@
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"isOfflineMode": false,
|
||||
"compilerSettings": {
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-exchange",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -46,11 +46,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/protocol/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^2.0.3",
|
||||
"@0x/contracts-gen": "^1.0.2",
|
||||
"@0x/contracts-test-utils": "^3.0.4",
|
||||
"@0x/dev-utils": "^2.1.0",
|
||||
"@0x/sol-compiler": "^3.0.3",
|
||||
"@0x/abi-gen": "^2.0.4",
|
||||
"@0x/contracts-gen": "^1.0.3",
|
||||
"@0x/contracts-test-utils": "^3.0.5",
|
||||
"@0x/dev-utils": "^2.1.1",
|
||||
"@0x/sol-compiler": "^3.1.0",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
@@ -67,18 +67,18 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^4.0.3",
|
||||
"@0x/base-contract": "^5.0.0",
|
||||
"@0x/contracts-asset-proxy": "1.0.2",
|
||||
"@0x/contracts-erc20": "1.0.2",
|
||||
"@0x/contracts-erc721": "1.0.2",
|
||||
"@0x/contracts-exchange-libs": "1.0.2",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/order-utils": "^6.1.0",
|
||||
"@0x/types": "^2.0.2",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.1.0",
|
||||
"@0x/web3-wrapper": "^5.0.0",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"@0x/order-utils": "^7.0.0",
|
||||
"@0x/types": "^2.1.0",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.0",
|
||||
"@0x/web3-wrapper": "^6.0.0",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,8 +1,15 @@
|
||||
import { FillResults, formatters, LogDecoder, OrderInfo, orderUtils } from '@0x/contracts-test-utils';
|
||||
import {
|
||||
FillResults,
|
||||
formatters,
|
||||
LogDecoder,
|
||||
OrderInfo,
|
||||
orderUtils,
|
||||
Web3ProviderEngine,
|
||||
} from '@0x/contracts-test-utils';
|
||||
import { SignedOrder, SignedZeroExTransaction } from '@0x/types';
|
||||
import { AbiEncoder, BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { MethodAbi, Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import { MethodAbi, TransactionReceiptWithDecodedLogs, ZeroExProvider } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, ExchangeContract } from '../../src';
|
||||
@@ -13,7 +20,7 @@ export class ExchangeWrapper {
|
||||
private readonly _exchange: ExchangeContract;
|
||||
private readonly _web3Wrapper: Web3Wrapper;
|
||||
private readonly _logDecoder: LogDecoder;
|
||||
constructor(exchangeContract: ExchangeContract, provider: Provider) {
|
||||
constructor(exchangeContract: ExchangeContract, provider: Web3ProviderEngine | ZeroExProvider) {
|
||||
this._exchange = exchangeContract;
|
||||
this._web3Wrapper = new Web3Wrapper(provider);
|
||||
this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts);
|
||||
|
@@ -15,6 +15,7 @@ import {
|
||||
TakerAssetFillAmountScenario,
|
||||
TakerScenario,
|
||||
TraderStateScenario,
|
||||
Web3ProviderEngine,
|
||||
} from '@0x/contracts-test-utils';
|
||||
import {
|
||||
assetDataUtils,
|
||||
@@ -25,10 +26,10 @@ import {
|
||||
OrderValidationUtils,
|
||||
} from '@0x/order-utils';
|
||||
import { AssetProxyId, RevertReason, SignatureType, SignedOrder } from '@0x/types';
|
||||
import { BigNumber, errorUtils, logUtils } from '@0x/utils';
|
||||
import { BigNumber, errorUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as chai from 'chai';
|
||||
import { LogWithDecodedArgs, Provider, TxData } from 'ethereum-types';
|
||||
import { LogWithDecodedArgs, TxData } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
import 'make-promises-safe';
|
||||
|
||||
@@ -59,7 +60,8 @@ export async function fillOrderCombinatorialUtilsFactoryAsync(
|
||||
const [ownerAddress, makerAddress, takerAddress] = userAddresses;
|
||||
const makerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[userAddresses.indexOf(makerAddress)];
|
||||
|
||||
const provider = web3Wrapper.getProvider();
|
||||
const supportedProvider = web3Wrapper.getProvider();
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const erc20Wrapper = new ERC20Wrapper(provider, userAddresses, ownerAddress);
|
||||
const erc721Wrapper = new ERC721Wrapper(provider, userAddresses, ownerAddress);
|
||||
|
||||
@@ -351,7 +353,7 @@ export class FillOrderCombinatorialUtils {
|
||||
this.testLibsContract = testLibsContract;
|
||||
}
|
||||
public async testFillOrderScenarioAsync(
|
||||
provider: Provider,
|
||||
provider: Web3ProviderEngine,
|
||||
fillScenario: FillScenario,
|
||||
isVerbose: boolean = false,
|
||||
): Promise<void> {
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "2.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "2.0.4",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.5 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.4 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -2,6 +2,7 @@
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"isOfflineMode": false,
|
||||
"compilerSettings": {
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-extensions",
|
||||
"version": "2.0.4",
|
||||
"version": "2.0.5",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -46,12 +46,12 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^2.0.3",
|
||||
"@0x/contract-wrappers": "^7.1.0",
|
||||
"@0x/contracts-gen": "^1.0.2",
|
||||
"@0x/contracts-test-utils": "^3.0.4",
|
||||
"@0x/dev-utils": "^2.1.0",
|
||||
"@0x/sol-compiler": "^3.0.3",
|
||||
"@0x/abi-gen": "^2.0.4",
|
||||
"@0x/contract-wrappers": "^8.0.0",
|
||||
"@0x/contracts-gen": "^1.0.3",
|
||||
"@0x/contracts-test-utils": "^3.0.5",
|
||||
"@0x/dev-utils": "^2.1.1",
|
||||
"@0x/sol-compiler": "^3.1.0",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
@@ -68,19 +68,19 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^4.0.3",
|
||||
"@0x/base-contract": "^5.0.0",
|
||||
"@0x/contracts-asset-proxy": "1.0.2",
|
||||
"@0x/contracts-erc20": "1.0.2",
|
||||
"@0x/contracts-erc721": "1.0.2",
|
||||
"@0x/contracts-exchange": "1.0.2",
|
||||
"@0x/contracts-exchange-libs": "1.0.2",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/order-utils": "^6.1.0",
|
||||
"@0x/types": "^2.0.2",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.1.0",
|
||||
"@0x/web3-wrapper": "^5.0.0",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"@0x/order-utils": "^7.0.0",
|
||||
"@0x/types": "^2.1.0",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.0",
|
||||
"@0x/web3-wrapper": "^6.0.0",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -5,11 +5,12 @@ import {
|
||||
OrderInfo,
|
||||
orderUtils,
|
||||
TransactionFactory,
|
||||
Web3ProviderEngine,
|
||||
} from '@0x/contracts-test-utils';
|
||||
import { SignedOrder } from '@0x/types';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, BalanceThresholdFilterContract, ExchangeContract } from '../../src';
|
||||
@@ -24,7 +25,7 @@ export class BalanceThresholdWrapper {
|
||||
balanceThresholdFilter: BalanceThresholdFilterContract,
|
||||
exchangeContract: ExchangeContract,
|
||||
signerTransactionFactory: TransactionFactory,
|
||||
provider: Provider,
|
||||
provider: Web3ProviderEngine,
|
||||
) {
|
||||
this._balanceThresholdFilter = balanceThresholdFilter;
|
||||
this._exchange = exchangeContract;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { LogDecoder } from '@0x/contracts-test-utils';
|
||||
import { LogDecoder, Web3ProviderEngine } from '@0x/contracts-test-utils';
|
||||
import { DutchAuctionDetails, SignedOrder } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { DutchAuctionContract } from '../../generated-wrappers/dutch_auction';
|
||||
@@ -12,7 +12,7 @@ export class DutchAuctionTestWrapper {
|
||||
private readonly _web3Wrapper: Web3Wrapper;
|
||||
private readonly _logDecoder: LogDecoder;
|
||||
|
||||
constructor(contractInstance: DutchAuctionContract, provider: Provider) {
|
||||
constructor(contractInstance: DutchAuctionContract, provider: Web3ProviderEngine) {
|
||||
this._dutchAuctionContract = contractInstance;
|
||||
this._web3Wrapper = new Web3Wrapper(provider);
|
||||
this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts);
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "2.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "2.0.4",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.5 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.4 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -2,6 +2,7 @@
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"isOfflineMode": false,
|
||||
"compilerSettings": {
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-multisig",
|
||||
"version": "2.0.4",
|
||||
"version": "2.0.5",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -46,11 +46,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/multisig/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^2.0.3",
|
||||
"@0x/contracts-gen": "^1.0.2",
|
||||
"@0x/contracts-test-utils": "^3.0.4",
|
||||
"@0x/dev-utils": "^2.1.0",
|
||||
"@0x/sol-compiler": "^3.0.3",
|
||||
"@0x/abi-gen": "^2.0.4",
|
||||
"@0x/contracts-gen": "^1.0.3",
|
||||
"@0x/contracts-test-utils": "^3.0.5",
|
||||
"@0x/dev-utils": "^2.1.1",
|
||||
"@0x/sol-compiler": "^3.1.0",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
@@ -67,14 +67,15 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^4.0.3",
|
||||
"@0x/base-contract": "^5.0.0",
|
||||
"@0x/contracts-asset-proxy": "1.0.2",
|
||||
"@0x/contracts-erc20": "1.0.2",
|
||||
"@0x/types": "^2.0.2",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.1.0",
|
||||
"@0x/web3-wrapper": "^5.0.0",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/types": "^2.1.0",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.0",
|
||||
"@0x/web3-wrapper": "^6.0.0",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { LogDecoder } from '@0x/contracts-test-utils';
|
||||
import { LogDecoder, Web3ProviderEngine } from '@0x/contracts-test-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { AssetProxyOwnerContract } from '../../generated-wrappers/asset_proxy_owner';
|
||||
@@ -11,7 +11,7 @@ export class AssetProxyOwnerWrapper {
|
||||
private readonly _assetProxyOwner: AssetProxyOwnerContract;
|
||||
private readonly _web3Wrapper: Web3Wrapper;
|
||||
private readonly _logDecoder: LogDecoder;
|
||||
constructor(assetproxyOwnerContract: AssetProxyOwnerContract, provider: Provider) {
|
||||
constructor(assetproxyOwnerContract: AssetProxyOwnerContract, provider: Web3ProviderEngine) {
|
||||
this._assetProxyOwner = assetproxyOwnerContract;
|
||||
this._web3Wrapper = new Web3Wrapper(provider);
|
||||
this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { LogDecoder } from '@0x/contracts-test-utils';
|
||||
import { LogDecoder, Web3ProviderEngine } from '@0x/contracts-test-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { MultiSigWalletContract } from '../../generated-wrappers/multi_sig_wallet';
|
||||
@@ -11,7 +11,7 @@ export class MultiSigWrapper {
|
||||
private readonly _multiSig: MultiSigWalletContract;
|
||||
private readonly _web3Wrapper: Web3Wrapper;
|
||||
private readonly _logDecoder: LogDecoder;
|
||||
constructor(multiSigContract: MultiSigWalletContract, provider: Provider) {
|
||||
constructor(multiSigContract: MultiSigWalletContract, provider: Web3ProviderEngine) {
|
||||
this._multiSig = multiSigContract;
|
||||
this._web3Wrapper = new Web3Wrapper(provider);
|
||||
this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts);
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "3.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "3.0.4",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v3.0.5 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v3.0.4 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-test-utils",
|
||||
"version": "3.0.4",
|
||||
"version": "3.0.5",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -40,19 +40,19 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/abi-gen": "^2.0.3",
|
||||
"@0x/dev-utils": "^2.1.0",
|
||||
"@0x/order-utils": "^6.1.0",
|
||||
"@0x/sol-compiler": "^3.0.3",
|
||||
"@0x/sol-coverage": "^2.0.3",
|
||||
"@0x/sol-profiler": "^2.0.4",
|
||||
"@0x/sol-trace": "^2.0.4",
|
||||
"@0x/subproviders": "^3.0.3",
|
||||
"@0x/abi-gen": "^2.0.4",
|
||||
"@0x/dev-utils": "^2.1.1",
|
||||
"@0x/order-utils": "^7.0.0",
|
||||
"@0x/sol-compiler": "^3.1.0",
|
||||
"@0x/sol-coverage": "^2.0.4",
|
||||
"@0x/sol-profiler": "^3.0.0",
|
||||
"@0x/sol-trace": "^2.0.5",
|
||||
"@0x/subproviders": "^4.0.0",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@0x/types": "^2.0.2",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.1.0",
|
||||
"@0x/web3-wrapper": "^5.0.0",
|
||||
"@0x/types": "^2.1.0",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.0",
|
||||
"@0x/web3-wrapper": "^6.0.0",
|
||||
"@types/bn.js": "^4.11.0",
|
||||
"@types/js-combinatorics": "^0.5.29",
|
||||
"@types/lodash": "4.14.104",
|
||||
@@ -62,7 +62,7 @@
|
||||
"chai-as-promised": "^7.1.0",
|
||||
"chai-bignumber": "^3.0.0",
|
||||
"dirty-chai": "^2.0.1",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"ethers": "~4.0.4",
|
||||
"js-combinatorics": "^0.5.3",
|
||||
|
@@ -22,6 +22,7 @@ export { orderUtils } from './order_utils';
|
||||
export { typeEncodingUtils } from './type_encoding_utils';
|
||||
export { profiler } from './profiler';
|
||||
export { coverage } from './coverage';
|
||||
export { Web3ProviderEngine } from '@0x/subproviders';
|
||||
export { addressUtils } from './address_utils';
|
||||
export { OrderFactory } from './order_factory';
|
||||
export { bytes32Values, testCombinatoriallyWithReferenceFuncAsync, uint256Values } from './combinatorial_utils';
|
||||
|
@@ -1,4 +1,18 @@
|
||||
[
|
||||
{
|
||||
"version": "2.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Fix bug in `LibBytes.slice` and `LibBytes.sliceDestructive`",
|
||||
"pr": 1604
|
||||
},
|
||||
{
|
||||
"note": "Upgrade contracts to Solidity 0.5.3",
|
||||
"pr": 1604
|
||||
}
|
||||
],
|
||||
"timestamp": 1551130135
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "2.0.4",
|
||||
|
@@ -5,6 +5,11 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.5 - _February 25, 2019_
|
||||
|
||||
* Fix bug in `LibBytes.slice` and `LibBytes.sliceDestructive` (#1604)
|
||||
* Upgrade contracts to Solidity 0.5.3 (#1604)
|
||||
|
||||
## v2.0.4 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -2,6 +2,7 @@
|
||||
"artifactsDir": "./generated-artifacts",
|
||||
"contractsDir": "./contracts",
|
||||
"useDockerisedSolc": true,
|
||||
"isOfflineMode": false,
|
||||
"compilerSettings": {
|
||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
||||
"outputSelection": {
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
import "./LibBytes.sol";
|
||||
|
||||
@@ -31,7 +31,7 @@ library LibAddressArray {
|
||||
/// @return Array of addresses: [... addressArray, addressToAppend]
|
||||
function append(address[] memory addressArray, address addressToAppend)
|
||||
internal pure
|
||||
returns (address[])
|
||||
returns (address[] memory)
|
||||
{
|
||||
// Get stats on address array and free memory
|
||||
uint256 freeMemPtr = 0;
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
|
||||
library LibBytes {
|
||||
@@ -179,7 +179,7 @@ library LibBytes {
|
||||
"FROM_LESS_THAN_TO_REQUIRED"
|
||||
);
|
||||
require(
|
||||
to < b.length,
|
||||
to <= b.length,
|
||||
"TO_LESS_THAN_LENGTH_REQUIRED"
|
||||
);
|
||||
|
||||
@@ -213,7 +213,7 @@ library LibBytes {
|
||||
"FROM_LESS_THAN_TO_REQUIRED"
|
||||
);
|
||||
require(
|
||||
to < b.length,
|
||||
to <= b.length,
|
||||
"TO_LESS_THAN_LENGTH_REQUIRED"
|
||||
);
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
import "./interfaces/IOwnable.sol";
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
|
||||
contract ReentrancyGuard {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
|
||||
contract SafeMath {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
|
||||
contract IOwnable {
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
import "../src/LibBytes.sol";
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
pragma solidity ^0.5.3;
|
||||
|
||||
import "../src/LibBytes.sol";
|
||||
|
||||
@@ -244,14 +244,14 @@ contract TestLibBytes {
|
||||
/// @param length Length of bytes to copy from <source> to <dest>
|
||||
/// @return mem Memory contents after calling memCopy.
|
||||
function testMemcpy(
|
||||
bytes mem,
|
||||
bytes memory mem,
|
||||
uint256 dest,
|
||||
uint256 source,
|
||||
uint256 length
|
||||
)
|
||||
public // not external, we need input in memory
|
||||
pure
|
||||
returns (bytes)
|
||||
returns (bytes memory)
|
||||
{
|
||||
// Sanity check. Overflows are not checked.
|
||||
require(source + length <= mem.length);
|
||||
@@ -266,4 +266,41 @@ contract TestLibBytes {
|
||||
// Return modified memory contents
|
||||
return mem;
|
||||
}
|
||||
|
||||
/// @dev Returns a slices from a byte array.
|
||||
/// @param b The byte array to take a slice from.
|
||||
/// @param from The starting index for the slice (inclusive).
|
||||
/// @param to The final index for the slice (exclusive).
|
||||
/// @return result The slice containing bytes at indices [from, to)
|
||||
function publicSlice(
|
||||
bytes memory b,
|
||||
uint256 from,
|
||||
uint256 to
|
||||
)
|
||||
public
|
||||
pure
|
||||
returns (bytes memory result, bytes memory original)
|
||||
{
|
||||
result = LibBytes.slice(b, from, to);
|
||||
return (result, b);
|
||||
}
|
||||
|
||||
/// @dev Returns a slice from a byte array without preserving the input.
|
||||
/// @param b The byte array to take a slice from. Will be destroyed in the process.
|
||||
/// @param from The starting index for the slice (inclusive).
|
||||
/// @param to The final index for the slice (exclusive).
|
||||
/// @return result The slice containing bytes at indices [from, to)
|
||||
/// @dev When `from == 0`, the original array will match the slice. In other cases its state will be corrupted.
|
||||
function publicSliceDestructive(
|
||||
bytes memory b,
|
||||
uint256 from,
|
||||
uint256 to
|
||||
)
|
||||
public
|
||||
pure
|
||||
returns (bytes memory result, bytes memory original)
|
||||
{
|
||||
result = LibBytes.sliceDestructive(b, from, to);
|
||||
return (result, b);
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-utils",
|
||||
"version": "2.0.4",
|
||||
"version": "2.0.5",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -46,11 +46,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/utils/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^2.0.3",
|
||||
"@0x/contracts-gen": "^1.0.2",
|
||||
"@0x/contracts-test-utils": "^3.0.4",
|
||||
"@0x/dev-utils": "^2.1.0",
|
||||
"@0x/sol-compiler": "^3.0.3",
|
||||
"@0x/abi-gen": "^2.0.4",
|
||||
"@0x/contracts-gen": "^1.0.3",
|
||||
"@0x/contracts-test-utils": "^3.0.5",
|
||||
"@0x/dev-utils": "^2.1.1",
|
||||
"@0x/sol-compiler": "^3.1.0",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/bn.js": "^4.11.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
@@ -68,14 +68,14 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^4.0.3",
|
||||
"@0x/order-utils": "^6.1.0",
|
||||
"@0x/types": "^2.0.2",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.1.0",
|
||||
"@0x/web3-wrapper": "^5.0.0",
|
||||
"@0x/base-contract": "^5.0.0",
|
||||
"@0x/order-utils": "^7.0.0",
|
||||
"@0x/types": "^2.1.0",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.0",
|
||||
"@0x/web3-wrapper": "^6.0.0",
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -870,5 +870,103 @@ describe('LibBytes', () => {
|
||||
describe('copies forward within one word and one byte overlap', () =>
|
||||
test([[0, 0, 1, 'one byte'], [0, 10, 11, 'eleven bytes'], [0, 15, 16, 'sixteen bytes']]));
|
||||
});
|
||||
|
||||
describe('slice', () => {
|
||||
it('should revert if from > to', async () => {
|
||||
const from = new BigNumber(1);
|
||||
const to = new BigNumber(0);
|
||||
expectContractCallFailedAsync(
|
||||
libBytes.publicSlice.callAsync(byteArrayLongerThan32Bytes, from, to),
|
||||
RevertReason.FromLessThanToRequired,
|
||||
);
|
||||
});
|
||||
it('should return a byte array of length 0 if from == to', async () => {
|
||||
const from = new BigNumber(0);
|
||||
const to = from;
|
||||
const [result, original] = await libBytes.publicSlice.callAsync(byteArrayLongerThan32Bytes, from, to);
|
||||
expect(original).to.eq(byteArrayLongerThan32Bytes);
|
||||
expect(result).to.eq(constants.NULL_BYTES);
|
||||
});
|
||||
it('should return a byte array of length 0 if from == to == b.length', async () => {
|
||||
const byteLen = (byteArrayLongerThan32Bytes.length - 2) / 2;
|
||||
const from = new BigNumber(byteLen);
|
||||
const to = from;
|
||||
const [result, original] = await libBytes.publicSlice.callAsync(byteArrayLongerThan32Bytes, from, to);
|
||||
expect(original).to.eq(byteArrayLongerThan32Bytes);
|
||||
expect(result).to.eq(constants.NULL_BYTES);
|
||||
});
|
||||
it('should revert if to > input.length', async () => {
|
||||
const byteLen = (byteArrayLongerThan32Bytes.length - 2) / 2;
|
||||
const from = new BigNumber(0);
|
||||
const to = new BigNumber(byteLen).plus(1);
|
||||
expectContractCallFailedAsync(
|
||||
libBytes.publicSlice.callAsync(byteArrayLongerThan32Bytes, from, to),
|
||||
RevertReason.ToLessThanLengthRequired,
|
||||
);
|
||||
});
|
||||
it('should slice a section of the input', async () => {
|
||||
const from = new BigNumber(1);
|
||||
const to = new BigNumber(2);
|
||||
const [result, original] = await libBytes.publicSlice.callAsync(byteArrayLongerThan32Bytes, from, to);
|
||||
const expectedResult = `0x${byteArrayLongerThan32Bytes.slice(4, 6)}`;
|
||||
expect(original).to.eq(byteArrayLongerThan32Bytes);
|
||||
expect(result).to.eq(expectedResult);
|
||||
});
|
||||
it('should copy the entire input if from = 0 and to = input.length', async () => {
|
||||
const byteLen = (byteArrayLongerThan32Bytes.length - 2) / 2;
|
||||
const from = new BigNumber(0);
|
||||
const to = new BigNumber(byteLen);
|
||||
const [result, original] = await libBytes.publicSlice.callAsync(byteArrayLongerThan32Bytes, from, to);
|
||||
expect(original).to.eq(byteArrayLongerThan32Bytes);
|
||||
expect(result).to.eq(byteArrayLongerThan32Bytes);
|
||||
});
|
||||
});
|
||||
|
||||
describe('sliceDestructive', () => {
|
||||
it('should revert if from > to', async () => {
|
||||
const from = new BigNumber(1);
|
||||
const to = new BigNumber(0);
|
||||
expectContractCallFailedAsync(
|
||||
libBytes.publicSliceDestructive.callAsync(byteArrayLongerThan32Bytes, from, to),
|
||||
RevertReason.FromLessThanToRequired,
|
||||
);
|
||||
});
|
||||
it('should return a byte array of length 0 if from == to', async () => {
|
||||
const from = new BigNumber(0);
|
||||
const to = from;
|
||||
const [result] = await libBytes.publicSliceDestructive.callAsync(byteArrayLongerThan32Bytes, from, to);
|
||||
expect(result).to.eq(constants.NULL_BYTES);
|
||||
});
|
||||
it('should return a byte array of length 0 if from == to == b.length', async () => {
|
||||
const byteLen = (byteArrayLongerThan32Bytes.length - 2) / 2;
|
||||
const from = new BigNumber(byteLen);
|
||||
const to = from;
|
||||
const [result] = await libBytes.publicSliceDestructive.callAsync(byteArrayLongerThan32Bytes, from, to);
|
||||
expect(result).to.eq(constants.NULL_BYTES);
|
||||
});
|
||||
it('should revert if to > input.length', async () => {
|
||||
const byteLen = (byteArrayLongerThan32Bytes.length - 2) / 2;
|
||||
const from = new BigNumber(0);
|
||||
const to = new BigNumber(byteLen).plus(1);
|
||||
expectContractCallFailedAsync(
|
||||
libBytes.publicSliceDestructive.callAsync(byteArrayLongerThan32Bytes, from, to),
|
||||
RevertReason.ToLessThanLengthRequired,
|
||||
);
|
||||
});
|
||||
it('should slice a section of the input', async () => {
|
||||
const from = new BigNumber(1);
|
||||
const to = new BigNumber(2);
|
||||
const [result] = await libBytes.publicSliceDestructive.callAsync(byteArrayLongerThan32Bytes, from, to);
|
||||
const expectedResult = `0x${byteArrayLongerThan32Bytes.slice(4, 6)}`;
|
||||
expect(result).to.eq(expectedResult);
|
||||
});
|
||||
it('should copy the entire input if from = 0 and to = input.length', async () => {
|
||||
const byteLen = (byteArrayLongerThan32Bytes.length - 2) / 2;
|
||||
const from = new BigNumber(0);
|
||||
const to = new BigNumber(byteLen);
|
||||
const [result] = await libBytes.publicSliceDestructive.callAsync(byteArrayLongerThan32Bytes, from, to);
|
||||
expect(result).to.eq(byteArrayLongerThan32Bytes);
|
||||
});
|
||||
});
|
||||
});
|
||||
// tslint:disable:max-file-line-count
|
||||
|
10
package.json
10
package.json
@@ -24,10 +24,10 @@
|
||||
"install:all": "yarn install",
|
||||
"wsrun": "wsrun",
|
||||
"lerna": "lerna",
|
||||
"build": "wsrun build $PKG --fast-exit -r --stages --exclude-missing",
|
||||
"build:no_website": "wsrun build $PKG --fast-exit -r --stages --exclude @0x/website --exclude-missing",
|
||||
"build:ci:no_website": "wsrun build:ci $PKG --fast-exit -r --stages --exclude @0x/website --exclude-missing",
|
||||
"build:contracts": "wsrun build -p ${npm_package_config_contractsPackages} -c --fast-exit -r --stages --exclude-missing",
|
||||
"build": "lerna link && wsrun build $PKG --fast-exit -r --stages --exclude-missing",
|
||||
"build:no_website": "lerna link && wsrun build $PKG --fast-exit -r --stages --exclude @0x/website --exclude-missing",
|
||||
"build:ci:no_website": "lerna link && wsrun build:ci $PKG --fast-exit -r --stages --exclude @0x/website --exclude-missing",
|
||||
"build:contracts": "lerna link && wsrun build -p ${npm_package_config_contractsPackages} -c --fast-exit -r --stages --exclude-missing",
|
||||
"build:monorepo_scripts": "PKG=@0x/monorepo-scripts yarn build",
|
||||
"build:ts": "tsc -b",
|
||||
"watch:ts": "tsc -b -w",
|
||||
@@ -49,7 +49,7 @@
|
||||
"contractsPackages": "@0x/contracts-asset-proxy @0x/contracts-erc20 @0x/contracts-erc721 @0x/contracts-exchange @0x/contracts-exchange-forwarder @0x/contracts-exchange-libs @0x/contracts-extensions @0x/contracts-multisig @0x/contracts-test-utils @0x/contracts-utils",
|
||||
"mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic",
|
||||
"packagesWithDocPages": "0x.js connect json-schemas subproviders web3-wrapper contract-wrappers order-utils order-watcher sol-compiler sol-coverage sol-profiler sol-trace ethereum-types asset-buyer migrations",
|
||||
"ignoreDependencyVersions": "@types/styled-components",
|
||||
"ignoreDependencyVersions": "@types/styled-components @types/node",
|
||||
"ignoreDependencyVersionsForPackage": "website instant dev-tools-pages"
|
||||
},
|
||||
"bundlewatch": {
|
||||
|
@@ -1,4 +1,18 @@
|
||||
[
|
||||
{
|
||||
"version": "6.0.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Add support for EIP1193 providers & Web3.js providers >= 1.0-beta.38",
|
||||
"pr": 1627
|
||||
},
|
||||
{
|
||||
"note": "Update provider params to type SupportedProvider which outlines all supported providers",
|
||||
"pr": 1627
|
||||
}
|
||||
],
|
||||
"timestamp": 1551130135
|
||||
},
|
||||
{
|
||||
"version": "5.0.0",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,11 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v6.0.0 - _February 25, 2019_
|
||||
|
||||
* Add support for EIP1193 providers & Web3.js providers >= 1.0-beta.38 (#1627)
|
||||
* Update provider params to type SupportedProvider which outlines all supported providers (#1627)
|
||||
|
||||
## v5.0.0 - _February 9, 2019_
|
||||
|
||||
* Export `transactionHashUtils`, `DecodedCalldata`, `ZeroExTransaction`, and `SignedZeroExTransaction` (#1569)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "0x.js",
|
||||
"version": "5.0.0",
|
||||
"version": "6.0.0",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -42,10 +42,10 @@
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen-wrappers": "^3.0.3",
|
||||
"@0x/contract-addresses": "^2.2.1",
|
||||
"@0x/dev-utils": "^2.1.0",
|
||||
"@0x/migrations": "^3.0.4",
|
||||
"@0x/abi-gen-wrappers": "^4.0.0",
|
||||
"@0x/contract-addresses": "^2.2.2",
|
||||
"@0x/dev-utils": "^2.1.1",
|
||||
"@0x/migrations": "^4.0.0",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^2.2.42",
|
||||
@@ -72,18 +72,18 @@
|
||||
"webpack": "^4.20.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/assert": "^2.0.3",
|
||||
"@0x/base-contract": "^4.0.3",
|
||||
"@0x/contract-wrappers": "^7.1.0",
|
||||
"@0x/order-utils": "^6.1.0",
|
||||
"@0x/order-watcher": "^3.0.4",
|
||||
"@0x/subproviders": "^3.0.3",
|
||||
"@0x/types": "^2.0.2",
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.1.0",
|
||||
"@0x/web3-wrapper": "^5.0.0",
|
||||
"@0x/assert": "^2.0.4",
|
||||
"@0x/base-contract": "^5.0.0",
|
||||
"@0x/contract-wrappers": "^8.0.0",
|
||||
"@0x/order-utils": "^7.0.0",
|
||||
"@0x/order-watcher": "^4.0.0",
|
||||
"@0x/subproviders": "^4.0.0",
|
||||
"@0x/types": "^2.1.0",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.0",
|
||||
"@0x/web3-wrapper": "^6.0.0",
|
||||
"@types/web3-provider-engine": "^14.0.0",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"ethers": "~4.0.4",
|
||||
"lodash": "^4.17.11",
|
||||
"web3-provider-engine": "14.0.6"
|
||||
|
@@ -108,10 +108,9 @@ export {
|
||||
BlockParam,
|
||||
LogWithDecodedArgs,
|
||||
ContractEventArg,
|
||||
Provider,
|
||||
SupportedProvider,
|
||||
JSONRPCRequestPayload,
|
||||
JSONRPCResponsePayload,
|
||||
JSONRPCErrorCallback,
|
||||
JSONRPCResponseError,
|
||||
LogEntry,
|
||||
DecodedLogArgs,
|
||||
@@ -129,4 +128,13 @@ export {
|
||||
DataItem,
|
||||
ConstructorStateMutability,
|
||||
StateMutability,
|
||||
Web3JsProvider,
|
||||
GanacheProvider,
|
||||
EIP1193Provider,
|
||||
ZeroExProvider,
|
||||
EIP1193Event,
|
||||
JSONRPCErrorCallback,
|
||||
Web3JsV1Provider,
|
||||
Web3JsV2Provider,
|
||||
Web3JsV3Provider,
|
||||
} from 'ethereum-types';
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"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 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.0 - _February 5, 2019_
|
||||
|
||||
* Upgrade the bignumber.js to v8.0.2 (#1517)
|
||||
|
@@ -2,8 +2,8 @@
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
@@ -42,13 +42,14 @@ export class {{contractName}}Contract extends BaseContract {
|
||||
{{/each}}
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
{{> typed_params inputs=ctor.inputs}}
|
||||
): Promise<{{contractName}}Contract> {
|
||||
if (_.isUndefined(artifact.compilerOutput)) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
||||
const abi = artifact.compilerOutput.abi;
|
||||
return {{contractName}}Contract.deployAsync(bytecode, abi, provider, txDefaults, {{> params inputs=ctor.inputs}});
|
||||
@@ -56,10 +57,11 @@ export class {{contractName}}Contract extends BaseContract {
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
{{> typed_params inputs=ctor.inputs}}
|
||||
): Promise<{{contractName}}Contract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[{{> params inputs=ctor.inputs}}] = BaseContract._formatABIDataItemList(
|
||||
constructorAbi.inputs,
|
||||
@@ -83,8 +85,8 @@ export class {{contractName}}Contract extends BaseContract {
|
||||
contractInstance.constructorArgs = [{{> params inputs=ctor.inputs}}];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
||||
super('{{contractName}}', abi, address, provider, txDefaults);
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('{{contractName}}', abi, address, supportedProvider, txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/abi-gen-templates",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
|
@@ -1,4 +1,18 @@
|
||||
[
|
||||
{
|
||||
"version": "4.0.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Add support for EIP1193 providers & Web3.js providers >= 1.0-beta.38",
|
||||
"pr": 1627
|
||||
},
|
||||
{
|
||||
"note": "Update provider params to type SupportedProvider which outlines all supported providers",
|
||||
"pr": 1627
|
||||
}
|
||||
],
|
||||
"timestamp": 1551130135
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "3.0.3",
|
||||
|
@@ -5,6 +5,11 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v4.0.0 - _February 25, 2019_
|
||||
|
||||
* Add support for EIP1193 providers & Web3.js providers >= 1.0-beta.38 (#1627)
|
||||
* Update provider params to type SupportedProvider which outlines all supported providers (#1627)
|
||||
|
||||
## v3.0.3 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/abi-gen-wrappers",
|
||||
"version": "3.0.3",
|
||||
"version": "4.0.0",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -30,19 +30,19 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-wrappers/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^2.0.3",
|
||||
"@0x/abi-gen-templates": "^2.0.0",
|
||||
"@0x/abi-gen": "^2.0.4",
|
||||
"@0x/abi-gen-templates": "^2.0.1",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@0x/types": "^2.0.2",
|
||||
"@0x/utils": "^4.1.0",
|
||||
"@0x/web3-wrapper": "^5.0.0",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"@0x/types": "^2.1.0",
|
||||
"@0x/utils": "^4.2.0",
|
||||
"@0x/web3-wrapper": "^6.0.0",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"ethers": "~4.0.4",
|
||||
"lodash": "^4.17.11",
|
||||
"shx": "^0.2.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^4.0.3"
|
||||
"@0x/base-contract": "^5.0.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
@@ -2,8 +2,8 @@
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
@@ -1419,7 +1419,7 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
_owners: string[],
|
||||
_assetProxyContracts: string[],
|
||||
@@ -1429,6 +1429,7 @@ export class AssetProxyOwnerContract extends BaseContract {
|
||||
if (_.isUndefined(artifact.compilerOutput)) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
||||
const abi = artifact.compilerOutput.abi;
|
||||
return AssetProxyOwnerContract.deployAsync(bytecode, abi, provider, txDefaults, _owners,
|
||||
@@ -1440,13 +1441,14 @@ _secondsTimeLocked
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
_owners: string[],
|
||||
_assetProxyContracts: string[],
|
||||
_required: BigNumber,
|
||||
_secondsTimeLocked: BigNumber,
|
||||
): Promise<AssetProxyOwnerContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[_owners,
|
||||
_assetProxyContracts,
|
||||
@@ -1486,8 +1488,8 @@ _secondsTimeLocked
|
||||
];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
||||
super('AssetProxyOwner', abi, address, provider, txDefaults);
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('AssetProxyOwner', abi, address, providerUtils.standardizeOrThrow(supportedProvider), txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
@@ -2,8 +2,8 @@
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
@@ -753,7 +753,7 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
_name: string,
|
||||
_symbol: string,
|
||||
@@ -763,6 +763,7 @@ export class DummyERC20TokenContract extends BaseContract {
|
||||
if (_.isUndefined(artifact.compilerOutput)) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
||||
const abi = artifact.compilerOutput.abi;
|
||||
return DummyERC20TokenContract.deployAsync(bytecode, abi, provider, txDefaults, _name,
|
||||
@@ -774,13 +775,14 @@ _totalSupply
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
_name: string,
|
||||
_symbol: string,
|
||||
_decimals: BigNumber,
|
||||
_totalSupply: BigNumber,
|
||||
): Promise<DummyERC20TokenContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[_name,
|
||||
_symbol,
|
||||
@@ -820,8 +822,8 @@ _totalSupply
|
||||
];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
||||
super('DummyERC20Token', abi, address, provider, txDefaults);
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('DummyERC20Token', abi, address, providerUtils.standardizeOrThrow(supportedProvider), txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
@@ -2,8 +2,8 @@
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
@@ -945,7 +945,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
_name: string,
|
||||
_symbol: string,
|
||||
@@ -953,6 +953,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
||||
if (_.isUndefined(artifact.compilerOutput)) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
||||
const abi = artifact.compilerOutput.abi;
|
||||
return DummyERC721TokenContract.deployAsync(bytecode, abi, provider, txDefaults, _name,
|
||||
@@ -962,11 +963,12 @@ _symbol
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
_name: string,
|
||||
_symbol: string,
|
||||
): Promise<DummyERC721TokenContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[_name,
|
||||
_symbol
|
||||
@@ -998,8 +1000,8 @@ _symbol
|
||||
];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
||||
super('DummyERC721Token', abi, address, provider, txDefaults);
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('DummyERC721Token', abi, address, providerUtils.standardizeOrThrow(supportedProvider), txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
@@ -2,8 +2,8 @@
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
@@ -196,13 +196,14 @@ export class DutchAuctionContract extends BaseContract {
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
_exchange: string,
|
||||
): Promise<DutchAuctionContract> {
|
||||
if (_.isUndefined(artifact.compilerOutput)) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
||||
const abi = artifact.compilerOutput.abi;
|
||||
return DutchAuctionContract.deployAsync(bytecode, abi, provider, txDefaults, _exchange
|
||||
@@ -211,10 +212,11 @@ export class DutchAuctionContract extends BaseContract {
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
_exchange: string,
|
||||
): Promise<DutchAuctionContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[_exchange
|
||||
] = BaseContract._formatABIDataItemList(
|
||||
@@ -242,8 +244,8 @@ export class DutchAuctionContract extends BaseContract {
|
||||
];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
||||
super('DutchAuction', abi, address, provider, txDefaults);
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('DutchAuction', abi, address, providerUtils.standardizeOrThrow(supportedProvider), txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
@@ -2,8 +2,8 @@
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
@@ -483,12 +483,13 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<ERC20ProxyContract> {
|
||||
if (_.isUndefined(artifact.compilerOutput)) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
||||
const abi = artifact.compilerOutput.abi;
|
||||
return ERC20ProxyContract.deployAsync(bytecode, abi, provider, txDefaults, );
|
||||
@@ -496,9 +497,10 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<ERC20ProxyContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[] = BaseContract._formatABIDataItemList(
|
||||
constructorAbi.inputs,
|
||||
@@ -522,8 +524,8 @@ export class ERC20ProxyContract extends BaseContract {
|
||||
contractInstance.constructorArgs = [];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
||||
super('ERC20Proxy', abi, address, provider, txDefaults);
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('ERC20Proxy', abi, address, providerUtils.standardizeOrThrow(supportedProvider), txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
@@ -2,8 +2,8 @@
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
@@ -386,12 +386,13 @@ export class ERC20TokenContract extends BaseContract {
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<ERC20TokenContract> {
|
||||
if (_.isUndefined(artifact.compilerOutput)) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
||||
const abi = artifact.compilerOutput.abi;
|
||||
return ERC20TokenContract.deployAsync(bytecode, abi, provider, txDefaults, );
|
||||
@@ -399,9 +400,10 @@ export class ERC20TokenContract extends BaseContract {
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<ERC20TokenContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[] = BaseContract._formatABIDataItemList(
|
||||
constructorAbi.inputs,
|
||||
@@ -425,8 +427,8 @@ export class ERC20TokenContract extends BaseContract {
|
||||
contractInstance.constructorArgs = [];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
||||
super('ERC20Token', abi, address, provider, txDefaults);
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('ERC20Token', abi, address, providerUtils.standardizeOrThrow(supportedProvider), txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
@@ -2,8 +2,8 @@
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
@@ -483,12 +483,13 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<ERC721ProxyContract> {
|
||||
if (_.isUndefined(artifact.compilerOutput)) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
||||
const abi = artifact.compilerOutput.abi;
|
||||
return ERC721ProxyContract.deployAsync(bytecode, abi, provider, txDefaults, );
|
||||
@@ -496,9 +497,10 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<ERC721ProxyContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[] = BaseContract._formatABIDataItemList(
|
||||
constructorAbi.inputs,
|
||||
@@ -522,8 +524,8 @@ export class ERC721ProxyContract extends BaseContract {
|
||||
contractInstance.constructorArgs = [];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
||||
super('ERC721Proxy', abi, address, provider, txDefaults);
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('ERC721Proxy', abi, address, providerUtils.standardizeOrThrow(supportedProvider), txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
@@ -2,8 +2,8 @@
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
@@ -621,12 +621,13 @@ export class ERC721TokenContract extends BaseContract {
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<ERC721TokenContract> {
|
||||
if (_.isUndefined(artifact.compilerOutput)) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
||||
const abi = artifact.compilerOutput.abi;
|
||||
return ERC721TokenContract.deployAsync(bytecode, abi, provider, txDefaults, );
|
||||
@@ -634,9 +635,10 @@ export class ERC721TokenContract extends BaseContract {
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<ERC721TokenContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[] = BaseContract._formatABIDataItemList(
|
||||
constructorAbi.inputs,
|
||||
@@ -660,8 +662,8 @@ export class ERC721TokenContract extends BaseContract {
|
||||
contractInstance.constructorArgs = [];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
||||
super('ERC721Token', abi, address, provider, txDefaults);
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('ERC721Token', abi, address, providerUtils.standardizeOrThrow(supportedProvider), txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
@@ -2,8 +2,8 @@
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
@@ -2225,13 +2225,14 @@ export class ExchangeContract extends BaseContract {
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
_zrxAssetData: string,
|
||||
): Promise<ExchangeContract> {
|
||||
if (_.isUndefined(artifact.compilerOutput)) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
||||
const abi = artifact.compilerOutput.abi;
|
||||
return ExchangeContract.deployAsync(bytecode, abi, provider, txDefaults, _zrxAssetData
|
||||
@@ -2240,10 +2241,11 @@ export class ExchangeContract extends BaseContract {
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
_zrxAssetData: string,
|
||||
): Promise<ExchangeContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[_zrxAssetData
|
||||
] = BaseContract._formatABIDataItemList(
|
||||
@@ -2271,8 +2273,8 @@ export class ExchangeContract extends BaseContract {
|
||||
];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
||||
super('Exchange', abi, address, provider, txDefaults);
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('Exchange', abi, address, providerUtils.standardizeOrThrow(supportedProvider), txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
@@ -2,8 +2,8 @@
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
@@ -455,7 +455,7 @@ export class ForwarderContract extends BaseContract {
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
_exchange: string,
|
||||
_zrxAssetData: string,
|
||||
@@ -464,6 +464,7 @@ export class ForwarderContract extends BaseContract {
|
||||
if (_.isUndefined(artifact.compilerOutput)) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
||||
const abi = artifact.compilerOutput.abi;
|
||||
return ForwarderContract.deployAsync(bytecode, abi, provider, txDefaults, _exchange,
|
||||
@@ -474,12 +475,13 @@ _wethAssetData
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
_exchange: string,
|
||||
_zrxAssetData: string,
|
||||
_wethAssetData: string,
|
||||
): Promise<ForwarderContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[_exchange,
|
||||
_zrxAssetData,
|
||||
@@ -515,8 +517,8 @@ _wethAssetData
|
||||
];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
||||
super('Forwarder', abi, address, provider, txDefaults);
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('Forwarder', abi, address, providerUtils.standardizeOrThrow(supportedProvider), txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
@@ -2,8 +2,8 @@
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
@@ -49,12 +49,13 @@ export class IValidatorContract extends BaseContract {
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<IValidatorContract> {
|
||||
if (_.isUndefined(artifact.compilerOutput)) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
||||
const abi = artifact.compilerOutput.abi;
|
||||
return IValidatorContract.deployAsync(bytecode, abi, provider, txDefaults, );
|
||||
@@ -62,9 +63,10 @@ export class IValidatorContract extends BaseContract {
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<IValidatorContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[] = BaseContract._formatABIDataItemList(
|
||||
constructorAbi.inputs,
|
||||
@@ -88,8 +90,8 @@ export class IValidatorContract extends BaseContract {
|
||||
contractInstance.constructorArgs = [];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
||||
super('IValidator', abi, address, provider, txDefaults);
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('IValidator', abi, address, providerUtils.standardizeOrThrow(supportedProvider), txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
@@ -2,8 +2,8 @@
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
@@ -47,12 +47,13 @@ export class IWalletContract extends BaseContract {
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<IWalletContract> {
|
||||
if (_.isUndefined(artifact.compilerOutput)) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
||||
const abi = artifact.compilerOutput.abi;
|
||||
return IWalletContract.deployAsync(bytecode, abi, provider, txDefaults, );
|
||||
@@ -60,9 +61,10 @@ export class IWalletContract extends BaseContract {
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<IWalletContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[] = BaseContract._formatABIDataItemList(
|
||||
constructorAbi.inputs,
|
||||
@@ -86,8 +88,8 @@ export class IWalletContract extends BaseContract {
|
||||
contractInstance.constructorArgs = [];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
||||
super('IWallet', abi, address, provider, txDefaults);
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('IWallet', abi, address, providerUtils.standardizeOrThrow(supportedProvider), txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
@@ -2,8 +2,8 @@
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
@@ -622,12 +622,13 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<MultiAssetProxyContract> {
|
||||
if (_.isUndefined(artifact.compilerOutput)) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
||||
const abi = artifact.compilerOutput.abi;
|
||||
return MultiAssetProxyContract.deployAsync(bytecode, abi, provider, txDefaults, );
|
||||
@@ -635,9 +636,10 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<MultiAssetProxyContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[] = BaseContract._formatABIDataItemList(
|
||||
constructorAbi.inputs,
|
||||
@@ -661,8 +663,8 @@ export class MultiAssetProxyContract extends BaseContract {
|
||||
contractInstance.constructorArgs = [];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
||||
super('MultiAssetProxy', abi, address, provider, txDefaults);
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('MultiAssetProxy', abi, address, providerUtils.standardizeOrThrow(supportedProvider), txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
@@ -2,8 +2,8 @@
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
@@ -227,7 +227,7 @@ export class OrderValidatorContract extends BaseContract {
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
_exchange: string,
|
||||
_zrxAssetData: string,
|
||||
@@ -235,6 +235,7 @@ export class OrderValidatorContract extends BaseContract {
|
||||
if (_.isUndefined(artifact.compilerOutput)) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
||||
const abi = artifact.compilerOutput.abi;
|
||||
return OrderValidatorContract.deployAsync(bytecode, abi, provider, txDefaults, _exchange,
|
||||
@@ -244,11 +245,12 @@ _zrxAssetData
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
_exchange: string,
|
||||
_zrxAssetData: string,
|
||||
): Promise<OrderValidatorContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[_exchange,
|
||||
_zrxAssetData
|
||||
@@ -280,8 +282,8 @@ _zrxAssetData
|
||||
];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
||||
super('OrderValidator', abi, address, provider, txDefaults);
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('OrderValidator', abi, address, providerUtils.standardizeOrThrow(supportedProvider), txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
@@ -2,8 +2,8 @@
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
@@ -621,12 +621,13 @@ export class WETH9Contract extends BaseContract {
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<WETH9Contract> {
|
||||
if (_.isUndefined(artifact.compilerOutput)) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
||||
const abi = artifact.compilerOutput.abi;
|
||||
return WETH9Contract.deployAsync(bytecode, abi, provider, txDefaults, );
|
||||
@@ -634,9 +635,10 @@ export class WETH9Contract extends BaseContract {
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<WETH9Contract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[] = BaseContract._formatABIDataItemList(
|
||||
constructorAbi.inputs,
|
||||
@@ -660,8 +662,8 @@ export class WETH9Contract extends BaseContract {
|
||||
contractInstance.constructorArgs = [];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
||||
super('WETH9', abi, address, provider, txDefaults);
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('WETH9', abi, address, providerUtils.standardizeOrThrow(supportedProvider), txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
@@ -2,8 +2,8 @@
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, TxData, TxDataPayable, SupportedProvider } from 'ethereum-types';
|
||||
import { BigNumber, classUtils, logUtils, providerUtils } from '@0x/utils';
|
||||
import { SimpleContractArtifact } from '@0x/types';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
@@ -464,12 +464,13 @@ export class ZRXTokenContract extends BaseContract {
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<ZRXTokenContract> {
|
||||
if (_.isUndefined(artifact.compilerOutput)) {
|
||||
throw new Error('Compiler output not found in the artifact file');
|
||||
}
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const bytecode = artifact.compilerOutput.evm.bytecode.object;
|
||||
const abi = artifact.compilerOutput.abi;
|
||||
return ZRXTokenContract.deployAsync(bytecode, abi, provider, txDefaults, );
|
||||
@@ -477,9 +478,10 @@ export class ZRXTokenContract extends BaseContract {
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
provider: Provider,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<ZRXTokenContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[] = BaseContract._formatABIDataItemList(
|
||||
constructorAbi.inputs,
|
||||
@@ -503,8 +505,8 @@ export class ZRXTokenContract extends BaseContract {
|
||||
contractInstance.constructorArgs = [];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) {
|
||||
super('ZRXToken', abi, address, provider, txDefaults);
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('ZRXToken', abi, address, providerUtils.standardizeOrThrow(supportedProvider), txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "2.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "2.0.3",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.4 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.3 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/abi-gen",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -31,10 +31,10 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md",
|
||||
"dependencies": {
|
||||
"@0x/typescript-typings": "^4.0.0",
|
||||
"@0x/utils": "^4.1.0",
|
||||
"@0x/typescript-typings": "^4.1.0",
|
||||
"@0x/utils": "^4.2.0",
|
||||
"chalk": "^2.3.0",
|
||||
"ethereum-types": "^2.0.0",
|
||||
"ethereum-types": "^2.1.0",
|
||||
"glob": "^7.1.2",
|
||||
"handlebars": "^4.0.11",
|
||||
"lodash": "^4.17.11",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "2.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "2.0.3",
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user