aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler/src/utils/encoder.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-compiler/src/utils/encoder.ts')
-rw-r--r--packages/sol-compiler/src/utils/encoder.ts20
1 files changed, 0 insertions, 20 deletions
diff --git a/packages/sol-compiler/src/utils/encoder.ts b/packages/sol-compiler/src/utils/encoder.ts
deleted file mode 100644
index 40b103fd5..000000000
--- a/packages/sol-compiler/src/utils/encoder.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { AbiDefinition, AbiType, ConstructorAbi, ContractAbi, DataItem } from 'ethereum-types';
-import * as _ from 'lodash';
-import * as web3Abi from 'web3-eth-abi';
-
-export const encoder = {
- encodeConstructorArgsFromAbi(args: any[], abi: ContractAbi): string {
- const constructorTypes: string[] = [];
- _.each(abi, (element: AbiDefinition) => {
- if (element.type === AbiType.Constructor) {
- // tslint:disable-next-line:no-unnecessary-type-assertion
- const constuctorAbi = element as ConstructorAbi;
- _.each(constuctorAbi.inputs, (input: DataItem) => {
- constructorTypes.push(input.type);
- });
- }
- });
- const encodedParameters = web3Abi.encodeParameters(constructorTypes, args);
- return encodedParameters;
- },
-};