2017-12-03 21:25:37 -08:00
|
|
|
package types
|
|
|
|
|
|
|
|
// Result is the union of ResponseDeliverTx and ResponseCheckTx.
|
|
|
|
type Result struct {
|
|
|
|
|
|
|
|
// Code is the response code, is stored back on the chain.
|
2018-11-16 09:12:24 -08:00
|
|
|
Code CodeType
|
|
|
|
|
|
|
|
// Codespace is the string referring to the domain of an error
|
|
|
|
Codespace CodespaceType
|
2017-12-03 21:25:37 -08:00
|
|
|
|
|
|
|
// Data is any data returned from the app.
|
|
|
|
Data []byte
|
|
|
|
|
|
|
|
// Log is just debug information. NOTE: nondeterministic.
|
|
|
|
Log string
|
|
|
|
|
2017-12-26 17:04:48 -08:00
|
|
|
// GasWanted is the maximum units of work we allow this tx to perform.
|
2018-11-19 09:13:45 -08:00
|
|
|
GasWanted uint64
|
2017-12-03 21:25:37 -08:00
|
|
|
|
2018-04-10 20:51:09 -07:00
|
|
|
// GasUsed is the amount of gas actually consumed. NOTE: unimplemented
|
2018-11-19 09:13:45 -08:00
|
|
|
GasUsed uint64
|
2017-12-03 21:25:37 -08:00
|
|
|
|
|
|
|
// Tx fee amount and denom.
|
|
|
|
FeeAmount int64
|
|
|
|
FeeDenom string
|
|
|
|
|
|
|
|
// Tags are used for transaction indexing and pubsub.
|
2018-04-26 07:14:51 -07:00
|
|
|
Tags Tags
|
2017-12-03 21:25:37 -08:00
|
|
|
}
|
2018-01-26 05:11:01 -08:00
|
|
|
|
|
|
|
// TODO: In the future, more codes may be OK.
|
|
|
|
func (res Result) IsOK() bool {
|
2018-01-26 06:22:56 -08:00
|
|
|
return res.Code.IsOK()
|
2018-01-26 05:11:01 -08:00
|
|
|
}
|