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

Auto input, auto generate input to auto test pallet functionality #77

Closed
flipchan opened this issue Aug 8, 2023 · 7 comments
Closed

Comments

@flipchan
Copy link
Collaborator

flipchan commented Aug 8, 2023

No description provided.

@flipchan
Copy link
Collaborator Author

flipchan commented Aug 8, 2023

support default types: bool, u32, u64, u128, addresses, f64, u8

Add a rng module to generate random input for the user.

@flipchan
Copy link
Collaborator Author

flipchan commented Aug 8, 2023

auto data with rng, also affects issue:
#8

@flipchan
Copy link
Collaborator Author

     Running `target/release/examples/test_input_gen`
u128: 178775027959014874923209709721246590756
u64: 1250344893184879350
u32: 2264555777
f64: 0.9103284860997953
f32: 0.0845471
boolean: false

@flipchan
Copy link
Collaborator Author

u128: 225864167899979897207776191162143802327
u64: 15697195152894034115
u32: 986567393
u8: 247
f64: 0.07036028431640629
f32: 0.48309267
boolean: true

@flipchan
Copy link
Collaborator Author

has rand been audited? is rand secure? Rust security researcher Shnatsel has left several comments on this in this a bit aged issue:
rust-secure-code/safety-dance#54

@flipchan
Copy link
Collaborator Author

random accoutid32 with subxt_signer schnorkel wrapper, requires subxthelper flag:
#[cfg(feature = "subxthelper")]
pub fn get_address() -> AccountId32 {

@flipchan
Copy link
Collaborator Author

u128: 159537579899660897343412367838632147051
u64: 7429441923015230314
u32: 2608842753
u8: 156
f64: 0.2547209547718835
f32: 0.7272214
boolean: false
Address: 5HjAev48u9TC5A3QAyu8WBZuWo4asVx1Z72jNoNcAWzsZpU8

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

No branches or pull requests

1 participant