the to address shouldn't be null in blob tx

This commit is contained in:
maskpp 2025-07-13 15:51:13 +08:00
parent 355228b011
commit 022105443c

View file

@ -150,6 +150,9 @@ func (args *SendTxArgs) ToTransaction() (*types.Transaction, error) {
if args.AccessList != nil { if args.AccessList != nil {
al = *args.AccessList al = *args.AccessList
} }
if to == nil {
return nil, fmt.Errorf("the to address shouldn't be null in blob transaction")
}
data = &types.BlobTx{ data = &types.BlobTx{
To: *to, To: *to,
ChainID: uint256.MustFromBig((*big.Int)(args.ChainID)), ChainID: uint256.MustFromBig((*big.Int)(args.ChainID)),