diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-09-05 21:34:52 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-09-05 21:34:52 +0800 |
commit | dff63f9b89a468ab09ac1be3c0c5e8ca157f8069 (patch) | |
tree | ff730251955dfed021d2a693f72d99e0d55c8945 /src | |
parent | ee00769be171531db725288f8d485964941af529 (diff) | |
download | dexon-sol-tools-dff63f9b89a468ab09ac1be3c0c5e8ca157f8069.tar dexon-sol-tools-dff63f9b89a468ab09ac1be3c0c5e8ca157f8069.tar.gz dexon-sol-tools-dff63f9b89a468ab09ac1be3c0c5e8ca157f8069.tar.bz2 dexon-sol-tools-dff63f9b89a468ab09ac1be3c0c5e8ca157f8069.tar.lz dexon-sol-tools-dff63f9b89a468ab09ac1be3c0c5e8ca157f8069.tar.xz dexon-sol-tools-dff63f9b89a468ab09ac1be3c0c5e8ca157f8069.tar.zst dexon-sol-tools-dff63f9b89a468ab09ac1be3c0c5e8ca157f8069.zip |
Use AbiType
Diffstat (limited to 'src')
-rw-r--r-- | src/contract.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/contract.ts b/src/contract.ts index bd5afc16c..b9ab496b2 100644 --- a/src/contract.ts +++ b/src/contract.ts @@ -22,7 +22,7 @@ export class Contract implements Web3.ContractInstance { this.validator = new SchemaValidator(); } private populateFunctions(): void { - const functionsAbi = _.filter(this.abi, abiPart => abiPart.type === 'function'); + const functionsAbi = _.filter(this.abi, abiPart => abiPart.type === Web3.AbiType.Function); _.forEach(functionsAbi, (functionAbi: Web3.MethodAbi) => { if (functionAbi.constant) { const cbStyleCallFunction = this.contract[functionAbi.name].call; @@ -40,7 +40,7 @@ export class Contract implements Web3.ContractInstance { }); } private populateEvents(): void { - const eventsAbi = _.filter(this.abi, abiPart => abiPart.type === 'event'); + const eventsAbi = _.filter(this.abi, abiPart => abiPart.type === Web3.AbiType.Event); _.forEach(eventsAbi, (eventAbi: Web3.EventAbi) => { this[eventAbi.name] = this.contract[eventAbi.name]; }); |