Skip to content

Commit

Permalink
fix panic
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusVanDerWijden committed Sep 18, 2024
1 parent a5f2cc6 commit 0be8359
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion spammer/eip7702.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func Send7702Transactions(config *Config, key *ecdsa.PrivateKey, f *filler.Fille
log.Warn("Could not create valid tx: %v", nonce)
return err
}
signedTx, err := types.SignTx(tx, types.NewCancunSigner(chainID), key)
signedTx, err := types.SignTx(tx, types.NewPragueSigner(chainID), key)
if err != nil {
return err
}
Expand Down
8 changes: 4 additions & 4 deletions transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ func RandomBlobTx(rpc *rpc.Client, f *filler.Filler, sender common.Address, nonc
func RandomAuthTx(rpc *rpc.Client, f *filler.Filler, sender common.Address, nonce uint64, gasPrice, chainID *big.Int, al bool, aList types.AuthorizationList) (*types.Transaction, error) {
conf := initDefaultTxConf(rpc, f, sender, nonce, gasPrice, chainID)
tx := types.NewTransaction(conf.nonce, *conf.to, conf.value, conf.gasLimit, conf.gasPrice, conf.code)
var list *types.AccessList
var list types.AccessList
if al {
var err error
list, err = CreateAccessList(conf.rpc, tx, conf.sender)
l, err := CreateAccessList(conf.rpc, tx, conf.sender)
if err != nil {
return nil, err
}
list = *l
}
tip, feecap, err := getCaps(conf.rpc, conf.gasPrice)
if err != nil {
Expand All @@ -146,7 +146,7 @@ func RandomAuthTx(rpc *rpc.Client, f *filler.Filler, sender common.Address, nonc
if rand.Int()%2 == 0 {
conf.to = nil // create a contract half of the time
}
return New7702Tx(conf.nonce, conf.to, conf.gasLimit, conf.chainID, tip, feecap, conf.value, conf.code, big.NewInt(1000000), *list, aList), nil
return New7702Tx(conf.nonce, conf.to, conf.gasLimit, conf.chainID, tip, feecap, conf.value, conf.code, big.NewInt(1000000), list, aList), nil
}

type txCreationStrategy func(conf *txConf) (*types.Transaction, error)
Expand Down

0 comments on commit 0be8359

Please sign in to comment.