juno
juno copied to clipboard
Implement basic `uint128` type
Or use third-party package if there's a good one. I think net
contains an un-exported uint128
implementation we can use as inspiration.
Context: https://github.com/NethermindEth/juno/pull/1447#discussion_r1402009510
hey @joshklop - just to be clear, you'd like to see a uint128
type implementation similar to this implementation in the net
package? https://go.dev/src/net/netip/uint128.go
Hi! Something similar would make sense (struct with hi, lo uint64s). There is no need to implement receivers and methods we wouldn't use in Juno; adapter functions/receivers to convert to/from felt.Felt
s are probably all we want right now.
@joshklop - i threw up a quick wip pr - https://github.com/NethermindEth/juno/pull/1452 - let me know if this is the direction you'd like to see from the implementation. if it's good then I can continue swapping out felt.Felt
or the new uint128
type wherever MaxPricePerUnit
exists.