diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-27 01:18:48 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-27 01:18:48 +0800 |
commit | 271adcdb7e3ecb9f88f05f36ffb71d2147bac292 (patch) | |
tree | 80d17771617e540908dd99e9cb63a737630aa37d /packages/abi-gen-wrappers | |
parent | 717a3bce8cd0d4cb782918b3ad806f6c1bdb825e (diff) | |
parent | 6d565f4bff38b12515f4d8f0e29cdc223c12d1fb (diff) | |
download | dexon-sol-tools-271adcdb7e3ecb9f88f05f36ffb71d2147bac292.tar dexon-sol-tools-271adcdb7e3ecb9f88f05f36ffb71d2147bac292.tar.gz dexon-sol-tools-271adcdb7e3ecb9f88f05f36ffb71d2147bac292.tar.bz2 dexon-sol-tools-271adcdb7e3ecb9f88f05f36ffb71d2147bac292.tar.lz dexon-sol-tools-271adcdb7e3ecb9f88f05f36ffb71d2147bac292.tar.xz dexon-sol-tools-271adcdb7e3ecb9f88f05f36ffb71d2147bac292.tar.zst dexon-sol-tools-271adcdb7e3ecb9f88f05f36ffb71d2147bac292.zip |
Merge branch 'development' into feature/instant/rollbar-env
Diffstat (limited to 'packages/abi-gen-wrappers')
-rw-r--r-- | packages/abi-gen-wrappers/CHANGELOG.json | 12 | ||||
-rw-r--r-- | packages/abi-gen-wrappers/CHANGELOG.md | 4 | ||||
-rw-r--r-- | packages/abi-gen-wrappers/package.json | 15 | ||||
-rw-r--r-- | packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts | 17 |
4 files changed, 35 insertions, 13 deletions
diff --git a/packages/abi-gen-wrappers/CHANGELOG.json b/packages/abi-gen-wrappers/CHANGELOG.json index b55ee9867..f74d98afa 100644 --- a/packages/abi-gen-wrappers/CHANGELOG.json +++ b/packages/abi-gen-wrappers/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "version": "2.0.0", + "changes": [ + { + "pr": 1309, + "note": "Update Exchange artifact to receive ZRX asset data as a constructor argument" + } + ] + }, + { "version": "1.1.0", "changes": [ { @@ -7,7 +16,8 @@ "`deployFrom0xArtifactAsync` additionally accepts artifacts that conform to the `SimpleContractArtifact` interface", "pr": 1298 } - ] + ], + "timestamp": 1542821676 }, { "timestamp": 1542208198, diff --git a/packages/abi-gen-wrappers/CHANGELOG.md b/packages/abi-gen-wrappers/CHANGELOG.md index 4dea965f1..7d359f07b 100644 --- a/packages/abi-gen-wrappers/CHANGELOG.md +++ b/packages/abi-gen-wrappers/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.1.0 - _November 21, 2018_ + + * `deployFrom0xArtifactAsync` additionally accepts artifacts that conform to the `SimpleContractArtifact` interface (#1298) + ## v1.0.5 - _November 14, 2018_ * Dependencies updated diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json index a86eb7ed1..1b7015d55 100644 --- a/packages/abi-gen-wrappers/package.json +++ b/packages/abi-gen-wrappers/package.json @@ -1,6 +1,6 @@ { "name": "@0x/abi-gen-wrappers", - "version": "1.0.5", + "version": "1.1.0", "engines": { "node": ">=6.12" }, @@ -15,7 +15,7 @@ "lint": "tslint --format stylish --project .", "pre_build": "yarn generate_contract_wrappers", "clean": "shx rm -rf lib wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated-wrappers --backend ethers" + "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|DummyERC20Token|DummyERC721Token|ERC20Proxy|ERC20Token|ERC721Proxy|ERC721Token|Exchange|Forwarder|IValidator|IWallet|OrderValidator|WETH9|ZRXToken).json" @@ -30,18 +30,19 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-wrappers/README.md", "devDependencies": { - "@0x/abi-gen": "^1.0.16", + "@0x/abi-gen": "^1.0.17", + "@0x/abi-gen-templates": "^1.0.0", "@0x/tslint-config": "^1.0.10", - "@0x/types": "^1.2.1", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/types": "^1.3.0", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "ethereum-types": "^1.1.2", "ethers": "~4.0.4", "lodash": "^4.17.5", "shx": "^0.2.2" }, "dependencies": { - "@0x/base-contract": "^3.0.6" + "@0x/base-contract": "^3.0.7" }, "publishConfig": { "access": "public" diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts index a04b6025e..11b5e7024 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts @@ -3028,29 +3028,35 @@ export class ExchangeContract extends BaseContract { artifact: ContractArtifact | SimpleContractArtifact, provider: Provider, txDefaults: Partial<TxData>, + _zrxAssetData: string, ): Promise<ExchangeContract> { if (_.isUndefined(artifact.compilerOutput)) { throw new Error('Compiler output not found in the artifact file'); } const bytecode = artifact.compilerOutput.evm.bytecode.object; const abi = artifact.compilerOutput.abi; - return ExchangeContract.deployAsync(bytecode, abi, provider, txDefaults, ); + return ExchangeContract.deployAsync(bytecode, abi, provider, txDefaults, _zrxAssetData +); } public static async deployAsync( bytecode: string, abi: ContractAbi, provider: Provider, txDefaults: Partial<TxData>, + _zrxAssetData: string, ): Promise<ExchangeContract> { const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [] = BaseContract._formatABIDataItemList( + [_zrxAssetData +] = BaseContract._formatABIDataItemList( constructorAbi.inputs, - [], + [_zrxAssetData +], BaseContract._bigNumberToString, ); const iface = new ethers.utils.Interface(abi); const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, []); + const txData = deployInfo.encode(bytecode, [_zrxAssetData +]); const web3Wrapper = new Web3Wrapper(provider); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( {data: txData}, @@ -3062,7 +3068,8 @@ export class ExchangeContract extends BaseContract { const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); logUtils.log(`Exchange successfully deployed at ${txReceipt.contractAddress}`); const contractInstance = new ExchangeContract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = []; + contractInstance.constructorArgs = [_zrxAssetData +]; return contractInstance; } constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) { |