Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get transaction status #439

Open
Japelino opened this issue Mar 23, 2024 · 0 comments
Open

Unable to get transaction status #439

Japelino opened this issue Mar 23, 2024 · 0 comments

Comments

@Japelino
Copy link

Japelino commented Mar 23, 2024

I have a few L2->L1 transaction hashes that I would like to know if they're claimed/claimable/settled/pending.
However "status" always returns the error: "invalid BigNumber value (argument="value", value=undefined, code=INVALID_ARGUMENT, version=bignumber/5.7.0)"

  1. First try:
const fetchEventStatus = async (txHash) => {
    const receipt = await l2Provider.getTransactionReceipt(txHash);
    const log = receipt.logs[0];
    const msg = L2ToL1MessageReader.fromEvent(l1Provider, log);
    const status = await msg.status(l2Provider); // Throws error
}
  1. I tried to parse the log using ArbSys but I get the same error:
const fetchEventStatus = async (txHash) => {
    const receipt = await l2Provider.getTransactionReceipt(txHash);
    const log = receipt.logs[0];
    const ArbSysContract = new Contract("0x0000000000000000000000000000000000000064", ArbSysABI, l2Provider);
    const parsedLog = ArbSysContract.interface.parseLog(log);
    const msg = L2ToL1MessageReader.fromEvent(l1Provider, parsedLog);
    const status = await msg.status(l2Provider); // Throws error
}

EDIT:
3. Also tried the following:

const fetchEventStatus = async (txHash) => {
    const receipt = await l2Provider.getTransactionReceipt(txHash);
    const eventsData = await L2ToL1MessageReader.getL2ToL1Events(
      l2Provider,
      { fromBlock: receipt.blockNumber-1, toBlock: receipt.blockNumber },
      undefined,
      undefined,
      receipt.hash,
    );
    const event = eventsData[0];
    const message = L2ToL1MessageReader.fromEvent(l2Provider, event);
    const status = await message.status(l2Provider); // Throws error
}

This makes status throw a different error: "call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="latestConfirmed()", data="0x", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.7.0)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant