-
Notifications
You must be signed in to change notification settings - Fork 204
Open
Description
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)"
- 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
}
- 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)"
Metadata
Metadata
Assignees
Labels
No labels