Merge pull request #2060 from 0xProject/feature/dev-utils-contract-wrappers

Added DevUtils Wrappers and migrations
This commit is contained in:
Jacob Evans 2019-08-14 12:27:25 +10:00 committed by GitHub
commit bc26e807cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 3822 additions and 21 deletions

View File

@ -1,4 +1,13 @@
[
{
"version": "5.3.0",
"changes": [
{
"note": "Added DevUtils",
"pr": 2060
}
]
},
{
"version": "5.2.0",
"changes": [

View File

@ -22,7 +22,7 @@
"docs": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --out generated_docs ./src/generated-wrappers/*"
},
"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": {
"type": "git",

View File

@ -1,4 +1,5 @@
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_erc721_token';
export * from './generated-wrappers/dutch_auction';

View File

@ -181,7 +181,9 @@ function registerPythonHelpers(): void {
Handlebars.registerHelper(
'makeReturnDocstringRole',
(description: string, indent: number) =>
new Handlebars.SafeString(utils.wrapPythonDocstringRole(`:returns: ${description}`, indent)),
new Handlebars.SafeString(
utils.wrapPythonDocstringRole(`:returns: ${description.replace(/ +/g, ' ')}`, indent),
),
);
Handlebars.registerHelper(
'makeEventParameterDocstringRole',

File diff suppressed because one or more lines are too long

View File

@ -496,7 +496,7 @@ export class AbiGenDummyContract extends BaseContract {
* @param v some v, recovery id
* @param r ECDSA r 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(
hash: string,

File diff suppressed because one or more lines are too long

View File

@ -86,7 +86,7 @@ contract AbiGenDummy
/// @param v some v, recovery id
/// @param r ECDSA r 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)
public
pure
@ -179,7 +179,7 @@ contract AbiGenDummy
function overloadedMethod(int a) public pure {}
function overloadedMethod(string memory a) public pure {}
// begin tests for `decodeTransactionData`, `decodeReturnData`
/// @dev complex input is dynamic and more difficult to decode than simple input.
@ -196,7 +196,7 @@ contract AbiGenDummy
bytes ipsum;
string dolor;
}
/// @dev Tests decoding when both input and output are empty.
function noInputNoOutput()
public

View File

@ -1,4 +1,13 @@
[
{
"version": "3.1.0",
"changes": [
{
"note": "Added DevUtils",
"pr": 2060
}
]
},
{
"version": "3.0.3",
"changes": [

View File

@ -15,6 +15,7 @@ export interface ContractAddresses {
multiAssetProxy: string;
staticCallProxy: string;
erc1155Proxy: string;
devUtils: string;
}
export enum NetworkId {
@ -43,6 +44,7 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
multiAssetProxy: '0xef701d5389ae74503d633396c4d654eabedc9d78',
staticCallProxy: '0x3517b88c19508c08650616019062b898ab65ed29',
erc1155Proxy: '0x7eefbd48fd63d441ec7435d024ec7c5131019add',
devUtils: '0x92d9a4d50190ae04e03914db2ee650124af844e6',
},
3: {
erc20Proxy: '0xb1408f4c245a23c31b98d2c626777d4c0d766caa',
@ -59,6 +61,7 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
multiAssetProxy: '0xab8fbd189c569ccdee3a4d929bb7f557be4028f6',
staticCallProxy: '0xe1b97e47aa3796276033a5341e884d2ba46b6ac1',
erc1155Proxy: '0x19bb6caa3bc34d39e5a23cedfa3e6c7e7f3c931d',
devUtils: '0x3e0b46bad8e374e4a110c12b832cb120dbe4a479',
},
4: {
exchange: '0xbff9493f92a3df4b0429b6d00743b3cfb4c85831',
@ -75,6 +78,7 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
multiAssetProxy: '0xb34cde0ad3a83d04abebc0b66e75196f22216621',
staticCallProxy: '0xe1b97e47aa3796276033a5341e884d2ba46b6ac1',
erc1155Proxy: '0x19bb6caa3bc34d39e5a23cedfa3e6c7e7f3c931d',
devUtils: '0x2d4a9abda7b8b3605c8dbd34e3550a7467c78287',
},
42: {
erc20Proxy: '0xf1ec01d6236d3cd881a0bf0130ea25fe4234003e',
@ -91,6 +95,7 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
multiAssetProxy: '0xf6313a772c222f51c28f2304c0703b8cf5428fd8',
staticCallProxy: '0x48e94bdb9033640d45ea7c721e25f380f8bffa43',
erc1155Proxy: '0x64517fa2b480ba3678a2a3c0cf08ef7fd4fad36f',
devUtils: '0x1e3616bc5144362f95d72de41874395567697e93',
},
// NetworkId 50 represents our Ganache snapshot generated from migrations.
50: {
@ -108,6 +113,7 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
coordinator: '0x0d8b0dd11f5d34ed41d556def5f841900d5b1c6b',
multiAssetProxy: '0xcfc18cec799fbd1793b5c43e773c98d4d61cc2db',
staticCallProxy: '0x6dfff22588be9b3ef8cf0ad6dc9b84796f9fb45f',
devUtils: '0x38ef19fdf8e8415f18c307ed71967e19aac28ba1',
},
};

View File

@ -1,4 +1,13 @@
[
{
"version": "2.1.0",
"changes": [
{
"note": "Added DevUtils",
"pr": 2060
}
]
},
{
"timestamp": 1565296576,
"version": "2.0.4",

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,7 @@
import * as AssetProxyOwner from '../artifacts/AssetProxyOwner.json';
import * as Coordinator from '../artifacts/Coordinator.json';
import * as CoordinatorRegistry from '../artifacts/CoordinatorRegistry.json';
import * as DevUtils from '../artifacts/DevUtils.json';
import * as DummyERC20Token from '../artifacts/DummyERC20Token.json';
import * as DummyERC721Token from '../artifacts/DummyERC721Token.json';
import * as DutchAuction from '../artifacts/DutchAuction.json';
@ -24,6 +25,7 @@ import * as ZRXToken from '../artifacts/ZRXToken.json';
export {
AssetProxyOwner,
DutchAuction,
DevUtils,
DummyERC20Token,
DummyERC721Token,
ERC1155Proxy,

View File

@ -8,6 +8,7 @@
"include": ["./src/**/*", "./test/**/*"],
"files": [
"./artifacts/AssetProxyOwner.json",
"./artifacts/DevUtils.json",
"./artifacts/DutchAuction.json",
"./artifacts/DummyERC20Token.json",
"./artifacts/DummyERC721Token.json",

View File

@ -34,7 +34,7 @@
"docs_test": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --out generated_docs ./src/generated-wrappers/*"
},
"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": {
"type": "git",

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,5 @@
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_erc721_token';
export * from './generated-wrappers/dutch_auction';

View File

@ -1,4 +1,13 @@
[
{
"version": "4.3.0",
"changes": [
{
"note": "Added DevUtils to migration script",
"pr": 2060
}
]
},
{
"version": "4.2.0",
"changes": [

View File

@ -252,6 +252,16 @@ export async function runMigrationsAsync(
exchange.address,
);
// Dev Utils
const devUtils = await wrappers.DevUtilsContract.deployFrom0xArtifactAsync(
artifacts.DevUtils,
provider,
txDefaults,
artifacts,
exchange.address,
zrxAssetData,
);
const contractAddresses = {
erc20Proxy: erc20Proxy.address,
erc721Proxy: erc721Proxy.address,
@ -267,6 +277,7 @@ export async function runMigrationsAsync(
coordinator: coordinator.address,
multiAssetProxy: multiAssetProxy.address,
staticCallProxy: staticCallProxy.address,
devUtils: devUtils.address,
};
return contractAddresses;

View File

@ -13,7 +13,7 @@
"clean": "shx rm -rf generated"
},
"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": {
"type": "git",

View File

@ -1,5 +1,9 @@
# Changelog
## 1.1.0 - TBD
- Added wrapper for DevUtils contract.
## 1.0.3 - 2019-08-10
- Added erroneously missing source files.

View File

@ -22,6 +22,7 @@ CONTRACTS_TO_BE_WRAPPED = [
"asset_proxy_owner",
"coordinator",
"coordinator_registry",
"dev_utils",
"dummy_erc20_token",
"dummy_erc721_token",
"dutch_auction",

View File

@ -33,6 +33,14 @@ zero_ex.contract_wrappers.coordinator_registry
:special-members:
zero_ex.contract_wrappers.dev_utils
=======================================
.. automodule:: zero_ex.contract_wrappers.dev_utils
:members:
:special-members:
zero_ex.contract_wrappers.dutch_auction
=======================================