2022-01-08 00:39:27 +00:00
|
|
|
syntax = "proto3";
|
2024-05-01 03:56:00 +00:00
|
|
|
package zgc.bep3.v1beta1;
|
2022-01-08 00:39:27 +00:00
|
|
|
|
|
|
|
import "cosmos/base/v1beta1/coin.proto";
|
2022-11-22 23:22:07 +00:00
|
|
|
import "cosmos_proto/cosmos.proto";
|
|
|
|
import "gogoproto/gogo.proto";
|
2022-01-08 00:39:27 +00:00
|
|
|
|
2024-05-01 03:17:24 +00:00
|
|
|
option go_package = "github.com/0glabs/0g-chain/x/bep3/types";
|
2022-01-08 00:39:27 +00:00
|
|
|
|
|
|
|
// Msg defines the bep3 Msg service.
|
|
|
|
service Msg {
|
|
|
|
// CreateAtomicSwap defines a method for creating an atomic swap
|
|
|
|
rpc CreateAtomicSwap(MsgCreateAtomicSwap) returns (MsgCreateAtomicSwapResponse);
|
|
|
|
|
|
|
|
// ClaimAtomicSwap defines a method for claiming an atomic swap
|
|
|
|
rpc ClaimAtomicSwap(MsgClaimAtomicSwap) returns (MsgClaimAtomicSwapResponse);
|
|
|
|
|
|
|
|
// RefundAtomicSwap defines a method for refunding an atomic swap
|
|
|
|
rpc RefundAtomicSwap(MsgRefundAtomicSwap) returns (MsgRefundAtomicSwapResponse);
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgCreateAtomicSwap defines the Msg/CreateAtomicSwap request type.
|
|
|
|
message MsgCreateAtomicSwap {
|
|
|
|
option (gogoproto.goproto_stringer) = false;
|
2022-11-22 23:22:07 +00:00
|
|
|
option (gogoproto.equal) = false;
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
2022-01-08 00:39:27 +00:00
|
|
|
|
2022-11-22 23:22:07 +00:00
|
|
|
string from = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
string to = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
string recipient_other_chain = 3;
|
|
|
|
string sender_other_chain = 4;
|
|
|
|
string random_number_hash = 5;
|
|
|
|
int64 timestamp = 6;
|
|
|
|
repeated cosmos.base.v1beta1.Coin amount = 7 [
|
|
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
|
|
|
(gogoproto.nullable) = false
|
|
|
|
];
|
2022-01-08 00:39:27 +00:00
|
|
|
uint64 height_span = 8;
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgCreateAtomicSwapResponse defines the Msg/CreateAtomicSwap response type.
|
|
|
|
message MsgCreateAtomicSwapResponse {}
|
|
|
|
|
|
|
|
// MsgClaimAtomicSwap defines the Msg/ClaimAtomicSwap request type.
|
|
|
|
message MsgClaimAtomicSwap {
|
|
|
|
option (gogoproto.goproto_stringer) = false;
|
2022-11-22 23:22:07 +00:00
|
|
|
option (gogoproto.equal) = false;
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
2022-01-08 00:39:27 +00:00
|
|
|
|
2022-11-22 23:22:07 +00:00
|
|
|
string from = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
string swap_id = 2 [(gogoproto.customname) = "SwapID"];
|
2022-01-08 00:39:27 +00:00
|
|
|
string random_number = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgClaimAtomicSwapResponse defines the Msg/ClaimAtomicSwap response type.
|
|
|
|
message MsgClaimAtomicSwapResponse {}
|
|
|
|
|
|
|
|
// MsgRefundAtomicSwap defines the Msg/RefundAtomicSwap request type.
|
|
|
|
message MsgRefundAtomicSwap {
|
|
|
|
option (gogoproto.goproto_stringer) = false;
|
2022-11-22 23:22:07 +00:00
|
|
|
option (gogoproto.equal) = false;
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
2022-01-08 00:39:27 +00:00
|
|
|
|
2022-11-22 23:22:07 +00:00
|
|
|
string from = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
2022-01-08 00:39:27 +00:00
|
|
|
string swap_id = 2 [(gogoproto.customname) = "SwapID"];
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgRefundAtomicSwapResponse defines the Msg/RefundAtomicSwap response type.
|
|
|
|
message MsgRefundAtomicSwapResponse {}
|