aboutsummaryrefslogtreecommitdiffstats
path: root/src/globals.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/globals.d.ts')
-rw-r--r--src/globals.d.ts35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/globals.d.ts b/src/globals.d.ts
index 9230ab02d..39d0860eb 100644
--- a/src/globals.d.ts
+++ b/src/globals.d.ts
@@ -33,23 +33,11 @@ declare module '*.json' {
/* tslint:enable */
}
-// truffle-contract declarations
-declare interface ContractInstance {
- address: string;
-}
-declare interface ContractFactory {
- setProvider: (providerObj: any) => void;
- deployed: () => ContractInstance;
- // Both any's are Web3.CallData, but I was unable to import it in this file
- defaults: (config: any) => any;
- at: (address: string) => ContractInstance;
-}
declare interface Artifact {
- networks: {[networkId: number]: any};
-}
-declare function contract(artifacts: Artifact): ContractFactory;
-declare module 'truffle-contract' {
- export = contract;
+ abi: any;
+ networks: {[networkId: number]: {
+ address: string;
+ }};
}
// find-version declarations
@@ -81,3 +69,18 @@ declare class HDWalletProvider {
declare module 'truffle-hdwallet-provider' {
export = HDWalletProvider;
}
+
+// abi-decoder declarations
+interface DecodedLogArg {
+ name: string;
+ value: string|BigNumber.BigNumber;
+}
+interface DecodedLog {
+ name: string;
+ events: DecodedLogArg[];
+}
+declare module 'abi-decoder' {
+ import * as Web3 from 'web3';
+ const addABI: (abi: Web3.AbiDefinition) => void;
+ const decodeLogs: (logs: Web3.LogEntry[]) => DecodedLog[];
+}