Skip to content

Commit 07acab3

Browse files
committed
enforce validation of no more than 1 refund_tx_hash
1 parent 39231d6 commit 07acab3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

proxy/api_validate.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ var (
1717
errLocalEndpointSbundleMetadata = errors.New("mev share bundle should not contain metadata when sent to local endpoint")
1818
errVersionNotSet = errors.New("version field should be set")
1919
errInvalidVersion = errors.New("invalid version")
20+
errMoreThanOneRefundTxHash = errors.New("no more than one refund tx hash is allowed")
2021
)
2122

2223
// EnsureReplacementUUID updates bundle with consistent replacement uuid value (falling back to `uuid` field if needed)
@@ -49,6 +50,10 @@ func ValidateEthSendBundle(args *rpctypes.EthSendBundleArgs, publicEndpoint bool
4950
return errInvalidVersion
5051
}
5152

53+
if len(args.RefundTxHashes) > 1 {
54+
return errMoreThanOneRefundTxHash
55+
}
56+
5257
if publicEndpoint {
5358
// For now public (system) endpoint should receive version field preset.
5459
// For flashbots endpoint orderflowproxy-sender uses it, for direct orderflow

0 commit comments

Comments
 (0)