diff options
author | Jacob Evans <jacob@dekz.net> | 2018-04-19 09:21:32 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-04-19 09:21:32 +0800 |
commit | 12ae7c009d548c2b7241b3a3896b159f1829a500 (patch) | |
tree | f00bc364052a4c5d8317350bb077991fe8d2f08e /packages/typescript-typings/types | |
parent | 62fcb51e1a9893b8d18536eefc9497d6c1f36c39 (diff) | |
download | dexon-sol-tools-12ae7c009d548c2b7241b3a3896b159f1829a500.tar dexon-sol-tools-12ae7c009d548c2b7241b3a3896b159f1829a500.tar.gz dexon-sol-tools-12ae7c009d548c2b7241b3a3896b159f1829a500.tar.bz2 dexon-sol-tools-12ae7c009d548c2b7241b3a3896b159f1829a500.tar.lz dexon-sol-tools-12ae7c009d548c2b7241b3a3896b159f1829a500.tar.xz dexon-sol-tools-12ae7c009d548c2b7241b3a3896b159f1829a500.tar.zst dexon-sol-tools-12ae7c009d548c2b7241b3a3896b159f1829a500.zip |
Support Tuples from function returns
Diffstat (limited to 'packages/typescript-typings/types')
-rw-r--r-- | packages/typescript-typings/types/ethers/index.d.ts | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/packages/typescript-typings/types/ethers/index.d.ts b/packages/typescript-typings/types/ethers/index.d.ts new file mode 100644 index 000000000..313e8eb8a --- /dev/null +++ b/packages/typescript-typings/types/ethers/index.d.ts @@ -0,0 +1,39 @@ +declare module 'ethers' { + export interface TransactionDescription { + name: string; + signature: string; + sighash: string; + data: string; + } + export interface CallDescription extends TransactionDescription { + parse: (...args: any[]) => any; + } + export interface FunctionDescription { + (...params: any[]): TransactionDescription | CallDescription; + inputs: { names: string[]; types: string[] }; + outputs: { names: string[]; types: string[] }; + type: string; + } + export interface EventDescription { + parse: (...args: any[]) => any; + inputs: { names: string[]; types: string[] }; + signature: string; + topic: string; + } + export class Interface { + public functions: { [functionName: string]: FunctionDescription }; + public events: { [eventName: string]: EventDescription }; + // public static decodeParams(types: string[], data: string): any[]; + constructor(abi: any); + } + export class Contract { + constructor(address: string, abi: any, provider: any); + } +} + +declare module 'ethers/utils/abi-coder' { + export class Coder { + public decode(names: any[], types: any[], data?: any[]): any[]; + defaultCoder: Coder; + } +} |