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

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mask-pp committed Apr 29, 2024
1 parent a352b40 commit 78a6db6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions bindings/encoding/custom_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
)

Expand All @@ -21,7 +20,6 @@ type BlockHashContractCallerAndTransactionReader interface {
func TryParsingCustomErrorFromReceipt(
ctx context.Context,
rpc BlockHashContractCallerAndTransactionReader,
from common.Address,
receipt *types.Receipt,
) error {
// Fetch the raw transaction.
Expand All @@ -32,7 +30,6 @@ func TryParsingCustomErrorFromReceipt(

// Call the contract at the block hash.
_, err = rpc.CallContractAtHash(ctx, ethereum.CallMsg{
From: from,
To: tx.To(),
Gas: tx.Gas(),
GasFeeCap: tx.GasFeeCap(),
Expand Down
2 changes: 1 addition & 1 deletion proposer/proposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ func (p *Proposer) ProposeTxLists(ctx context.Context, txListsBytes [][]byte) []
log.Error("Failed to fetch receipt", "txHash", txHash, "error", err)
continue
}
errors[i] = encoding.TryParsingCustomErrorFromReceipt(ctx, p.rpc.L1, p.proposerAddress, receipt)
errors[i] = encoding.TryParsingCustomErrorFromReceipt(ctx, p.rpc.L1, receipt)
}
}

Expand Down
2 changes: 1 addition & 1 deletion proposer/proposer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func (s *ProposerTestSuite) TestProposeTxLists() {
log.Error("Failed to fetch receipt", "txHash", txHash, "error", err)
continue
}
errors[i] = encoding.TryParsingCustomErrorFromReceipt(ctx, p.rpc.L1, p.proposerAddress, receipt)
errors[i] = encoding.TryParsingCustomErrorFromReceipt(ctx, p.rpc.L1, receipt)
}
}

Expand Down
4 changes: 2 additions & 2 deletions prover/proof_submitter/transaction/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ func (s *Sender) Send(
"Failed to submit proof",
"blockID", proofWithHeader.BlockID,
"tier", proofWithHeader.Tier,
"txHash", receipt.TxHash,
"error", encoding.TryParsingCustomErrorFromReceipt(ctx, s.rpc.L1, s.txmgr.From(), receipt),
"txHash", receipt.TxHash.String(),
"error", encoding.TryParsingCustomErrorFromReceipt(ctx, s.rpc.L1, receipt),
)
metrics.ProverSubmissionRevertedCounter.Add(1)
return ErrUnretryableSubmission
Expand Down

0 comments on commit 78a6db6

Please sign in to comment.