graph: Add unsigned vs. signed comment to From<U128> for BigInt
@@ -82,6 +82,11 @@ impl From<i32> for BigInt {
}
impl From<U128> for BigInt {
+ /// This implementation assumes that U128 represents an unsigned U128,
+ /// and not a signed U128 (aka int128 in Solidity). Right now, this is
+ /// all we need (for block numbers). If it ever becomes necessary to
+ /// handle signed U128s, we should add the same
+ /// `{to,from}_{signed,unsigned}_u128` methods that we have for U256.
fn from(n: U128) -> BigInt {
let mut bytes: [u8; 16] = [0; 16];
n.to_little_endian(&mut bytes);
