Last active
January 16, 2017 05:29
-
-
Save jaekwon/a936a5d9ea16f1833ef6485188b435cf to your computer and use it in GitHub Desktop.
Basecoin Plugin Interface
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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