-
Notifications
You must be signed in to change notification settings - Fork 13
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
Solsig indexed #75
Solsig indexed #75
Conversation
Signed-off-by: Peter Broadhurst <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few comments
pkg/abi/typecomponents.go
Outdated
@@ -66,7 +66,7 @@ type TypeComponent interface { | |||
DecodeABIData(d []byte, offset int) (*ComponentValue, error) | |||
DecodeABIDataCtx(ctx context.Context, d []byte, offest int) (*ComponentValue, error) | |||
|
|||
SolidityParamDef(inFunction bool) (solDef string, structDefs []string) // gives a string that can be used to define this param in solidity | |||
SolidityParamDef(isFunction, isEvent bool) (solDef string, structDefs []string) // gives a string that can be used to define this param in solidity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I understand they are mutuality exclusive, feels like this should be an enum as it's either one or the other
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok - moving interface to enum and refactoring
if isRef && inFunction { | ||
paramDef = fmt.Sprintf("%s memory", paramDef) | ||
if isRef && isFunction { | ||
paramDef += " memory" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the change from sprintF to +=
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just felt more readable
Signed-off-by: Peter Broadhurst <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank for making those changes @peterbroadhurst , looks a lot nearer to me now!
After all the work in #71, I ended up missing one of the most important distinguishing things the feature was meant to help with 🤦
The ABI signature of an event is identical for ERC-20/ERC-721, but some of the fields are indexed. I'd missed including that.
In PR chain with #73