From 501e7ef8e2c55c148c857ff60b0986aef857520c Mon Sep 17 00:00:00 2001 From: Brian Chen Date: Mon, 14 Feb 2022 11:39:01 -0800 Subject: [PATCH] Update TransactionReceipt type to match backend types (#97) --- src/alchemy-apis/types.ts | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/alchemy-apis/types.ts b/src/alchemy-apis/types.ts index 98b8db3..63b34f6 100644 --- a/src/alchemy-apis/types.ts +++ b/src/alchemy-apis/types.ts @@ -1,5 +1,3 @@ -import { TransactionReceipt } from "web3-core"; - export interface TokenAllowanceParams { contract: string; owner: string; @@ -151,6 +149,36 @@ export interface TransactionReceiptsResponse { receipts: TransactionReceipt[] | null; } +export interface TransactionReceipt { + transactionHash: string; + blockHash: string; + blockNumber: string; + contractAddress: string | null; + cumulativeGasUsed: string; + effectiveGasPrice: string; + from: string; + gasUsed: string; + logs: Log[]; + logsBloom: string; + root?: string; + status?: string; + to: string; + transactionIndex: string; + type: string; +} + +export interface Log { + blockHash: string; + address: string; + logIndex: string; + data: string; + removed: boolean; + topics: string[]; + blockNumber: string; + transactionHash: string; + transactionIndex: string; +} + export interface Nft { contract: NftContract; id: NftId;