2020-05-06 08:17:50 -07:00
|
|
|
syntax = "proto3";
|
2020-06-18 10:04:26 -07:00
|
|
|
package ibc.transfer;
|
2020-05-06 08:17:50 -07:00
|
|
|
|
2020-05-15 13:36:47 -07:00
|
|
|
option go_package = "github.com/cosmos/cosmos-sdk/x/ibc-transfer/types";
|
2020-05-06 08:17:50 -07:00
|
|
|
|
2020-06-18 10:04:26 -07:00
|
|
|
import "gogoproto/gogo.proto";
|
2020-08-11 04:49:45 -07:00
|
|
|
import "cosmos/base/v1beta1/coin.proto";
|
2020-09-03 13:23:20 -07:00
|
|
|
import "ibc/client/client.proto";
|
2020-05-06 08:17:50 -07:00
|
|
|
|
2020-08-01 02:16:22 -07:00
|
|
|
// MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between
|
|
|
|
// ICS20 enabled chains. See ICS Spec here:
|
|
|
|
// https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures
|
2020-05-06 08:17:50 -07:00
|
|
|
message MsgTransfer {
|
2020-09-25 03:25:37 -07:00
|
|
|
option (gogoproto.equal) = false;
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
2020-05-06 08:17:50 -07:00
|
|
|
// the port on which the packet will be sent
|
2020-08-01 02:16:22 -07:00
|
|
|
string source_port = 1 [(gogoproto.moretags) = "yaml:\"source_port\""];
|
2020-05-06 08:17:50 -07:00
|
|
|
// the channel by which the packet will be sent
|
2020-08-01 02:16:22 -07:00
|
|
|
string source_channel = 2 [(gogoproto.moretags) = "yaml:\"source_channel\""];
|
2020-05-06 08:17:50 -07:00
|
|
|
// the tokens to be transferred
|
2020-08-11 04:49:45 -07:00
|
|
|
cosmos.base.v1beta1.Coin token = 3 [(gogoproto.nullable) = false];
|
2020-05-06 08:17:50 -07:00
|
|
|
// the sender address
|
2020-09-25 03:25:37 -07:00
|
|
|
string sender = 4;
|
2020-05-06 08:17:50 -07:00
|
|
|
// the recipient address on the destination chain
|
2020-06-04 12:30:56 -07:00
|
|
|
string receiver = 5;
|
|
|
|
// Timeout height relative to the current block height.
|
|
|
|
// The timeout is disabled when set to 0.
|
2020-09-08 15:06:54 -07:00
|
|
|
ibc.client.Height timeout_height = 6 [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false];
|
2020-06-04 12:30:56 -07:00
|
|
|
// Timeout timestamp (in nanoseconds) relative to the current block timestamp.
|
|
|
|
// The timeout is disabled when set to 0.
|
2020-08-14 14:46:26 -07:00
|
|
|
uint64 timeout_timestamp = 7 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""];
|
2020-05-06 08:17:50 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// FungibleTokenPacketData defines a struct for the packet payload
|
2020-08-01 02:16:22 -07:00
|
|
|
// See FungibleTokenPacketData spec:
|
|
|
|
// https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures
|
2020-05-06 08:17:50 -07:00
|
|
|
message FungibleTokenPacketData {
|
2020-08-01 02:16:22 -07:00
|
|
|
// the token denomination to be transferred
|
|
|
|
string denom = 1;
|
|
|
|
// the token amount to be transferred
|
|
|
|
uint64 amount = 2;
|
2020-05-06 08:17:50 -07:00
|
|
|
// the sender address
|
2020-08-01 02:16:22 -07:00
|
|
|
string sender = 3;
|
2020-05-06 08:17:50 -07:00
|
|
|
// the recipient address on the destination chain
|
2020-08-01 02:16:22 -07:00
|
|
|
string receiver = 4;
|
2020-05-06 08:17:50 -07:00
|
|
|
}
|
|
|
|
|
2020-09-09 03:01:28 -07:00
|
|
|
// DenomTrace contains the base denomination for ICS20 fungible tokens and the
|
|
|
|
// source tracing information path.
|
2020-08-14 14:46:26 -07:00
|
|
|
message DenomTrace {
|
2020-09-09 03:01:28 -07:00
|
|
|
// path defines the chain of port/channel identifiers used for tracing the
|
|
|
|
// source of the fungible token.
|
2020-08-14 14:46:26 -07:00
|
|
|
string path = 1;
|
|
|
|
// base denomination of the relayed fungible token.
|
|
|
|
string base_denom = 2;
|
|
|
|
}
|
2020-08-16 23:24:14 -07:00
|
|
|
|
|
|
|
// Params defines the set of IBC transfer parameters.
|
2020-09-09 03:01:28 -07:00
|
|
|
// NOTE: To prevent a single token from being transferred, set the
|
|
|
|
// TransfersEnabled parameter to true and then set the bank module's SendEnabled
|
|
|
|
// parameter for the denomination to false.
|
2020-08-16 23:24:14 -07:00
|
|
|
message Params {
|
2020-09-09 03:01:28 -07:00
|
|
|
// send_enabled enables or disables all cross-chain token transfers from this
|
|
|
|
// chain.
|
2020-09-08 15:06:54 -07:00
|
|
|
bool send_enabled = 1 [(gogoproto.moretags) = "yaml:\"send_enabled\""];
|
2020-09-09 03:01:28 -07:00
|
|
|
// receive_enabled enables or disables all cross-chain token transfers to this
|
|
|
|
// chain.
|
2020-09-08 15:06:54 -07:00
|
|
|
bool receive_enabled = 2 [(gogoproto.moretags) = "yaml:\"receive_enabled\""];
|
2020-08-16 23:24:14 -07:00
|
|
|
}
|