Closed natebeauregard closed 1 month ago
The changes in this pull request focus on modifying the InitiateWithdrawal
function within the L2ToL1MessagePasserExecuter
struct by changing the sender
parameter type from a string to common.Address
. This adjustment streamlines the address handling process. Additionally, updates in the storeWithdrawalMsgInEVM
function ensure the sender's address is correctly formatted for Ethereum transactions, and the test function has been updated to reflect these changes.
File | Change Summary |
---|---|
bindings/L2ToL1MessagePasserExecuter.go | Changed InitiateWithdrawal to accept sender as common.Address instead of a string. |
builder/builder.go | Added import for sdk and updated address handling in storeWithdrawalMsgInEVM for Ethereum compatibility. |
evm/executer_test.go | Modified TestL2ToL1MessagePasserExecuter to use common.HexToAddress for sender address initialization. |
๐ In the meadow where bunnies play,
We fixed the code in a clever way.
With addresses clear, and errors caught,
Our withdrawals now work, as they ought!
Hopping along, we celebrate,
Robustness and joy, oh, isnโt it great? ๐
builder/builder.go (2)
`12-12`: **LGTM!** The import statement is approved. --- `340-347`: **LGTM!** The code changes are approved for the following reasons: - The conversion from Bech32 to Cosmos address using `sdk.AccAddressFromBech32` ensures the sender's address is in the correct format. - Transforming the Cosmos address to Ethereum address format using `common.BytesToAddress` enhances compatibility with the Ethereum state. - The changes fix the address conversion bug and improve the reliability of the withdrawals feature.
Fixes a small bug in the withdrawals flow where cosmos addresses weren't being correctly converted from Bech32 before being converted to their ETH representation.
Summary by CodeRabbit
New Features
Bug Fixes
Tests