73 lines
2.9 KiB
Protocol Buffer
73 lines
2.9 KiB
Protocol Buffer
syntax = "proto3";
|
|
package ibc.transfer;
|
|
|
|
option go_package = "github.com/cosmos/cosmos-sdk/x/ibc-transfer/types";
|
|
|
|
import "gogoproto/gogo.proto";
|
|
import "cosmos/base/v1beta1/coin.proto";
|
|
|
|
// 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
|
|
message MsgTransfer {
|
|
// the port on which the packet will be sent
|
|
string source_port = 1 [(gogoproto.moretags) = "yaml:\"source_port\""];
|
|
// the channel by which the packet will be sent
|
|
string source_channel = 2 [(gogoproto.moretags) = "yaml:\"source_channel\""];
|
|
// the tokens to be transferred
|
|
cosmos.base.v1beta1.Coin token = 3 [(gogoproto.nullable) = false];
|
|
// the sender address
|
|
bytes sender = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
|
|
// the recipient address on the destination chain
|
|
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.
|
|
uint64 timeout_timestamp = 7 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""];
|
|
}
|
|
|
|
// FungibleTokenPacketData defines a struct for the packet payload
|
|
// See FungibleTokenPacketData spec:
|
|
// https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures
|
|
message FungibleTokenPacketData {
|
|
// the token denomination to be transferred
|
|
string denom = 1;
|
|
// the token amount to be transferred
|
|
uint64 amount = 2;
|
|
// the sender address
|
|
string sender = 3;
|
|
// the recipient address on the destination chain
|
|
string receiver = 4;
|
|
}
|
|
|
|
// 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
|
|
message FungibleTokenPacketAcknowledgement {
|
|
bool success = 1;
|
|
string error = 2;
|
|
}
|
|
|
|
// 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;
|
|
}
|
|
|
|
// Params defines the set of IBC transfer parameters.
|
|
// 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.
|
|
message Params {
|
|
// transfers_enabled enables or disables all cross-chain token transfers from/to this chain.
|
|
bool transfers_enabled = 1 [
|
|
(gogoproto.moretags) = "yaml:\"transfers_enabled\""
|
|
];
|
|
}
|