diff options
author | Leonid <logvinov.leon@gmail.com> | 2018-01-05 19:49:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-05 19:49:51 +0800 |
commit | 35e0b6143ab1405259471e1c9c698bfcd869df5a (patch) | |
tree | c9acc3f7a1dbccaf10c8616289de61f2dc879236 /packages/abi-gen/src/utils.ts | |
parent | ce6abad97f248a3557390dd1e1ff3ae84662838f (diff) | |
parent | e019ae4aed610c4645894c2999871fd3c0b57388 (diff) | |
download | dexon-sol-tools-35e0b6143ab1405259471e1c9c698bfcd869df5a.tar dexon-sol-tools-35e0b6143ab1405259471e1c9c698bfcd869df5a.tar.gz dexon-sol-tools-35e0b6143ab1405259471e1c9c698bfcd869df5a.tar.bz2 dexon-sol-tools-35e0b6143ab1405259471e1c9c698bfcd869df5a.tar.lz dexon-sol-tools-35e0b6143ab1405259471e1c9c698bfcd869df5a.tar.xz dexon-sol-tools-35e0b6143ab1405259471e1c9c698bfcd869df5a.tar.zst dexon-sol-tools-35e0b6143ab1405259471e1c9c698bfcd869df5a.zip |
Merge pull request #304 from joincivil/ritave/feature/abi-gen-constructor
Added constructor ABIs to abi-gen
Diffstat (limited to 'packages/abi-gen/src/utils.ts')
-rw-r--r-- | packages/abi-gen/src/utils.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/abi-gen/src/utils.ts b/packages/abi-gen/src/utils.ts index 764daa142..524c54a5e 100644 --- a/packages/abi-gen/src/utils.ts +++ b/packages/abi-gen/src/utils.ts @@ -1,6 +1,7 @@ import * as fs from 'fs'; import * as _ from 'lodash'; import * as path from 'path'; +import * as Web3 from 'web3'; import { ParamKind } from './types'; @@ -56,4 +57,12 @@ export const utils = { throw new Error(`Failed to read ${filename}: ${err}`); } }, + getEmptyConstructor(): Web3.ConstructorAbi { + return { + type: 'constructor', + stateMutability: 'nonpayable', + payable: false, + inputs: [], + }; + }, }; |