-
Notifications
You must be signed in to change notification settings - Fork 368
feat(ICRC_Ledger): DEFI-2541: Manual Block deserializer implementation #7847
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
base: master
Are you sure you want to change the base?
Conversation
|
Follow-up PR: PR 7848. |
| TransferBuilder { | ||
| builder: self, | ||
| from, | ||
| to, | ||
| amount, | ||
| spender: Some(spender), | ||
| } |
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.
| TransferBuilder { | |
| builder: self, | |
| from, | |
| to, | |
| amount, | |
| spender: Some(spender), | |
| } | |
| self.transfer(from, to, amount).spender(spender) |
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.
Thanks for catching this! I removed the transfer_from helper method completely, since as you pointed out, we have the transfer to which you can add spender for accomplishing the same thing.
maciejdfinity
left a comment
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.
As discussed, LGTM
As preparation for supporting the parsing of blocks that have no
tx.opfield in the ICRC-3 block, this PR proposes to manually implement theDeserializetrait forBlock. Internally, the deserialization implementation then uses both thebtypeof theBlock, as well as the parsedFlattenedTransaction, to parse theTransactionthat is subsequently used e.g., by the index to apply the transaction in the block.