HederaPrngAdapterLib
Title: HederaPrngAdapterLib
Authors: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80), Modified from hiero-ledger/hiero-contracts (https://github.com/hiero-ledger/hiero-contracts)
Stateless wrapper around the PRNG system contract; drawInRange mirrors the upstream helper's
modulo reduction (bias is negligible for ranges far below 2^32 but is NOT uniform in general).
Functions
__HederaPrngAdapter_init
function __HederaPrngAdapter_init() internal;registerInterface
function registerInterface() internal;drawSeed
function drawSeed() internal returns (bytes32 seed);Returns
| Name | Type | Description |
|---|---|---|
| seed | bytes32 |
drawInRange
function drawInRange(uint32 lo, uint32 hi) internal returns (uint32 number);Parameters
| Name | Type | Description |
|---|---|---|
| lo | uint32 | |
| hi | uint32 |
Returns
| Name | Type | Description |
|---|---|---|
| number | uint32 |