diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-02-24 06:56:05 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-02-28 04:05:46 +0800 |
commit | 4e451479f8db6ef459f4d4c6f7935c20f9d6ea09 (patch) | |
tree | 7e57e5990b7e505cbb3f9bc1ced23ea9044a67e1 | |
parent | 93b2736d6533f983aeb74005004de7f40eb35851 (diff) | |
download | dexon-sol-tools-4e451479f8db6ef459f4d4c6f7935c20f9d6ea09.tar dexon-sol-tools-4e451479f8db6ef459f4d4c6f7935c20f9d6ea09.tar.gz dexon-sol-tools-4e451479f8db6ef459f4d4c6f7935c20f9d6ea09.tar.bz2 dexon-sol-tools-4e451479f8db6ef459f4d4c6f7935c20f9d6ea09.tar.lz dexon-sol-tools-4e451479f8db6ef459f4d4c6f7935c20f9d6ea09.tar.xz dexon-sol-tools-4e451479f8db6ef459f4d4c6f7935c20f9d6ea09.tar.zst dexon-sol-tools-4e451479f8db6ef459f4d4c6f7935c20f9d6ea09.zip |
Fix build
-rw-r--r-- | packages/0x.js/src/contract_wrappers/generated/base_contract.ts | 10 | ||||
-rw-r--r-- | packages/contract_templates/contract.handlebars | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/packages/0x.js/src/contract_wrappers/generated/base_contract.ts b/packages/0x.js/src/contract_wrappers/generated/base_contract.ts index a62c785bc..a465ddc38 100644 --- a/packages/0x.js/src/contract_wrappers/generated/base_contract.ts +++ b/packages/0x.js/src/contract_wrappers/generated/base_contract.ts @@ -7,8 +7,8 @@ import * as Web3 from 'web3'; export class BaseContract { protected _ethersInterface: ethersContracts.Interface; protected _web3Wrapper: Web3Wrapper; - protected _abi: Web3.ContractAbi; - protected _address: string; + public abi: Web3.ContractAbi; + public address: string; protected static _transformABIData( abis: Web3.DataItem[], values: any[], @@ -49,7 +49,7 @@ export class BaseContract { // 3. Gas estimate calculation + safety margin const removeUndefinedProperties = _.pickBy; const txDataWithDefaults = { - to: this._address, + to: this.address, ...removeUndefinedProperties(this._web3Wrapper.getContractDefaults()), ...removeUndefinedProperties(txData as any), // HACK: TS can't prove that T is spreadable. @@ -63,8 +63,8 @@ export class BaseContract { } constructor(web3Wrapper: Web3Wrapper, abi: Web3.ContractAbi, address: string) { this._web3Wrapper = web3Wrapper; - this._abi = abi; - this._address = address; + this.abi = abi; + this.address = address; this._ethersInterface = new ethersContracts.Interface(abi); } } diff --git a/packages/contract_templates/contract.handlebars b/packages/contract_templates/contract.handlebars index 2954145a7..4b8b30056 100644 --- a/packages/contract_templates/contract.handlebars +++ b/packages/contract_templates/contract.handlebars @@ -43,6 +43,6 @@ export class {{contractName}}Contract extends BaseContract { {{/each}} constructor(web3Wrapper: Web3Wrapper, abi: Web3.ContractAbi, address: string) { super(web3Wrapper, abi, address); - classUtils.bindAll(this, ['_ethersInterface', '_address', '_abi', '_web3Wrapper']); + classUtils.bindAll(this, ['_ethersInterface', 'address', 'abi', '_web3Wrapper']); } } // tslint:disable:max-file-line-count |