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

Add string varibles #55

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add string varibles #55

wants to merge 2 commits into from

Conversation

Jason-W123
Copy link
Contributor

Value set to string is different from other types, we need to mention it.

Copy link

vercel bot commented Jan 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
stylus-by-example ✅ Ready (Inspect) Visit Preview Jan 6, 2025 7:17am

Copy link
Contributor

@TucksonDev TucksonDev left a comment

Choose a reason for hiding this comment

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

Approved, with a small comment

@@ -45,9 +50,11 @@ impl Contract {
// Here are some global variables
let _timestamp = block::timestamp();
let _amount = msg::value();
let _base_uri = self.base_uri.get_string();
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need to add this here. This section is for global variables. We are already showing examples for state variables in the previous function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I put here is because we don't mention how to get value from string type state, maybe we add another read-only function for this and also put how to get owner and max_supply there?

Copy link
Contributor

Choose a reason for hiding this comment

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

Either that, or have a specific "section" for reading those (something under a different comment, since that one suggests those are "global variables")

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