Closed akshay-ap closed 4 months ago
Totals | |
---|---|
Change from base Build 9462835574: | 0.0% |
Covered Lines: | 388 |
Relevant Lines: | 400 |
Totals | |
---|---|
Change from base Build 9462835574: | 0.01% |
Covered Lines: | 389 |
Relevant Lines: | 401 |
Totals | |
---|---|
Change from base Build 9462835574: | 0.01% |
Covered Lines: | 389 |
Relevant Lines: | 401 |
Why event SafeModuleTransaction is not emitted by execTransactionFromModuleReturnData in SafeL2?
I think because previously execTransactionFromModuleReturnData
used to call execTransactionFromModule
internally but with the introduction of guards it couldn't rely on the return data buffer anymore and this was changed and overlooked in https://github.com/safe-global/safe-smart-account/pull/728
good catch sir! would be great to add a test for this
good catch sir! would be great to add a test for this
Already added in the PR here: https://github.com/safe-global/safe-smart-account/pull/774/files
Totals | |
---|---|
Change from base Build 9462835574: | 0.0% |
Covered Lines: | 388 |
Relevant Lines: | 400 |
Do we have some analysis on the gas cost implications of this change?
Totals | |
---|---|
Change from base Build 9462835574: | 0.0% |
Covered Lines: | 388 |
Relevant Lines: | 400 |
Totals | |
---|---|
Change from base Build 9462835574: | 0.0% |
Covered Lines: | 388 |
Relevant Lines: | 400 |
Do we have some analysis on the gas cost implications of this change?
Added it in PR description.
I also noticed that this implementation started emitting events for execTransactionFromModuleReturnData
, so we should add tests for it as @mmv08 suggested.
Totals | |
---|---|
Change from base Build 9462835574: | 0.0% |
Covered Lines: | 388 |
Relevant Lines: | 400 |
I also noticed that this implementation started emitting events for
execTransactionFromModuleReturnData
, so we should add tests for it as @mmv08 suggested.
Added here: https://github.com/safe-global/safe-smart-account/pull/772/commits/4e719c27da667004d87ba8ee99fa0bc76e7c2f7b
Now, we don't need #774
Totals | |
---|---|
Change from base Build 9462835574: | 0.0% |
Covered Lines: | 388 |
Relevant Lines: | 400 |
I'm not sure I understand this "con" from option B in the PR description:
aah, my bad. I have updated the description.
Totals | |
---|---|
Change from base Build 9462835574: | 0.0% |
Covered Lines: | 388 |
Relevant Lines: | 400 |
Totals | |
---|---|
Change from base Build 9462835574: | 0.01% |
Covered Lines: | 389 |
Relevant Lines: | 401 |
Totals | |
---|---|
Change from base Build 9462835574: | 0.01% |
Covered Lines: | 389 |
Relevant Lines: | 401 |
Fixes: #735 and #773
Changes in PR
onAfterExecTransactionFromModule
that gets called after execution from module.SafeModuleTransaction
.execTransactionFromModuleReturnData
in SafeL2 emitsSafeModuleTransaction
event.Codesize increase by
33
bytes with compiler version 0.7.6This PR:
Main branch
Impact on gas usage with
Safe
contractChanges in this PR add additional overhead of
49
gasThis PR:
Main branch
Why this approach?
Alternatives considered A.
execTransactionFromModule(...)
fromModuleManager
toSafe
contract. https://github.com/safe-global/safe-smart-account/pull/772/commits/3521a4bd8b468ef5ae517729898f8bbc1fc325faModuleManager
does not implementexecTransactionFromModule
.B.
_onExecTransactionFromModule
method that gets called byexecTransactionFromModule
Con: This approach still has repeating codeA
with new function. Here,_onExecTransactionFromModule
still calls its parent.24
bytesSide note:
Why event
SafeModuleTransaction
is not emitted byexecTransactionFromModuleReturnData
inSafeL2
? WhySafeL2
does not overrideexecTransactionFromModuleReturnData
. ->execTransactionFromModuleReturnData
inSafeL2
should also emit event. Might have been missed in the past.Would be covered in a separate PR.. This PR fixes the issue.