Skip to content

Instantly share code, notes, and snippets.

@jaekwon
Last active January 16, 2017 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaekwon/a936a5d9ea16f1833ef6485188b435cf to your computer and use it in GitHub Desktop.
Save jaekwon/a936a5d9ea16f1833ef6485188b435cf to your computer and use it in GitHub Desktop.
Basecoin Plugin Interface
type Plugin interface {
// Name of this plugin, should be short.
Name() 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
}
type CallContext struct {
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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment