-
Notifications
You must be signed in to change notification settings - Fork 503
[Feat] - Add dynamic chain config to template #1663
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
base: master
Are you sure you want to change the base?
[Feat] - Add dynamic chain config to template #1663
Conversation
|
The plan to integrate the configuration is as follows:
Timeline-wise -- can do after new year's. |
|
I made the changes. I'll double check soon. |
| {{ range $imp := .Cfg.SortedImports }} | ||
| {{ $imp }} | ||
| {{- end }} | ||
| {{ end }} |
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.
Imports placed before pragma statement in Solidity template
Medium Severity
The template places import statements before the pragma solidity statement. According to Solidity documentation and best practices, the standard source file layout order is: SPDX License Identifier → Pragma → Imports. The current template generates imports between the SPDX comment and pragma when imports are provided. While some Solidity versions may accept this ordering, it violates the standard file layout and may cause issues with Solidity linters, formatters, and static analysis tools. The import block should be moved to appear after the pragma solidity line.
Description
Fixes # (issue)
Type of change
How has this been tested?
How has this been benchmarked?
Checklist:
golangci-lintdoes not output errors locallyNote
Introduces configurable extensibility for Solidity verifier generation.
backend/solidity:WithImport,WithInterface,WithConstants,WithConstructor,WithFunctions, plus helpersSortedImports()andInterfaceDeclaration()imports, contractis ...interface list, and optionalConstants/Constructor/Functionsblocksoptions_test.go) validating import sorting, interface declaration formatting, and propagation of constants/constructor/functionsWritten by Cursor Bugbot for commit 68f676d. This will update automatically on new commits. Configure here.