-
Notifications
You must be signed in to change notification settings - Fork 16
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
Use more wrappers in API #270
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
limemloh
force-pushed
the
api-strict-types
branch
from
September 22, 2023 14:50
a4c6bce
to
9965528
Compare
limemloh
force-pushed
the
api-strict-types
branch
from
September 22, 2023 18:29
9965528
to
db3e0bb
Compare
limemloh
force-pushed
the
ccd-js-gen-use-schema
branch
3 times, most recently
from
September 25, 2023 13:16
936594b
to
43746e4
Compare
limemloh
force-pushed
the
ccd-js-gen-use-schema
branch
from
September 26, 2023 07:32
43746e4
to
b528f5a
Compare
5 tasks
limemloh
force-pushed
the
api-strict-types
branch
2 times, most recently
from
September 28, 2023 07:08
d31b794
to
c5a0fab
Compare
limemloh
force-pushed
the
api-strict-types
branch
from
September 28, 2023 07:16
c5a0fab
to
a1edc78
Compare
soerenbf
approved these changes
Oct 2, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's what I found:
Also, as discussed, we should implement some JSON (de)serialization interface for all the types. Maybe we should add an issue for this, so we don't forget?
soerenbf
reviewed
Oct 2, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Introduce type wrappers and update API to use them instead of primitives.
Changes
Several types have been replaced with a module containing the type itself together with functions for constructing and
converting the type:
AccountAddress
ContractAddresss
CredentialRegistrationId
Duration
Timestamp
Energy
The API now uses dedicated types instead of language primitives for:
AccountAddress
instead of a string with base58 encoding.BlockHash
instead of a string with hex encoding.TranactionHash
instead of a string with hex encoding.Energy
instead of a bigint.ReceiveName
instead of a string.InitName
instead of a string.ContractName
instead of a string.EntrypointName
instead of a string.Parameter
instead of a string with hex encoding.SequenceNumber
(formerly called nonce) instead of a bigint.Timestamp
instead of a bigint.Duration
instead of a bigint.Checklist
hard-to-understand areas.