@@ -48,18 +48,19 @@ type EthSendBundleArgs struct {
4848 MinTimestamp * uint64 `json:"minTimestamp,omitempty"`
4949 MaxTimestamp * uint64 `json:"maxTimestamp,omitempty"`
5050 RevertingTxHashes []common.Hash `json:"revertingTxHashes,omitempty"`
51- ReplacementUUID * string `json:"replacementUuid,omitempty"`
51+ ReplacementUUID * uuid. UUID `json:"replacementUuid,omitempty"`
5252 Version * string `json:"version,omitempty"`
5353
5454 ReplacementNonce * uint64 `json:"replacementNonce,omitempty"`
5555 SigningAddress * common.Address `json:"signingAddress,omitempty"` // may or may not be respected depending on the context
5656 RefundIdentity * common.Address `json:"refundIdentity,omitempty"` // metadata field to improve redistribution ux
5757
5858 DroppingTxHashes []common.Hash `json:"droppingTxHashes,omitempty"`
59- UUID * string `json:"uuid,omitempty"`
59+ UUID * uuid. UUID `json:"uuid,omitempty"`
6060 RefundPercent * uint64 `json:"refundPercent,omitempty"`
6161 RefundRecipient * common.Address `json:"refundRecipient,omitempty"`
6262 RefundTxHashes []string `json:"refundTxHashes,omitempty"`
63+ DelayedRefund * bool `json:"delayedRefund,omitempty"` // if set to true refund will be paid out of block
6364}
6465
6566const (
@@ -106,7 +107,7 @@ type MevBundleMetadata struct {
106107
107108type MevSendBundleArgs struct {
108109 Version string `json:"version"`
109- ReplacementUUID string `json:"replacementUuid,omitempty"`
110+ ReplacementUUID * uuid. UUID `json:"replacementUuid,omitempty"`
110111 Inclusion MevBundleInclusion `json:"inclusion"`
111112 // when empty its considered cancel
112113 Body []MevBundleBody `json:"body"`
@@ -184,7 +185,7 @@ func (b *EthSendBundleArgs) UniqueKey() uuid.UUID {
184185 _ , _ = hash .Write (txHash .Bytes ())
185186 }
186187 if b .ReplacementUUID != nil {
187- _ , _ = hash .Write ([] byte (* b .ReplacementUUID ))
188+ _ , _ = hash .Write ((* b .ReplacementUUID )[:] )
188189 }
189190 if b .ReplacementNonce != nil {
190191 _ = binary .Write (hash , binary .LittleEndian , * b .ReplacementNonce )
@@ -371,7 +372,9 @@ func (b *MevSendBundleArgs) UniqueKey() uuid.UUID {
371372}
372373
373374func uniqueKeyMevSendBundle (b * MevSendBundleArgs , hash hash.Hash ) {
374- hash .Write ([]byte (b .ReplacementUUID ))
375+ if b .ReplacementUUID != nil {
376+ hash .Write (b .ReplacementUUID [:])
377+ }
375378 _ = binary .Write (hash , binary .LittleEndian , b .Inclusion .BlockNumber )
376379 _ = binary .Write (hash , binary .LittleEndian , b .Inclusion .MaxBlock )
377380 for _ , body := range b .Body {
@@ -394,7 +397,7 @@ func uniqueKeyMevSendBundle(b *MevSendBundleArgs, hash hash.Hash) {
394397func (b * MevSendBundleArgs ) Validate () (common.Hash , error ) {
395398 // only cancell call can be without txs
396399 // cancell call must have ReplacementUUID set
397- if len (b .Body ) == 0 && b .ReplacementUUID == "" {
400+ if len (b .Body ) == 0 && b .ReplacementUUID == nil {
398401 return common.Hash {}, ErrBundleNoTxs
399402 }
400403 return hashMevSendBundle (0 , b )
0 commit comments