Skip to content

Commit 055e1e6

Browse files
mask-ppjwasinger
andauthored
signer/core/apitypes: require blob txs to have tx.to set (ethereum#32197)
Check the `to` address before building the blob tx. --------- Co-authored-by: jwasinger <[email protected]>
1 parent b992b10 commit 055e1e6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

signer/core/apitypes/types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ func (args *SendTxArgs) ToTransaction() (*types.Transaction, error) {
150150
if args.AccessList != nil {
151151
al = *args.AccessList
152152
}
153+
if to == nil {
154+
return nil, fmt.Errorf("transaction recipient must be set for blob transactions")
155+
}
153156
data = &types.BlobTx{
154157
To: *to,
155158
ChainID: uint256.MustFromBig((*big.Int)(args.ChainID)),

0 commit comments

Comments
 (0)