Skip to main content

Module utils

Module utils 

Source

Functionsยง

compute_topology_fingerprint
Compute the full XOR topology fingerprint from a list of Ethereum addresses.
token_to_f64
Convert a U256 token amount to an f64 with the given decimals. Same f64 precision limitation as wei_to_eth_f64. Display/estimation only.
wei_to_eth_f64
Convert a U256 wei amount to an f64 ETH amount. Loses precision above ~9 ETH (f64 mantissa limit). Display/estimation only.
xor_into_fingerprint
XOR a 32-byte address hash into the fingerprint. Matches Solidity topologyFingerprint ^ keccak256(abi.encodePacked(nodeAddress)).