You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I attempted to retrieve the L1 txHash using the provided method in the SDK, but encountered a failure. Upon inspecting the code logic, I noticed that for my transaction, logs==[], and therefore, I couldn't proceed with the next steps. Could you please help me understand how to resolve this issue? Alternatively, are there other methods to obtain the L1 txHash and L1 block number? Thank you.
The text was updated successfully, but these errors were encountered:
liucan163
changed the title
How to get the L1 block number or L1 tx hash through the L2 transaction hash?
How to get the L1 block number or L1 tx hash by the L2 transaction hash?
Nov 30, 2023
tynes
transferred this issue from ethereum-optimism/optimism
Jun 17, 2024
I attempted to retrieve the L1 txHash using the provided method in the SDK, but encountered a failure. Upon inspecting the code logic, I noticed that for my transaction, logs==[], and therefore, I couldn't proceed with the next steps. Could you please help me understand how to resolve this issue? Alternatively, are there other methods to obtain the L1 txHash and L1 block number? Thank you.
const crossChainMessenger = new CrossChainMessenger({
l1ChainId: 11155111,
l2ChainId: 11155420,
l1SignerOrProvider: l1Provider,
l2SignerOrProvider: l2Provider,
})
console.log('crossChainMessenger====', crossChainMessenger)
const l2TxHash = "0xc36006a7203af54a148db0bc6d1a59131cda383a667c9b092e468e775ef4d825"
const l1Rcpt = await crossChainMessenger.getMessageReceipt(l2TxHash)
const l1TxHash = l1Rcpt.transactionReceipt.transactionHash
console.log('l1TxHash=======', l1TxHash)
The text was updated successfully, but these errors were encountered: