-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add advanced wallet code in wallet-v3-code.fif #1978
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
Open
ugursrtdmr9
wants to merge
1
commit into
ton-blockchain:master
Choose a base branch
from
ugursrtdmr9:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+27
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| #!/usr/bin/fift -s | ||
| "Asm.fif" include | ||
|
|
||
| // New advanced wallet code adapted from `auto/wallet3-code.fif` | ||
| <{ SETCP0 DUP IFNOTRET // return if recv_internal | ||
| DUP 85143 INT EQUAL OVER 78748 INT EQUAL OR IFJMP:<{ // "seqno" and "get_public_key" get-methods | ||
| 1 INT AND c4 PUSHCTR CTOS 32 LDU 32 LDU NIP 256 PLDU CONDSEL // cnt or pubk | ||
| }> | ||
| INC 32 THROWIF // fail unless recv_external | ||
| 9 PUSHPOW2 LDSLICEX DUP 32 LDU 32 LDU 32 LDU // signature in_msg subwallet_id valid_until msg_seqno cs | ||
| NOW s1 s3 XCHG LEQ 35 THROWIF // signature in_msg subwallet_id cs msg_seqno | ||
| c4 PUSH CTOS 32 LDU 32 LDU 256 LDU ENDS // signature in_msg subwallet_id cs msg_seqno stored_seqno stored_subwallet public_key | ||
| s3 s2 XCPU EQUAL 33 THROWIFNOT // signature in_msg subwallet_id cs public_key stored_seqno stored_subwallet | ||
| s4 s4 XCPU EQUAL 34 THROWIFNOT // signature in_msg stored_subwallet cs public_key stored_seqno | ||
| s0 s4 XCHG HASHSU // signature stored_seqno stored_subwallet cs public_key msg_hash | ||
| s0 s5 s5 XC2PU // public_key stored_seqno stored_subwallet cs msg_hash signature public_key | ||
| CHKSIGNU 35 THROWIFNOT // public_key stored_seqno stored_subwallet cs | ||
| ACCEPT | ||
| WHILE:<{ | ||
| DUP SREFS // public_key stored_seqno stored_subwallet cs _51 | ||
| }>DO<{ // public_key stored_seqno stored_subwallet cs | ||
| 8 LDU LDREF s0 s2 XCHG // public_key stored_seqno stored_subwallet cs _56 mode | ||
| SENDRAWMSG | ||
| }> // public_key stored_seqno stored_subwallet cs | ||
| ENDS SWAP INC // public_key stored_subwallet seqno' | ||
| NEWC 32 STU 32 STU 256 STU ENDC c4 POP | ||
| }>c | ||
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.
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.
UQCTvFud6_Zp7-047-nRS7slbIof4agxPdnGQ7bLg1RXFgfN