diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-06-05 08:25:44 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-06-07 01:11:51 +0800 |
commit | 61d9e418e8dcb768537a5d2f124be8c7f65e5cdd (patch) | |
tree | fbc58e601cfa779db0f38c4794da1cf3916a231a /packages | |
parent | 475bb2845d674b81ba970517f3d53c774cc1562e (diff) | |
download | dexon-sol-tools-61d9e418e8dcb768537a5d2f124be8c7f65e5cdd.tar dexon-sol-tools-61d9e418e8dcb768537a5d2f124be8c7f65e5cdd.tar.gz dexon-sol-tools-61d9e418e8dcb768537a5d2f124be8c7f65e5cdd.tar.bz2 dexon-sol-tools-61d9e418e8dcb768537a5d2f124be8c7f65e5cdd.tar.lz dexon-sol-tools-61d9e418e8dcb768537a5d2f124be8c7f65e5cdd.tar.xz dexon-sol-tools-61d9e418e8dcb768537a5d2f124be8c7f65e5cdd.tar.zst dexon-sol-tools-61d9e418e8dcb768537a5d2f124be8c7f65e5cdd.zip |
Fix linter issues in generated contract wrappers
Diffstat (limited to 'packages')
-rw-r--r-- | packages/abi-gen/src/utils.ts | 2 | ||||
-rw-r--r-- | packages/contract_templates/contract.handlebars | 4 | ||||
-rw-r--r-- | packages/contract_templates/partials/callAsync.handlebars | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/packages/abi-gen/src/utils.ts b/packages/abi-gen/src/utils.ts index a46209dad..66390174c 100644 --- a/packages/abi-gen/src/utils.ts +++ b/packages/abi-gen/src/utils.ts @@ -56,7 +56,7 @@ export const utils = { const componentType = `${component.name}: ${componentValueType}`; return componentType; }); - const tsType = `{${componentsType}}`; + const tsType = `{${componentsType.join(';')}}`; return tsType; } throw new Error(`Unknown Solidity type found: ${solType}`); diff --git a/packages/contract_templates/contract.handlebars b/packages/contract_templates/contract.handlebars index 5fb19af11..75654b069 100644 --- a/packages/contract_templates/contract.handlebars +++ b/packages/contract_templates/contract.handlebars @@ -2,7 +2,7 @@ * This file is auto-generated using abi-gen. Don't edit directly. * Templates can be found at https://github.com/0xProject/0x-monorepo/tree/development/packages/contract_templates. */ -// tslint:disable:no-consecutive-blank-lines ordered-imports +// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace // tslint:disable-next-line:no-unused-variable import { BaseContract } from '@0xproject/base-contract'; import { ContractArtifact } from '@0xproject/sol-compiler'; @@ -83,7 +83,7 @@ export class {{contractName}}Contract extends BaseContract { return contractInstance; } constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial<TxData>) { - super("{{contractName}}", abi, address, provider, txDefaults); + super('{{contractName}}', abi, address, provider, txDefaults); classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']); } } // tslint:disable:max-file-line-count diff --git a/packages/contract_templates/partials/callAsync.handlebars b/packages/contract_templates/partials/callAsync.handlebars index 99fda80e1..5d14b1823 100644 --- a/packages/contract_templates/partials/callAsync.handlebars +++ b/packages/contract_templates/partials/callAsync.handlebars @@ -18,7 +18,7 @@ async callAsync( data: encodedData, }, self._web3Wrapper.getContractDefaults(), - ) + ); const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); let resultArray = ethersFunction.parse(rawCallResult); const outputAbi = (_.find(self.abi, {name: '{{this.name}}'}) as MethodAbi).outputs; |