-
Notifications
You must be signed in to change notification settings - Fork 52
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
suave_structs.go: Marshal bytes to hexstring #206
base: main
Are you sure you want to change the base?
Conversation
- current: []byte field marshals to base64 string - to be: BuildBlockArgs and DataRecord structs now use hexutil.Big and hexutil.Bytes for uint64 and []byte fields respectively
0fb11f1
to
6a7d39e
Compare
@@ -243,6 +265,13 @@ type {{.Name}} struct { | |||
{{range .Fields}}{{title .Name}} {{typ3 .Typ}} | |||
{{end}} | |||
} | |||
|
|||
type {{.Name | lower}}Marshaling struct { |
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.
Do you need to do this as part of the code generation?
Could you create another file suave_structs_encoding.go
which is not code generated that does the encoding overriding?
@@ -45,6 +45,11 @@ devtools: | |||
|
|||
suavedevtools: | |||
go run ./suave/gen/main.go -write | |||
cd core/types && \ |
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.
Could you use // go:generate to do this? https://github.com/flashbots/suave-execution-geth/blob/feature/e2e-block-building-builderapi/suave/builder/api/api.go#L15
📝 Summary
📚 References