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 | |
parent | ee00769be171531db725288f8d485964941af529 (diff) | |
download | dexon-0x-contracts-dff63f9b89a468ab09ac1be3c0c5e8ca157f8069.tar.gz dexon-0x-contracts-dff63f9b89a468ab09ac1be3c0c5e8ca157f8069.tar.zst dexon-0x-contracts-dff63f9b89a468ab09ac1be3c0c5e8ca157f8069.zip |
Use AbiType
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | src/contract.ts | 4 | ||||
-rw-r--r-- | yarn.lock | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/package.json b/package.json index 50f54e1c4..c58c59834 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "types-ethereumjs-util": "^0.0.5", "typescript": "^2.4.1", "web3-provider-engine": "^13.0.1", - "web3-typescript-typings": "^0.4.1", + "web3-typescript-typings": "^0.5.0", "webpack": "^3.1.0" }, "dependencies": { 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]; }); @@ -5005,9 +5005,9 @@ web3-provider-engine@^8.4.0: xhr "^2.2.0" xtend "^4.0.1" -web3-typescript-typings@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/web3-typescript-typings/-/web3-typescript-typings-0.4.1.tgz#077f5c042c1d2625b4cabedad88b9e9427b38fb3" +web3-typescript-typings@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/web3-typescript-typings/-/web3-typescript-typings-0.5.0.tgz#a598ad5d4600c53d8e865c52e52b62f2ad04ec84" dependencies: bignumber.js "^4.0.2" |