Closed Zena-park closed 2 weeks ago
Describe the bug The L2 transaction is executed even when there is no actual L1 activity ( when msg.value is 0 and _data is '0x' ).
L2ToL1MessagePasser.initiateWithdrawal(l1Wallet.address, 100000, '0x', { value: 0})
L2CrossDomainMessenger.sendMessage(l1Wallet.address, '0x', 200000, { value: 0 })
Configuration
Severity:
Impact
Unnecessary gas consumption
Recommendation
In the L2ToL1MessagePasser.initiateWithdrawal function, if msg.value is 0 and there is no _data parameter value, error handling is required.
https://github.com/tokamak-network/tokamak-thanos/blob/5ad9baac98217a0c1533969b00076d9a4443edba/packages/tokamak/contracts-bedrock/src/L2/L2ToL1MessagePasser.sol#L73-L83
I think it is okay here. Even L1 does not prevent submit a transaction like that. And Optimism is the same compared to Thanos in this situation
Okay. I'll close the issue.
Describe the bug The L2 transaction is executed even when there is no actual L1 activity ( when msg.value is 0 and _data is '0x' ).
Configuration
Severity:
Impact
Unnecessary gas consumption
Recommendation
In the L2ToL1MessagePasser.initiateWithdrawal function, if msg.value is 0 and there is no _data parameter value, error handling is required.
https://github.com/tokamak-network/tokamak-thanos/blob/5ad9baac98217a0c1533969b00076d9a4443edba/packages/tokamak/contracts-bedrock/src/L2/L2ToL1MessagePasser.sol#L73-L83