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

[Framework] Provide a new seed function in simple_rng that allow developers to define a nonce or index #2984

Open
jolestar opened this issue Nov 29, 2024 · 0 comments
Labels
proposal New external API or other notable changes
Milestone

Comments

@jolestar
Copy link
Contributor

Proposal Details

Provide a new seed function in simple_rng that allows developers to define a nonce or index.

Such as:

public fun rand_u64(): u64;
public fun rand_u64_with_index(index: u64): u64;

If a developer calls rand_u64 multiple times rand_u64 in a transaction, he will get the same rand number. So he should call rand_u64_with_index.

cc @mx819812523 @yubing744

@jolestar jolestar added the proposal New external API or other notable changes label Nov 29, 2024
@jolestar jolestar added this to the Rooch v0.9 milestone Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal New external API or other notable changes
Projects
Status: No status
Development

No branches or pull requests

1 participant