Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
feat(proposer): try parsing custom error when sending transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Apr 23, 2024
1 parent d357a05 commit 9fe80b7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion proposer/proposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion proposer/transaction_builder/blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion proposer/transaction_builder/calldata.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 9fe80b7

Please sign in to comment.