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

Add the field element data type #120

Closed
tshakalekholoane opened this issue Apr 4, 2022 · 0 comments · Fixed by #139
Closed

Add the field element data type #120

tshakalekholoane opened this issue Apr 4, 2022 · 0 comments · Fixed by #139
Labels
Core Features or changes related to core package

Comments

@tshakalekholoane
Copy link
Contributor

tshakalekholoane commented Apr 4, 2022

Implement the field element data type used in StarkNet including convenience methods that provide capabilities such as serialisation. A starting point might be wrapping the Go math/big Int type.

See also:

@tshakalekholoane tshakalekholoane added the Core Features or changes related to core package label Apr 4, 2022
adriantpaez added a commit that referenced this issue Apr 19, 2022
Implementation of the `field element` type (Felt) with:
- Basic arithmetic operations
- String representation with custom base
- UnmarshalJSON to use in the StarkNet models
@adriantpaez adriantpaez mentioned this issue Apr 19, 2022
12 tasks
stdevMac pushed a commit that referenced this issue Apr 21, 2022
* core: add Felt (#120)

Implementation of the `field element` type (Felt) with:
- Basic arithmetic operations
- String representation with custom base
- UnmarshalJSON to use in the StarkNet models

* Remove unused lines

* refactor: propose changes

- Move the Felt logic to its own package.
- Remove redundant allocations.
- Use the new gofmt specifiers to indicate links in the documentation.
- Generalise the fmt.Stringer conformance.

* fix: tests for the Felt.String() function

* fix: update Felt.String()

Return a hexadecimal string without the 0x prefix

* refactor: remove comment

Co-authored-by: Tshaka Eric Lekholoane <_@tshaka.co>
IronGauntlets pushed a commit that referenced this issue Aug 18, 2022
* core: add Felt (#120)

Implementation of the `field element` type (Felt) with:
- Basic arithmetic operations
- String representation with custom base
- UnmarshalJSON to use in the StarkNet models

* Remove unused lines

* refactor: propose changes

- Move the Felt logic to its own package.
- Remove redundant allocations.
- Use the new gofmt specifiers to indicate links in the documentation.
- Generalise the fmt.Stringer conformance.

* fix: tests for the Felt.String() function

* fix: update Felt.String()

Return a hexadecimal string without the 0x prefix

* refactor: remove comment

Co-authored-by: Tshaka Eric Lekholoane <_@tshaka.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Features or changes related to core package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant