MCPcopy Create free account
hub / github.com/cowprotocol/services / from_integer

Method from_integer

crates/model/src/order.rs:711–715  ·  view source on GitHub ↗

Intended for easier uid creation in tests.

(i: u32)

Source from the content-addressed store, hash-verified

709impl OrderUid {
710 /// Intended for easier uid creation in tests.
711 pub fn from_integer(i: u32) -> Self {
712 let mut uid = OrderUid::default();
713 uid.0[0..4].copy_from_slice(&i.to_le_bytes());
714 uid
715 }
716
717 /// Create a UID from its parts.
718 pub fn from_parts(hash: B256, owner: Address, valid_to: u32) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected