Move some ethers-related types to typescript-typings/ethers

This commit is contained in:
Alex Browne
2018-08-06 16:58:46 -07:00
parent 6a6739ebbe
commit 52e094addc
3 changed files with 25 additions and 13 deletions

View File

@@ -34,4 +34,22 @@ declare module 'ethers' {
const enum errors {
INVALID_ARGUMENT = 'INVALID_ARGUMENT',
}
export type ParamName = null | string | NestedParamName;
export interface NestedParamName {
name: string | null;
names: ParamName[];
}
export const utils: {
AbiCoder: {
defaultCoder: AbiCoder;
};
};
export interface AbiCoder {
encode: (names?: ParamName[], types: string[], args: any[]) => string;
decode: (names?: ParamName[], types: string[], data: string) => any;
}
}