aboutsummaryrefslogtreecommitdiffstats
path: root/packages/base-contract
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-10-09 21:46:13 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-10-09 22:01:34 +0800
commitf93774f855d5735aff975cdb87c61aad624b4c9a (patch)
tree1100824ec730578dac713dfcc590916f31e8017c /packages/base-contract
parentd21e6f3aaf0ec5bc4e86bee029dc206bb8a586ce (diff)
downloaddexon-sol-tools-f93774f855d5735aff975cdb87c61aad624b4c9a.tar
dexon-sol-tools-f93774f855d5735aff975cdb87c61aad624b4c9a.tar.gz
dexon-sol-tools-f93774f855d5735aff975cdb87c61aad624b4c9a.tar.bz2
dexon-sol-tools-f93774f855d5735aff975cdb87c61aad624b4c9a.tar.lz
dexon-sol-tools-f93774f855d5735aff975cdb87c61aad624b4c9a.tar.xz
dexon-sol-tools-f93774f855d5735aff975cdb87c61aad624b4c9a.tar.zst
dexon-sol-tools-f93774f855d5735aff975cdb87c61aad624b4c9a.zip
Stop accesing ethers private methods
Diffstat (limited to 'packages/base-contract')
-rw-r--r--packages/base-contract/src/index.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/base-contract/src/index.ts b/packages/base-contract/src/index.ts
index 7e0428d92..a8e4ad2e2 100644
--- a/packages/base-contract/src/index.ts
+++ b/packages/base-contract/src/index.ts
@@ -12,13 +12,12 @@ import {
TxDataPayable,
} from 'ethereum-types';
import * as ethers from 'ethers';
-import { Interface } from 'ethers/utils/interface';
import * as _ from 'lodash';
import { formatABIDataItem } from './utils';
export interface EthersInterfaceByFunctionSignature {
- [key: string]: Interface;
+ [key: string]: ethers.utils.Interface;
}
const REVERT_ERROR_SELECTOR = '08c379a0';
@@ -118,7 +117,7 @@ export class BaseContract {
}
}
}
- protected _lookupEthersInterface(functionSignature: string): Interface {
+ protected _lookupEthersInterface(functionSignature: string): ethers.utils.Interface {
const ethersInterface = this._ethersInterfacesByFunctionSignature[functionSignature];
if (_.isUndefined(ethersInterface)) {
throw new Error(`Failed to lookup method with function signature '${functionSignature}'`);
@@ -155,7 +154,7 @@ export class BaseContract {
this._ethersInterfacesByFunctionSignature = {};
_.each(methodAbis, methodAbi => {
const functionSignature = abiUtils.getFunctionSignature(methodAbi);
- this._ethersInterfacesByFunctionSignature[functionSignature] = new Interface([methodAbi]);
+ this._ethersInterfacesByFunctionSignature[functionSignature] = new ethers.utils.Interface([methodAbi]);
});
}
}