diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-10-10 08:04:54 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-10-10 08:04:54 +0800 |
commit | 8155d311af04339c105f1a29b74f1ddbced85197 (patch) | |
tree | 9b345f05561e806b6d89cec26b371aadafb109ed /packages/base-contract/src/index.ts | |
parent | cd8e6d9cdf7d6aa1e811bb7d9d7017da342907ed (diff) | |
parent | bd06ebde8d1a5caf138ad3b36f9a5c5f255f2312 (diff) | |
download | dexon-sol-tools-8155d311af04339c105f1a29b74f1ddbced85197.tar dexon-sol-tools-8155d311af04339c105f1a29b74f1ddbced85197.tar.gz dexon-sol-tools-8155d311af04339c105f1a29b74f1ddbced85197.tar.bz2 dexon-sol-tools-8155d311af04339c105f1a29b74f1ddbced85197.tar.lz dexon-sol-tools-8155d311af04339c105f1a29b74f1ddbced85197.tar.xz dexon-sol-tools-8155d311af04339c105f1a29b74f1ddbced85197.tar.zst dexon-sol-tools-8155d311af04339c105f1a29b74f1ddbced85197.zip |
Merge branch 'development' into feature/asset-buyer/api-tweaks
* development:
Define bundlewatch.ci.repoBranchBase
Stop accesing ethers private methods
Fix merge conflicts
Fix ethers build issue
Upgrade ethers.js version
Fix branch name
Add max sizes
Use bundlewatch instead of bundlesize
Move Metamask Error to OrderErrors
Update the exported types for the packages which touch RPC providers
Throw and handle errors from Providers.
Clarifies use of schemas outside of Javascript/TypeScript.
Detect MM on signature validation failure.
Return SignedOrder from signing utils.
Update 0x.js Changelog
Add eth_signTypedData support to our wallet subproviders
Move SignTypedData to utils package
Introduce Metamask Subprovider.
Expose eth_signTypedData functionality for order signing
Diffstat (limited to 'packages/base-contract/src/index.ts')
-rw-r--r-- | packages/base-contract/src/index.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/base-contract/src/index.ts b/packages/base-contract/src/index.ts index 981e6fca6..a8e4ad2e2 100644 --- a/packages/base-contract/src/index.ts +++ b/packages/base-contract/src/index.ts @@ -17,7 +17,7 @@ import * as _ from 'lodash'; import { formatABIDataItem } from './utils'; export interface EthersInterfaceByFunctionSignature { - [key: string]: ethers.Interface; + [key: string]: ethers.utils.Interface; } const REVERT_ERROR_SELECTOR = '08c379a0'; @@ -101,7 +101,7 @@ export class BaseContract { // if it overflows the corresponding Solidity type, there is a bug in the // encoder, or the encoder performs unsafe type coercion. public static strictArgumentEncodingCheck(inputAbi: DataItem[], args: any[]): void { - const coder = new ethers.AbiCoder(); + const coder = new ethers.utils.AbiCoder(); const params = abiUtils.parseEthersParams(inputAbi); const rawEncoded = coder.encode(inputAbi, args); const rawDecoded = coder.decode(inputAbi, rawEncoded); @@ -117,7 +117,7 @@ export class BaseContract { } } } - protected _lookupEthersInterface(functionSignature: string): ethers.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}'`); @@ -154,7 +154,7 @@ export class BaseContract { this._ethersInterfacesByFunctionSignature = {}; _.each(methodAbis, methodAbi => { const functionSignature = abiUtils.getFunctionSignature(methodAbi); - this._ethersInterfacesByFunctionSignature[functionSignature] = new ethers.Interface([methodAbi]); + this._ethersInterfacesByFunctionSignature[functionSignature] = new ethers.utils.Interface([methodAbi]); }); } } |