Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/lib/message/L1Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ export class L1TransactionReceipt implements TransactionReceipt {
this.nitroReceipt = new nitro.L1TransactionReceipt(tx)
}

public async getAllDeposits<T extends SignerOrProvider>(l2SignerOrProvider: T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think we should add a getAllDeposits func, instead we should a getEthDepositMessages func like we have in nitro, then use the toNitroEthDepositMessage function to convert the underlying messages into a nitro format

if (await isNitroL2(l2SignerOrProvider)) {
return this.nitroReceipt.getAllDeposits(l2SignerOrProvider)
} else {
return this.classicReceipt.getL1ToL2Messages(l2SignerOrProvider)
}
}

/**
* Get any l1tol2 messages created by this transaction
* @param l2SignerOrProvider
Expand Down