Documentation ¶
Index ¶
- func InitMultiContractMethods(log protocol.Logger) map[string]common.ContractFunc
- type MultiSignContract
- type MultiSignRuntime
- func (r *MultiSignRuntime) Query(txSimContext protocol.TxSimContext, parameters map[string][]byte) (result []byte, err error)
- func (r *MultiSignRuntime) Req(txSimContext protocol.TxSimContext, parameters map[string][]byte) (result []byte, err error)
- func (r *MultiSignRuntime) Trig(txSimContext protocol.TxSimContext, parameters map[string][]byte) *commonPb.ContractResult
- func (r *MultiSignRuntime) Vote(txSimContext protocol.TxSimContext, parameters map[string][]byte) (result []byte, event []*commonPb.ContractEvent, err error)
- func (r *MultiSignRuntime) VoteWithManualRun(txSimContext protocol.TxSimContext, parameters map[string][]byte) (result []byte, event []*commonPb.ContractEvent, err error)
- func (r *MultiSignRuntime) VoteWithoutManualRun(txSimContext protocol.TxSimContext, parameters map[string][]byte) (result []byte, event []*commonPb.ContractEvent, err error)
- type MultiSignRuntimeParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitMultiContractMethods ¶
func InitMultiContractMethods(log protocol.Logger) map[string]common.ContractFunc
InitMultiContractMethods export method
Types ¶
type MultiSignContract ¶
type MultiSignContract struct { common.BaseContract // contains filtered or unexported fields }
MultiSignContract a multi sign contract
func NewMultiSignContract ¶
func NewMultiSignContract(log protocol.Logger) *MultiSignContract
NewMultiSignContract get a multi sign contract @param log @return *MultiSignContract
type MultiSignRuntime ¶
type MultiSignRuntime struct {
// contains filtered or unexported fields
}
MultiSignRuntime multi sign method
func (*MultiSignRuntime) Query ¶
func (r *MultiSignRuntime) Query(txSimContext protocol.TxSimContext, parameters map[string][]byte) ( result []byte, err error)
Query get multi sign status
func (*MultiSignRuntime) Req ¶
func (r *MultiSignRuntime) Req(txSimContext protocol.TxSimContext, parameters map[string][]byte) ( result []byte, err error)
Req request to multi sign, call a native contract
func (*MultiSignRuntime) Trig ¶
func (r *MultiSignRuntime) Trig( txSimContext protocol.TxSimContext, parameters map[string][]byte) *commonPb.ContractResult
Trig make the contract call execute, when enable_manual_run flag is `false` 1)check the enable_manual_run flag 2) check the status of the multi sign tx 3) get the txId of the multi sign tx 4) compare the sender of Trig with the sender of multi sign tx
func (*MultiSignRuntime) Vote ¶
func (r *MultiSignRuntime) Vote(txSimContext protocol.TxSimContext, parameters map[string][]byte) ( result []byte, event []*commonPb.ContractEvent, err error)
Vote voting on existing multiSign transaction requests when the enable_manual_run flag is set, call VoteWithManualRun when the enable_manual_run flag is not set, call VoteWithoutManualRun
func (*MultiSignRuntime) VoteWithManualRun ¶
func (r *MultiSignRuntime) VoteWithManualRun(txSimContext protocol.TxSimContext, parameters map[string][]byte) ( result []byte, event []*commonPb.ContractEvent, err error)
VoteWithManualRun voting on existing multiSign transaction requests
this will cause some scene below: 1) vote agree: cause more than half voters agree 2) vote reject: cause half and more voters reject 3) vote agree/reject: but don't fulfill above 1) 2) scene
func (*MultiSignRuntime) VoteWithoutManualRun ¶
func (r *MultiSignRuntime) VoteWithoutManualRun(txSimContext protocol.TxSimContext, parameters map[string][]byte) ( result []byte, event []*commonPb.ContractEvent, err error)
VoteWithoutManualRun voting on existing multiSign transaction requests
this will cause some scene below: 1) vote agree: cause more than half voters agree 2) vote agree/reject: but don't fulfill above 1) scene
type MultiSignRuntimeParam ¶ added in v3.0.1
type MultiSignRuntimeParam struct {
// contains filtered or unexported fields
}
MultiSignRuntimeParam params within multi sign method