diff options
author | Jacob Evans <dekz@dekz.net> | 2018-04-20 06:49:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-20 06:49:23 +0800 |
commit | 62a55c013516c82eb4aa26c90db7533cd72f8d1b (patch) | |
tree | a96728392d7f9890e8a8f5a8c18627acc2ea8f28 /packages/base-contract | |
parent | f6fd4281a4772c28521fa606bd37f16a21dbe23c (diff) | |
parent | 72336eb393d775817619a354d784b7dea4e243bf (diff) | |
download | dexon-sol-tools-62a55c013516c82eb4aa26c90db7533cd72f8d1b.tar dexon-sol-tools-62a55c013516c82eb4aa26c90db7533cd72f8d1b.tar.gz dexon-sol-tools-62a55c013516c82eb4aa26c90db7533cd72f8d1b.tar.bz2 dexon-sol-tools-62a55c013516c82eb4aa26c90db7533cd72f8d1b.tar.lz dexon-sol-tools-62a55c013516c82eb4aa26c90db7533cd72f8d1b.tar.xz dexon-sol-tools-62a55c013516c82eb4aa26c90db7533cd72f8d1b.tar.zst dexon-sol-tools-62a55c013516c82eb4aa26c90db7533cd72f8d1b.zip |
Merge pull request #540 from 0xProject/feature/abi-gen/tuple-return-types
Support Tuples returned from functions
Diffstat (limited to 'packages/base-contract')
-rw-r--r-- | packages/base-contract/CHANGELOG.json | 9 | ||||
-rw-r--r-- | packages/base-contract/package.json | 2 | ||||
-rw-r--r-- | packages/base-contract/src/index.ts | 8 |
3 files changed, 14 insertions, 5 deletions
diff --git a/packages/base-contract/CHANGELOG.json b/packages/base-contract/CHANGELOG.json index ed3c86465..c5d467b7f 100644 --- a/packages/base-contract/CHANGELOG.json +++ b/packages/base-contract/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "version": "0.3.0", + "changes": [ + { + "note": "Update ethers-contracts to ethers.js", + "pr": 540 + } + ] + }, + { "timestamp": 1524044013, "version": "0.2.1", "changes": [ diff --git a/packages/base-contract/package.json b/packages/base-contract/package.json index 22ae43cdc..78dcbfe7f 100644 --- a/packages/base-contract/package.json +++ b/packages/base-contract/package.json @@ -42,7 +42,7 @@ "@0xproject/typescript-typings": "^0.2.0", "@0xproject/utils": "^0.5.2", "@0xproject/web3-wrapper": "^0.6.1", - "ethers-contracts": "^2.2.1", + "ethers": "^3.0.15", "lodash": "^4.17.4" }, "publishConfig": { diff --git a/packages/base-contract/src/index.ts b/packages/base-contract/src/index.ts index bfa99fac1..e95b18db6 100644 --- a/packages/base-contract/src/index.ts +++ b/packages/base-contract/src/index.ts @@ -10,13 +10,13 @@ import { } from '@0xproject/types'; import { abiUtils, BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; -import * as ethersContracts from 'ethers-contracts'; +import * as ethers from 'ethers'; import * as _ from 'lodash'; import { formatABIDataItem } from './utils'; export interface EthersInterfaceByFunctionSignature { - [key: string]: ethersContracts.Interface; + [key: string]: ethers.Interface; } export class BaseContract { @@ -62,7 +62,7 @@ export class BaseContract { } return txDataWithDefaults; } - protected _lookupEthersInterface(functionSignature: string): ethersContracts.Interface { + protected _lookupEthersInterface(functionSignature: string): ethers.Interface { const ethersInterface = this._ethersInterfacesByFunctionSignature[functionSignature]; if (_.isUndefined(ethersInterface)) { throw new Error(`Failed to lookup method with function signature '${functionSignature}'`); @@ -92,7 +92,7 @@ export class BaseContract { this._ethersInterfacesByFunctionSignature = {}; _.each(methodAbis, methodAbi => { const functionSignature = abiUtils.getFunctionSignature(methodAbi); - this._ethersInterfacesByFunctionSignature[functionSignature] = new ethersContracts.Interface([methodAbi]); + this._ethersInterfacesByFunctionSignature[functionSignature] = new ethers.Interface([methodAbi]); }); } } |