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

Update invoke example values for numeric and byte types #1987

Merged
merged 3 commits into from
Mar 28, 2025

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Mar 27, 2025

What

Update example values for numeric and byte types that are presented to users in docs about a contract on the invoke command.

Why

The examples provided were a mix of rather random values, such as 'beefface123' for bytes, and some integers were exampled as '42', others contained negative signs which looked a bit confusing when seeing a suggestion to use a negative value for values in a contract that should never be negative.

Also, the BytesN command outputted invalid examples whenever the N was not event.

@leighmcculloch leighmcculloch marked this pull request as ready for review March 27, 2025 03:46
@leighmcculloch leighmcculloch requested a review from Copilot March 27, 2025 03:46
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates example values for numeric and byte types used in the invoke command documentation for contracts. It replaces varied and sometimes confusing numbers (including negative values) with consistent, non-negative values and ensures byte examples are valid.

@leighmcculloch leighmcculloch requested a review from Copilot March 27, 2025 03:48
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates example values for numeric and byte types in the documentation to provide more consistent and less confusing examples for users of the invoke command. Key changes include:

  • Replacing mixed numeric examples (like 42 and -42) with a uniform value ("1") for the ScType numeric variants.
  • Updating the byte examples to use a consistent 16-character hexadecimal string.
  • Simplifying the logic for generating BytesN examples.

@leighmcculloch leighmcculloch enabled auto-merge (squash) March 28, 2025 13:34
@leighmcculloch leighmcculloch requested a review from fnando March 28, 2025 13:35
@leighmcculloch leighmcculloch merged commit 5429607 into main Mar 28, 2025
32 checks passed
@leighmcculloch leighmcculloch deleted the update-example-values branch March 28, 2025 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants