Merge pull request #2060 from 0xProject/feature/dev-utils-contract-wrappers
Added DevUtils Wrappers and migrations
This commit is contained in:
commit
bc26e807cd
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "5.3.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Added DevUtils",
|
||||||
|
"pr": 2060
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "5.2.0",
|
"version": "5.2.0",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
"docs": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --out generated_docs ./src/generated-wrappers/*"
|
"docs": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --out generated_docs ./src/generated-wrappers/*"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"abis": "../contract-artifacts/artifacts/@(AssetProxyOwner|DutchAuction|DummyERC20Token|DummyERC721Token|ERC20Proxy|ERC20Token|ERC721Proxy|ERC721Token|Exchange|Forwarder|IAssetProxy|IValidator|IWallet|MultiAssetProxy|OrderValidator|WETH9|ZRXToken|Coordinator|CoordinatorRegistry|EthBalanceChecker|ERC1155Proxy|StaticCallProxy).json"
|
"abis": "../contract-artifacts/artifacts/@(AssetProxyOwner|DevUtils|DutchAuction|DummyERC20Token|DummyERC721Token|ERC20Proxy|ERC20Token|ERC721Proxy|ERC721Token|Exchange|Forwarder|IAssetProxy|IValidator|IWallet|MultiAssetProxy|OrderValidator|WETH9|ZRXToken|Coordinator|CoordinatorRegistry|EthBalanceChecker|ERC1155Proxy|StaticCallProxy).json"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
export * from './generated-wrappers/asset_proxy_owner';
|
export * from './generated-wrappers/asset_proxy_owner';
|
||||||
|
export * from './generated-wrappers/dev_utils';
|
||||||
export * from './generated-wrappers/dummy_erc20_token';
|
export * from './generated-wrappers/dummy_erc20_token';
|
||||||
export * from './generated-wrappers/dummy_erc721_token';
|
export * from './generated-wrappers/dummy_erc721_token';
|
||||||
export * from './generated-wrappers/dutch_auction';
|
export * from './generated-wrappers/dutch_auction';
|
||||||
|
@ -181,7 +181,9 @@ function registerPythonHelpers(): void {
|
|||||||
Handlebars.registerHelper(
|
Handlebars.registerHelper(
|
||||||
'makeReturnDocstringRole',
|
'makeReturnDocstringRole',
|
||||||
(description: string, indent: number) =>
|
(description: string, indent: number) =>
|
||||||
new Handlebars.SafeString(utils.wrapPythonDocstringRole(`:returns: ${description}`, indent)),
|
new Handlebars.SafeString(
|
||||||
|
utils.wrapPythonDocstringRole(`:returns: ${description.replace(/ +/g, ' ')}`, indent),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
Handlebars.registerHelper(
|
Handlebars.registerHelper(
|
||||||
'makeEventParameterDocstringRole',
|
'makeEventParameterDocstringRole',
|
||||||
|
File diff suppressed because one or more lines are too long
@ -496,7 +496,7 @@ export class AbiGenDummyContract extends BaseContract {
|
|||||||
* @param v some v, recovery id
|
* @param v some v, recovery id
|
||||||
* @param r ECDSA r output
|
* @param r ECDSA r output
|
||||||
* @param s ECDSA s output
|
* @param s ECDSA s output
|
||||||
* @returns the signerAddress that created this signature
|
* @returns the signerAddress that created this signature. this line too is super long in order to demonstrate the proper hanging indentation in generated code.
|
||||||
*/
|
*/
|
||||||
async callAsync(
|
async callAsync(
|
||||||
hash: string,
|
hash: string,
|
||||||
|
File diff suppressed because one or more lines are too long
@ -86,7 +86,7 @@ contract AbiGenDummy
|
|||||||
/// @param v some v, recovery id
|
/// @param v some v, recovery id
|
||||||
/// @param r ECDSA r output
|
/// @param r ECDSA r output
|
||||||
/// @param s ECDSA s output
|
/// @param s ECDSA s output
|
||||||
/// @return the signerAddress that created this signature
|
/// @return the signerAddress that created this signature. this line too is super long in order to demonstrate the proper hanging indentation in generated code.
|
||||||
function ecrecoverFn(bytes32 hash, uint8 v, bytes32 r, bytes32 s)
|
function ecrecoverFn(bytes32 hash, uint8 v, bytes32 r, bytes32 s)
|
||||||
public
|
public
|
||||||
pure
|
pure
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "3.1.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Added DevUtils",
|
||||||
|
"pr": 2060
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
@ -15,6 +15,7 @@ export interface ContractAddresses {
|
|||||||
multiAssetProxy: string;
|
multiAssetProxy: string;
|
||||||
staticCallProxy: string;
|
staticCallProxy: string;
|
||||||
erc1155Proxy: string;
|
erc1155Proxy: string;
|
||||||
|
devUtils: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum NetworkId {
|
export enum NetworkId {
|
||||||
@ -43,6 +44,7 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
|
|||||||
multiAssetProxy: '0xef701d5389ae74503d633396c4d654eabedc9d78',
|
multiAssetProxy: '0xef701d5389ae74503d633396c4d654eabedc9d78',
|
||||||
staticCallProxy: '0x3517b88c19508c08650616019062b898ab65ed29',
|
staticCallProxy: '0x3517b88c19508c08650616019062b898ab65ed29',
|
||||||
erc1155Proxy: '0x7eefbd48fd63d441ec7435d024ec7c5131019add',
|
erc1155Proxy: '0x7eefbd48fd63d441ec7435d024ec7c5131019add',
|
||||||
|
devUtils: '0x92d9a4d50190ae04e03914db2ee650124af844e6',
|
||||||
},
|
},
|
||||||
3: {
|
3: {
|
||||||
erc20Proxy: '0xb1408f4c245a23c31b98d2c626777d4c0d766caa',
|
erc20Proxy: '0xb1408f4c245a23c31b98d2c626777d4c0d766caa',
|
||||||
@ -59,6 +61,7 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
|
|||||||
multiAssetProxy: '0xab8fbd189c569ccdee3a4d929bb7f557be4028f6',
|
multiAssetProxy: '0xab8fbd189c569ccdee3a4d929bb7f557be4028f6',
|
||||||
staticCallProxy: '0xe1b97e47aa3796276033a5341e884d2ba46b6ac1',
|
staticCallProxy: '0xe1b97e47aa3796276033a5341e884d2ba46b6ac1',
|
||||||
erc1155Proxy: '0x19bb6caa3bc34d39e5a23cedfa3e6c7e7f3c931d',
|
erc1155Proxy: '0x19bb6caa3bc34d39e5a23cedfa3e6c7e7f3c931d',
|
||||||
|
devUtils: '0x3e0b46bad8e374e4a110c12b832cb120dbe4a479',
|
||||||
},
|
},
|
||||||
4: {
|
4: {
|
||||||
exchange: '0xbff9493f92a3df4b0429b6d00743b3cfb4c85831',
|
exchange: '0xbff9493f92a3df4b0429b6d00743b3cfb4c85831',
|
||||||
@ -75,6 +78,7 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
|
|||||||
multiAssetProxy: '0xb34cde0ad3a83d04abebc0b66e75196f22216621',
|
multiAssetProxy: '0xb34cde0ad3a83d04abebc0b66e75196f22216621',
|
||||||
staticCallProxy: '0xe1b97e47aa3796276033a5341e884d2ba46b6ac1',
|
staticCallProxy: '0xe1b97e47aa3796276033a5341e884d2ba46b6ac1',
|
||||||
erc1155Proxy: '0x19bb6caa3bc34d39e5a23cedfa3e6c7e7f3c931d',
|
erc1155Proxy: '0x19bb6caa3bc34d39e5a23cedfa3e6c7e7f3c931d',
|
||||||
|
devUtils: '0x2d4a9abda7b8b3605c8dbd34e3550a7467c78287',
|
||||||
},
|
},
|
||||||
42: {
|
42: {
|
||||||
erc20Proxy: '0xf1ec01d6236d3cd881a0bf0130ea25fe4234003e',
|
erc20Proxy: '0xf1ec01d6236d3cd881a0bf0130ea25fe4234003e',
|
||||||
@ -91,6 +95,7 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
|
|||||||
multiAssetProxy: '0xf6313a772c222f51c28f2304c0703b8cf5428fd8',
|
multiAssetProxy: '0xf6313a772c222f51c28f2304c0703b8cf5428fd8',
|
||||||
staticCallProxy: '0x48e94bdb9033640d45ea7c721e25f380f8bffa43',
|
staticCallProxy: '0x48e94bdb9033640d45ea7c721e25f380f8bffa43',
|
||||||
erc1155Proxy: '0x64517fa2b480ba3678a2a3c0cf08ef7fd4fad36f',
|
erc1155Proxy: '0x64517fa2b480ba3678a2a3c0cf08ef7fd4fad36f',
|
||||||
|
devUtils: '0x1e3616bc5144362f95d72de41874395567697e93',
|
||||||
},
|
},
|
||||||
// NetworkId 50 represents our Ganache snapshot generated from migrations.
|
// NetworkId 50 represents our Ganache snapshot generated from migrations.
|
||||||
50: {
|
50: {
|
||||||
@ -108,6 +113,7 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
|
|||||||
coordinator: '0x0d8b0dd11f5d34ed41d556def5f841900d5b1c6b',
|
coordinator: '0x0d8b0dd11f5d34ed41d556def5f841900d5b1c6b',
|
||||||
multiAssetProxy: '0xcfc18cec799fbd1793b5c43e773c98d4d61cc2db',
|
multiAssetProxy: '0xcfc18cec799fbd1793b5c43e773c98d4d61cc2db',
|
||||||
staticCallProxy: '0x6dfff22588be9b3ef8cf0ad6dc9b84796f9fb45f',
|
staticCallProxy: '0x6dfff22588be9b3ef8cf0ad6dc9b84796f9fb45f',
|
||||||
|
devUtils: '0x38ef19fdf8e8415f18c307ed71967e19aac28ba1',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "2.1.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Added DevUtils",
|
||||||
|
"pr": 2060
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1565296576,
|
"timestamp": 1565296576,
|
||||||
"version": "2.0.4",
|
"version": "2.0.4",
|
||||||
|
501
packages/contract-artifacts/artifacts/DevUtils.json
generated
Normal file
501
packages/contract-artifacts/artifacts/DevUtils.json
generated
Normal file
File diff suppressed because one or more lines are too long
@ -1,6 +1,7 @@
|
|||||||
import * as AssetProxyOwner from '../artifacts/AssetProxyOwner.json';
|
import * as AssetProxyOwner from '../artifacts/AssetProxyOwner.json';
|
||||||
import * as Coordinator from '../artifacts/Coordinator.json';
|
import * as Coordinator from '../artifacts/Coordinator.json';
|
||||||
import * as CoordinatorRegistry from '../artifacts/CoordinatorRegistry.json';
|
import * as CoordinatorRegistry from '../artifacts/CoordinatorRegistry.json';
|
||||||
|
import * as DevUtils from '../artifacts/DevUtils.json';
|
||||||
import * as DummyERC20Token from '../artifacts/DummyERC20Token.json';
|
import * as DummyERC20Token from '../artifacts/DummyERC20Token.json';
|
||||||
import * as DummyERC721Token from '../artifacts/DummyERC721Token.json';
|
import * as DummyERC721Token from '../artifacts/DummyERC721Token.json';
|
||||||
import * as DutchAuction from '../artifacts/DutchAuction.json';
|
import * as DutchAuction from '../artifacts/DutchAuction.json';
|
||||||
@ -24,6 +25,7 @@ import * as ZRXToken from '../artifacts/ZRXToken.json';
|
|||||||
export {
|
export {
|
||||||
AssetProxyOwner,
|
AssetProxyOwner,
|
||||||
DutchAuction,
|
DutchAuction,
|
||||||
|
DevUtils,
|
||||||
DummyERC20Token,
|
DummyERC20Token,
|
||||||
DummyERC721Token,
|
DummyERC721Token,
|
||||||
ERC1155Proxy,
|
ERC1155Proxy,
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
"include": ["./src/**/*", "./test/**/*"],
|
"include": ["./src/**/*", "./test/**/*"],
|
||||||
"files": [
|
"files": [
|
||||||
"./artifacts/AssetProxyOwner.json",
|
"./artifacts/AssetProxyOwner.json",
|
||||||
|
"./artifacts/DevUtils.json",
|
||||||
"./artifacts/DutchAuction.json",
|
"./artifacts/DutchAuction.json",
|
||||||
"./artifacts/DummyERC20Token.json",
|
"./artifacts/DummyERC20Token.json",
|
||||||
"./artifacts/DummyERC721Token.json",
|
"./artifacts/DummyERC721Token.json",
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
"docs_test": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --out generated_docs ./src/generated-wrappers/*"
|
"docs_test": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --out generated_docs ./src/generated-wrappers/*"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"abis": "../contract-artifacts/artifacts/@(AssetProxyOwner|DutchAuction|DummyERC20Token|DummyERC721Token|ERC20Proxy|ERC20Token|ERC721Proxy|ERC721Token|Exchange|Forwarder|IAssetProxy|IValidator|IWallet|MultiAssetProxy|OrderValidator|WETH9|ZRXToken|Coordinator|CoordinatorRegistry|EthBalanceChecker).json"
|
"abis": "../contract-artifacts/artifacts/@(AssetProxyOwner|DevUtils|DutchAuction|DummyERC20Token|DummyERC721Token|ERC20Proxy|ERC20Token|ERC721Proxy|ERC721Token|Exchange|Forwarder|IAssetProxy|IValidator|IWallet|MultiAssetProxy|OrderValidator|WETH9|ZRXToken|Coordinator|CoordinatorRegistry|EthBalanceChecker).json"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
3143
packages/contract-wrappers/src/generated-wrappers/dev_utils.ts
generated
Normal file
3143
packages/contract-wrappers/src/generated-wrappers/dev_utils.ts
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,5 @@
|
|||||||
export * from './generated-wrappers/asset_proxy_owner';
|
export * from './generated-wrappers/asset_proxy_owner';
|
||||||
|
export * from './generated-wrappers/dev_utils';
|
||||||
export * from './generated-wrappers/dummy_erc20_token';
|
export * from './generated-wrappers/dummy_erc20_token';
|
||||||
export * from './generated-wrappers/dummy_erc721_token';
|
export * from './generated-wrappers/dummy_erc721_token';
|
||||||
export * from './generated-wrappers/dutch_auction';
|
export * from './generated-wrappers/dutch_auction';
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "4.3.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Added DevUtils to migration script",
|
||||||
|
"pr": 2060
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
@ -252,6 +252,16 @@ export async function runMigrationsAsync(
|
|||||||
exchange.address,
|
exchange.address,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Dev Utils
|
||||||
|
const devUtils = await wrappers.DevUtilsContract.deployFrom0xArtifactAsync(
|
||||||
|
artifacts.DevUtils,
|
||||||
|
provider,
|
||||||
|
txDefaults,
|
||||||
|
artifacts,
|
||||||
|
exchange.address,
|
||||||
|
zrxAssetData,
|
||||||
|
);
|
||||||
|
|
||||||
const contractAddresses = {
|
const contractAddresses = {
|
||||||
erc20Proxy: erc20Proxy.address,
|
erc20Proxy: erc20Proxy.address,
|
||||||
erc721Proxy: erc721Proxy.address,
|
erc721Proxy: erc721Proxy.address,
|
||||||
@ -267,6 +277,7 @@ export async function runMigrationsAsync(
|
|||||||
coordinator: coordinator.address,
|
coordinator: coordinator.address,
|
||||||
multiAssetProxy: multiAssetProxy.address,
|
multiAssetProxy: multiAssetProxy.address,
|
||||||
staticCallProxy: staticCallProxy.address,
|
staticCallProxy: staticCallProxy.address,
|
||||||
|
devUtils: devUtils.address,
|
||||||
};
|
};
|
||||||
|
|
||||||
return contractAddresses;
|
return contractAddresses;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
"clean": "shx rm -rf generated"
|
"clean": "shx rm -rf generated"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"abis": "../contract-artifacts/artifacts/{AssetProxyOwner,Coordinator,CoordinatorRegistry,DummyERC20Token,DummyERC721Token,DutchAuction,ERC20Proxy,ERC20Token,ERC721Proxy,ERC721Token,EthBalanceChecker,Exchange,Forwarder,IAssetProxy,IValidator,IWallet,MultiAssetProxy,OrderValidator,WETH9,ZRXToken}.json"
|
"abis": "../contract-artifacts/artifacts/{AssetProxyOwner,Coordinator,CoordinatorRegistry,DevUtils,DummyERC20Token,DummyERC721Token,DutchAuction,ERC20Proxy,ERC20Token,ERC721Proxy,ERC721Token,EthBalanceChecker,Exchange,Forwarder,IAssetProxy,IValidator,IWallet,MultiAssetProxy,OrderValidator,WETH9,ZRXToken}.json"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 1.1.0 - TBD
|
||||||
|
|
||||||
|
- Added wrapper for DevUtils contract.
|
||||||
|
|
||||||
## 1.0.3 - 2019-08-10
|
## 1.0.3 - 2019-08-10
|
||||||
|
|
||||||
- Added erroneously missing source files.
|
- Added erroneously missing source files.
|
||||||
|
@ -22,6 +22,7 @@ CONTRACTS_TO_BE_WRAPPED = [
|
|||||||
"asset_proxy_owner",
|
"asset_proxy_owner",
|
||||||
"coordinator",
|
"coordinator",
|
||||||
"coordinator_registry",
|
"coordinator_registry",
|
||||||
|
"dev_utils",
|
||||||
"dummy_erc20_token",
|
"dummy_erc20_token",
|
||||||
"dummy_erc721_token",
|
"dummy_erc721_token",
|
||||||
"dutch_auction",
|
"dutch_auction",
|
||||||
|
@ -33,6 +33,14 @@ zero_ex.contract_wrappers.coordinator_registry
|
|||||||
:special-members:
|
:special-members:
|
||||||
|
|
||||||
|
|
||||||
|
zero_ex.contract_wrappers.dev_utils
|
||||||
|
=======================================
|
||||||
|
|
||||||
|
.. automodule:: zero_ex.contract_wrappers.dev_utils
|
||||||
|
:members:
|
||||||
|
:special-members:
|
||||||
|
|
||||||
|
|
||||||
zero_ex.contract_wrappers.dutch_auction
|
zero_ex.contract_wrappers.dutch_auction
|
||||||
=======================================
|
=======================================
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user