diff --git a/glide.lock b/glide.lock index 948a5da3ba..6d606a6d63 100644 --- a/glide.lock +++ b/glide.lock @@ -90,7 +90,7 @@ imports: - app - client - name: github.com/tendermint/tendermint - version: cf0cb9558aaecbf3ddb071eb863df77e55d828ed + version: 9a2dd8bc9279ed2a1a4d4f31cc151f8a621cceb3 subpackages: - rpc/core/types - types diff --git a/types/plugin.go b/types/plugin.go index 09d68d4de0..ab65452cce 100644 --- a/types/plugin.go +++ b/types/plugin.go @@ -6,9 +6,15 @@ import ( ) type Plugin interface { + + // Name of this plugin, should be short. Name() string - SetOption(store KVStore, key string, value string) (log string) + + // Run a transaction from ABCI DeliverTx RunTx(store KVStore, ctx CallContext, txBytes []byte) (res abci.Result) + + // Other ABCI message handlers + SetOption(store KVStore, key string, value string) (log string) InitChain(store KVStore, vals []*abci.Validator) BeginBlock(store KVStore, height uint64) EndBlock(store KVStore, height uint64) []*abci.Validator @@ -16,12 +22,10 @@ type Plugin interface { //---------------------------------------- -// CallContext.Caller's coins have been deducted by CallContext.Coins -// Caller's Sequence has been incremented. type CallContext struct { - CallerAddress []byte - CallerAccount *Account - Coins Coins + CallerAddress []byte // Caller's Address (hash of PubKey) + CallerAccount *Account // Caller's Account, w/ fee & TxInputs deducted + TxInput Coins // The coins that the caller wishes to spend, excluding fees } func NewCallContext(callerAddress []byte, callerAccount *Account, coins Coins) CallContext {