Closed luckydog6969 closed 3 months ago
I think the easiest solution for you will be to use a patched version of getrandom with panicking getrandom
and getrandom_uninit
. Alternatively, you could define a custom impl by following the register_custom_getrandom
docs.
disclaimer im a noob so pls bear with me. anyway, when i run cargo build my program compiles successfully but when i run anchor build i get this error output.
according to the documentation of solana (this section corresponds to my error) https://solana.com/docs/programs/lang-rust#depending-on-rand. “Programs are constrained to run deterministically, so random numbers are not available. Sometimes a program may depend on a crate that depends itself on rand even if the program does not use any of the random number functionality. If a program depends on rand, the compilation will fail because there is no get-random support for Solana. “
and it said to add this to the program cargo.toml:
getrandom = { version = "0.1.14", features = ["dummy"] }
. andgetrandom = { version = "0.2.2", features = ["custom"] }
.i tried it and it did not work
givens
if you solve it drop your sol address and ill send you 20 bucks. appreciate the help!