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
Is your feature request related to a problem? Please describe.
It is really hard to find a corresponding FaultDisputeGame on-chain for a specific withdrawal transaction on L2. Users have to loop through all created games to find the right one.
Describe the solution you'd like
One way to solve this problem is to emit the l2BlockNumber and the rootClaim in the Resolved event, so we can use the subgraph to index all events and get the right one or we can directly query events on chain without calling the l2BlockNumber again.
Additional context
We have created this PR to resolve this issue. bobanetwork#226
Does this make sense, and is it helpful for others?
The text was updated successfully, but these errors were encountered:
There isn't a 1:1 mapping between a withdrawal transaction and a dispute game as the dispute game is about an output commitment which commits to all previous withdrawals. Are you trying to build a UI? What feature are you trying to build?
For example, if a user performs a withdrawal transaction on L2 at block X, we need to find the corresponding FaultDisputeGame contract on-chain where the L2 block number in this contract is greater than block X, and the previous FaultDisputeGame contract has a l2 block number smaller than block X. This requires looping through all FaultDisputeGame contracts to find the correct one. By emitting this L2 block number in the event, it becomes easier for us to identify the resolved game associated with the correct L2 block number.
Is your feature request related to a problem? Please describe.
It is really hard to find a corresponding
FaultDisputeGame
on-chain for a specific withdrawal transaction on L2. Users have to loop through all created games to find the right one.Describe the solution you'd like
One way to solve this problem is to emit the
l2BlockNumber
and therootClaim
in theResolved
event, so we can use the subgraph to index all events and get the right one or we can directly query events on chain without calling thel2BlockNumber
again.Additional context
We have created this PR to resolve this issue. bobanetwork#226
Does this make sense, and is it helpful for others?
The text was updated successfully, but these errors were encountered: