mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-04-23 03:00:50 -04:00
remove getting receipts
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
"math/big"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/scroll-tech/go-ethereum/accounts/abi/bind"
|
||||
"github.com/scroll-tech/go-ethereum/common"
|
||||
@@ -201,20 +200,20 @@ func sendTransaction(client *ethclient.Client, auth *bind.TransactOpts, txType i
|
||||
return fmt.Errorf("failed to send tx: %w", err)
|
||||
}
|
||||
|
||||
log.Info("transaction sent", "txHash", signedTx.Hash().Hex())
|
||||
//log.Info("transaction sent", "txHash", signedTx.Hash().Hex())
|
||||
|
||||
var receipt *types.Receipt
|
||||
for {
|
||||
receipt, err = client.TransactionReceipt(context.Background(), signedTx.Hash())
|
||||
if err == nil {
|
||||
if receipt.Status != types.ReceiptStatusSuccessful {
|
||||
return fmt.Errorf("transaction failed: %s", signedTx.Hash().Hex())
|
||||
}
|
||||
break
|
||||
}
|
||||
log.Warn("waiting for receipt", "txHash", signedTx.Hash())
|
||||
time.Sleep(2 * time.Second)
|
||||
}
|
||||
//var receipt *types.Receipt
|
||||
//for {
|
||||
// receipt, err = client.TransactionReceipt(context.Background(), signedTx.Hash())
|
||||
// if err == nil {
|
||||
// if receipt.Status != types.ReceiptStatusSuccessful {
|
||||
// return fmt.Errorf("transaction failed: %s", signedTx.Hash().Hex())
|
||||
// }
|
||||
// break
|
||||
// }
|
||||
// log.Warn("waiting for receipt", "txHash", signedTx.Hash())
|
||||
// time.Sleep(2 * time.Second)
|
||||
//}
|
||||
|
||||
log.Info("Sent transaction", "txHash", signedTx.Hash().Hex(), "from", auth.From.Hex(), "nonce", signedTx.Nonce(), "to", to.Hex())
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user