diff options
author | Leonid <logvinov.leon@gmail.com> | 2017-09-06 16:28:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-06 16:28:37 +0800 |
commit | f0a5ad2d2063fe8ba4682147ec2f73e2763b0275 (patch) | |
tree | 6b6c4e4e8a5b367f39687bf4fc7e9bbc237b4874 /src/globals.d.ts | |
parent | 0275ac9dada35648ffb3b543f6ba2546117a3b63 (diff) | |
parent | 258b4fac31aee1bc0c26e42d62b10bd22c69c1b8 (diff) | |
download | dexon-sol-tools-f0a5ad2d2063fe8ba4682147ec2f73e2763b0275.tar dexon-sol-tools-f0a5ad2d2063fe8ba4682147ec2f73e2763b0275.tar.gz dexon-sol-tools-f0a5ad2d2063fe8ba4682147ec2f73e2763b0275.tar.bz2 dexon-sol-tools-f0a5ad2d2063fe8ba4682147ec2f73e2763b0275.tar.lz dexon-sol-tools-f0a5ad2d2063fe8ba4682147ec2f73e2763b0275.tar.xz dexon-sol-tools-f0a5ad2d2063fe8ba4682147ec2f73e2763b0275.tar.zst dexon-sol-tools-f0a5ad2d2063fe8ba4682147ec2f73e2763b0275.zip |
Merge pull request #151 from 0xProject/feature/remove-truffle-contracts
Remove truffle contracts dependency
Diffstat (limited to 'src/globals.d.ts')
-rw-r--r-- | src/globals.d.ts | 35 |
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[]; +} |