diff options
author | Fabio Berger <me@fabioberger.com> | 2018-07-05 06:36:01 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-07-05 06:36:01 +0800 |
commit | 1050ecdf3c9e0dbc881342b8ff377180ed1b0dad (patch) | |
tree | 5f1fd590b3a21237eaf35c8cb8e68b069be46ce8 /packages/web3-wrapper/src/types.ts | |
parent | d712dc47d97d3051e2938bf11b9088aba657b869 (diff) | |
download | dexon-sol-tools-1050ecdf3c9e0dbc881342b8ff377180ed1b0dad.tar dexon-sol-tools-1050ecdf3c9e0dbc881342b8ff377180ed1b0dad.tar.gz dexon-sol-tools-1050ecdf3c9e0dbc881342b8ff377180ed1b0dad.tar.bz2 dexon-sol-tools-1050ecdf3c9e0dbc881342b8ff377180ed1b0dad.tar.lz dexon-sol-tools-1050ecdf3c9e0dbc881342b8ff377180ed1b0dad.tar.xz dexon-sol-tools-1050ecdf3c9e0dbc881342b8ff377180ed1b0dad.tar.zst dexon-sol-tools-1050ecdf3c9e0dbc881342b8ff377180ed1b0dad.zip |
Refactor Web3Wrapper to no longer use Web3.js & add more test coverage
Diffstat (limited to 'packages/web3-wrapper/src/types.ts')
-rw-r--r-- | packages/web3-wrapper/src/types.ts | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/packages/web3-wrapper/src/types.ts b/packages/web3-wrapper/src/types.ts index 79542da10..54a5f3f0e 100644 --- a/packages/web3-wrapper/src/types.ts +++ b/packages/web3-wrapper/src/types.ts @@ -1,3 +1,59 @@ export enum Web3WrapperErrors { TransactionMiningTimeout = 'TRANSACTION_MINING_TIMEOUT', } + +export interface AbstractBlockRPC { + number: string | null; + hash: string | null; + parentHash: string; + nonce: string | null; + sha3Uncles: string; + logsBloom: string | null; + transactionsRoot: string; + stateRoot: string; + miner: string; + difficulty: string; + totalDifficulty: string; + extraData: string; + size: string; + gasLimit: string; + gasUsed: string; + timestamp: string; + uncles: string[]; +} +export interface BlockWithoutTransactionDataRPC extends AbstractBlockRPC { + transactions: string[]; +} +export interface BlockWithTransactionDataRPC extends AbstractBlockRPC { + transactions: TransactionRPC[]; +} +export interface TransactionRPC { + hash: string; + nonce: number; + blockHash: string | null; + blockNumber: string | null; + transactionIndex: string | null; + from: string; + to: string | null; + value: string; + gasPrice: string; + gas: string; + input: string; +} + +export interface CallTxDataBaseRPC { + to?: string; + value?: string; + gas?: string; + gasPrice?: string; + data?: string; + nonce?: string; +} + +export interface TxDataRPC extends CallTxDataBaseRPC { + from: string; +} + +export interface CallDataRPC extends CallTxDataBaseRPC { + from?: string; +} |