diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-01-23 04:53:32 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-01-30 23:01:36 +0800 |
commit | 387363283ca03ac1d6c9be5b7be2107790bbf79d (patch) | |
tree | 7f9ce518e2f4931321901dfeb2675d70854e996d /packages/types | |
parent | 709026bf1a49d468850b4ebed845c8598fa4fd75 (diff) | |
download | dexon-sol-tools-387363283ca03ac1d6c9be5b7be2107790bbf79d.tar.gz dexon-sol-tools-387363283ca03ac1d6c9be5b7be2107790bbf79d.tar.zst dexon-sol-tools-387363283ca03ac1d6c9be5b7be2107790bbf79d.zip |
Remove truffle from tests
Diffstat (limited to 'packages/types')
-rw-r--r-- | packages/types/package.json | 2 | ||||
-rw-r--r-- | packages/types/src/index.ts | 28 |
2 files changed, 29 insertions, 1 deletions
diff --git a/packages/types/package.json b/packages/types/package.json index 0c17e52ea..b6751ef70 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -22,10 +22,12 @@ "@0xproject/tslint-config": "^0.4.5", "shx": "^0.2.2", "tslint": "5.8.0", + "web3-typescript-typings": "^0.9.4", "typescript": "~2.6.1" }, "dependencies": { "@0xproject/utils": "^0.2.3", + "bignumber.js": "~4.1.0", "web3": "^0.20.0" } } diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 9420fc05d..0e409c93d 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 { @@ -30,3 +30,29 @@ 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<ArgsType> extends TransactionReceipt { + logs: Array<LogWithDecodedArgs<ArgsType> | Web3.LogEntry>; +} |