Skip to content

Commit

Permalink
updated send-authorization-list-tx
Browse files Browse the repository at this point in the history
  • Loading branch information
PelleKrab committed Dec 21, 2024
1 parent 4eaac00 commit f55a9c0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions testgen/generators.go
Original file line number Diff line number Diff line change
Expand Up @@ -1585,29 +1585,31 @@ var EthSendRawTransaction = MethodTests{
sender, nonce = t.chain.GetSender(4)
basefee = uint256.MustFromBig(t.chain.Head().BaseFee())
fee = uint256.NewInt(500)
r = uint256.NewInt(1)
s = uint256.NewInt(1)
)
fee.Add(basefee, fee)

auth := &types.Authorization{
ChainID: t.chain.Config().ChainID,
auth := &types.SetCodeAuthorization{
ChainID: t.chain.Config().ChainID.Uint64(),
Address: emitContract,
Nonce: uint64(0),
V: big.NewInt(1),
R: big.NewInt(1),
S: big.NewInt(1),
V: uint8(1),
R: *r,
S: *s,
}

privateKey, err := t.chain.GetPrivateKey(sender)
if err != nil {
return err
}

signedAuth, err := types.SignAuth(auth, privateKey)
signedAuth, err := types.SignSetCode(privateKey, *auth)
if err != nil {
return err
}

authList := types.AuthorizationList{signedAuth}
authList := []types.SetCodeAuthorization{signedAuth}

txdata := &types.SetCodeTx{
Nonce: nonce,
Expand Down

0 comments on commit f55a9c0

Please sign in to comment.