@@ -523,6 +523,29 @@ func (d *Derivation) UnPackData(data []byte) (geth.RPCRollupBatch, error) {
523523 PostStateRoot : common .BytesToHash (rollupBatchData .PostStateRoot [:]),
524524 WithdrawRoot : common .BytesToHash (rollupBatchData .WithdrawalRoot [:]),
525525 }
526+ } else if bytes .Equal (d .rollupABI .Methods ["commitBatchWithProof" ].ID , data [:4 ]) {
527+ args , err := d .rollupABI .Methods ["commitBatchWithProof" ].Inputs .Unpack (data [4 :])
528+ if err != nil {
529+ return batch , fmt .Errorf ("commitBatchWithProof Unpack error:%v" , err )
530+ }
531+ rollupBatchData := args [0 ].(struct {
532+ Version uint8 "json:\" version\" "
533+ ParentBatchHeader []uint8 "json:\" parentBatchHeader\" "
534+ LastBlockNumber uint64 "json:\" lastBlockNumber\" "
535+ NumL1Messages uint16 "json:\" numL1Messages\" "
536+ PrevStateRoot [32 ]uint8 "json:\" prevStateRoot\" "
537+ PostStateRoot [32 ]uint8 "json:\" postStateRoot\" "
538+ WithdrawalRoot [32 ]uint8 "json:\" withdrawalRoot\" "
539+ })
540+ batch = geth.RPCRollupBatch {
541+ Version : uint (rollupBatchData .Version ),
542+ ParentBatchHeader : rollupBatchData .ParentBatchHeader ,
543+ LastBlockNumber : rollupBatchData .LastBlockNumber ,
544+ NumL1Messages : rollupBatchData .NumL1Messages ,
545+ PrevStateRoot : common .BytesToHash (rollupBatchData .PrevStateRoot [:]),
546+ PostStateRoot : common .BytesToHash (rollupBatchData .PostStateRoot [:]),
547+ WithdrawRoot : common .BytesToHash (rollupBatchData .WithdrawalRoot [:]),
548+ }
526549 } else {
527550 return batch , types .ErrNotCommitBatchTx
528551 }
0 commit comments