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 rollup serialization #445

Merged

Conversation

@karlfloersch
Copy link
Contributor

commented Sep 16, 2019

Description

This pull request adds a number of helpful classes for serializing transitions and txs for rollup.

Metadata

Fixes

  • Starts to fix #438

Contributing Agreement

@karlfloersch karlfloersch requested a review from willmeister Sep 16, 2019
@karlfloersch karlfloersch added the ovm label Sep 16, 2019
@karlfloersch karlfloersch added this to the Wow the Crowd milestone Sep 16, 2019
@karlfloersch karlfloersch added enhancement and removed ovm labels Sep 16, 2019
Copy link
Collaborator

left a comment

Looks good. Ship it! 🚢

* @returns the TransferNewAccountTx.
*/
const fromEncoded = (encoded: string): AbiCreateAndTransferTransition => {
const decoded = abi.decode(AbiCreateAndTransferTransition.abiTypes, encoded)

This comment has been minimized.

Copy link
@willmeister

willmeister Sep 16, 2019

Collaborator

I might suggest assigning these using array destructuring so that you can add variable names indicating what each index is. Something like...

const [stateRoot, senderSlot, recipientSlot, createdAccountPubkey, tokenType, amount, signature] 
  = abi.decode(AbiCreateAndTransferTransition.abiTypes, encoded)

This comment has been minimized.

Copy link
@karlfloersch

karlfloersch Sep 17, 2019

Author Contributor

Oh that's a great point! Fixed

@karlfloersch karlfloersch merged commit c2c31ce into plasma-group:master Sep 17, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@karlfloersch karlfloersch deleted the karlfloersch:feat/rollup_serialization branch Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.