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

Generate max-size constants for dynamic fields #7

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

shermike
Copy link

For example, for the struct:

type Log struct {
    Data []Uint256 `json:"data" ssz-max:"6000"`
}

Will be generated the following constant in log_encoding.go: const LogMaxDataSize = 6000

@shermike shermike requested a review from olegrok November 27, 2024 12:02
@shermike shermike force-pushed the add-max-size-constants branch from 11966c6 to f18caf3 Compare November 27, 2024 12:14
For example, for the struct:
```
type Log struct {
    Data []Uint256 `json:"data" ssz-max:"6000"`
}
```
Will be generated the following constant in `log_encoding.go`: `const LogMaxDataSize = 6000`

Signed-off-by: Mikhail Sherstennikov <[email protected]>
@shermike shermike force-pushed the add-max-size-constants branch from f18caf3 to c98789b Compare November 27, 2024 12:16
Copy link

@olegrok olegrok left a comment

Choose a reason for hiding this comment

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

@shermike shermike merged commit 50c6ef9 into main Nov 27, 2024
1 check passed
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.

2 participants