Documentation ¶
Index ¶
Constants ¶
View Source
const ( FunctionVote = "Vote" FunctionExecute = "Execute" )
function vote's params
Variables ¶
View Source
var ( ErrPropsalInvalidInitData = errors.New("err_proposal_invalid_init_data") ErrPropsalInvalidTxAction = errors.New("err_proposal_invalid_tx_action") ErrPropsalInvalidTxCallParams = errors.New("err_proposal_invalid_tx_call_params") ErrPropsalInvalidVoteTime = errors.New("err_proposal_invalid_vote_time") ErrPropsalInvalidVoteParams = errors.New("err_proposal_invalid_vote_params") ErrPropsalNoStakes = errors.New("err_proposal_no_stakes") ErrPropsalInvalidExectueTime = errors.New("err_proposal_invalid_execute_time") ErrPropsalExectued = errors.New("err_proposal_executed") ErrPropsalInvalidGrantAmount = errors.New("err_proposal_invalid_grant_amount") ErrPropsalInvalidFunction = errors.New("err_proposal_invalid_function") )
Functions ¶
func Execute ¶
func Execute(tx *schema.Transaction, state *schema.StateForProposal, oracle *schema.Oracle, localState, initData string) (*schema.StateForProposal, string, string, error)
Types ¶
type LocalState ¶
type LocalState struct { Voteds map[string]Voted `json:"voteds"` Infavor int64 `json:"infavor"` Against int64 `json:"against"` Approved bool `json:"approved"` Executed bool `json:"executed"` }
func (*LocalState) Hash ¶
func (l *LocalState) Hash() string
func (*LocalState) String ¶
func (l *LocalState) String() string
type VoteParams ¶
type VoteParams struct {
Infavor bool `json:"infavor"`
}
Click to show internal directories.
Click to hide internal directories.