Skip to content

Commit 3dd3868

Browse files
authored
feat: add from/to fields for receipt (#629)
* feat: add from/to fields for receipt * fix: fix types
1 parent 5e0a66b commit 3dd3868

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

packages/common/src/adapters/types/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ export interface Log {
7272
* Standardized transaction receipt
7373
*/
7474
export interface TransactionReceipt {
75+
from: string
76+
to: string | null
7577
transactionHash: string
7678
blockNumber: bigint
7779
blockHash: string

packages/providers/ethers-v5-adapter/src/EthersV5SignerAdapter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ export class EthersV5SignerAdapter extends AbstractSigner<RpcProvider> {
5454
wait: async (confirmations?: number) => {
5555
const receipt = await tx.wait(confirmations)
5656
return {
57+
from: receipt.from,
58+
to: receipt.to,
5759
transactionHash: receipt.transactionHash,
5860
blockNumber: BigInt(receipt.blockNumber),
5961
blockHash: receipt.blockHash,

packages/providers/ethers-v6-adapter/src/EthersV6SignerAdapter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ export class EthersV6SignerAdapter extends AbstractSigner<Provider> {
4848
throw new Error('Transaction failed')
4949
}
5050
return {
51+
from: receipt.from,
52+
to: receipt.to,
5153
transactionHash: receipt.hash,
5254
blockNumber: BigInt(receipt.blockNumber),
5355
blockHash: receipt.blockHash || '',

packages/providers/viem-adapter/src/ViemSignerAdapter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ export class ViemSignerAdapter extends AbstractSigner<PublicClient> {
9696
})
9797

9898
return {
99+
from: receipt.from,
100+
to: receipt.to,
99101
transactionHash: receipt.transactionHash,
100102
blockNumber: BigInt(receipt.blockNumber),
101103
blockHash: receipt.blockHash,

0 commit comments

Comments
 (0)