-
Notifications
You must be signed in to change notification settings - Fork 972
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
Better struct handling in code generation util #1933
Conversation
avoids using struct's canonical name, better for compilation
…o dev-generate-interface-code
@montyly @0xalpharush pip-audit may need to be updated again |
One unresolved issue (edit: resolved below) is that structs defined in a library and referenced in a using-for statement do not get included in the interface, though they may be referenced in a function's arguments or returns. For example: contract Market is Initializable, AccessControlUpgradeable, PausableUpgradeable, ERC4626 {
using FixedLib for FixedLib.Pool;
using FixedLib for FixedLib.Position;
/// @notice Tracks account's fixed deposit positions by maturity, account and position.
mapping(uint256 => mapping(address => FixedLib.Position)) public fixedDepositPositions;
/// @notice Tracks account's fixed borrow positions by maturity, account and position.
mapping(uint256 => mapping(address => FixedLib.Position)) public fixedBorrowPositions;
... for which function fixedDepositPositions(uint256,address) external returns (Position memory);
function fixedBorrowPositions(uint256,address) external returns (Position memory); This causes the compilation error below: Error: Identifier not found or not unique.
--> DiffFuzzUpgrades.sol:257:71:
|
257 | function fixedDepositPositions(uint256,address) external returns (Position memory);
| ^^^^^^^^ |
so we don't end up with two functions with the same name
Bump version
readme updates for 0.9.4 release
use published release of solc-select
patch for python 3.11 support
* docs(readme): add new docs link Fix the status badges and include a link to the documentation page that is now generated * docs(citation): create CITATION.cff This creates a `CITATION.cff` file. The information is taken from arXiv's bibtex for the whitepaper: ```bibtex @inproceedings{Feist_2019, doi = {10.1109/wetseb.2019.00008}, url = {https://doi.org/10.1109%2Fwetseb.2019.00008}, year = 2019, month = {may}, publisher = {{IEEE} }, author = {Josselin Feist and Gustavo Grieco and Alex Groce}, title = {Slither: A Static Analysis Framework for Smart Contracts}, booktitle = {2019 {IEEE}/{ACM} 2nd International Workshop on Emerging Trends in Software Engineering for Blockchain ({WETSEB})} } ```
prepare for 0.9.6 release
* 0.9.6 * lint readme
Generates better code, which will compile without manual editing, when dealing with structs.
I
is prepended to the contract name.include_enums
is false