Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement basic uint128 type #1448

Open
joshklop opened this issue Nov 22, 2023 · 3 comments · May be fixed by #1452
Open

Implement basic uint128 type #1448

joshklop opened this issue Nov 22, 2023 · 3 comments · May be fixed by #1452
Labels
Good first issue Good for newcomers

Comments

@joshklop
Copy link
Contributor

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: #1447 (comment)

@joshklop joshklop added the Good first issue Good for newcomers label Nov 22, 2023
@sarabrajsingh
Copy link

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

@joshklop
Copy link
Contributor Author

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.Felts are probably all we want right now.

@sarabrajsingh sarabrajsingh linked a pull request Nov 23, 2023 that will close this issue
@sarabrajsingh
Copy link

@joshklop - i threw up a quick wip pr - #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.

@joshklop joshklop linked a pull request Dec 4, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants