Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit multisig #133

Merged
merged 6 commits into from
Aug 2, 2018
Merged

Audit multisig #133

merged 6 commits into from
Aug 2, 2018

Conversation

treerz
Copy link
Contributor

@treerz treerz commented Jul 27, 2018

Fixes #.10 and #.11 in MultiSig

  • use abi.encodeWithSignature for delegatecall
  • limit gas amount sent to delegatecall

@treerz treerz self-assigned this Jul 27, 2018
@treerz treerz requested review from phraktle and szerintedmi July 27, 2018 11:48
phraktle
phraktle previously approved these changes Jul 27, 2018
@@ -94,7 +94,8 @@ contract MultiSig {
script.state = ScriptState.Failed;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to mark script as failed prior to executing it, because you 100% have enough gas to set correct script.state after delegateCall. This will save gas and allow to clean up lines 97-102.

"problem" part of #10 is solved already, "code quality" isn't yet

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, i'll remove the unnecessary parts.

…ow retain enough gas to set it properly after we have the result)
@treerz treerz merged commit a4f8b3d into staging Aug 2, 2018
@treerz treerz deleted the audit-multisig branch August 17, 2018 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants