cosmos-sdk/types/types.proto

81 lines
2.6 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package cosmos_sdk.v1;
import "third_party/proto/gogoproto/gogo.proto";
2020-03-26 09:46:10 -07:00
import "third_party/proto/tendermint/abci/types/types.proto";
2020-02-21 02:31:16 -08:00
option go_package = "github.com/cosmos/cosmos-sdk/types";
option (gogoproto.goproto_stringer_all) = false;
2020-02-21 02:31:16 -08:00
option (gogoproto.stringer_all) = false;
// Coin defines a token with a denomination and an amount.
//
// NOTE: The amount field is an Int which implements the custom method
// signatures required by gogoproto.
message Coin {
2020-02-21 02:31:16 -08:00
option (gogoproto.equal) = true;
string denom = 1;
string amount = 2 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false];
}
// DecCoin defines a token with a denomination and a decimal amount.
//
// NOTE: The amount field is an Dec which implements the custom method
// signatures required by gogoproto.
message DecCoin {
2020-02-21 02:31:16 -08:00
option (gogoproto.equal) = true;
string denom = 1;
string amount = 2 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false];
}
// IntProto defines a Protobuf wrapper around an Int object.
message IntProto {
2020-02-21 02:31:16 -08:00
string int = 1 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false];
}
// DecProto defines a Protobuf wrapper around a Dec object.
message DecProto {
2020-02-21 02:31:16 -08:00
string dec = 1 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false];
}
// ValAddresses defines a repeated set of validator addresses.
message ValAddresses {
option (gogoproto.stringer) = true;
2020-02-21 02:31:16 -08:00
repeated bytes addresses = 1 [(gogoproto.casttype) = "ValAddress"];
}
2020-03-26 09:46:10 -07:00
// GasInfo defines tx execution gas context.
message GasInfo {
// GasWanted is the maximum units of work we allow this tx to perform.
uint64 gas_wanted = 1 [(gogoproto.moretags) = "yaml:\"gas_wanted\""];
// GasUsed is the amount of gas actually consumed.
uint64 gas_used = 2 [(gogoproto.moretags) = "yaml:\"gas_used\""];
}
// Result is the union of ResponseFormat and ResponseCheckTx.
message Result {
option (gogoproto.goproto_getters) = false;
// Data is any data returned from message or handler execution. It MUST be length
// prefixed in order to separate data from multiple message executions.
bytes data = 1;
// Log contains the log information from message or handler execution.
string log = 2;
// Events contains a slice of Event objects that were emitted during message or
// handler execution.
repeated tendermint.abci.types.Event events = 3 [(gogoproto.nullable) = false];
}
// SimulationResponse defines the response generated when a transaction is
// successfully simulated.
message SimulationResponse {
GasInfo gas_info = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
Result result = 2;
}