MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / arbitrary

Method arbitrary

fendermint/vm/interpreter/src/arb.rs:12–25  ·  view source on GitHub ↗
(g: &mut Gen)

Source from the content-addressed store, hash-verified

10
11impl Arbitrary for FvmStateParams {
12 fn arbitrary(g: &mut Gen) -> Self {
13 Self {
14 state_root: ArbCid::arbitrary(g).0,
15 timestamp: Timestamp(u64::arbitrary(g)),
16 network_version: NetworkVersion::new(*g.choose(&[21]).unwrap()),
17 base_fee: ArbTokenAmount::arbitrary(g).0,
18 circ_supply: ArbTokenAmount::arbitrary(g).0,
19 chain_id: chainid::from_str_hashed(String::arbitrary(g).as_str())
20 .unwrap()
21 .into(),
22 power_scale: *g.choose(&[-1, 0, 3]).unwrap(),
23 app_version: *g.choose(&[0, 1, 2]).unwrap(),
24 }
25 }
26}

Callers

nothing calls this directly

Calls 3

from_str_hashedFunction · 0.85
as_strMethod · 0.80
TimestampClass · 0.50

Tested by

no test coverage detected