Skip to content

Commit 3ef1eea

Browse files
committed
sequencer changes
1 parent d5200da commit 3ef1eea

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

msg/message.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ func (n Nonce) Big() *big.Int {
2828
var FungibleTransfer TransferType = "FungibleTransfer"
2929
var NonFungibleTransfer TransferType = "NonFungibleTransfer"
3030
var GenericTransfer TransferType = "GenericTransfer"
31+
var SequencerTransfer TransferType = "SequencerTransfer"
3132

3233
// Message is used as a generic format to communicate between chains
3334
type Message struct {
@@ -112,6 +113,22 @@ func NewGenericTransfer(source, dest ChainId, nonce Nonce, resourceId ResourceId
112113
}
113114
}
114115

116+
func NewSequencerTransfer(source, dest ChainId, nonce Nonce, resourceId ResourceId, widgetId WidgetId, gasLimit *big.Int, gasPrice *big.Int, metadata []byte) Message {
117+
return Message{
118+
Source: source,
119+
Destination: dest,
120+
Type: SequencerTransfer,
121+
DepositNonce: nonce,
122+
ResourceId: resourceId,
123+
WidgetId: widgetId,
124+
Payload: []interface{}{
125+
metadata,
126+
gasLimit,
127+
gasPrice,
128+
},
129+
}
130+
}
131+
115132
func ResourceIdFromSlice(in []byte) ResourceId {
116133
var res ResourceId
117134
copy(res[:], in)

0 commit comments

Comments
 (0)