From 2cd1583a98eee1eddb85439f7a196cd923350817 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 23 Apr 2024 15:57:24 +0800 Subject: [PATCH] feat(proposer): try parsing custom error when sending transactions (#752) --- proposer/proposer.go | 6 +++++- proposer/transaction_builder/blob.go | 2 +- proposer/transaction_builder/calldata.go | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/proposer/proposer.go b/proposer/proposer.go index f58371911..e32bfe8b8 100644 --- a/proposer/proposer.go +++ b/proposer/proposer.go @@ -320,7 +320,11 @@ func (p *Proposer) ProposeOp(ctx context.Context) error { for i, err := range p.ProposeTxLists(ctx, txListsBytes) { if err != nil { - log.Error("Failed to send TaikoL1.proposeBlock transaction", "index", i, "error", err) + log.Error( + "Failed to send TaikoL1.proposeBlock transaction", + "index", i, + "error", encoding.TryParsingCustomError(err), + ) continue } diff --git a/proposer/transaction_builder/blob.go b/proposer/transaction_builder/blob.go index 601f77428..db831b06d 100644 --- a/proposer/transaction_builder/blob.go +++ b/proposer/transaction_builder/blob.go @@ -129,7 +129,7 @@ func (b *BlobTransactionBuilder) Build( // Send the transaction to the L1 node. data, err := encoding.TaikoL1ABI.Pack("proposeBlock", encodedParams, []byte{}) if err != nil { - return nil, encoding.TryParsingCustomError(err) + return nil, err } return &txmgr.TxCandidate{ diff --git a/proposer/transaction_builder/calldata.go b/proposer/transaction_builder/calldata.go index 469ab1bd7..5af830040 100644 --- a/proposer/transaction_builder/calldata.go +++ b/proposer/transaction_builder/calldata.go @@ -109,7 +109,7 @@ func (b *CalldataTransactionBuilder) Build( // Send the transaction to the L1 node. data, err := encoding.TaikoL1ABI.Pack("proposeBlock", encodedParams, txListBytes) if err != nil { - return nil, encoding.TryParsingCustomError(err) + return nil, err } return &txmgr.TxCandidate{