-
Notifications
You must be signed in to change notification settings - Fork 162
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
feat(stdlib): Slice.loadBasechainAddress()
and Slice.skipBasechainAddress()
#2395
base: main
Are you sure you want to change the base?
Conversation
BasechainAddress
struct, related functions, and add Slice.loadBasechainAddress()
, Slice.skipBasechainAddress()
BasechainAddress
struct and related functions, plus Slice.loadBasechainAddress()
, Slice.skipBasechainAddress()
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.
Let's remove all the new functions and keep just the docs changes
BasechainAddress
struct and related functions, plus Slice.loadBasechainAddress()
, Slice.skipBasechainAddress()
BasechainAddress
struct and related functions
I don't understand the purpose of this PR now, if we remove the new functions. If you want to fix the links, please open the new one |
BasechainAddress
struct and related functionsSlice.loadBasechainAddress()
and Slice.skipBasechainAddress()
(which is why i don't like posting incomplete drafts)
|
Now this needs #2411 because of the reference of BasechainAddress, which was supposed to be in core-addresses :) |
there is a difference between drafts and mixing new features and fixes together |
Attempts to load such [`BasechainAddress{:tact}`][base-addr] struct when [`Slice{:tact}`][slice] doesn't contain it throw an exception with [exit code 8](/book/exit-codes#8): `Cell overflow`. | ||
|
||
Attempts to load more data than [`Slice{:tact}`][slice] contains throw an exception with [exit code 9](/book/exit-codes#9): `Cell underflow`. |
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.
What happens when a slice that is not a valid basechain addess is passed?
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.
Exit code 9.
Actually, I may have found a bunch of long-standing typos — the exit code 8 doesn't seem right for the .load functions.
Double-checking those now.
UPD: They're incorrect
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.
This should be documented
} | ||
|
||
// addr_std, skip the remaining prefix bits | ||
self.skipBits(9); |
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.
what happens when we have workchains other than basechain?
Agree with moving it to 1.6.5, we can be more specific when attempting to load the BasechainAddress from a Slice. Like, to use exit codes 138 (not a basechain address), for example. Plus, the exit code 8 doesn't seem achievable with the .load instructions, so that has to be fixed (in progress) |
Converting to a draft until learnXinY is ready for review. Then, I'll return to this. Here, I'll:
|
Issue
Closes #2412