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-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 {
|
|
|
|
// 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-08-14 14:46:26 -07:00
|
|
|
bytes sender = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
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.
|
|
|
|
uint64 timeout_height = 6 [(gogoproto.moretags) = "yaml:\"timeout_height\""];
|
|
|
|
// 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-08-01 02:16:22 -07:00
|
|
|
// FungibleTokenPacketAcknowledgement contains a boolean success flag and an
|
|
|
|
// optional error msg error msg is empty string on success See spec for
|
|
|
|
// onAcknowledgePacket:
|
|
|
|
// https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#packet-relay
|
2020-05-06 08:17:50 -07:00
|
|
|
message FungibleTokenPacketAcknowledgement {
|
2020-08-01 02:16:22 -07:00
|
|
|
bool success = 1;
|
|
|
|
string error = 2;
|
2020-06-18 10:04:26 -07:00
|
|
|
}
|
2020-08-14 14:46:26 -07:00
|
|
|
|
|
|
|
// DenomTrace contains the base denomination for ICS20 fungible tokens and the source tracing
|
|
|
|
// information path.
|
|
|
|
message DenomTrace {
|
|
|
|
// path defines the chain of port/channel identifiers used for tracing the source of the fungible
|
|
|
|
// token.
|
|
|
|
string path = 1;
|
|
|
|
// base denomination of the relayed fungible token.
|
|
|
|
string base_denom = 2;
|
|
|
|
}
|