base-org/op-viem

writeReplayMesssage

wilsoncusack opened this issue · 3 comments

This would be an L2 action. I think that this should take a transaction hash and a gas limit, we would

  1. (optionally) verify that the transaction had a FailedRelayedMessage event emitted
  2. fetch the calldata of the transaction
  3. call relayMessage on the L2 cross domain messenger with the calldata from the first, (maybe new min gas limit?

See notes on this and gas limit here https://community.optimism.io/docs/protocol/deposit-flow/#replays-in-action

actually I think this is relevant to both L1 and L2

OK so actually there's probably a subtask here that is estimateRelayMessageGas which would proxy to estimate gas from viem but set the caller to 0x0000000000000000000000000000000000000001, which is an address that will cause the function to revert if it is not relayed correctly.

I don't believe this is relavent to l1. It was relavent prebedrock but now replaying is done via the same methods the happy path uses