aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ts/0x.js.ts5
-rw-r--r--src/ts/globals.d.ts2
-rw-r--r--src/ts/types.ts3
3 files changed, 4 insertions, 6 deletions
diff --git a/src/ts/0x.js.ts b/src/ts/0x.js.ts
index 893d95de6..ba922d3db 100644
--- a/src/ts/0x.js.ts
+++ b/src/ts/0x.js.ts
@@ -132,8 +132,9 @@ export class ZeroEx {
/**
* Converts BigNumber instance to BN
- * We do it because ethABI accepts only BN's
- * We should be consistent about using BigNumbers in our codebase and not use BN anywhere else
+ * The only we convert to BN is to remain compatible with `ethABI. soliditySHA3 ` that
+ * expects values of Solidity type `uint` to be of type `BN`.
+ * We do not use BN anywhere else in the codebase.
*/
private static bigNumberToBN(value: BigNumber.BigNumber) {
return new BN(value.toString(), 10);
diff --git a/src/ts/globals.d.ts b/src/ts/globals.d.ts
index a50c635fb..99baf593f 100644
--- a/src/ts/globals.d.ts
+++ b/src/ts/globals.d.ts
@@ -26,5 +26,5 @@ declare module 'ethereumjs-util' {
}
declare module 'ethereumjs-abi' {
- const soliditySHA3: (argTypes: string[], args: any) => Buffer;
+ const soliditySHA3: (argTypes: string[], args: any[]) => Buffer;
}
diff --git a/src/ts/types.ts b/src/ts/types.ts
index c49ef2331..04902cca6 100644
--- a/src/ts/types.ts
+++ b/src/ts/types.ts
@@ -13,8 +13,5 @@ function strEnum(values: string[]): {[key: string]: string} {
export const SolidityTypes = strEnum([
'address',
'uint256',
- 'uint8',
- 'string',
- 'bool',
]);
export type SolidityTypes = keyof typeof SolidityTypes;