diff options
Diffstat (limited to 'packages/types/src/index.ts')
-rw-r--r-- | packages/types/src/index.ts | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 9cf9bc7af..7b53b52c4 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from 'bignumber.js'; import * as Web3 from 'web3'; export interface TxData { @@ -25,3 +25,34 @@ export interface TransactionReceipt { contractAddress: string | null; logs: Web3.LogEntry[]; } + +export interface JSONRPCPayload { + params: any[]; + method: string; +} + +export enum AbiType { + Function = 'function', + Constructor = 'constructor', + Event = 'event', + Fallback = 'fallback', +} + +export type ContractEventArg = string | BigNumber; + +export interface DecodedLogArgs { + [argName: string]: ContractEventArg; +} + +export interface LogWithDecodedArgs<ArgsType> extends Web3.DecodedLogEntry<ArgsType> {} +export type RawLog = Web3.LogEntry; +export enum SolidityTypes { + Address = 'address', + Uint256 = 'uint256', + Uint8 = 'uint8', + Uint = 'uint', +} + +export interface TransactionReceiptWithDecodedLogs extends TransactionReceipt { + logs: Array<LogWithDecodedArgs<DecodedLogArgs> | Web3.LogEntry>; +} |