merge development

This commit is contained in:
Fabio Berger
2019-03-20 17:07:02 +01:00
152 changed files with 2372 additions and 534 deletions

View File

@@ -18,7 +18,8 @@
"note": "Integration testing for ERC1155Proxy",
"pr": 1673
}
]
],
"timestamp": 1553091633
},
{
"timestamp": 1551479279,

View File

@@ -5,6 +5,13 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.0.0 - _March 20, 2019_
* Do not reexport external dependencies (#1682)
* Add ERC1155Proxy (#1661)
* Bumped solidity version to ^0.5.5 (#1701)
* Integration testing for ERC1155Proxy (#1673)
## v1.0.9 - _March 1, 2019_
* Dependencies updated

View File

@@ -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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-asset-proxy",
"version": "1.0.9",
"version": "2.0.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.6",
"@0x/contracts-gen": "^1.0.5",
"@0x/contracts-test-utils": "^3.0.8",
"@0x/dev-utils": "^2.1.3",
"@0x/sol-compiler": "^3.1.3",
"@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/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.2",
"@0x/contracts-erc20": "^1.0.9",
"@0x/contracts-erc721": "^1.0.9",
"@0x/contracts-erc1155": "^1.0.0",
"@0x/contracts-utils": "^2.0.8",
"@0x/order-utils": "^7.0.2",
"@0x/types": "^2.1.1",
"@0x/typescript-typings": "^4.1.0",
"@0x/utils": "^4.2.2",
"@0x/web3-wrapper": "^6.0.2",
"ethereum-types": "^2.1.0",
"@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",
"ethereum-types": "^2.1.1",
"lodash": "^4.17.11"
},
"publishConfig": {

View File

@@ -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);
});
});

View File

@@ -17,6 +17,7 @@
"note": "Set `evmVersion` to `constantinople`",
"pr": 1707
}
]
],
"timestamp": 1553091633
}
]

View File

@@ -4,3 +4,10 @@ Edit the package's CHANGELOG.json file only.
-->
CHANGELOG
## v1.0.0 - _March 20, 2019_
* Created Coordinator package
* Use separate EIP712 domains for transactions and approvals (#1705)
* Add `SignatureType.Invalid` (#1705)
* Set `evmVersion` to `constantinople` (#1707)

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-coordinator",
"version": "0.0.1",
"version": "1.0.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.6",
"@0x/contracts-gen": "^1.0.5",
"@0x/contracts-test-utils": "^3.0.8",
"@0x/dev-utils": "^2.1.3",
"@0x/sol-compiler": "^3.1.3",
"@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/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.2",
"@0x/contracts-asset-proxy": "^1.0.9",
"@0x/contracts-erc20": "^1.0.9",
"@0x/base-contract": "^5.0.3",
"@0x/contracts-asset-proxy": "^2.0.0",
"@0x/contracts-erc20": "^2.0.0",
"@0x/contracts-exchange": "1.0.2",
"@0x/contracts-exchange-libs": "^1.1.3",
"@0x/contracts-utils": "^2.0.8",
"@0x/order-utils": "^7.0.2",
"@0x/types": "^2.1.1",
"@0x/typescript-typings": "^4.1.0",
"@0x/utils": "^4.2.2",
"@0x/web3-wrapper": "^6.0.2",
"ethereum-types": "^2.1.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",
"ethereum-types": "^2.1.1",
"ethereumjs-util": "^5.1.1",
"lodash": "^4.17.11"
},

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1553091633,
"version": "1.0.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.0.0",
"changes": [

View File

@@ -4,3 +4,11 @@ Edit the package's CHANGELOG.json file only.
-->
CHANGELOG
## v1.0.1 - _March 20, 2019_
* Dependencies updated
## v1.0.0 - _Invalid date_
* Created ERC1155 contracts package (#1657)

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc1155",
"version": "1.0.0",
"version": "1.0.1",
"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.6",
"@0x/contracts-gen": "^1.0.5",
"@0x/contracts-test-utils": "^3.0.8",
"@0x/dev-utils": "^2.1.3",
"@0x/sol-compiler": "^3.1.3",
"@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/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.2",
"@0x/contracts-utils": "^2.0.8",
"@0x/types": "^2.1.1",
"@0x/typescript-typings": "^4.1.0",
"@0x/utils": "^4.2.2",
"@0x/web3-wrapper": "^6.0.2",
"ethereum-types": "^2.1.0",
"@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",
"ethereum-types": "^2.1.1",
"lodash": "^4.17.11"
},
"publishConfig": {

View File

@@ -6,7 +6,8 @@
"note": "Upgrade contracts to Solidity 0.5.5",
"pr": 1682
}
]
],
"timestamp": 1553091633
},
{
"timestamp": 1551479279,

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.0.0 - _March 20, 2019_
* Upgrade contracts to Solidity 0.5.5 (#1682)
## v1.0.9 - _March 1, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc20",
"version": "1.0.9",
"version": "2.0.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.6",
"@0x/contracts-gen": "^1.0.5",
"@0x/contracts-test-utils": "^3.0.8",
"@0x/dev-utils": "^2.1.3",
"@0x/sol-compiler": "^3.1.3",
"@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/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.2",
"@0x/contracts-exchange-libs": "^1.1.3",
"@0x/contracts-utils": "^2.0.8",
"@0x/types": "^2.1.1",
"@0x/typescript-typings": "^4.1.0",
"@0x/utils": "^4.2.2",
"@0x/web3-wrapper": "^6.0.2",
"ethereum-types": "^2.1.0",
"@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",
"ethereum-types": "^2.1.1",
"lodash": "^4.17.11"
},
"publishConfig": {

View File

@@ -6,7 +6,8 @@
"note": "Upgrade contracts to Solidity 0.5.5",
"pr": 1682
}
]
],
"timestamp": 1553091633
},
{
"timestamp": 1551479279,

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.0.0 - _March 20, 2019_
* Upgrade contracts to Solidity 0.5.5 (#1682)
## v1.0.9 - _March 1, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc721",
"version": "1.0.9",
"version": "2.0.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.6",
"@0x/contracts-gen": "^1.0.5",
"@0x/contracts-test-utils": "^3.0.8",
"@0x/dev-utils": "^2.1.3",
"@0x/sol-compiler": "^3.1.3",
"@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/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.2",
"@0x/contracts-utils": "^2.0.8",
"@0x/types": "^2.1.1",
"@0x/typescript-typings": "^4.1.0",
"@0x/utils": "^4.2.2",
"@0x/web3-wrapper": "^6.0.2",
"ethereum-types": "^2.1.0",
"@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",
"ethereum-types": "^2.1.1",
"lodash": "^4.17.11"
},
"publishConfig": {

View File

@@ -6,7 +6,8 @@
"note": "Do not reexport external dependencies",
"pr": 1682
}
]
],
"timestamp": 1553091633
},
{
"timestamp": 1551479279,

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.0.0 - _March 20, 2019_
* Do not reexport external dependencies (#1682)
## v1.0.9 - _March 1, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange-forwarder",
"version": "1.0.9",
"version": "2.0.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.6",
"@0x/contract-wrappers": "^8.0.3",
"@0x/contracts-gen": "^1.0.5",
"@0x/contracts-test-utils": "^3.0.8",
"@0x/dev-utils": "^2.1.3",
"@0x/sol-compiler": "^3.1.3",
"@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/tslint-config": "^3.0.0",
"@types/lodash": "4.14.104",
"@types/node": "*",
@@ -68,19 +68,19 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^5.0.2",
"@0x/contracts-asset-proxy": "^1.0.9",
"@0x/base-contract": "^5.0.3",
"@0x/contracts-asset-proxy": "^2.0.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.0.2",
"@0x/types": "^2.1.1",
"@0x/typescript-typings": "^4.1.0",
"@0x/utils": "^4.2.2",
"@0x/web3-wrapper": "^6.0.2",
"ethereum-types": "^2.1.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",
"ethereum-types": "^2.1.1",
"lodash": "^4.17.11"
},
"publishConfig": {

View File

@@ -6,7 +6,8 @@
"note": "Upgrade contracts to Solidity 0.5.5",
"pr": 1682
}
]
],
"timestamp": 1553091633
},
{
"timestamp": 1551479279,

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.0.0 - _March 20, 2019_
* Upgrade contracts to Solidity 0.5.5 (#1682)
## v1.1.3 - _March 1, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange-libs",
"version": "1.1.3",
"version": "2.0.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.6",
"@0x/contracts-gen": "^1.0.5",
"@0x/contracts-test-utils": "^3.0.8",
"@0x/dev-utils": "^2.1.3",
"@0x/sol-compiler": "^3.1.3",
"@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/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.2",
"@0x/contracts-utils": "^2.0.8",
"@0x/order-utils": "^7.0.2",
"@0x/types": "^2.1.1",
"@0x/typescript-typings": "^4.1.0",
"@0x/utils": "^4.2.2",
"@0x/web3-wrapper": "^6.0.2",
"ethereum-types": "^2.1.0",
"@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",
"ethereum-types": "^2.1.1",
"lodash": "^4.17.11"
},
"publishConfig": {

View File

@@ -14,7 +14,8 @@
"note": "Integration testing for ERC1155Proxy",
"pr": 1673
}
]
],
"timestamp": 1553091633
},
{
"timestamp": 1551479279,

View File

@@ -5,6 +5,12 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.0.0 - _March 20, 2019_
* Do not reexport external dependencies (#1682)
* Upgrade contracts to Solidity 0.5.5 (#1682)
* Integration testing for ERC1155Proxy (#1673)
## v1.0.9 - _March 1, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange",
"version": "1.0.9",
"version": "2.0.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.6",
"@0x/contracts-gen": "^1.0.5",
"@0x/contracts-test-utils": "^3.0.8",
"@0x/dev-utils": "^2.1.3",
"@0x/sol-compiler": "^3.1.3",
"@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/tslint-config": "^3.0.0",
"@types/lodash": "4.14.104",
"@types/node": "*",
@@ -67,19 +67,19 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^5.0.2",
"@0x/contracts-asset-proxy": "^1.0.9",
"@0x/contracts-erc20": "^1.0.9",
"@0x/contracts-erc721": "^1.0.9",
"@0x/contracts-erc1155": "^1.0.0",
"@0x/contracts-exchange-libs": "^1.1.3",
"@0x/contracts-utils": "^2.0.8",
"@0x/order-utils": "^7.0.2",
"@0x/types": "^2.1.1",
"@0x/typescript-typings": "^4.1.0",
"@0x/utils": "^4.2.2",
"@0x/web3-wrapper": "^6.0.2",
"ethereum-types": "^2.1.0",
"@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",
"ethereum-types": "^2.1.1",
"ethereumjs-util": "^5.1.1",
"lodash": "^4.17.11"
},

View File

@@ -10,7 +10,8 @@
"note": "Upgrade contracts to Solidity 0.5.5",
"pr": 1682
}
]
],
"timestamp": 1553091633
},
{
"timestamp": 1551479279,

View File

@@ -5,6 +5,11 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.0.0 - _March 20, 2019_
* Do not reexport external dependencies (#1682)
* Upgrade contracts to Solidity 0.5.5 (#1682)
## v2.0.8 - _March 1, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-extensions",
"version": "2.0.8",
"version": "3.0.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.6",
"@0x/contract-wrappers": "^8.0.3",
"@0x/contracts-gen": "^1.0.5",
"@0x/contracts-test-utils": "^3.0.8",
"@0x/dev-utils": "^2.1.3",
"@0x/sol-compiler": "^3.1.3",
"@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/tslint-config": "^3.0.0",
"@types/lodash": "4.14.104",
"@types/node": "*",
@@ -68,19 +68,19 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^5.0.2",
"@0x/contracts-asset-proxy": "^1.0.9",
"@0x/contracts-erc20": "^1.0.9",
"@0x/contracts-erc721": "^1.0.9",
"@0x/contracts-exchange": "^1.0.9",
"@0x/contracts-exchange-libs": "^1.1.3",
"@0x/contracts-utils": "^2.0.8",
"@0x/order-utils": "^7.0.2",
"@0x/types": "^2.1.1",
"@0x/typescript-typings": "^4.1.0",
"@0x/utils": "^4.2.2",
"@0x/web3-wrapper": "^6.0.2",
"ethereum-types": "^2.1.0",
"@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",
"ethereum-types": "^2.1.1",
"lodash": "^4.17.11"
},
"publishConfig": {

View File

@@ -6,7 +6,8 @@
"note": "Do not reexport external dependencies",
"pr": 1682
}
]
],
"timestamp": 1553091633
},
{
"timestamp": 1551479279,

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.0.0 - _March 20, 2019_
* Do not reexport external dependencies (#1682)
## v2.0.8 - _March 1, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-multisig",
"version": "2.0.8",
"version": "3.0.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.6",
"@0x/contracts-gen": "^1.0.5",
"@0x/contracts-test-utils": "^3.0.8",
"@0x/dev-utils": "^2.1.3",
"@0x/sol-compiler": "^3.1.3",
"@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/tslint-config": "^3.0.0",
"@types/lodash": "4.14.104",
"@types/node": "*",
@@ -67,15 +67,15 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^5.0.2",
"@0x/contracts-asset-proxy": "^1.0.9",
"@0x/contracts-erc20": "^1.0.9",
"@0x/base-contract": "^5.0.3",
"@0x/contracts-asset-proxy": "^2.0.0",
"@0x/contracts-erc20": "^2.0.0",
"@0x/contracts-utils": "2.0.1",
"@0x/types": "^2.1.1",
"@0x/typescript-typings": "^4.1.0",
"@0x/utils": "^4.2.2",
"@0x/web3-wrapper": "^6.0.2",
"ethereum-types": "^2.1.0",
"@0x/types": "^2.2.0",
"@0x/typescript-typings": "^4.2.0",
"@0x/utils": "^4.2.3",
"@0x/web3-wrapper": "^6.0.3",
"ethereum-types": "^2.1.1",
"lodash": "^4.17.11"
},
"publishConfig": {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,302 @@
// 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 TECContract extends BaseContract {
public getSignerAddress = {
async callAsync(
hash: string,
signature: string,
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string
> {
const self = this as any as TECContract;
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 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,
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 TECContract;
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 TECContract;
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 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;
},
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 TECContract;
const encodedData = self._strictEncodeArguments('executeTransaction((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('executeTransaction((uint256,address,bytes),bytes,uint256[],bytes[])');
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue<void
>(rawCallResult);
// tslint:enable boolean-naming
return result;
},
};
public static async deployFrom0xArtifactAsync(
artifact: ContractArtifact | SimpleContractArtifact,
supportedProvider: SupportedProvider,
txDefaults: Partial<TxData>,
_exchange: string,
): Promise<TECContract> {
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
);
}
public static async deployAsync(
bytecode: string,
abi: ContractAbi,
supportedProvider: SupportedProvider,
txDefaults: Partial<TxData>,
_exchange: string,
): Promise<TECContract> {
const provider = providerUtils.standardizeOrThrow(supportedProvider);
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
[_exchange
] = BaseContract._formatABIDataItemList(
constructorAbi.inputs,
[_exchange
],
BaseContract._bigNumberToString,
);
const iface = new ethers.utils.Interface(abi);
const deployInfo = iface.deployFunction;
const txData = deployInfo.encode(bytecode, [_exchange
]);
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(`TEC successfully deployed at ${txReceipt.contractAddress}`);
const contractInstance = new TECContract(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);
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
}
} // tslint:disable:max-file-line-count
// tslint:enable:no-unbound-method

View File

@@ -0,0 +1,148 @@
// 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 TestLibsContract extends BaseContract {
public publicGetTransactionHash = {
async callAsync(
transaction: {salt: BigNumber;signerAddress: string;data: string},
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string
> {
const self = this as any as TestLibsContract;
const encodedData = self._strictEncodeArguments('publicGetTransactionHash((uint256,address,bytes))', [transaction
]);
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('publicGetTransactionHash((uint256,address,bytes))');
// tslint:disable boolean-naming
const result = abiEncoder.strictDecodeReturnValue<string
>(rawCallResult);
// tslint:enable boolean-naming
return result;
},
};
public publicGetTECApprovalHash = {
async callAsync(
approval: {transactionHash: string;transactionSignature: string;approvalExpirationTimeSeconds: BigNumber},
callData: Partial<CallData> = {},
defaultBlock?: BlockParam,
): Promise<string
> {
const self = this as any as TestLibsContract;
const encodedData = self._strictEncodeArguments('publicGetTECApprovalHash((bytes32,bytes,uint256))', [approval
]);
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('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()');
// 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<TestLibsContract> {
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, );
}
public static async deployAsync(
bytecode: string,
abi: ContractAbi,
supportedProvider: SupportedProvider,
txDefaults: Partial<TxData>,
): Promise<TestLibsContract> {
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(`TestLibs successfully deployed at ${txReceipt.contractAddress}`);
const contractInstance = new TestLibsContract(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);
classUtils.bindAll(this, ['_abiEncoderByFunctionSignature', 'address', 'abi', '_web3Wrapper']);
}
} // tslint:disable:max-file-line-count
// tslint:enable:no-unbound-method

View File

@@ -0,0 +1,192 @@
// 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

View File

@@ -6,7 +6,8 @@
"note": "Added ERC1155Proxy test constants and interfaces",
"pr": 1661
}
]
],
"timestamp": 1553091633
},
{
"version": "3.0.9",

View File

@@ -5,6 +5,15 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.1.0 - _March 20, 2019_
* Added ERC1155Proxy test constants and interfaces (#1661)
## v3.0.9 - _Invalid date_
* Set evmVersion to byzantium (#1678)
* Remove Coordinator EIP712 constants. They're now in the `order-utils` package. (#1705)
## v3.0.8 - _March 1, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-test-utils",
"version": "3.0.8",
"version": "3.1.0",
"engines": {
"node": ">=6.12"
},
@@ -40,19 +40,19 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/abi-gen": "^2.0.6",
"@0x/dev-utils": "^2.1.3",
"@0x/order-utils": "^7.0.2",
"@0x/sol-compiler": "^3.1.3",
"@0x/sol-coverage": "^3.0.0",
"@0x/sol-profiler": "^3.1.2",
"@0x/sol-trace": "^2.0.8",
"@0x/subproviders": "^4.0.2",
"@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/tslint-config": "^3.0.0",
"@0x/types": "^2.1.1",
"@0x/typescript-typings": "^4.1.0",
"@0x/utils": "^4.2.2",
"@0x/web3-wrapper": "^6.0.2",
"@0x/types": "^2.2.0",
"@0x/typescript-typings": "^4.2.0",
"@0x/utils": "^4.2.3",
"@0x/web3-wrapper": "^6.0.3",
"@types/bn.js": "^4.11.0",
"@types/js-combinatorics": "^0.5.29",
"@types/lodash": "4.14.104",
@@ -62,7 +62,7 @@
"chai-as-promised": "^7.1.0",
"chai-bignumber": "^3.0.0",
"dirty-chai": "^2.0.1",
"ethereum-types": "^2.1.0",
"ethereum-types": "^2.1.1",
"ethereumjs-util": "^5.1.1",
"ethers": "~4.0.4",
"js-combinatorics": "^0.5.3",

View File

@@ -14,7 +14,8 @@
"note": "Added Address.sol with test for whether or not an address is a contract",
"pr": 1657
}
]
],
"timestamp": 1553091633
},
{
"timestamp": 1551479279,

View File

@@ -5,6 +5,12 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## 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)
## v2.0.8 - _March 1, 2019_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-utils",
"version": "2.0.8",
"version": "3.0.0",
"engines": {
"node": ">=6.12"
},
@@ -46,11 +46,11 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/utils/README.md",
"devDependencies": {
"@0x/abi-gen": "^2.0.6",
"@0x/contracts-gen": "^1.0.5",
"@0x/contracts-test-utils": "^3.0.8",
"@0x/dev-utils": "^2.1.3",
"@0x/sol-compiler": "^3.1.3",
"@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/tslint-config": "^3.0.0",
"@types/bn.js": "^4.11.0",
"@types/lodash": "4.14.104",
@@ -68,14 +68,14 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/base-contract": "^5.0.2",
"@0x/order-utils": "^7.0.2",
"@0x/types": "^2.1.1",
"@0x/typescript-typings": "^4.1.0",
"@0x/utils": "^4.2.2",
"@0x/web3-wrapper": "^6.0.2",
"@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",
"bn.js": "^4.11.8",
"ethereum-types": "^2.1.0",
"ethereum-types": "^2.1.1",
"ethereumjs-util": "^5.1.1",
"lodash": "^4.17.11"
},