aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-07-04 01:49:35 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-07-04 01:49:35 +0800
commitd2ebf4a7772070e3ec255d0551de8c9f2822d4c3 (patch)
tree1b879ef84055e4e5b686770530a3aded330c096a /packages
parentc5fcea1dbd5e64e72eb5cf360558de9f9b886a16 (diff)
downloaddexon-0x-contracts-d2ebf4a7772070e3ec255d0551de8c9f2822d4c3.tar.gz
dexon-0x-contracts-d2ebf4a7772070e3ec255d0551de8c9f2822d4c3.tar.zst
dexon-0x-contracts-d2ebf4a7772070e3ec255d0551de8c9f2822d4c3.zip
Add TransactionReceiptStatus type to ethereum-types
Diffstat (limited to 'packages')
-rw-r--r--packages/contracts/test/utils/assertions.ts4
-rw-r--r--packages/ethereum-types/src/index.ts4
2 files changed, 5 insertions, 3 deletions
diff --git a/packages/contracts/test/utils/assertions.ts b/packages/contracts/test/utils/assertions.ts
index 89e90ad2f..c8031c8a1 100644
--- a/packages/contracts/test/utils/assertions.ts
+++ b/packages/contracts/test/utils/assertions.ts
@@ -2,7 +2,7 @@ import { RevertReason } from '@0xproject/types';
import { logUtils } from '@0xproject/utils';
import { NodeType } from '@0xproject/web3-wrapper';
import * as chai from 'chai';
-import { TransactionReceipt, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
+import { TransactionReceipt, TransactionReceiptStatus, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import * as _ from 'lodash';
import { web3Wrapper } from './web3_wrapper';
@@ -93,7 +93,7 @@ export async function expectTransactionFailedAsync(p: sendTransactionResult, rea
export async function expectTransactionFailedWithoutReasonAsync(p: sendTransactionResult): Promise<void> {
return p
.then(async result => {
- let txReceiptStatus: null | string | 0 | 1;
+ let txReceiptStatus: TransactionReceiptStatus;
if (_.isString(result)) {
// Result is a txHash. We need to make a web3 call to get the
// receipt, then get the status from the receipt.
diff --git a/packages/ethereum-types/src/index.ts b/packages/ethereum-types/src/index.ts
index 499c84327..f4d445e3b 100644
--- a/packages/ethereum-types/src/index.ts
+++ b/packages/ethereum-types/src/index.ts
@@ -215,6 +215,8 @@ export interface TxDataPayable extends TxData {
value?: BigNumber;
}
+export type TransactionReceiptStatus = null | string | 0 | 1;
+
export interface TransactionReceipt {
blockHash: string;
blockNumber: number;
@@ -222,7 +224,7 @@ export interface TransactionReceipt {
transactionIndex: number;
from: string;
to: string;
- status: null | string | 0 | 1;
+ status: TransactionReceiptStatus;
cumulativeGasUsed: number;
gasUsed: number;
contractAddress: string | null;