eigerco / nebula

A soroban contract library
https://nebula.eiger.co
Apache License 2.0
7 stars 2 forks source link

use of deprecated method `soroban_sdk::prng::Prng::u64_in_range` #117

Open geofmureithi opened 11 months ago

geofmureithi commented 11 months ago

Describe the bug

error: use of deprecated method `soroban_sdk::prng::Prng::u64_in_range`: use env.prng().gen_range(...)
  --> contracts/shared/src/rand.rs:21:20
   |
21 |         env.prng().u64_in_range(1..=max_range as u64) as u32
   |                    ^^^^^^^^^^^^
   |
   = note: `-D deprecated` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(deprecated)]`

error: could not compile `shared` (lib) due to previous error

To Reproduce Compile any contract that uses the API