Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

fix: throw nested revert messages #593

Merged
merged 2 commits into from
Apr 22, 2020
Merged

fix: throw nested revert messages #593

merged 2 commits into from
Apr 22, 2020

Conversation

liamzebedee
Copy link
Contributor

Fixes #509

// Slicing the Error() signature (4 bytes) and Data offset (4 bytes)
// leaves us with a pre-encoded string.
// We also slice off the ABI-coded length of returnData (32).
revertMessage := add(returnData, 0x44)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could help to articulate the return data length in something more similar to byte (e.g. either nibble, or half byte), or clarify that it's 32 bits. Got confused on the math for a moment heh.

Copy link
Contributor

@Shadowfiend Shadowfiend left a comment

Choose a reason for hiding this comment

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

Awesome!

@Shadowfiend Shadowfiend merged commit 611c89b into master Apr 22, 2020
@Shadowfiend Shadowfiend deleted the nested-revert-msg branch April 22, 2020 16:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Funding/redemption script revert error string may be malformed
2 participants