MCPcopy Create free account
hub / github.com/base/base / addr

Function addr

crates/proof/challenge/src/test_utils.rs:530–534  ·  view source on GitHub ↗

Helper to create an address from a `u64` index.

(index: u64)

Source from the content-addressed store, hash-verified

528
529/// Helper to create an address from a `u64` index.
530pub fn addr(index: u64) -> Address {
531 let mut bytes = [0u8; 20];
532 bytes[12..20].copy_from_slice(&index.to_be_bytes());
533 Address::from(bytes)
534}
535
536/// Helper to build a factory game entry.
537pub fn factory_game(index: u64, game_type: u32) -> GameAtIndex {

Calls

no outgoing calls

Tested by

no test coverage detected