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

chore: improve interface explanation #10

Merged
merged 1 commit into from
Sep 24, 2024
Merged

chore: improve interface explanation #10

merged 1 commit into from
Sep 24, 2024

Conversation

daejunpark
Copy link
Collaborator

@daejunpark daejunpark commented Sep 24, 2024

this improves the explanation of createCalldata interface

// An exception is thrown if the contract name exists in multiple files. An optional filename (with .sol extension) can be provided to avoid ambiguity.
// By default, view and pure functions are excluded. An optional boolean flag can be set to include view and pure functions.
function createCalldata(string memory contractOrInterfaceName) external pure returns (bytes memory data);
function createCalldata(string memory contractOrInterfaceName, bool includeViewAndPureFunctions) external pure returns (bytes memory data);
Copy link
Collaborator

Choose a reason for hiding this comment

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

adding a suggestion for my preference, but not a blocker:

Suggested change
function createCalldata(string memory contractOrInterfaceName, bool includeViewAndPureFunctions) external pure returns (bytes memory data);
function createCalldata(string memory contractOrInterfaceName, bool includeReadOnlyFunctions) external pure returns (bytes memory data);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i considered "ReadOnly" vs "ViewAndPure", but i feel the latter is less ambiguous. this is because, technically, there are read-only functions that are not marked view or pure, which will still be included even if this flag is set to false.

@daejunpark daejunpark merged commit a02072c into main Sep 24, 2024
4 checks passed
@daejunpark daejunpark deleted the chore/comment branch September 24, 2024 22:55
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