-
Notifications
You must be signed in to change notification settings - Fork 31
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
[Docs]: Make Rust docs consistent #476
Labels
Milestone
Comments
bidzyyys
added
type: feature
New feature request.
needs triage
Needs to be assigned the appropriate labels
labels
Jan 7, 2025
Just for clarity, with the proposed convention the /// Returns the Uniform Resource Identifier (URI) for `token_id` token.
///
/// NOTE: In order to expose this function in the ABI, you need to annotate
/// it with `#[selector(name = "tokenURI")]` and ensure that the `erc721`
/// parameter is passed internally. This design works around Stylus's lack
/// of inheritance while avoiding code duplication. See the Example section.
///
/// # Arguments
///
/// * `&self` - Read access to the contract's state.
/// * `token_id` - ID of a token.
/// * `erc721` - Read access to a contract providing [`IErc721`] interface.
///
/// # Errors
///
/// * [`Error::NonexistentToken`] - If the token does not exist.
///
/// # Example
///
/// ```rust,ignore
/// #[selector(name = "tokenURI")]
/// pub fn token_uri(&self, token_id: U256) -> Result<String, Vec<u8>> {
/// Ok(self.metadata.token_uri(token_id, &self.erc721)?)
/// }
/// ```
|
Yes @0xNeshi 💯 |
3 tasks
Hey @0xNeshi ,Would like to work on this |
Thanks for your interest in contributing to our library @DarkLord017! Sure, go ahead 🚀 |
DarkLord017
added a commit
to DarkLord017/rust-contracts-stylus
that referenced
this issue
Jan 15, 2025
Open
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
What is the feature you would like to see?
Rust docs for our contracts should follow the order:
1.1 Additional
NOTE: ...
1.2 Additional
NOTE: "In order to expose this function in ABI you need to ..."
*
)*
)*
)Contribution Guidelines
The text was updated successfully, but these errors were encountered: