diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-02-27 08:33:51 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-02-28 04:06:02 +0800 |
commit | 42063f785ec565ae5b7f61c2c56a8eabace60d84 (patch) | |
tree | 9f87fbaac81ca61622d59f7c1cdec5d29b913eda /packages/utils/src/globals.d.ts | |
parent | 1657451f37a74e772c10d26d94ce950b7092816e (diff) | |
download | dexon-sol-tools-42063f785ec565ae5b7f61c2c56a8eabace60d84.tar dexon-sol-tools-42063f785ec565ae5b7f61c2c56a8eabace60d84.tar.gz dexon-sol-tools-42063f785ec565ae5b7f61c2c56a8eabace60d84.tar.bz2 dexon-sol-tools-42063f785ec565ae5b7f61c2c56a8eabace60d84.tar.lz dexon-sol-tools-42063f785ec565ae5b7f61c2c56a8eabace60d84.tar.xz dexon-sol-tools-42063f785ec565ae5b7f61c2c56a8eabace60d84.tar.zst dexon-sol-tools-42063f785ec565ae5b7f61c2c56a8eabace60d84.zip |
Use as a backend to decode event args
Diffstat (limited to 'packages/utils/src/globals.d.ts')
-rw-r--r-- | packages/utils/src/globals.d.ts | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/packages/utils/src/globals.d.ts b/packages/utils/src/globals.d.ts index ade9e59db..951ef6ea2 100644 --- a/packages/utils/src/globals.d.ts +++ b/packages/utils/src/globals.d.ts @@ -1,3 +1,28 @@ -declare module 'web3/lib/solidity/coder' { - const decodeParams: (types: string[], data: string) => any[]; +declare module 'ethers-contracts' { + 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[] }; + } + export interface EventDescription { + parse: (...args: any[]) => any; + inputs: { names: string[]; types: string[] }; + signature: string; + topic: string; + } + // tslint:disable-next-line:max-classes-per-file + export class Interface { + public functions: { [functionName: string]: FunctionDescription }; + public events: { [eventName: string]: EventDescription }; + constructor(abi: any); + } } |