import '../../setup' ; import { SignedTransaction , RollupTransaction , Transfer , abiEncodeSignedTransaction , abiEncodeTransaction , parseSignedTransactionFromABI , parseTransactionFromABI , } from '../../../src/' ; const sender = '423Ace7C343094Ed5EB34B0a1838c19adB2BAC92' ; const recipient = 'ba3739e8B603cFBCe513C9A4f8b6fFD44312d75E' ; describe ( 'RollupEncoding' , ( ) => { describe ( 'Transactions' , ( ) => { it ( 'should encoded & decode Transfer without throwing' , async ( ) => { const tx = { sender , recipient , tokenType : 1 , amount : 15 , } ; const abiEncoded = abiEncodeTransaction ( tx ) ; const transfer = parseTransactionFromABI ( abiEncoded ) ; transfer . should . deep . equal ( tx ) ; } ) ; it ( 'should encoded & decode SignedTransactions without throwing' , async ( ) => { const transfer = { sender , recipient , tokenType : 1 , amount : 15 , } ; const signedTransfer = { signature : '0x1234' , transaction : transfer , } ; const abiEncodedTransfer = abiEncodeSignedTransaction ( signedTransfer ) ; const parsedTransfer = parseSignedTransactionFromABI ( abiEncodedTransfer ) ; parsedTransfer . should . deep . equal ( signedTransfer ) ; } ) ; } ) ; } ) ;