Compare commits
53 Commits
@0x/contra
...
@0x/assert
Author | SHA1 | Date | |
---|---|---|---|
|
0f45409b4d | ||
|
5469d3ec13 | ||
|
d12f8410b9 | ||
|
704c52d229 | ||
|
7dcdda14f5 | ||
|
0f59256ca7 | ||
|
ddee04e98c | ||
|
e866add4b0 | ||
|
39b93b88c5 | ||
|
deb7e95567 | ||
|
91500501ce | ||
|
6a1caeb9a1 | ||
|
cee7803c37 | ||
|
4e8d0ac7cb | ||
|
47bbcb9935 | ||
|
c0288c5f26 | ||
|
18c2013625 | ||
|
548089888d | ||
|
180c65cfeb | ||
|
6a28e41bc8 | ||
|
f9ef942a98 | ||
|
8272c7a74e | ||
|
4e745489db | ||
|
fc2625a0c0 | ||
|
d0e43ebaf1 | ||
|
879805e316 | ||
|
6845d2e0ef | ||
|
542d1c1c41 | ||
|
31568e7abb | ||
|
4b2488b124 | ||
|
6ed1412bdd | ||
|
78b9a45158 | ||
|
b8925baa88 | ||
|
87fd3f2a82 | ||
|
8af164dbd2 | ||
|
c994afbf3c | ||
|
843caf86fb | ||
|
44eef5b0e0 | ||
|
7ed3afe9f0 | ||
|
2fbe0aed32 | ||
|
849ca58228 | ||
|
9991fca2e5 | ||
|
9c7bdcfeef | ||
|
b5463d522b | ||
|
af0d830103 | ||
|
d4187dffa3 | ||
|
a7f06f2be5 | ||
|
7ff7d1a185 | ||
|
e3bc80e027 | ||
|
9366fa3b45 | ||
|
d356e9e65f | ||
|
230ebffd0e | ||
|
5eedc1edca |
@@ -1,4 +1,14 @@
|
||||
[
|
||||
{
|
||||
"version": "2.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Run Web3ProviderEngine without excess block polling",
|
||||
"pr": 1695
|
||||
}
|
||||
],
|
||||
"timestamp": 1553183790
|
||||
},
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.1.0 - _March 21, 2019_
|
||||
|
||||
* Run Web3ProviderEngine without excess block polling (#1695)
|
||||
|
||||
## v2.0.0 - _March 20, 2019_
|
||||
|
||||
* Do not reexport external dependencies (#1682)
|
||||
|
@@ -26,7 +26,7 @@ contract ERC1155Proxy is
|
||||
{
|
||||
|
||||
// Id of this proxy.
|
||||
bytes4 constant internal PROXY_ID = bytes4(keccak256("ERC1155Token(address,uint256[],uint256[],bytes)"));
|
||||
bytes4 constant internal PROXY_ID = bytes4(keccak256("ERC1155Assets(address,uint256[],uint256[],bytes)"));
|
||||
|
||||
function ()
|
||||
external
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-asset-proxy",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.0",
|
||||
"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.7",
|
||||
"@0x/contracts-gen": "^1.0.6",
|
||||
"@0x/contracts-test-utils": "^3.1.0",
|
||||
"@0x/dev-utils": "^2.1.4",
|
||||
"@0x/sol-compiler": "^3.1.4",
|
||||
"@0x/abi-gen": "^2.0.8",
|
||||
"@0x/contracts-gen": "^1.0.7",
|
||||
"@0x/contracts-test-utils": "^3.1.1",
|
||||
"@0x/dev-utils": "^2.2.0",
|
||||
"@0x/sol-compiler": "^3.1.5",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
@@ -67,16 +67,16 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.0.3",
|
||||
"@0x/contracts-erc1155": "^1.0.1",
|
||||
"@0x/contracts-erc20": "^2.0.0",
|
||||
"@0x/contracts-erc721": "^2.0.0",
|
||||
"@0x/contracts-utils": "^3.0.0",
|
||||
"@0x/order-utils": "^7.1.0",
|
||||
"@0x/types": "^2.2.0",
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/web3-wrapper": "^6.0.3",
|
||||
"@0x/base-contract": "^5.0.4",
|
||||
"@0x/contracts-erc1155": "^1.1.0",
|
||||
"@0x/contracts-erc20": "^2.1.0",
|
||||
"@0x/contracts-erc721": "^2.1.0",
|
||||
"@0x/contracts-utils": "^3.1.0",
|
||||
"@0x/order-utils": "^7.1.1",
|
||||
"@0x/types": "^2.2.1",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"@0x/web3-wrapper": "^6.0.4",
|
||||
"ethereum-types": "^2.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -15,7 +15,7 @@ import {
|
||||
web3Wrapper,
|
||||
} from '@0x/contracts-test-utils';
|
||||
import { BlockchainLifecycle } from '@0x/dev-utils';
|
||||
import { RevertReason } from '@0x/types';
|
||||
import { AssetProxyId, RevertReason } from '@0x/types';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import * as chai from 'chai';
|
||||
import { LogWithDecodedArgs } from 'ethereum-types';
|
||||
@@ -123,8 +123,7 @@ describe('ERC1155Proxy', () => {
|
||||
});
|
||||
it('should have an id of 0x9645780d', async () => {
|
||||
const proxyId = await erc1155Proxy.getProxyId.callAsync();
|
||||
// proxy computed using -- bytes4(keccak256("erc1155Token(address,uint256[],uint256[],bytes)"));
|
||||
const expectedProxyId = '0x9645780d';
|
||||
const expectedProxyId = AssetProxyId.ERC1155;
|
||||
expect(proxyId).to.equal(expectedProxyId);
|
||||
});
|
||||
});
|
||||
|
@@ -1,8 +1,10 @@
|
||||
import { env, EnvVars } from '@0x/dev-utils';
|
||||
|
||||
import { coverage, profiler, provider } from '@0x/contracts-test-utils';
|
||||
import { providerUtils } from '@0x/utils';
|
||||
|
||||
before('start web3 provider', () => {
|
||||
provider.start();
|
||||
providerUtils.startProviderEngine(provider);
|
||||
});
|
||||
after('generate coverage report', async () => {
|
||||
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
|
||||
|
@@ -1,4 +1,14 @@
|
||||
[
|
||||
{
|
||||
"version": "1.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Run Web3ProviderEngine without excess block polling",
|
||||
"pr": 1695
|
||||
}
|
||||
],
|
||||
"timestamp": 1553183790
|
||||
},
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.1.0 - _March 21, 2019_
|
||||
|
||||
* Run Web3ProviderEngine without excess block polling (#1695)
|
||||
|
||||
## v1.0.0 - _March 20, 2019_
|
||||
|
||||
* Created Coordinator package
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-coordinator",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.0",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -46,11 +46,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^2.0.7",
|
||||
"@0x/contracts-gen": "^1.0.6",
|
||||
"@0x/contracts-test-utils": "^3.1.0",
|
||||
"@0x/dev-utils": "^2.1.4",
|
||||
"@0x/sol-compiler": "^3.1.4",
|
||||
"@0x/abi-gen": "^2.0.8",
|
||||
"@0x/contracts-gen": "^1.0.7",
|
||||
"@0x/contracts-test-utils": "^3.1.1",
|
||||
"@0x/dev-utils": "^2.2.0",
|
||||
"@0x/sol-compiler": "^3.1.5",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
@@ -67,17 +67,17 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.0.3",
|
||||
"@0x/contracts-asset-proxy": "^2.0.0",
|
||||
"@0x/contracts-erc20": "^2.0.0",
|
||||
"@0x/base-contract": "^5.0.4",
|
||||
"@0x/contracts-asset-proxy": "^2.1.0",
|
||||
"@0x/contracts-erc20": "^2.1.0",
|
||||
"@0x/contracts-exchange": "1.0.2",
|
||||
"@0x/contracts-exchange-libs": "^2.0.0",
|
||||
"@0x/contracts-utils": "^3.0.0",
|
||||
"@0x/order-utils": "^7.1.0",
|
||||
"@0x/types": "^2.2.0",
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/web3-wrapper": "^6.0.3",
|
||||
"@0x/contracts-exchange-libs": "^2.1.0",
|
||||
"@0x/contracts-utils": "^3.1.0",
|
||||
"@0x/order-utils": "^7.1.1",
|
||||
"@0x/types": "^2.2.1",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"@0x/web3-wrapper": "^6.0.4",
|
||||
"ethereum-types": "^2.1.1",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
|
@@ -1,8 +1,10 @@
|
||||
import { env, EnvVars } from '@0x/dev-utils';
|
||||
|
||||
import { coverage, profiler, provider } from '@0x/contracts-test-utils';
|
||||
import { providerUtils } from '@0x/utils';
|
||||
|
||||
before('start web3 provider', () => {
|
||||
provider.start();
|
||||
providerUtils.startProviderEngine(provider);
|
||||
});
|
||||
after('generate coverage report', async () => {
|
||||
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { eip712Utils, transactionHashUtils } from '@0x/order-utils';
|
||||
import { constants } from '@0x/order-utils/lib/src/constants';
|
||||
import { eip712Utils } from '@0x/order-utils';
|
||||
import { SignedZeroExTransaction } from '@0x/types';
|
||||
import { BigNumber, signTypedDataUtils } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
@@ -11,25 +10,11 @@ export const hashUtils = {
|
||||
txOrigin: string,
|
||||
approvalExpirationTimeSeconds: BigNumber,
|
||||
): Buffer {
|
||||
const domain = {
|
||||
name: constants.COORDINATOR_DOMAIN_NAME,
|
||||
version: constants.COORDINATOR_DOMAIN_VERSION,
|
||||
const typedData = eip712Utils.createCoordinatorApprovalTypedData(
|
||||
transaction,
|
||||
verifyingContractAddress,
|
||||
};
|
||||
const transactionHash = transactionHashUtils.getTransactionHashHex(transaction);
|
||||
const approval = {
|
||||
txOrigin,
|
||||
transactionHash,
|
||||
transactionSignature: transaction.signature,
|
||||
approvalExpirationTimeSeconds: approvalExpirationTimeSeconds.toString(),
|
||||
};
|
||||
const typedData = eip712Utils.createTypedData(
|
||||
constants.COORDINATOR_APPROVAL_SCHEMA.name,
|
||||
{
|
||||
CoordinatorApproval: constants.COORDINATOR_APPROVAL_SCHEMA.parameters,
|
||||
},
|
||||
approval,
|
||||
domain,
|
||||
approvalExpirationTimeSeconds,
|
||||
);
|
||||
const hashBuffer = signTypedDataUtils.generateTypedDataHash(typedData);
|
||||
return hashBuffer;
|
||||
|
@@ -1,4 +1,14 @@
|
||||
[
|
||||
{
|
||||
"version": "1.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Run Web3ProviderEngine without excess block polling",
|
||||
"pr": 1695
|
||||
}
|
||||
],
|
||||
"timestamp": 1553183790
|
||||
},
|
||||
{
|
||||
"timestamp": 1553091633,
|
||||
"version": "1.0.1",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.1.0 - _March 21, 2019_
|
||||
|
||||
* Run Web3ProviderEngine without excess block polling (#1695)
|
||||
|
||||
## v1.0.1 - _March 20, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-erc1155",
|
||||
"version": "1.0.1",
|
||||
"version": "1.1.0",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -46,11 +46,10 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^2.0.7",
|
||||
"@0x/contracts-gen": "^1.0.6",
|
||||
"@0x/contracts-test-utils": "^3.1.0",
|
||||
"@0x/dev-utils": "^2.1.4",
|
||||
"@0x/sol-compiler": "^3.1.4",
|
||||
"@0x/abi-gen": "^2.0.8",
|
||||
"@0x/contracts-gen": "^1.0.7",
|
||||
"@0x/dev-utils": "^2.2.0",
|
||||
"@0x/sol-compiler": "^3.1.5",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
@@ -67,12 +66,13 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.0.3",
|
||||
"@0x/contracts-utils": "^3.0.0",
|
||||
"@0x/types": "^2.2.0",
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/web3-wrapper": "^6.0.3",
|
||||
"@0x/base-contract": "^5.0.4",
|
||||
"@0x/contracts-test-utils": "^3.1.1",
|
||||
"@0x/contracts-utils": "^3.1.0",
|
||||
"@0x/types": "^2.2.1",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"@0x/web3-wrapper": "^6.0.4",
|
||||
"ethereum-types": "^2.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,8 +1,10 @@
|
||||
import { env, EnvVars } from '@0x/dev-utils';
|
||||
|
||||
import { coverage, profiler, provider } from '@0x/contracts-test-utils';
|
||||
import { providerUtils } from '@0x/utils';
|
||||
|
||||
before('start web3 provider', () => {
|
||||
provider.start();
|
||||
providerUtils.startProviderEngine(provider);
|
||||
});
|
||||
after('generate coverage report', async () => {
|
||||
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
|
||||
|
@@ -1,4 +1,14 @@
|
||||
[
|
||||
{
|
||||
"version": "2.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Run Web3ProviderEngine without excess block polling",
|
||||
"pr": 1695
|
||||
}
|
||||
],
|
||||
"timestamp": 1553183790
|
||||
},
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.1.0 - _March 21, 2019_
|
||||
|
||||
* Run Web3ProviderEngine without excess block polling (#1695)
|
||||
|
||||
## v2.0.0 - _March 20, 2019_
|
||||
|
||||
* Upgrade contracts to Solidity 0.5.5 (#1682)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-erc20",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.0",
|
||||
"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.7",
|
||||
"@0x/contracts-gen": "^1.0.6",
|
||||
"@0x/contracts-test-utils": "^3.1.0",
|
||||
"@0x/dev-utils": "^2.1.4",
|
||||
"@0x/sol-compiler": "^3.1.4",
|
||||
"@0x/abi-gen": "^2.0.8",
|
||||
"@0x/contracts-gen": "^1.0.7",
|
||||
"@0x/contracts-test-utils": "^3.1.1",
|
||||
"@0x/dev-utils": "^2.2.0",
|
||||
"@0x/sol-compiler": "^3.1.5",
|
||||
"@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": "^5.0.3",
|
||||
"@0x/contracts-exchange-libs": "^2.0.0",
|
||||
"@0x/contracts-utils": "^3.0.0",
|
||||
"@0x/types": "^2.2.0",
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/web3-wrapper": "^6.0.3",
|
||||
"@0x/base-contract": "^5.0.4",
|
||||
"@0x/contracts-exchange-libs": "^2.1.0",
|
||||
"@0x/contracts-utils": "^3.1.0",
|
||||
"@0x/types": "^2.2.1",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"@0x/web3-wrapper": "^6.0.4",
|
||||
"ethereum-types": "^2.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,8 +1,10 @@
|
||||
import { env, EnvVars } from '@0x/dev-utils';
|
||||
|
||||
import { coverage, profiler, provider } from '@0x/contracts-test-utils';
|
||||
import { providerUtils } from '@0x/utils';
|
||||
|
||||
before('start web3 provider', () => {
|
||||
provider.start();
|
||||
providerUtils.startProviderEngine(provider);
|
||||
});
|
||||
after('generate coverage report', async () => {
|
||||
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
|
||||
|
@@ -1,4 +1,14 @@
|
||||
[
|
||||
{
|
||||
"version": "2.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Run Web3ProviderEngine without excess block polling",
|
||||
"pr": 1695
|
||||
}
|
||||
],
|
||||
"timestamp": 1553183790
|
||||
},
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.1.0 - _March 21, 2019_
|
||||
|
||||
* Run Web3ProviderEngine without excess block polling (#1695)
|
||||
|
||||
## v2.0.0 - _March 20, 2019_
|
||||
|
||||
* Upgrade contracts to Solidity 0.5.5 (#1682)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-erc721",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.0",
|
||||
"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.7",
|
||||
"@0x/contracts-gen": "^1.0.6",
|
||||
"@0x/contracts-test-utils": "^3.1.0",
|
||||
"@0x/dev-utils": "^2.1.4",
|
||||
"@0x/sol-compiler": "^3.1.4",
|
||||
"@0x/abi-gen": "^2.0.8",
|
||||
"@0x/contracts-gen": "^1.0.7",
|
||||
"@0x/contracts-test-utils": "^3.1.1",
|
||||
"@0x/dev-utils": "^2.2.0",
|
||||
"@0x/sol-compiler": "^3.1.5",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
@@ -67,12 +67,12 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.0.3",
|
||||
"@0x/contracts-utils": "^3.0.0",
|
||||
"@0x/types": "^2.2.0",
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/web3-wrapper": "^6.0.3",
|
||||
"@0x/base-contract": "^5.0.4",
|
||||
"@0x/contracts-utils": "^3.1.0",
|
||||
"@0x/types": "^2.2.1",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"@0x/web3-wrapper": "^6.0.4",
|
||||
"ethereum-types": "^2.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,8 +1,10 @@
|
||||
import { env, EnvVars } from '@0x/dev-utils';
|
||||
|
||||
import { coverage, profiler, provider } from '@0x/contracts-test-utils';
|
||||
import { providerUtils } from '@0x/utils';
|
||||
|
||||
before('start web3 provider', () => {
|
||||
provider.start();
|
||||
providerUtils.startProviderEngine(provider);
|
||||
});
|
||||
after('generate coverage report', async () => {
|
||||
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
|
||||
|
@@ -1,4 +1,14 @@
|
||||
[
|
||||
{
|
||||
"version": "2.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Run Web3ProviderEngine without excess block polling",
|
||||
"pr": 1695
|
||||
}
|
||||
],
|
||||
"timestamp": 1553183790
|
||||
},
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.1.0 - _March 21, 2019_
|
||||
|
||||
* Run Web3ProviderEngine without excess block polling (#1695)
|
||||
|
||||
## v2.0.0 - _March 20, 2019_
|
||||
|
||||
* Do not reexport external dependencies (#1682)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-exchange-forwarder",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.0",
|
||||
"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.7",
|
||||
"@0x/contract-wrappers": "^8.0.4",
|
||||
"@0x/contracts-gen": "^1.0.6",
|
||||
"@0x/contracts-test-utils": "^3.1.0",
|
||||
"@0x/dev-utils": "^2.1.4",
|
||||
"@0x/sol-compiler": "^3.1.4",
|
||||
"@0x/abi-gen": "^2.0.8",
|
||||
"@0x/contract-wrappers": "^8.0.5",
|
||||
"@0x/contracts-gen": "^1.0.7",
|
||||
"@0x/contracts-test-utils": "^3.1.1",
|
||||
"@0x/dev-utils": "^2.2.0",
|
||||
"@0x/sol-compiler": "^3.1.5",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
@@ -68,18 +68,18 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.0.3",
|
||||
"@0x/contracts-asset-proxy": "^2.0.0",
|
||||
"@0x/base-contract": "^5.0.4",
|
||||
"@0x/contracts-asset-proxy": "^2.1.0",
|
||||
"@0x/contracts-erc20": "1.0.8",
|
||||
"@0x/contracts-erc721": "1.0.8",
|
||||
"@0x/contracts-exchange": "1.0.2",
|
||||
"@0x/contracts-exchange-libs": "1.0.2",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/order-utils": "^7.1.0",
|
||||
"@0x/types": "^2.2.0",
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/web3-wrapper": "^6.0.3",
|
||||
"@0x/order-utils": "^7.1.1",
|
||||
"@0x/types": "^2.2.1",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"@0x/web3-wrapper": "^6.0.4",
|
||||
"ethereum-types": "^2.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,8 +1,10 @@
|
||||
import { env, EnvVars } from '@0x/dev-utils';
|
||||
|
||||
import { coverage, profiler, provider } from '@0x/contracts-test-utils';
|
||||
import { providerUtils } from '@0x/utils';
|
||||
|
||||
before('start web3 provider', () => {
|
||||
provider.start();
|
||||
providerUtils.startProviderEngine(provider);
|
||||
});
|
||||
after('generate coverage report', async () => {
|
||||
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
|
||||
|
@@ -1,4 +1,14 @@
|
||||
[
|
||||
{
|
||||
"version": "2.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Run Web3ProviderEngine without excess block polling",
|
||||
"pr": 1695
|
||||
}
|
||||
],
|
||||
"timestamp": 1553183790
|
||||
},
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.1.0 - _March 21, 2019_
|
||||
|
||||
* Run Web3ProviderEngine without excess block polling (#1695)
|
||||
|
||||
## v2.0.0 - _March 20, 2019_
|
||||
|
||||
* Upgrade contracts to Solidity 0.5.5 (#1682)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-exchange-libs",
|
||||
"version": "2.0.0",
|
||||
"version": "2.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.7",
|
||||
"@0x/contracts-gen": "^1.0.6",
|
||||
"@0x/contracts-test-utils": "^3.1.0",
|
||||
"@0x/dev-utils": "^2.1.4",
|
||||
"@0x/sol-compiler": "^3.1.4",
|
||||
"@0x/abi-gen": "^2.0.8",
|
||||
"@0x/contracts-gen": "^1.0.7",
|
||||
"@0x/contracts-test-utils": "^3.1.1",
|
||||
"@0x/dev-utils": "^2.2.0",
|
||||
"@0x/sol-compiler": "^3.1.5",
|
||||
"@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": "^5.0.3",
|
||||
"@0x/contracts-utils": "^3.0.0",
|
||||
"@0x/order-utils": "^7.1.0",
|
||||
"@0x/types": "^2.2.0",
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/web3-wrapper": "^6.0.3",
|
||||
"@0x/base-contract": "^5.0.4",
|
||||
"@0x/contracts-utils": "^3.1.0",
|
||||
"@0x/order-utils": "^7.1.1",
|
||||
"@0x/types": "^2.2.1",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"@0x/web3-wrapper": "^6.0.4",
|
||||
"ethereum-types": "^2.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,8 +1,10 @@
|
||||
import { env, EnvVars } from '@0x/dev-utils';
|
||||
|
||||
import { coverage, profiler, provider } from '@0x/contracts-test-utils';
|
||||
import { providerUtils } from '@0x/utils';
|
||||
|
||||
before('start web3 provider', () => {
|
||||
provider.start();
|
||||
providerUtils.startProviderEngine(provider);
|
||||
});
|
||||
after('generate coverage report', async () => {
|
||||
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
|
||||
|
@@ -1,4 +1,14 @@
|
||||
[
|
||||
{
|
||||
"version": "2.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Run Web3ProviderEngine without excess block polling",
|
||||
"pr": 1695
|
||||
}
|
||||
],
|
||||
"timestamp": 1553183790
|
||||
},
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.1.0 - _March 21, 2019_
|
||||
|
||||
* Run Web3ProviderEngine without excess block polling (#1695)
|
||||
|
||||
## v2.0.0 - _March 20, 2019_
|
||||
|
||||
* Do not reexport external dependencies (#1682)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-exchange",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.0",
|
||||
"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.7",
|
||||
"@0x/contracts-gen": "^1.0.6",
|
||||
"@0x/contracts-test-utils": "^3.1.0",
|
||||
"@0x/dev-utils": "^2.1.4",
|
||||
"@0x/sol-compiler": "^3.1.4",
|
||||
"@0x/abi-gen": "^2.0.8",
|
||||
"@0x/contracts-gen": "^1.0.7",
|
||||
"@0x/contracts-test-utils": "^3.1.1",
|
||||
"@0x/dev-utils": "^2.2.0",
|
||||
"@0x/sol-compiler": "^3.1.5",
|
||||
"@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": "^5.0.3",
|
||||
"@0x/contracts-asset-proxy": "^2.0.0",
|
||||
"@0x/contracts-erc1155": "^1.0.1",
|
||||
"@0x/contracts-erc20": "^2.0.0",
|
||||
"@0x/contracts-erc721": "^2.0.0",
|
||||
"@0x/contracts-exchange-libs": "^2.0.0",
|
||||
"@0x/contracts-utils": "^3.0.0",
|
||||
"@0x/order-utils": "^7.1.0",
|
||||
"@0x/types": "^2.2.0",
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/web3-wrapper": "^6.0.3",
|
||||
"@0x/base-contract": "^5.0.4",
|
||||
"@0x/contracts-asset-proxy": "^2.1.0",
|
||||
"@0x/contracts-erc1155": "^1.1.0",
|
||||
"@0x/contracts-erc20": "^2.1.0",
|
||||
"@0x/contracts-erc721": "^2.1.0",
|
||||
"@0x/contracts-exchange-libs": "^2.1.0",
|
||||
"@0x/contracts-utils": "^3.1.0",
|
||||
"@0x/order-utils": "^7.1.1",
|
||||
"@0x/types": "^2.2.1",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"@0x/web3-wrapper": "^6.0.4",
|
||||
"ethereum-types": "^2.1.1",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
|
@@ -1,8 +1,10 @@
|
||||
import { env, EnvVars } from '@0x/dev-utils';
|
||||
|
||||
import { coverage, profiler, provider } from '@0x/contracts-test-utils';
|
||||
import { providerUtils } from '@0x/utils';
|
||||
|
||||
before('start web3 provider', () => {
|
||||
provider.start();
|
||||
providerUtils.startProviderEngine(provider);
|
||||
});
|
||||
after('generate coverage report', async () => {
|
||||
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
|
||||
|
@@ -1,4 +1,14 @@
|
||||
[
|
||||
{
|
||||
"version": "3.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Run Web3ProviderEngine without excess block polling",
|
||||
"pr": 1695
|
||||
}
|
||||
],
|
||||
"timestamp": 1553183790
|
||||
},
|
||||
{
|
||||
"version": "3.0.0",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v3.1.0 - _March 21, 2019_
|
||||
|
||||
* Run Web3ProviderEngine without excess block polling (#1695)
|
||||
|
||||
## v3.0.0 - _March 20, 2019_
|
||||
|
||||
* Do not reexport external dependencies (#1682)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-extensions",
|
||||
"version": "3.0.0",
|
||||
"version": "3.1.0",
|
||||
"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.7",
|
||||
"@0x/contract-wrappers": "^8.0.4",
|
||||
"@0x/contracts-gen": "^1.0.6",
|
||||
"@0x/contracts-test-utils": "^3.1.0",
|
||||
"@0x/dev-utils": "^2.1.4",
|
||||
"@0x/sol-compiler": "^3.1.4",
|
||||
"@0x/abi-gen": "^2.0.8",
|
||||
"@0x/contract-wrappers": "^8.0.5",
|
||||
"@0x/contracts-gen": "^1.0.7",
|
||||
"@0x/contracts-test-utils": "^3.1.1",
|
||||
"@0x/dev-utils": "^2.2.0",
|
||||
"@0x/sol-compiler": "^3.1.5",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "*",
|
||||
@@ -68,18 +68,18 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.0.3",
|
||||
"@0x/contracts-asset-proxy": "^2.0.0",
|
||||
"@0x/contracts-erc20": "^2.0.0",
|
||||
"@0x/contracts-erc721": "^2.0.0",
|
||||
"@0x/contracts-exchange": "^2.0.0",
|
||||
"@0x/contracts-exchange-libs": "^2.0.0",
|
||||
"@0x/contracts-utils": "^3.0.0",
|
||||
"@0x/order-utils": "^7.1.0",
|
||||
"@0x/types": "^2.2.0",
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/web3-wrapper": "^6.0.3",
|
||||
"@0x/base-contract": "^5.0.4",
|
||||
"@0x/contracts-asset-proxy": "^2.1.0",
|
||||
"@0x/contracts-erc20": "^2.1.0",
|
||||
"@0x/contracts-erc721": "^2.1.0",
|
||||
"@0x/contracts-exchange": "^2.1.0",
|
||||
"@0x/contracts-exchange-libs": "^2.1.0",
|
||||
"@0x/contracts-utils": "^3.1.0",
|
||||
"@0x/order-utils": "^7.1.1",
|
||||
"@0x/types": "^2.2.1",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"@0x/web3-wrapper": "^6.0.4",
|
||||
"ethereum-types": "^2.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,8 +1,10 @@
|
||||
import { env, EnvVars } from '@0x/dev-utils';
|
||||
|
||||
import { coverage, profiler, provider } from '@0x/contracts-test-utils';
|
||||
import { providerUtils } from '@0x/utils';
|
||||
|
||||
before('start web3 provider', () => {
|
||||
provider.start();
|
||||
providerUtils.startProviderEngine(provider);
|
||||
});
|
||||
after('generate coverage report', async () => {
|
||||
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
|
||||
|
@@ -1,4 +1,14 @@
|
||||
[
|
||||
{
|
||||
"version": "3.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Run Web3ProviderEngine without excess block polling",
|
||||
"pr": 1695
|
||||
}
|
||||
],
|
||||
"timestamp": 1553183790
|
||||
},
|
||||
{
|
||||
"version": "3.0.0",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v3.1.0 - _March 21, 2019_
|
||||
|
||||
* Run Web3ProviderEngine without excess block polling (#1695)
|
||||
|
||||
## v3.0.0 - _March 20, 2019_
|
||||
|
||||
* Do not reexport external dependencies (#1682)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-multisig",
|
||||
"version": "3.0.0",
|
||||
"version": "3.1.0",
|
||||
"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.7",
|
||||
"@0x/contracts-gen": "^1.0.6",
|
||||
"@0x/contracts-test-utils": "^3.1.0",
|
||||
"@0x/dev-utils": "^2.1.4",
|
||||
"@0x/sol-compiler": "^3.1.4",
|
||||
"@0x/abi-gen": "^2.0.8",
|
||||
"@0x/contracts-gen": "^1.0.7",
|
||||
"@0x/contracts-test-utils": "^3.1.1",
|
||||
"@0x/dev-utils": "^2.2.0",
|
||||
"@0x/sol-compiler": "^3.1.5",
|
||||
"@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": "^5.0.3",
|
||||
"@0x/contracts-asset-proxy": "^2.0.0",
|
||||
"@0x/contracts-erc20": "^2.0.0",
|
||||
"@0x/base-contract": "^5.0.4",
|
||||
"@0x/contracts-asset-proxy": "^2.1.0",
|
||||
"@0x/contracts-erc20": "^2.1.0",
|
||||
"@0x/contracts-utils": "2.0.1",
|
||||
"@0x/types": "^2.2.0",
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/web3-wrapper": "^6.0.3",
|
||||
"@0x/types": "^2.2.1",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"@0x/web3-wrapper": "^6.0.4",
|
||||
"ethereum-types": "^2.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,9 +1,9 @@
|
||||
import { env, EnvVars } from '@0x/dev-utils';
|
||||
|
||||
import { coverage, profiler, provider } from '@0x/contracts-test-utils';
|
||||
import { env, EnvVars } from '@0x/dev-utils';
|
||||
import { providerUtils } from '@0x/utils';
|
||||
|
||||
before('start web3 provider engine', () => {
|
||||
provider.start();
|
||||
before('start web3 provider', () => {
|
||||
providerUtils.startProviderEngine(provider);
|
||||
});
|
||||
|
||||
after('generate coverage report', async () => {
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,192 +0,0 @@
|
||||
// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name
|
||||
// tslint:disable:no-unused-variable
|
||||
// tslint:disable:no-unbound-method
|
||||
import { BaseContract } from '@0x/base-contract';
|
||||
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';
|
||||
import * as _ from 'lodash';
|
||||
// tslint:enable:no-unused-variable
|
||||
|
||||
|
||||
/* istanbul ignore next */
|
||||
// tslint:disable:no-parameter-reassignment
|
||||
// tslint:disable-next-line:class-name
|
||||
export class TestMixinsContract extends BaseContract {
|
||||
public getSignerAddress = {
|
||||
async callAsync(
|
||||
hash: string,
|
||||
signature: string,
|
||||
callData: Partial<CallData> = {},
|
||||
defaultBlock?: BlockParam,
|
||||
): Promise<string
|
||||
> {
|
||||
const self = this as any as TestMixinsContract;
|
||||
const encodedData = self._strictEncodeArguments('getSignerAddress(bytes32,bytes)', [hash,
|
||||
signature
|
||||
]);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...callData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('getSignerAddress(bytes32,bytes)');
|
||||
// tslint:disable boolean-naming
|
||||
const result = abiEncoder.strictDecodeReturnValue<string
|
||||
>(rawCallResult);
|
||||
// tslint:enable boolean-naming
|
||||
return result;
|
||||
},
|
||||
};
|
||||
public assertValidTransactionOrdersApproval = {
|
||||
async callAsync(
|
||||
transaction: {salt: BigNumber;signerAddress: string;data: string},
|
||||
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
|
||||
transactionSignature: string,
|
||||
approvalExpirationTimeSeconds: BigNumber[],
|
||||
approvalSignatures: string[],
|
||||
callData: Partial<CallData> = {},
|
||||
defaultBlock?: BlockParam,
|
||||
): Promise<void
|
||||
> {
|
||||
const self = this as any as TestMixinsContract;
|
||||
const encodedData = self._strictEncodeArguments('assertValidTransactionOrdersApproval((uint256,address,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes,uint256[],bytes[])', [transaction,
|
||||
orders,
|
||||
transactionSignature,
|
||||
approvalExpirationTimeSeconds,
|
||||
approvalSignatures
|
||||
]);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...callData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('assertValidTransactionOrdersApproval((uint256,address,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes,uint256[],bytes[])');
|
||||
// tslint:disable boolean-naming
|
||||
const result = abiEncoder.strictDecodeReturnValue<void
|
||||
>(rawCallResult);
|
||||
// tslint:enable boolean-naming
|
||||
return result;
|
||||
},
|
||||
};
|
||||
public assertValidTECApprovals = {
|
||||
async callAsync(
|
||||
transaction: {salt: BigNumber;signerAddress: string;data: string},
|
||||
transactionSignature: string,
|
||||
approvalExpirationTimeSeconds: BigNumber[],
|
||||
approvalSignatures: string[],
|
||||
callData: Partial<CallData> = {},
|
||||
defaultBlock?: BlockParam,
|
||||
): Promise<void
|
||||
> {
|
||||
const self = this as any as TestMixinsContract;
|
||||
const encodedData = self._strictEncodeArguments('assertValidTECApprovals((uint256,address,bytes),bytes,uint256[],bytes[])', [transaction,
|
||||
transactionSignature,
|
||||
approvalExpirationTimeSeconds,
|
||||
approvalSignatures
|
||||
]);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...callData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('assertValidTECApprovals((uint256,address,bytes),bytes,uint256[],bytes[])');
|
||||
// tslint:disable boolean-naming
|
||||
const result = abiEncoder.strictDecodeReturnValue<void
|
||||
>(rawCallResult);
|
||||
// tslint:enable boolean-naming
|
||||
return result;
|
||||
},
|
||||
};
|
||||
public EIP712_DOMAIN_HASH = {
|
||||
async callAsync(
|
||||
callData: Partial<CallData> = {},
|
||||
defaultBlock?: BlockParam,
|
||||
): Promise<string
|
||||
> {
|
||||
const self = this as any as TestMixinsContract;
|
||||
const encodedData = self._strictEncodeArguments('EIP712_DOMAIN_HASH()', []);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...callData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('EIP712_DOMAIN_HASH()');
|
||||
// tslint:disable boolean-naming
|
||||
const result = abiEncoder.strictDecodeReturnValue<string
|
||||
>(rawCallResult);
|
||||
// tslint:enable boolean-naming
|
||||
return result;
|
||||
},
|
||||
};
|
||||
public static async deployFrom0xArtifactAsync(
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<TestMixinsContract> {
|
||||
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 TestMixinsContract.deployAsync(bytecode, abi, provider, txDefaults, );
|
||||
}
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<TestMixinsContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[] = BaseContract._formatABIDataItemList(
|
||||
constructorAbi.inputs,
|
||||
[],
|
||||
BaseContract._bigNumberToString,
|
||||
);
|
||||
const iface = new ethers.utils.Interface(abi);
|
||||
const deployInfo = iface.deployFunction;
|
||||
const txData = deployInfo.encode(bytecode, []);
|
||||
const web3Wrapper = new Web3Wrapper(provider);
|
||||
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{data: txData},
|
||||
txDefaults,
|
||||
web3Wrapper.estimateGasAsync.bind(web3Wrapper),
|
||||
);
|
||||
const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
|
||||
logUtils.log(`transactionHash: ${txHash}`);
|
||||
const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
|
||||
logUtils.log(`TestMixins successfully deployed at ${txReceipt.contractAddress}`);
|
||||
const contractInstance = new TestMixinsContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
|
||||
contractInstance.constructorArgs = [];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('TestMixins', abi, address, supportedProvider, txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
// tslint:enable:no-unbound-method
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1553183790,
|
||||
"version": "3.1.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "3.1.0",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v3.1.1 - _March 21, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v3.1.0 - _March 20, 2019_
|
||||
|
||||
* Added ERC1155Proxy test constants and interfaces (#1661)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-test-utils",
|
||||
"version": "3.1.0",
|
||||
"version": "3.1.1",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -40,19 +40,19 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/abi-gen": "^2.0.7",
|
||||
"@0x/dev-utils": "^2.1.4",
|
||||
"@0x/order-utils": "^7.1.0",
|
||||
"@0x/sol-compiler": "^3.1.4",
|
||||
"@0x/sol-coverage": "^3.0.1",
|
||||
"@0x/sol-profiler": "^3.1.3",
|
||||
"@0x/sol-trace": "^2.0.9",
|
||||
"@0x/subproviders": "^4.0.3",
|
||||
"@0x/abi-gen": "^2.0.8",
|
||||
"@0x/dev-utils": "^2.2.0",
|
||||
"@0x/order-utils": "^7.1.1",
|
||||
"@0x/sol-compiler": "^3.1.5",
|
||||
"@0x/sol-coverage": "^3.0.2",
|
||||
"@0x/sol-profiler": "^3.1.4",
|
||||
"@0x/sol-trace": "^2.0.10",
|
||||
"@0x/subproviders": "^4.0.4",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@0x/types": "^2.2.0",
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/web3-wrapper": "^6.0.3",
|
||||
"@0x/types": "^2.2.1",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"@0x/web3-wrapper": "^6.0.4",
|
||||
"@types/bn.js": "^4.11.0",
|
||||
"@types/js-combinatorics": "^0.5.29",
|
||||
"@types/lodash": "4.14.104",
|
||||
|
@@ -1,4 +1,14 @@
|
||||
[
|
||||
{
|
||||
"version": "3.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Added `startProviderEngine` to `providerUtils`. Preventing excess block polling",
|
||||
"pr": 1695
|
||||
}
|
||||
],
|
||||
"timestamp": 1553183790
|
||||
},
|
||||
{
|
||||
"version": "3.0.0",
|
||||
"changes": [
|
||||
@@ -13,6 +23,14 @@
|
||||
{
|
||||
"note": "Added Address.sol with test for whether or not an address is a contract",
|
||||
"pr": 1657
|
||||
},
|
||||
{
|
||||
"note": "Add unit tests for `LibAddressArray`",
|
||||
"pr": 1712
|
||||
},
|
||||
{
|
||||
"note": "Fix `LibAddressArray.indexOf` returning incorrect index.",
|
||||
"pr": 1712
|
||||
}
|
||||
],
|
||||
"timestamp": 1553091633
|
||||
|
@@ -5,11 +5,17 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v3.1.0 - _March 21, 2019_
|
||||
|
||||
* Added `startProviderEngine` to `providerUtils`. Preventing excess block polling (#1695)
|
||||
|
||||
## v3.0.0 - _March 20, 2019_
|
||||
|
||||
* Optimize loops in LibAddressArray (#1668)
|
||||
* Upgrade contracts to Solidity 0.5.5 (#1682)
|
||||
* Added Address.sol with test for whether or not an address is a contract (#1657)
|
||||
* Add unit tests for `LibAddressArray` (#1712)
|
||||
* Fix `LibAddressArray.indexOf` returning incorrect index. (#1712)
|
||||
|
||||
## v2.0.8 - _March 1, 2019_
|
||||
|
||||
|
@@ -30,6 +30,7 @@
|
||||
"src/SafeMath.sol",
|
||||
"src/interfaces/IOwnable.sol",
|
||||
"test/TestConstants.sol",
|
||||
"test/TestLibAddressArray.sol",
|
||||
"test/TestLibBytes.sol"
|
||||
]
|
||||
}
|
||||
|
@@ -30,7 +30,7 @@ library LibAddressArray {
|
||||
/// @param addressArray Array of addresses.
|
||||
/// @param addressToAppend Address to append.
|
||||
/// @return Array of addresses: [... addressArray, addressToAppend]
|
||||
function append(address[] memory addressArray, address addressToAppend)
|
||||
function append(address[] memory addressArray, address addressToAppend)
|
||||
internal
|
||||
pure
|
||||
returns (address[] memory)
|
||||
@@ -148,7 +148,7 @@ library LibAddressArray {
|
||||
if eq(target, arrayElement) {
|
||||
// Set success and index
|
||||
success := 1
|
||||
index := div(i, 32)
|
||||
index := div(sub(i, arrayContentsStart), 32)
|
||||
// Break loop
|
||||
i := arrayContentsEnd
|
||||
}
|
||||
|
106
contracts/utils/contracts/test/TestLibAddressArray.sol
Normal file
106
contracts/utils/contracts/test/TestLibAddressArray.sol
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
|
||||
Copyright 2018 ZeroEx Intl.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity ^0.5.5;
|
||||
|
||||
import "../src/LibAddressArray.sol";
|
||||
|
||||
|
||||
contract TestLibAddressArray {
|
||||
|
||||
using LibAddressArray for address[];
|
||||
|
||||
/// @dev Append a new address to an array of addresses.
|
||||
/// The `addressArray` may need to be reallocated to make space
|
||||
/// for the new address. Because of this we return the resulting
|
||||
/// memory location of `addressArray`.
|
||||
/// @param addressArray Array of addresses.
|
||||
/// @param addressToAppend Address to append.
|
||||
/// @return Array of addresses: [... addressArray, addressToAppend]
|
||||
function publicAppend(address[] memory addressArray, address addressToAppend)
|
||||
public
|
||||
pure
|
||||
returns (address[] memory)
|
||||
{
|
||||
return addressArray.append(addressToAppend);
|
||||
}
|
||||
|
||||
/// @dev Moves the free memory pointer by `freeMemOffset` bytes,
|
||||
/// then performs the append.
|
||||
/// This tests the behavior of the address array being reallocated if
|
||||
/// the memory immediately after the old array is claimed.
|
||||
/// @param addressArray Array of addresses.
|
||||
/// @param freeMemOffset Number of (signed) bytes to offset the free memory pointer (0x40).
|
||||
/// @param addressToAppend Address to append.
|
||||
/// @return The new address array.
|
||||
/// @return The memory address of the old address array.
|
||||
/// @return The memory address of the new address array.
|
||||
function testAppendRealloc(
|
||||
address[] memory addressArray,
|
||||
int256 freeMemOffset,
|
||||
address addressToAppend
|
||||
)
|
||||
public
|
||||
pure
|
||||
returns (
|
||||
address[] memory result,
|
||||
uint256 oldArrayMemStart,
|
||||
uint256 newArrayMemStart
|
||||
)
|
||||
{
|
||||
assembly {
|
||||
// Remember the original memory address of the array.
|
||||
oldArrayMemStart := addressArray
|
||||
// Move the free memory pointer.
|
||||
mstore(0x40, add(mload(0x40), freeMemOffset))
|
||||
}
|
||||
|
||||
// Call append.
|
||||
result = addressArray.append(addressToAppend);
|
||||
|
||||
// Get the new array memory address.
|
||||
assembly {
|
||||
newArrayMemStart := result
|
||||
}
|
||||
}
|
||||
|
||||
/// @dev Checks if an address array contains the target address.
|
||||
/// @param addressArray Array of addresses.
|
||||
/// @param target Address to search for in array.
|
||||
/// @return True if the addressArray contains the target.
|
||||
function publicContains(address[] memory addressArray, address target)
|
||||
public
|
||||
pure
|
||||
returns (bool success)
|
||||
{
|
||||
return addressArray.contains(target);
|
||||
}
|
||||
|
||||
/// @dev Finds the index of an address within an array.
|
||||
/// @param addressArray Array of addresses.
|
||||
/// @param target Address to search for in array.
|
||||
/// @return Existence and index of the target in the array.
|
||||
function publicIndexOf(address[] memory addressArray, address target)
|
||||
public
|
||||
pure
|
||||
returns (bool success, uint256 index)
|
||||
{
|
||||
(success, index) = addressArray.indexOf(target);
|
||||
}
|
||||
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contracts-utils",
|
||||
"version": "3.0.0",
|
||||
"version": "3.1.0",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -33,7 +33,7 @@
|
||||
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
|
||||
},
|
||||
"config": {
|
||||
"abis": "./generated-artifacts/@(IOwnable|LibBytes|Ownable|ReentrancyGuard|SafeMath|TestConstants|TestLibBytes).json",
|
||||
"abis": "./generated-artifacts/@(Address|IOwnable|LibBytes|Ownable|ReentrancyGuard|SafeMath|TestConstants|TestLibAddressArray|TestLibBytes).json",
|
||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
|
||||
},
|
||||
"repository": {
|
||||
@@ -46,11 +46,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/utils/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^2.0.7",
|
||||
"@0x/contracts-gen": "^1.0.6",
|
||||
"@0x/contracts-test-utils": "^3.1.0",
|
||||
"@0x/dev-utils": "^2.1.4",
|
||||
"@0x/sol-compiler": "^3.1.4",
|
||||
"@0x/abi-gen": "^2.0.8",
|
||||
"@0x/contracts-gen": "^1.0.7",
|
||||
"@0x/contracts-test-utils": "^3.1.1",
|
||||
"@0x/dev-utils": "^2.2.0",
|
||||
"@0x/sol-compiler": "^3.1.5",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/bn.js": "^4.11.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
@@ -68,12 +68,12 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.0.3",
|
||||
"@0x/order-utils": "^7.1.0",
|
||||
"@0x/types": "^2.2.0",
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/web3-wrapper": "^6.0.3",
|
||||
"@0x/base-contract": "^5.0.4",
|
||||
"@0x/order-utils": "^7.1.1",
|
||||
"@0x/types": "^2.2.1",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"@0x/web3-wrapper": "^6.0.4",
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereum-types": "^2.1.1",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
|
@@ -5,14 +5,17 @@
|
||||
*/
|
||||
import { ContractArtifact } from 'ethereum-types';
|
||||
|
||||
import * as Address from '../generated-artifacts/Address.json';
|
||||
import * as IOwnable from '../generated-artifacts/IOwnable.json';
|
||||
import * as LibBytes from '../generated-artifacts/LibBytes.json';
|
||||
import * as Ownable from '../generated-artifacts/Ownable.json';
|
||||
import * as ReentrancyGuard from '../generated-artifacts/ReentrancyGuard.json';
|
||||
import * as SafeMath from '../generated-artifacts/SafeMath.json';
|
||||
import * as TestConstants from '../generated-artifacts/TestConstants.json';
|
||||
import * as TestLibAddressArray from '../generated-artifacts/TestLibAddressArray.json';
|
||||
import * as TestLibBytes from '../generated-artifacts/TestLibBytes.json';
|
||||
export const artifacts = {
|
||||
Address: Address as ContractArtifact,
|
||||
LibBytes: LibBytes as ContractArtifact,
|
||||
Ownable: Ownable as ContractArtifact,
|
||||
ReentrancyGuard: ReentrancyGuard as ContractArtifact,
|
||||
@@ -20,4 +23,5 @@ export const artifacts = {
|
||||
IOwnable: IOwnable as ContractArtifact,
|
||||
TestConstants: TestConstants as ContractArtifact,
|
||||
TestLibBytes: TestLibBytes as ContractArtifact,
|
||||
TestLibAddressArray: TestLibAddressArray as ContractArtifact,
|
||||
};
|
||||
|
@@ -3,10 +3,12 @@
|
||||
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
export * from '../generated-wrappers/address';
|
||||
export * from '../generated-wrappers/i_ownable';
|
||||
export * from '../generated-wrappers/lib_bytes';
|
||||
export * from '../generated-wrappers/ownable';
|
||||
export * from '../generated-wrappers/reentrancy_guard';
|
||||
export * from '../generated-wrappers/safe_math';
|
||||
export * from '../generated-wrappers/test_constants';
|
||||
export * from '../generated-wrappers/test_lib_address_array';
|
||||
export * from '../generated-wrappers/test_lib_bytes';
|
||||
|
@@ -1,8 +1,10 @@
|
||||
import { env, EnvVars } from '@0x/dev-utils';
|
||||
|
||||
import { coverage, profiler, provider } from '@0x/contracts-test-utils';
|
||||
import { providerUtils } from '@0x/utils';
|
||||
|
||||
before('start web3 provider', () => {
|
||||
provider.start();
|
||||
providerUtils.startProviderEngine(provider);
|
||||
});
|
||||
after('generate coverage report', async () => {
|
||||
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
|
||||
|
161
contracts/utils/test/lib_address_array.ts
Normal file
161
contracts/utils/test/lib_address_array.ts
Normal file
@@ -0,0 +1,161 @@
|
||||
import {
|
||||
addressUtils,
|
||||
chaiSetup,
|
||||
expectContractCallFailedAsync,
|
||||
provider,
|
||||
txDefaults,
|
||||
web3Wrapper,
|
||||
} from '@0x/contracts-test-utils';
|
||||
import { BlockchainLifecycle } from '@0x/dev-utils';
|
||||
import { RevertReason } from '@0x/types';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import * as chai from 'chai';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, TestLibAddressArrayContract } from '../src';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
|
||||
|
||||
describe('LibAddressArray', () => {
|
||||
let lib: TestLibAddressArrayContract;
|
||||
|
||||
before(async () => {
|
||||
await blockchainLifecycle.startAsync();
|
||||
});
|
||||
after(async () => {
|
||||
await blockchainLifecycle.revertAsync();
|
||||
});
|
||||
before(async () => {
|
||||
// Deploy LibAddressArray
|
||||
lib = await TestLibAddressArrayContract.deployFrom0xArtifactAsync(
|
||||
artifacts.TestLibAddressArray,
|
||||
provider,
|
||||
txDefaults,
|
||||
);
|
||||
});
|
||||
beforeEach(async () => {
|
||||
await blockchainLifecycle.startAsync();
|
||||
});
|
||||
afterEach(async () => {
|
||||
await blockchainLifecycle.revertAsync();
|
||||
});
|
||||
|
||||
describe('append', () => {
|
||||
it('should append to empty array', async () => {
|
||||
const addr = addressUtils.generatePseudoRandomAddress();
|
||||
const result = await lib.publicAppend.callAsync([], addr);
|
||||
const expected = [addr];
|
||||
expect(result).to.deep.equal(expected);
|
||||
});
|
||||
|
||||
it('should append to non-empty array', async () => {
|
||||
const arr = _.times(3, () => addressUtils.generatePseudoRandomAddress());
|
||||
const addr = addressUtils.generatePseudoRandomAddress();
|
||||
const expected = [...arr, addr];
|
||||
const result = await lib.publicAppend.callAsync(arr, addr);
|
||||
expect(result).to.deep.equal(expected);
|
||||
});
|
||||
|
||||
it('should revert if the free memory pointer was moved to before the end of the array', async () => {
|
||||
const arr = _.times(3, () => addressUtils.generatePseudoRandomAddress());
|
||||
const addr = addressUtils.generatePseudoRandomAddress();
|
||||
const freeMemOffset = new BigNumber(-1);
|
||||
return expectContractCallFailedAsync(
|
||||
lib.testAppendRealloc.callAsync(arr, freeMemOffset, addr),
|
||||
RevertReason.InvalidFreeMemoryPtr,
|
||||
);
|
||||
});
|
||||
|
||||
it('should keep the same memory address if free memory pointer does not move', async () => {
|
||||
const arr = _.times(3, () => addressUtils.generatePseudoRandomAddress());
|
||||
const addr = addressUtils.generatePseudoRandomAddress();
|
||||
const freeMemOffset = new BigNumber(0);
|
||||
const expected = [...arr, addr];
|
||||
const [result, oldArrayMemStart, newArrayMemStart] = await lib.testAppendRealloc.callAsync(
|
||||
arr,
|
||||
freeMemOffset,
|
||||
addr,
|
||||
);
|
||||
expect(result).to.deep.equal(expected);
|
||||
expect(newArrayMemStart).bignumber.to.be.equal(oldArrayMemStart);
|
||||
});
|
||||
|
||||
it('should change memory address if free memory pointer advances', async () => {
|
||||
const arr = _.times(3, () => addressUtils.generatePseudoRandomAddress());
|
||||
const addr = addressUtils.generatePseudoRandomAddress();
|
||||
const freeMemOffset = new BigNumber(1);
|
||||
const expectedArray = [...arr, addr];
|
||||
const [result, oldArrayMemStart, newArrayMemStart] = await lib.testAppendRealloc.callAsync(
|
||||
arr,
|
||||
freeMemOffset,
|
||||
addr,
|
||||
);
|
||||
// The new location should be the end of the old array + freeMemOffset.
|
||||
const expectedNewArrayMemStart = oldArrayMemStart.plus((arr.length + 1) * 32).plus(freeMemOffset);
|
||||
expect(result).to.deep.equal(expectedArray);
|
||||
expect(newArrayMemStart).bignumber.to.be.equal(expectedNewArrayMemStart);
|
||||
});
|
||||
});
|
||||
|
||||
describe('contains', () => {
|
||||
it('should return false on an empty array', async () => {
|
||||
const addr = addressUtils.generatePseudoRandomAddress();
|
||||
const isFound = await lib.publicContains.callAsync([], addr);
|
||||
expect(isFound).to.equal(false);
|
||||
});
|
||||
|
||||
it('should return false on a missing item', async () => {
|
||||
const arr = _.times(3, () => addressUtils.generatePseudoRandomAddress());
|
||||
const addr = addressUtils.generatePseudoRandomAddress();
|
||||
const isFound = await lib.publicContains.callAsync(arr, addr);
|
||||
expect(isFound).to.equal(false);
|
||||
});
|
||||
|
||||
it('should return true on an included item', async () => {
|
||||
const arr = _.times(4, () => addressUtils.generatePseudoRandomAddress());
|
||||
const addr = _.sample(arr) as string;
|
||||
const isFound = await lib.publicContains.callAsync(arr, addr);
|
||||
expect(isFound).to.equal(true);
|
||||
});
|
||||
|
||||
it('should return true on the only item in the array', async () => {
|
||||
const arr = _.times(1, () => addressUtils.generatePseudoRandomAddress());
|
||||
const isFound = await lib.publicContains.callAsync(arr, arr[0]);
|
||||
expect(isFound).to.equal(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('indexOf', () => {
|
||||
it('should fail on an empty array', async () => {
|
||||
const addr = addressUtils.generatePseudoRandomAddress();
|
||||
const [isSuccess] = await lib.publicIndexOf.callAsync([], addr);
|
||||
expect(isSuccess).to.equal(false);
|
||||
});
|
||||
|
||||
it('should fail on a missing item', async () => {
|
||||
const arr = _.times(3, () => addressUtils.generatePseudoRandomAddress());
|
||||
const addr = addressUtils.generatePseudoRandomAddress();
|
||||
const [isSuccess] = await lib.publicIndexOf.callAsync(arr, addr);
|
||||
expect(isSuccess).to.equal(false);
|
||||
});
|
||||
|
||||
it('should succeed on an included item', async () => {
|
||||
const arr = _.times(4, () => addressUtils.generatePseudoRandomAddress());
|
||||
const expectedIndexOf = _.random(0, arr.length - 1);
|
||||
const addr = arr[expectedIndexOf];
|
||||
const [isSuccess, index] = await lib.publicIndexOf.callAsync(arr, addr);
|
||||
expect(isSuccess).to.equal(true);
|
||||
expect(index).bignumber.to.equal(expectedIndexOf);
|
||||
});
|
||||
|
||||
it('should succeed on the only item in the array', async () => {
|
||||
const arr = _.times(1, () => addressUtils.generatePseudoRandomAddress());
|
||||
const [isSuccess, index] = await lib.publicIndexOf.callAsync(arr, arr[0]);
|
||||
expect(isSuccess).to.equal(true);
|
||||
expect(index).bignumber.to.equal(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
// tslint:disable:max-file-line-count
|
@@ -3,12 +3,14 @@
|
||||
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
|
||||
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
|
||||
"files": [
|
||||
"generated-artifacts/Address.json",
|
||||
"generated-artifacts/IOwnable.json",
|
||||
"generated-artifacts/LibBytes.json",
|
||||
"generated-artifacts/Ownable.json",
|
||||
"generated-artifacts/ReentrancyGuard.json",
|
||||
"generated-artifacts/SafeMath.json",
|
||||
"generated-artifacts/TestConstants.json",
|
||||
"generated-artifacts/TestLibAddressArray.json",
|
||||
"generated-artifacts/TestLibBytes.json"
|
||||
],
|
||||
"exclude": ["./deploy/solc/solc_bin"]
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1553183790,
|
||||
"version": "6.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1553091633,
|
||||
"version": "6.0.4",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v6.0.5 - _March 21, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v6.0.4 - _March 20, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "0x.js",
|
||||
"version": "6.0.4",
|
||||
"version": "6.0.5",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -42,10 +42,10 @@
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen-wrappers": "^4.0.3",
|
||||
"@0x/contract-addresses": "^2.2.3",
|
||||
"@0x/dev-utils": "^2.1.4",
|
||||
"@0x/migrations": "^4.0.4",
|
||||
"@0x/abi-gen-wrappers": "^4.1.0",
|
||||
"@0x/contract-addresses": "^2.3.0",
|
||||
"@0x/dev-utils": "^2.2.0",
|
||||
"@0x/migrations": "^4.1.0",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^2.2.42",
|
||||
@@ -72,16 +72,16 @@
|
||||
"webpack": "^4.20.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/assert": "^2.0.7",
|
||||
"@0x/base-contract": "^5.0.3",
|
||||
"@0x/contract-wrappers": "^8.0.4",
|
||||
"@0x/order-utils": "^7.1.0",
|
||||
"@0x/order-watcher": "^4.0.4",
|
||||
"@0x/subproviders": "^4.0.3",
|
||||
"@0x/types": "^2.2.0",
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/web3-wrapper": "^6.0.3",
|
||||
"@0x/assert": "^2.0.8",
|
||||
"@0x/base-contract": "^5.0.4",
|
||||
"@0x/contract-wrappers": "^8.0.5",
|
||||
"@0x/order-utils": "^7.1.1",
|
||||
"@0x/order-watcher": "^4.0.5",
|
||||
"@0x/subproviders": "^4.0.4",
|
||||
"@0x/types": "^2.2.1",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"@0x/web3-wrapper": "^6.0.4",
|
||||
"@types/web3-provider-engine": "^14.0.0",
|
||||
"ethereum-types": "^2.1.1",
|
||||
"ethers": "~4.0.4",
|
||||
|
@@ -1,4 +1,14 @@
|
||||
[
|
||||
{
|
||||
"version": "4.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Add Coordinator and CoordinatorRegistry contract wrappers",
|
||||
"pr": 1689
|
||||
}
|
||||
],
|
||||
"timestamp": 1553183790
|
||||
},
|
||||
{
|
||||
"timestamp": 1553091633,
|
||||
"version": "4.0.3",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v4.1.0 - _March 21, 2019_
|
||||
|
||||
* Add Coordinator and CoordinatorRegistry contract wrappers (#1689)
|
||||
|
||||
## v4.0.3 - _March 20, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/abi-gen-wrappers",
|
||||
"version": "4.0.3",
|
||||
"version": "4.1.0",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -18,7 +18,7 @@
|
||||
"generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/abi-gen-templates/contract.handlebars --partials '../../node_modules/@0x/abi-gen-templates/partials/**/*.handlebars' --output src/generated-wrappers --backend ethers"
|
||||
},
|
||||
"config": {
|
||||
"abis": "../contract-artifacts/artifacts/@(AssetProxyOwner|DutchAuction|DummyERC20Token|DummyERC721Token|ERC20Proxy|ERC20Token|ERC721Proxy|ERC721Token|Exchange|Forwarder|IValidator|IWallet|MultiAssetProxy|OrderValidator|WETH9|ZRXToken).json"
|
||||
"abis": "../contract-artifacts/artifacts/@(AssetProxyOwner|DutchAuction|DummyERC20Token|DummyERC721Token|ERC20Proxy|ERC20Token|ERC721Proxy|ERC721Token|Exchange|Forwarder|IValidator|IWallet|MultiAssetProxy|OrderValidator|WETH9|ZRXToken|Coordinator|CoordinatorRegistry).json"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -30,19 +30,19 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-wrappers/README.md",
|
||||
"devDependencies": {
|
||||
"@0x/abi-gen": "^2.0.7",
|
||||
"@0x/abi-gen": "^2.0.8",
|
||||
"@0x/abi-gen-templates": "^2.0.1",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@0x/types": "^2.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/web3-wrapper": "^6.0.3",
|
||||
"@0x/types": "^2.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"@0x/web3-wrapper": "^6.0.4",
|
||||
"ethereum-types": "^2.1.1",
|
||||
"ethers": "~4.0.4",
|
||||
"lodash": "^4.17.11",
|
||||
"shx": "^0.2.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.0.3"
|
||||
"@0x/base-contract": "^5.0.4"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
@@ -14,7 +14,7 @@ import * as _ from 'lodash';
|
||||
/* istanbul ignore next */
|
||||
// tslint:disable:no-parameter-reassignment
|
||||
// tslint:disable-next-line:class-name
|
||||
export class TECContract extends BaseContract {
|
||||
export class CoordinatorContract extends BaseContract {
|
||||
public getSignerAddress = {
|
||||
async callAsync(
|
||||
hash: string,
|
||||
@@ -23,7 +23,7 @@ export class TECContract extends BaseContract {
|
||||
defaultBlock?: BlockParam,
|
||||
): Promise<string
|
||||
> {
|
||||
const self = this as any as TECContract;
|
||||
const self = this as any as CoordinatorContract;
|
||||
const encodedData = self._strictEncodeArguments('getSignerAddress(bytes32,bytes)', [hash,
|
||||
signature
|
||||
]);
|
||||
@@ -45,10 +45,86 @@ export class TECContract extends BaseContract {
|
||||
return result;
|
||||
},
|
||||
};
|
||||
public assertValidTransactionOrdersApproval = {
|
||||
public executeTransaction = {
|
||||
async sendTransactionAsync(
|
||||
transaction: {salt: BigNumber;signerAddress: string;data: string},
|
||||
txOrigin: string,
|
||||
transactionSignature: string,
|
||||
approvalExpirationTimeSeconds: BigNumber[],
|
||||
approvalSignatures: string[],
|
||||
txData: Partial<TxData> = {},
|
||||
): Promise<string> {
|
||||
const self = this as any as CoordinatorContract;
|
||||
const encodedData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),address,bytes,uint256[],bytes[])', [transaction,
|
||||
txOrigin,
|
||||
transactionSignature,
|
||||
approvalExpirationTimeSeconds,
|
||||
approvalSignatures
|
||||
]);
|
||||
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...txData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
self.executeTransaction.estimateGasAsync.bind(
|
||||
self,
|
||||
transaction,
|
||||
txOrigin,
|
||||
transactionSignature,
|
||||
approvalExpirationTimeSeconds,
|
||||
approvalSignatures
|
||||
),
|
||||
);
|
||||
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
|
||||
return txHash;
|
||||
},
|
||||
async estimateGasAsync(
|
||||
transaction: {salt: BigNumber;signerAddress: string;data: string},
|
||||
txOrigin: string,
|
||||
transactionSignature: string,
|
||||
approvalExpirationTimeSeconds: BigNumber[],
|
||||
approvalSignatures: string[],
|
||||
txData: Partial<TxData> = {},
|
||||
): Promise<number> {
|
||||
const self = this as any as CoordinatorContract;
|
||||
const encodedData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),address,bytes,uint256[],bytes[])', [transaction,
|
||||
txOrigin,
|
||||
transactionSignature,
|
||||
approvalExpirationTimeSeconds,
|
||||
approvalSignatures
|
||||
]);
|
||||
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...txData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
getABIEncodedTransactionData(
|
||||
transaction: {salt: BigNumber;signerAddress: string;data: string},
|
||||
txOrigin: string,
|
||||
transactionSignature: string,
|
||||
approvalExpirationTimeSeconds: BigNumber[],
|
||||
approvalSignatures: string[],
|
||||
): string {
|
||||
const self = this as any as CoordinatorContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),address,bytes,uint256[],bytes[])', [transaction,
|
||||
txOrigin,
|
||||
transactionSignature,
|
||||
approvalExpirationTimeSeconds,
|
||||
approvalSignatures
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
async callAsync(
|
||||
transaction: {salt: BigNumber;signerAddress: string;data: string},
|
||||
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
|
||||
txOrigin: string,
|
||||
transactionSignature: string,
|
||||
approvalExpirationTimeSeconds: BigNumber[],
|
||||
approvalSignatures: string[],
|
||||
@@ -56,9 +132,9 @@ export class TECContract extends BaseContract {
|
||||
defaultBlock?: BlockParam,
|
||||
): Promise<void
|
||||
> {
|
||||
const self = this as any as TECContract;
|
||||
const encodedData = self._strictEncodeArguments('assertValidTransactionOrdersApproval((uint256,address,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes,uint256[],bytes[])', [transaction,
|
||||
orders,
|
||||
const self = this as any as CoordinatorContract;
|
||||
const encodedData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),address,bytes,uint256[],bytes[])', [transaction,
|
||||
txOrigin,
|
||||
transactionSignature,
|
||||
approvalExpirationTimeSeconds,
|
||||
approvalSignatures
|
||||
@@ -73,7 +149,7 @@ export class TECContract extends BaseContract {
|
||||
);
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('assertValidTransactionOrdersApproval((uint256,address,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],bytes,uint256[],bytes[])');
|
||||
const abiEncoder = self._lookupAbiEncoder('executeTransaction((uint256,address,bytes),address,bytes,uint256[],bytes[])');
|
||||
// tslint:disable boolean-naming
|
||||
const result = abiEncoder.strictDecodeReturnValue<void
|
||||
>(rawCallResult);
|
||||
@@ -81,9 +157,10 @@ export class TECContract extends BaseContract {
|
||||
return result;
|
||||
},
|
||||
};
|
||||
public assertValidTECApprovals = {
|
||||
public assertValidCoordinatorApprovals = {
|
||||
async callAsync(
|
||||
transaction: {salt: BigNumber;signerAddress: string;data: string},
|
||||
txOrigin: string,
|
||||
transactionSignature: string,
|
||||
approvalExpirationTimeSeconds: BigNumber[],
|
||||
approvalSignatures: string[],
|
||||
@@ -91,8 +168,9 @@ export class TECContract extends BaseContract {
|
||||
defaultBlock?: BlockParam,
|
||||
): Promise<void
|
||||
> {
|
||||
const self = this as any as TECContract;
|
||||
const encodedData = self._strictEncodeArguments('assertValidTECApprovals((uint256,address,bytes),bytes,uint256[],bytes[])', [transaction,
|
||||
const self = this as any as CoordinatorContract;
|
||||
const encodedData = self._strictEncodeArguments('assertValidCoordinatorApprovals((uint256,address,bytes),address,bytes,uint256[],bytes[])', [transaction,
|
||||
txOrigin,
|
||||
transactionSignature,
|
||||
approvalExpirationTimeSeconds,
|
||||
approvalSignatures
|
||||
@@ -107,7 +185,7 @@ export class TECContract extends BaseContract {
|
||||
);
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('assertValidTECApprovals((uint256,address,bytes),bytes,uint256[],bytes[])');
|
||||
const abiEncoder = self._lookupAbiEncoder('assertValidCoordinatorApprovals((uint256,address,bytes),address,bytes,uint256[],bytes[])');
|
||||
// tslint:disable boolean-naming
|
||||
const result = abiEncoder.strictDecodeReturnValue<void
|
||||
>(rawCallResult);
|
||||
@@ -121,7 +199,7 @@ export class TECContract extends BaseContract {
|
||||
defaultBlock?: BlockParam,
|
||||
): Promise<string
|
||||
> {
|
||||
const self = this as any as TECContract;
|
||||
const self = this as any as CoordinatorContract;
|
||||
const encodedData = self._strictEncodeArguments('EIP712_DOMAIN_HASH()', []);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
@@ -141,78 +219,11 @@ export class TECContract extends BaseContract {
|
||||
return result;
|
||||
},
|
||||
};
|
||||
public executeTransaction = {
|
||||
async sendTransactionAsync(
|
||||
transaction: {salt: BigNumber;signerAddress: string;data: string},
|
||||
transactionSignature: string,
|
||||
approvalExpirationTimeSeconds: BigNumber[],
|
||||
approvalSignatures: string[],
|
||||
txData: Partial<TxData> = {},
|
||||
): Promise<string> {
|
||||
const self = this as any as TECContract;
|
||||
const encodedData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),bytes,uint256[],bytes[])', [transaction,
|
||||
transactionSignature,
|
||||
approvalExpirationTimeSeconds,
|
||||
approvalSignatures
|
||||
]);
|
||||
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...txData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
self.executeTransaction.estimateGasAsync.bind(
|
||||
self,
|
||||
transaction,
|
||||
transactionSignature,
|
||||
approvalExpirationTimeSeconds,
|
||||
approvalSignatures
|
||||
),
|
||||
);
|
||||
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
|
||||
return txHash;
|
||||
},
|
||||
async estimateGasAsync(
|
||||
transaction: {salt: BigNumber;signerAddress: string;data: string},
|
||||
transactionSignature: string,
|
||||
approvalExpirationTimeSeconds: BigNumber[],
|
||||
approvalSignatures: string[],
|
||||
txData: Partial<TxData> = {},
|
||||
): Promise<number> {
|
||||
const self = this as any as TECContract;
|
||||
const encodedData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),bytes,uint256[],bytes[])', [transaction,
|
||||
transactionSignature,
|
||||
approvalExpirationTimeSeconds,
|
||||
approvalSignatures
|
||||
]);
|
||||
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...txData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
getABIEncodedTransactionData(
|
||||
transaction: {salt: BigNumber;signerAddress: string;data: string},
|
||||
transactionSignature: string,
|
||||
approvalExpirationTimeSeconds: BigNumber[],
|
||||
approvalSignatures: string[],
|
||||
): string {
|
||||
const self = this as any as TECContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),bytes,uint256[],bytes[])', [transaction,
|
||||
transactionSignature,
|
||||
approvalExpirationTimeSeconds,
|
||||
approvalSignatures
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
public assertValidTransactionOrdersApproval = {
|
||||
async callAsync(
|
||||
transaction: {salt: BigNumber;signerAddress: string;data: string},
|
||||
orders: Array<{makerAddress: string;takerAddress: string;feeRecipientAddress: string;senderAddress: string;makerAssetAmount: BigNumber;takerAssetAmount: BigNumber;makerFee: BigNumber;takerFee: BigNumber;expirationTimeSeconds: BigNumber;salt: BigNumber;makerAssetData: string;takerAssetData: string}>,
|
||||
txOrigin: string,
|
||||
transactionSignature: string,
|
||||
approvalExpirationTimeSeconds: BigNumber[],
|
||||
approvalSignatures: string[],
|
||||
@@ -220,8 +231,10 @@ export class TECContract extends BaseContract {
|
||||
defaultBlock?: BlockParam,
|
||||
): Promise<void
|
||||
> {
|
||||
const self = this as any as TECContract;
|
||||
const encodedData = self._strictEncodeArguments('executeTransaction((uint256,address,bytes),bytes,uint256[],bytes[])', [transaction,
|
||||
const self = this as any as CoordinatorContract;
|
||||
const encodedData = self._strictEncodeArguments('assertValidTransactionOrdersApproval((uint256,address,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address,bytes,uint256[],bytes[])', [transaction,
|
||||
orders,
|
||||
txOrigin,
|
||||
transactionSignature,
|
||||
approvalExpirationTimeSeconds,
|
||||
approvalSignatures
|
||||
@@ -236,7 +249,7 @@ export class TECContract extends BaseContract {
|
||||
);
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('executeTransaction((uint256,address,bytes),bytes,uint256[],bytes[])');
|
||||
const abiEncoder = self._lookupAbiEncoder('assertValidTransactionOrdersApproval((uint256,address,bytes),(address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address,bytes,uint256[],bytes[])');
|
||||
// tslint:disable boolean-naming
|
||||
const result = abiEncoder.strictDecodeReturnValue<void
|
||||
>(rawCallResult);
|
||||
@@ -249,14 +262,14 @@ export class TECContract extends BaseContract {
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
_exchange: string,
|
||||
): Promise<TECContract> {
|
||||
): Promise<CoordinatorContract> {
|
||||
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 TECContract.deployAsync(bytecode, abi, provider, txDefaults, _exchange
|
||||
return CoordinatorContract.deployAsync(bytecode, abi, provider, txDefaults, _exchange
|
||||
);
|
||||
}
|
||||
public static async deployAsync(
|
||||
@@ -265,7 +278,7 @@ export class TECContract extends BaseContract {
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
_exchange: string,
|
||||
): Promise<TECContract> {
|
||||
): Promise<CoordinatorContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[_exchange
|
||||
@@ -288,14 +301,14 @@ export class TECContract extends BaseContract {
|
||||
const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
|
||||
logUtils.log(`transactionHash: ${txHash}`);
|
||||
const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
|
||||
logUtils.log(`TEC successfully deployed at ${txReceipt.contractAddress}`);
|
||||
const contractInstance = new TECContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
|
||||
logUtils.log(`Coordinator successfully deployed at ${txReceipt.contractAddress}`);
|
||||
const contractInstance = new CoordinatorContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
|
||||
contractInstance.constructorArgs = [_exchange
|
||||
];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('TEC', abi, address, supportedProvider, txDefaults);
|
||||
super('Coordinator', abi, address, supportedProvider, txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
@@ -10,20 +10,80 @@ import * as ethers from 'ethers';
|
||||
import * as _ from 'lodash';
|
||||
// tslint:enable:no-unused-variable
|
||||
|
||||
export type CoordinatorRegistryEventArgs =
|
||||
| CoordinatorRegistryCoordinatorEndpointSetEventArgs;
|
||||
|
||||
export enum CoordinatorRegistryEvents {
|
||||
CoordinatorEndpointSet = 'CoordinatorEndpointSet',
|
||||
}
|
||||
|
||||
export interface CoordinatorRegistryCoordinatorEndpointSetEventArgs extends DecodedLogArgs {
|
||||
coordinatorOperator: string;
|
||||
coordinatorEndpoint: string;
|
||||
}
|
||||
|
||||
|
||||
/* istanbul ignore next */
|
||||
// tslint:disable:no-parameter-reassignment
|
||||
// tslint:disable-next-line:class-name
|
||||
export class TestLibsContract extends BaseContract {
|
||||
public publicGetTransactionHash = {
|
||||
export class CoordinatorRegistryContract extends BaseContract {
|
||||
public setCoordinatorEndpoint = {
|
||||
async sendTransactionAsync(
|
||||
coordinatorEndpoint: string,
|
||||
txData: Partial<TxData> = {},
|
||||
): Promise<string> {
|
||||
const self = this as any as CoordinatorRegistryContract;
|
||||
const encodedData = self._strictEncodeArguments('setCoordinatorEndpoint(string)', [coordinatorEndpoint
|
||||
]);
|
||||
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...txData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
self.setCoordinatorEndpoint.estimateGasAsync.bind(
|
||||
self,
|
||||
coordinatorEndpoint
|
||||
),
|
||||
);
|
||||
const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults);
|
||||
return txHash;
|
||||
},
|
||||
async estimateGasAsync(
|
||||
coordinatorEndpoint: string,
|
||||
txData: Partial<TxData> = {},
|
||||
): Promise<number> {
|
||||
const self = this as any as CoordinatorRegistryContract;
|
||||
const encodedData = self._strictEncodeArguments('setCoordinatorEndpoint(string)', [coordinatorEndpoint
|
||||
]);
|
||||
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...txData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults);
|
||||
return gas;
|
||||
},
|
||||
getABIEncodedTransactionData(
|
||||
coordinatorEndpoint: string,
|
||||
): string {
|
||||
const self = this as any as CoordinatorRegistryContract;
|
||||
const abiEncodedTransactionData = self._strictEncodeArguments('setCoordinatorEndpoint(string)', [coordinatorEndpoint
|
||||
]);
|
||||
return abiEncodedTransactionData;
|
||||
},
|
||||
async callAsync(
|
||||
transaction: {salt: BigNumber;signerAddress: string;data: string},
|
||||
coordinatorEndpoint: string,
|
||||
callData: Partial<CallData> = {},
|
||||
defaultBlock?: BlockParam,
|
||||
): Promise<string
|
||||
): Promise<void
|
||||
> {
|
||||
const self = this as any as TestLibsContract;
|
||||
const encodedData = self._strictEncodeArguments('publicGetTransactionHash((uint256,address,bytes))', [transaction
|
||||
const self = this as any as CoordinatorRegistryContract;
|
||||
const encodedData = self._strictEncodeArguments('setCoordinatorEndpoint(string)', [coordinatorEndpoint
|
||||
]);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
@@ -35,23 +95,23 @@ export class TestLibsContract extends BaseContract {
|
||||
);
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('publicGetTransactionHash((uint256,address,bytes))');
|
||||
const abiEncoder = self._lookupAbiEncoder('setCoordinatorEndpoint(string)');
|
||||
// tslint:disable boolean-naming
|
||||
const result = abiEncoder.strictDecodeReturnValue<string
|
||||
const result = abiEncoder.strictDecodeReturnValue<void
|
||||
>(rawCallResult);
|
||||
// tslint:enable boolean-naming
|
||||
return result;
|
||||
},
|
||||
};
|
||||
public publicGetTECApprovalHash = {
|
||||
public getCoordinatorEndpoint = {
|
||||
async callAsync(
|
||||
approval: {transactionHash: string;transactionSignature: string;approvalExpirationTimeSeconds: BigNumber},
|
||||
coordinatorOperator: string,
|
||||
callData: Partial<CallData> = {},
|
||||
defaultBlock?: BlockParam,
|
||||
): Promise<string
|
||||
> {
|
||||
const self = this as any as TestLibsContract;
|
||||
const encodedData = self._strictEncodeArguments('publicGetTECApprovalHash((bytes32,bytes,uint256))', [approval
|
||||
const self = this as any as CoordinatorRegistryContract;
|
||||
const encodedData = self._strictEncodeArguments('getCoordinatorEndpoint(address)', [coordinatorOperator
|
||||
]);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
@@ -63,33 +123,7 @@ export class TestLibsContract extends BaseContract {
|
||||
);
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('publicGetTECApprovalHash((bytes32,bytes,uint256))');
|
||||
// tslint:disable boolean-naming
|
||||
const result = abiEncoder.strictDecodeReturnValue<string
|
||||
>(rawCallResult);
|
||||
// tslint:enable boolean-naming
|
||||
return result;
|
||||
},
|
||||
};
|
||||
public EIP712_DOMAIN_HASH = {
|
||||
async callAsync(
|
||||
callData: Partial<CallData> = {},
|
||||
defaultBlock?: BlockParam,
|
||||
): Promise<string
|
||||
> {
|
||||
const self = this as any as TestLibsContract;
|
||||
const encodedData = self._strictEncodeArguments('EIP712_DOMAIN_HASH()', []);
|
||||
const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
|
||||
{
|
||||
to: self.address,
|
||||
...callData,
|
||||
data: encodedData,
|
||||
},
|
||||
self._web3Wrapper.getContractDefaults(),
|
||||
);
|
||||
const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock);
|
||||
BaseContract._throwIfRevertWithReasonCallResult(rawCallResult);
|
||||
const abiEncoder = self._lookupAbiEncoder('EIP712_DOMAIN_HASH()');
|
||||
const abiEncoder = self._lookupAbiEncoder('getCoordinatorEndpoint(address)');
|
||||
// tslint:disable boolean-naming
|
||||
const result = abiEncoder.strictDecodeReturnValue<string
|
||||
>(rawCallResult);
|
||||
@@ -101,21 +135,21 @@ export class TestLibsContract extends BaseContract {
|
||||
artifact: ContractArtifact | SimpleContractArtifact,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<TestLibsContract> {
|
||||
): Promise<CoordinatorRegistryContract> {
|
||||
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 TestLibsContract.deployAsync(bytecode, abi, provider, txDefaults, );
|
||||
return CoordinatorRegistryContract.deployAsync(bytecode, abi, provider, txDefaults, );
|
||||
}
|
||||
public static async deployAsync(
|
||||
bytecode: string,
|
||||
abi: ContractAbi,
|
||||
supportedProvider: SupportedProvider,
|
||||
txDefaults: Partial<TxData>,
|
||||
): Promise<TestLibsContract> {
|
||||
): Promise<CoordinatorRegistryContract> {
|
||||
const provider = providerUtils.standardizeOrThrow(supportedProvider);
|
||||
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
|
||||
[] = BaseContract._formatABIDataItemList(
|
||||
@@ -135,13 +169,13 @@ export class TestLibsContract extends BaseContract {
|
||||
const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults);
|
||||
logUtils.log(`transactionHash: ${txHash}`);
|
||||
const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
|
||||
logUtils.log(`TestLibs successfully deployed at ${txReceipt.contractAddress}`);
|
||||
const contractInstance = new TestLibsContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
|
||||
logUtils.log(`CoordinatorRegistry successfully deployed at ${txReceipt.contractAddress}`);
|
||||
const contractInstance = new CoordinatorRegistryContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
|
||||
contractInstance.constructorArgs = [];
|
||||
return contractInstance;
|
||||
}
|
||||
constructor(abi: ContractAbi, address: string, supportedProvider: SupportedProvider, txDefaults?: Partial<TxData>) {
|
||||
super('TestLibs', abi, address, supportedProvider, txDefaults);
|
||||
super('CoordinatorRegistry', abi, address, supportedProvider, txDefaults);
|
||||
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
@@ -14,3 +14,5 @@ export * from './generated-wrappers/multi_asset_proxy';
|
||||
export * from './generated-wrappers/order_validator';
|
||||
export * from './generated-wrappers/weth9';
|
||||
export * from './generated-wrappers/zrx_token';
|
||||
export * from './generated-wrappers/coordinator';
|
||||
export * from './generated-wrappers/coordinator_registry';
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1553183790,
|
||||
"version": "2.0.8",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1553091633,
|
||||
"version": "2.0.7",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.8 - _March 21, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.7 - _March 20, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/abi-gen",
|
||||
"version": "2.0.7",
|
||||
"version": "2.0.8",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -31,8 +31,8 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md",
|
||||
"dependencies": {
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"chalk": "^2.3.0",
|
||||
"ethereum-types": "^2.1.1",
|
||||
"glob": "^7.1.2",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1553183790,
|
||||
"version": "2.0.8",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1553091633,
|
||||
"version": "2.0.7",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.8 - _March 21, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.7 - _March 20, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/assert",
|
||||
"version": "2.0.7",
|
||||
"version": "2.0.8",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -44,9 +44,9 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/json-schemas": "^3.0.7",
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/json-schemas": "^3.0.8",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"lodash": "^4.17.11",
|
||||
"valid-url": "^1.0.9"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1553183790,
|
||||
"version": "6.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1553091633,
|
||||
"version": "6.0.4",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v6.0.5 - _March 21, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v6.0.4 - _March 20, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/asset-buyer",
|
||||
"version": "6.0.4",
|
||||
"version": "6.0.5",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -36,16 +36,16 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/asset-buyer/README.md",
|
||||
"dependencies": {
|
||||
"@0x/assert": "^2.0.7",
|
||||
"@0x/connect": "^5.0.3",
|
||||
"@0x/contract-wrappers": "^8.0.4",
|
||||
"@0x/json-schemas": "^3.0.7",
|
||||
"@0x/order-utils": "^7.1.0",
|
||||
"@0x/subproviders": "^4.0.3",
|
||||
"@0x/types": "^2.2.0",
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/web3-wrapper": "^6.0.3",
|
||||
"@0x/assert": "^2.0.8",
|
||||
"@0x/connect": "^5.0.4",
|
||||
"@0x/contract-wrappers": "^8.0.5",
|
||||
"@0x/json-schemas": "^3.0.8",
|
||||
"@0x/order-utils": "^7.1.1",
|
||||
"@0x/subproviders": "^4.0.4",
|
||||
"@0x/types": "^2.2.1",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"@0x/web3-wrapper": "^6.0.4",
|
||||
"ethereum-types": "^2.1.1",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1553183790,
|
||||
"version": "5.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1553091633,
|
||||
"version": "5.0.3",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v5.0.4 - _March 21, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v5.0.3 - _March 20, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/base-contract",
|
||||
"version": "5.0.3",
|
||||
"version": "5.0.4",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -40,9 +40,9 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/web3-wrapper": "^6.0.3",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"@0x/web3-wrapper": "^6.0.4",
|
||||
"ethereum-types": "^2.1.1",
|
||||
"ethers": "~4.0.4",
|
||||
"lodash": "^4.17.11"
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1553183790,
|
||||
"version": "5.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "5.0.3",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v5.0.4 - _March 21, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v5.0.3 - _March 20, 2019_
|
||||
|
||||
* Update websocket@^1.0.25 -> websocket@^1.0.26 (#1685)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/connect",
|
||||
"version": "5.0.3",
|
||||
"version": "5.0.4",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -44,12 +44,12 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md",
|
||||
"dependencies": {
|
||||
"@0x/assert": "^2.0.7",
|
||||
"@0x/json-schemas": "^3.0.7",
|
||||
"@0x/order-utils": "^7.1.0",
|
||||
"@0x/types": "^2.2.0",
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/assert": "^2.0.8",
|
||||
"@0x/json-schemas": "^3.0.8",
|
||||
"@0x/order-utils": "^7.1.1",
|
||||
"@0x/types": "^2.2.1",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"lodash": "^4.17.11",
|
||||
"query-string": "^6.0.0",
|
||||
"sinon": "^4.0.0",
|
||||
|
@@ -1,13 +1,17 @@
|
||||
[
|
||||
{
|
||||
"version": "2.2.3",
|
||||
"version": "2.3.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Add addresses for coordinator extension contract and coordinator registry",
|
||||
"pr": 1689
|
||||
},
|
||||
{
|
||||
"note": "Added Dutch Auction mainnet address",
|
||||
"pr": 1715
|
||||
}
|
||||
],
|
||||
"timestamp": 1553091633
|
||||
"timestamp": 1553183790
|
||||
},
|
||||
{
|
||||
"version": "2.2.2",
|
||||
|
@@ -5,8 +5,9 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.2.3 - _March 20, 2019_
|
||||
## v2.3.0 - _March 21, 2019_
|
||||
|
||||
* Add addresses for coordinator extension contract and coordinator registry (#1689)
|
||||
* Added Dutch Auction mainnet address (#1715)
|
||||
|
||||
## v2.2.2 - _February 25, 2019_
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contract-addresses",
|
||||
"version": "2.2.3",
|
||||
"version": "2.3.0",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
|
@@ -10,6 +10,8 @@ export interface ContractAddresses {
|
||||
forwarder: string;
|
||||
orderValidator: string;
|
||||
dutchAuction: string;
|
||||
coordinatorRegistry: string;
|
||||
coordinator: string;
|
||||
}
|
||||
|
||||
export enum NetworkId {
|
||||
@@ -33,6 +35,8 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
|
||||
forwarder: '0x5468a1dc173652ee28d249c271fa9933144746b1',
|
||||
orderValidator: '0x9463e518dea6810309563c81d5266c1b1d149138',
|
||||
dutchAuction: '0x07b32a653754945666cfca91168bb207323dfe67',
|
||||
coordinatorRegistry: '0x45797531b873fd5e519477a070a955764c1a5b07',
|
||||
coordinator: '0x24675738816c87ad37e712cc24f309a0c906187f',
|
||||
},
|
||||
3: {
|
||||
erc20Proxy: '0xb1408f4c245a23c31b98d2c626777d4c0d766caa',
|
||||
@@ -44,6 +48,8 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
|
||||
forwarder: '0x2240dab907db71e64d3e0dba4800c83b5c502d4e',
|
||||
orderValidator: '0x90431a90516ab49af23a0530e04e8c7836e7122f',
|
||||
dutchAuction: '0x2df6b59309f35ada230ec7d61d7d97355017a1df',
|
||||
coordinatorRegistry: '0x403cc23e88c17c4652fb904784d1af640a6722d9',
|
||||
coordinator: '0xc442300dcb4df1ff1db0173e77556dc559de6006',
|
||||
},
|
||||
4: {
|
||||
exchange: '0xbce0b5f6eb618c565c3e5f5cd69652bbc279f44e',
|
||||
@@ -55,6 +61,8 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
|
||||
forwarder: '0x2d40589abbdee84961f3a7656b9af7adb0ee5ab4',
|
||||
orderValidator: '0x0c5173a51e26b29d6126c686756fb9fbef71f762',
|
||||
dutchAuction: '0xdd7bd6437e67c422879364740ab5855fe3dc41f7',
|
||||
coordinatorRegistry: '0x1084b6a398e47907bae43fec3ff4b677db6e4fee',
|
||||
coordinator: '0xc05e6c01b83eeedecac2f7bab9367da4d4c108df',
|
||||
},
|
||||
42: {
|
||||
erc20Proxy: '0xf1ec01d6236d3cd881a0bf0130ea25fe4234003e',
|
||||
@@ -66,6 +74,8 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
|
||||
forwarder: '0x17992e4ffb22730138e4b62aaa6367fa9d3699a6',
|
||||
orderValidator: '0xb389da3d204b412df2f75c6afb3d0a7ce0bc283d',
|
||||
dutchAuction: '0xe11667fb51f34c5367f40d7e379327ce32ee7150',
|
||||
coordinatorRegistry: '0x09fb99968c016a3ff537bf58fb3d9fe55a7975d5',
|
||||
coordinator: '0x04b2b090bad68b254881d7eb645a258ce66cc998',
|
||||
},
|
||||
// NetworkId 50 represents our Ganache snapshot generated from migrations.
|
||||
50: {
|
||||
@@ -78,6 +88,8 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
|
||||
forwarder: '0x6000eca38b8b5bba64986182fe2a69c57f6b5414',
|
||||
orderValidator: '0x32eecaf51dfea9618e9bc94e9fbfddb1bbdcba15',
|
||||
dutchAuction: '0x7e3f4e1deb8d3a05d9d2da87d9521268d0ec3239',
|
||||
coordinatorRegistry: '0xaa86dda78e9434aca114b6676fc742a18d15a1cc',
|
||||
coordinator: '0x4d3d5c850dd5bd9d6f4adda3dd039a3c8054ca29',
|
||||
},
|
||||
};
|
||||
|
||||
|
@@ -1,4 +1,14 @@
|
||||
[
|
||||
{
|
||||
"version": "1.4.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Added artifact for `Coordinaotr` and `CoordinatorRegistry` contracts",
|
||||
"pr": 1689
|
||||
}
|
||||
],
|
||||
"timestamp": 1553183790
|
||||
},
|
||||
{
|
||||
"version": "1.3.0",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.4.0 - _March 21, 2019_
|
||||
|
||||
* Added artifact for `Coordinaotr` and `CoordinatorRegistry` contracts (#1689)
|
||||
|
||||
## v1.3.0 - _January 15, 2019_
|
||||
|
||||
* Added artifact for `MultiAssetProxy` contract (#1503)
|
||||
|
364
packages/contract-artifacts/artifacts/Coordinator.json
generated
Normal file
364
packages/contract-artifacts/artifacts/Coordinator.json
generated
Normal file
File diff suppressed because one or more lines are too long
122
packages/contract-artifacts/artifacts/CoordinatorRegistry.json
generated
Normal file
122
packages/contract-artifacts/artifacts/CoordinatorRegistry.json
generated
Normal file
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contract-artifacts",
|
||||
"version": "1.3.0",
|
||||
"version": "1.4.0",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
|
@@ -1,4 +1,6 @@
|
||||
import * as AssetProxyOwner from '../artifacts/AssetProxyOwner.json';
|
||||
import * as Coordinator from '../artifacts/Coordinator.json';
|
||||
import * as CoordinatorRegistry from '../artifacts/CoordinatorRegistry.json';
|
||||
import * as DummyERC20Token from '../artifacts/DummyERC20Token.json';
|
||||
import * as DummyERC721Token from '../artifacts/DummyERC721Token.json';
|
||||
import * as DutchAuction from '../artifacts/DutchAuction.json';
|
||||
@@ -32,4 +34,6 @@ export {
|
||||
OrderValidator,
|
||||
WETH9,
|
||||
ZRXToken,
|
||||
Coordinator,
|
||||
CoordinatorRegistry,
|
||||
};
|
||||
|
@@ -22,6 +22,8 @@
|
||||
"./artifacts/MultiAssetProxy.json",
|
||||
"./artifacts/OrderValidator.json",
|
||||
"./artifacts/WETH9.json",
|
||||
"./artifacts/ZRXToken.json"
|
||||
"./artifacts/ZRXToken.json",
|
||||
"./artifacts/CoordinatorRegistry.json",
|
||||
"./artifacts/Coordinator.json"
|
||||
]
|
||||
}
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1553183790,
|
||||
"version": "8.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1553091633,
|
||||
"version": "8.0.4",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v8.0.5 - _March 21, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v8.0.4 - _March 20, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/contract-wrappers",
|
||||
"version": "8.0.4",
|
||||
"version": "8.0.5",
|
||||
"description": "Smart TS wrappers for 0x smart contracts",
|
||||
"keywords": [
|
||||
"0xproject",
|
||||
@@ -37,11 +37,11 @@
|
||||
"node": ">=6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0x/contracts-test-utils": "^3.1.0",
|
||||
"@0x/dev-utils": "^2.1.4",
|
||||
"@0x/fill-scenarios": "^3.0.3",
|
||||
"@0x/migrations": "^4.0.4",
|
||||
"@0x/subproviders": "^4.0.3",
|
||||
"@0x/contracts-test-utils": "^3.1.1",
|
||||
"@0x/dev-utils": "^2.2.0",
|
||||
"@0x/fill-scenarios": "^3.0.4",
|
||||
"@0x/migrations": "^4.1.0",
|
||||
"@0x/subproviders": "^4.0.4",
|
||||
"@0x/tslint-config": "^3.0.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^2.2.42",
|
||||
@@ -67,16 +67,16 @@
|
||||
"web3-provider-engine": "14.0.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/abi-gen-wrappers": "^4.0.3",
|
||||
"@0x/assert": "^2.0.7",
|
||||
"@0x/contract-addresses": "^2.2.3",
|
||||
"@0x/contract-artifacts": "^1.3.0",
|
||||
"@0x/json-schemas": "^3.0.7",
|
||||
"@0x/order-utils": "^7.1.0",
|
||||
"@0x/types": "^2.2.0",
|
||||
"@0x/typescript-typings": "^4.2.0",
|
||||
"@0x/utils": "^4.2.3",
|
||||
"@0x/web3-wrapper": "^6.0.3",
|
||||
"@0x/abi-gen-wrappers": "^4.1.0",
|
||||
"@0x/assert": "^2.0.8",
|
||||
"@0x/contract-addresses": "^2.3.0",
|
||||
"@0x/contract-artifacts": "^1.4.0",
|
||||
"@0x/json-schemas": "^3.0.8",
|
||||
"@0x/order-utils": "^7.1.1",
|
||||
"@0x/types": "^2.2.1",
|
||||
"@0x/typescript-typings": "^4.2.1",
|
||||
"@0x/utils": "^4.3.0",
|
||||
"@0x/web3-wrapper": "^6.0.4",
|
||||
"ethereum-types": "^2.1.1",
|
||||
"ethereumjs-abi": "0.6.5",
|
||||
"ethereumjs-blockstream": "6.0.0",
|
||||
|
@@ -2,7 +2,7 @@ import { ContractAddresses } from '@0x/contract-addresses';
|
||||
import { BlockchainLifecycle, callbackErrorReporter } from '@0x/dev-utils';
|
||||
import { EmptyWalletSubprovider, Web3ProviderEngine } from '@0x/subproviders';
|
||||
import { DoneCallback } from '@0x/types';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { BigNumber, providerUtils } from '@0x/utils';
|
||||
import * as chai from 'chai';
|
||||
import 'mocha';
|
||||
|
||||
@@ -628,6 +628,6 @@ function addEmptyWalletSubprovider(p: Web3ProviderEngine): Web3ProviderEngine {
|
||||
for (const subprovider of currentSubproviders) {
|
||||
providerEngine.addProvider(subprovider);
|
||||
}
|
||||
providerEngine.start();
|
||||
providerUtils.startProviderEngine(providerEngine);
|
||||
return providerEngine;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user