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

Remove Hardcoded Version in README and Add Nicer Error #135

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

rauljordan
Copy link
Contributor

This PR removes a hardcoded version from the README.md and intercepts the common missing import error that is a result of not specifying an #[entrypoint] in contracts that users frequently run into.

Copy link
Contributor

@gligneul gligneul left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +265 to +268
if e.msg.contains("pay_for_memory_grow") {
let msg = "Contract could not be activated as it is missing an entrypoint. \
Please ensure that your contract has an #[entrypoint] defined on your main struct";
bail!(msg);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is nice! I wonder if this message should be on the SDK side, but I'm not sure if it is possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The error comes from the Nitro backend, so I think we're kind of stuck here. It's a bit hacky, but it works

@rauljordan rauljordan merged commit 3bc9e27 into main Jan 22, 2025
7 checks passed
@rauljordan rauljordan deleted the remove-readme-hardcoded-version branch January 22, 2025 19:12
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