2020-02-20 06:24:26 -08:00
|
|
|
syntax = "proto3";
|
2020-08-11 04:49:45 -07:00
|
|
|
package cosmos.bank.v1beta1;
|
2020-02-20 06:24:26 -08:00
|
|
|
|
2020-06-18 10:04:26 -07:00
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
import "cosmos_proto/cosmos.proto";
|
2020-08-11 04:49:45 -07:00
|
|
|
import "cosmos/base/v1beta1/coin.proto";
|
2020-04-20 08:22:12 -07:00
|
|
|
|
|
|
|
option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types";
|
2020-02-20 06:24:26 -08:00
|
|
|
|
2020-08-19 00:36:41 -07:00
|
|
|
// Params defines the parameters for the bank module.
|
2020-07-08 10:43:08 -07:00
|
|
|
message Params {
|
2020-08-17 06:55:04 -07:00
|
|
|
option (gogoproto.goproto_stringer) = false;
|
|
|
|
repeated SendEnabled send_enabled = 1 [(gogoproto.moretags) = "yaml:\"send_enabled,omitempty\""];
|
|
|
|
bool default_send_enabled = 2 [(gogoproto.moretags) = "yaml:\"default_send_enabled,omitempty\""];
|
2020-07-08 10:43:08 -07:00
|
|
|
}
|
|
|
|
|
2020-09-25 03:25:37 -07:00
|
|
|
// SendEnabled maps coin denom to a send_enabled status (whether a denom is
|
|
|
|
// sendable).
|
2020-07-08 10:43:08 -07:00
|
|
|
message SendEnabled {
|
2020-08-17 06:55:04 -07:00
|
|
|
option (gogoproto.equal) = true;
|
2020-07-08 10:43:08 -07:00
|
|
|
option (gogoproto.goproto_stringer) = false;
|
2020-08-17 06:55:04 -07:00
|
|
|
string denom = 1;
|
|
|
|
bool enabled = 2;
|
2020-07-08 10:43:08 -07:00
|
|
|
}
|
|
|
|
|
2020-08-19 00:36:41 -07:00
|
|
|
// Input models transaction input.
|
2020-02-20 06:24:26 -08:00
|
|
|
message Input {
|
2020-09-25 03:25:37 -07:00
|
|
|
option (gogoproto.equal) = false;
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
2020-02-21 02:31:16 -08:00
|
|
|
|
2020-09-25 03:25:37 -07:00
|
|
|
string address = 1;
|
2020-08-11 04:49:45 -07:00
|
|
|
repeated cosmos.base.v1beta1.Coin coins = 2
|
2020-04-20 08:22:12 -07:00
|
|
|
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
2020-02-20 06:24:26 -08:00
|
|
|
}
|
|
|
|
|
2020-08-19 00:36:41 -07:00
|
|
|
// Output models transaction outputs.
|
2020-02-20 06:24:26 -08:00
|
|
|
message Output {
|
2020-09-25 03:25:37 -07:00
|
|
|
option (gogoproto.equal) = false;
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
2020-02-21 02:31:16 -08:00
|
|
|
|
2020-09-25 03:25:37 -07:00
|
|
|
string address = 1;
|
2020-08-11 04:49:45 -07:00
|
|
|
repeated cosmos.base.v1beta1.Coin coins = 2
|
2020-04-20 08:22:12 -07:00
|
|
|
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
2020-02-20 06:24:26 -08:00
|
|
|
}
|
|
|
|
|
2021-03-05 06:11:19 -08:00
|
|
|
// Supply represents a struct that passively keeps track of the total supply
|
|
|
|
// amounts in the network.
|
|
|
|
// This message is deprecated now that supply is indexed by denom.
|
|
|
|
message Supply {
|
|
|
|
option deprecated = true;
|
|
|
|
|
2021-05-07 14:33:17 -07:00
|
|
|
option (gogoproto.equal) = true;
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
2021-03-05 06:11:19 -08:00
|
|
|
|
|
|
|
option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/exported.SupplyI";
|
|
|
|
|
|
|
|
repeated cosmos.base.v1beta1.Coin total = 1
|
|
|
|
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
|
|
|
}
|
|
|
|
|
2020-09-08 15:06:54 -07:00
|
|
|
// DenomUnit represents a struct that describes a given
|
2020-08-19 00:36:41 -07:00
|
|
|
// denomination unit of the basic token.
|
|
|
|
message DenomUnit {
|
|
|
|
// denom represents the string name of the given denom unit (e.g uatom).
|
2020-09-08 15:06:54 -07:00
|
|
|
string denom = 1;
|
2020-08-19 00:36:41 -07:00
|
|
|
// exponent represents power of 10 exponent that one must
|
|
|
|
// raise the base_denom to in order to equal the given DenomUnit's denom
|
|
|
|
// 1 denom = 1^exponent base_denom
|
2020-09-08 15:06:54 -07:00
|
|
|
// (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with
|
2020-08-19 00:36:41 -07:00
|
|
|
// exponent = 6, thus: 1 atom = 10^6 uatom).
|
2020-09-08 15:06:54 -07:00
|
|
|
uint32 exponent = 2;
|
2020-08-19 00:36:41 -07:00
|
|
|
// aliases is a list of string aliases for the given denom
|
2020-09-08 15:06:54 -07:00
|
|
|
repeated string aliases = 3;
|
2020-07-28 00:49:56 -07:00
|
|
|
}
|
|
|
|
|
2020-09-08 15:06:54 -07:00
|
|
|
// Metadata represents a struct that describes
|
2020-08-19 00:36:41 -07:00
|
|
|
// a basic token.
|
2020-07-28 00:49:56 -07:00
|
|
|
message Metadata {
|
2020-09-08 15:06:54 -07:00
|
|
|
string description = 1;
|
2020-08-19 00:36:41 -07:00
|
|
|
// denom_units represents the list of DenomUnit's for a given coin
|
|
|
|
repeated DenomUnit denom_units = 2;
|
|
|
|
// base represents the base denom (should be the DenomUnit with exponent = 0).
|
2020-09-08 15:06:54 -07:00
|
|
|
string base = 3;
|
2020-08-19 00:36:41 -07:00
|
|
|
// display indicates the suggested denom that should be
|
|
|
|
// displayed in clients.
|
2020-09-08 15:06:54 -07:00
|
|
|
string display = 4;
|
2021-02-24 15:06:04 -08:00
|
|
|
// name defines the name of the token (eg: Cosmos Atom)
|
|
|
|
string name = 5;
|
|
|
|
// symbol is the token symbol usually shown on exchanges (eg: ATOM). This can
|
|
|
|
// be the same as the display.
|
2021-03-01 08:28:54 -08:00
|
|
|
string symbol = 6;
|
2020-09-08 15:06:54 -07:00
|
|
|
}
|