Documentation ¶
Overview ¶
Package v2 implements some functions for v2 contract.
Package v2 implements some functions for v2 contract.
记录了所有用户的质押充币、提币、分红等过程 最新状态集 Advance:形成流水日志,
Index ¶
- Constants
- func DelJuryBalance(stub shim.ChaincodeStubInterface, addr string) error
- func GetJuryBalance(stub shim.ChaincodeStubInterface, addr string) (*modules.JurorDeposit, error)
- func UpperFirstChar(str string) string
- type DepositChaincode
- func (d *DepositChaincode) ApplyBecomeMediator(stub shim.ChaincodeStubInterface, mediatorCreateArgs string) error
- func (d DepositChaincode) ApplyForForfeitureDeposit(stub shim.ChaincodeStubInterface, forfeitureAddress string, role string, ...) pb.Response
- func (d DepositChaincode) DeteleKey(stub shim.ChaincodeStubInterface, key string) pb.Response
- func (d *DepositChaincode) DevApplyQuit(stub shim.ChaincodeStubInterface) pb.Response
- func (d *DepositChaincode) DeveloperPayToDepositContract(stub shim.ChaincodeStubInterface) pb.Response
- func (d *DepositChaincode) GetAgreeForBecomeMediatorList(stub shim.ChaincodeStubInterface) (map[string]bool, error)
- func (d DepositChaincode) GetAllJury(stub shim.ChaincodeStubInterface) pb.Response
- func (d DepositChaincode) GetAllMediator(stub shim.ChaincodeStubInterface) pb.Response
- func (d DepositChaincode) GetAllNode(stub shim.ChaincodeStubInterface) pb.Response
- func (d *DepositChaincode) GetBecomeMediatorApplyList(stub shim.ChaincodeStubInterface) (map[string]bool, error)
- func (d *DepositChaincode) GetJuryDeposit(stub shim.ChaincodeStubInterface, address string) (*modules.JuryDepositJson, error)
- func (d *DepositChaincode) GetListForDeveloper(stub shim.ChaincodeStubInterface) (map[string]bool, error)
- func (d *DepositChaincode) GetListForForfeitureApplication(stub shim.ChaincodeStubInterface) pb.Response
- func (d *DepositChaincode) GetListForJuryCandidate(stub shim.ChaincodeStubInterface) (map[string]bool, error)
- func (d *DepositChaincode) GetListForMediatorCandidate(stub shim.ChaincodeStubInterface) (map[string]bool, error)
- func (d *DepositChaincode) GetMediatorDeposit(stub shim.ChaincodeStubInterface, address string) (*modules.MediatorDepositJson, error)
- func (d *DepositChaincode) GetNodeBalance(stub shim.ChaincodeStubInterface, address string) (*modules.DepositBalanceJson, error)
- func (d *DepositChaincode) GetQuitApplyList(stub shim.ChaincodeStubInterface) pb.Response
- func (d *DepositChaincode) HandleForAddMediator(stub shim.ChaincodeStubInterface, mediatorCreateArgs string) error
- func (d *DepositChaincode) HandleForApplyBecomeMediator(stub shim.ChaincodeStubInterface, address string, okOrNo string) pb.Response
- func (d *DepositChaincode) HandleForApplyQuitDev(stub shim.ChaincodeStubInterface, address string, okOrNo string) pb.Response
- func (d *DepositChaincode) HandleForApplyQuitJury(stub shim.ChaincodeStubInterface, address string, okOrNo string) pb.Response
- func (d *DepositChaincode) HandleForApplyQuitMediator(stub shim.ChaincodeStubInterface, address string, okOrNo string) pb.Response
- func (d *DepositChaincode) HandleForForfeitureApplication(stub shim.ChaincodeStubInterface, address string, okOrNo string) pb.Response
- func (d DepositChaincode) HandleForRemoveMediator(stub shim.ChaincodeStubInterface, address string) error
- func (d DepositChaincode) HandleNodeRemoveFromAgreeList(stub shim.ChaincodeStubInterface, address string) pb.Response
- func (d DepositChaincode) HandlePledgeReward(stub shim.ChaincodeStubInterface) pb.Response
- func (d *DepositChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response
- func (d *DepositChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response
- func (d DepositChaincode) IsFinishAddNewRecords(stub shim.ChaincodeStubInterface) bool
- func (d DepositChaincode) IsFinishAllocated(stub shim.ChaincodeStubInterface) bool
- func (d *DepositChaincode) IsInAgreeList(stub shim.ChaincodeStubInterface, address string) bool
- func (d *DepositChaincode) IsInBecomeList(stub shim.ChaincodeStubInterface, address string) bool
- func (d *DepositChaincode) IsInDeveloperList(stub shim.ChaincodeStubInterface, address string) bool
- func (d *DepositChaincode) IsInForfeitureList(stub shim.ChaincodeStubInterface, address string) bool
- func (d *DepositChaincode) IsInJuryCandidateList(stub shim.ChaincodeStubInterface, address string) bool
- func (d *DepositChaincode) IsInMediatorCandidateList(stub shim.ChaincodeStubInterface, address string) bool
- func (d *DepositChaincode) IsInQuitList(stub shim.ChaincodeStubInterface, address string) bool
- func (d *DepositChaincode) JuryApplyQuit(stub shim.ChaincodeStubInterface) pb.Response
- func (d *DepositChaincode) JuryPayToDepositContract(stub shim.ChaincodeStubInterface, args string) pb.Response
- func (d *DepositChaincode) MediatorApplyQuit(stub shim.ChaincodeStubInterface) pb.Response
- func (d *DepositChaincode) MediatorPayToDepositContract(stub shim.ChaincodeStubInterface) error
- func (d DepositChaincode) ProcessPledgeDeposit(stub shim.ChaincodeStubInterface) pb.Response
- func (d DepositChaincode) ProcessPledgeWithdraw(stub shim.ChaincodeStubInterface, amount string) pb.Response
- func (d DepositChaincode) QueryAllPledgeHistory(stub shim.ChaincodeStubInterface) ([]*modules.PledgeList, error)
- func (d DepositChaincode) QueryPledgeList(stub shim.ChaincodeStubInterface) (*modules.PledgeList, error)
- func (d DepositChaincode) QueryPledgeListByDate(stub shim.ChaincodeStubInterface, date string) (*modules.PledgeList, error)
- func (d DepositChaincode) QueryPledgeStatusByAddr(stub shim.ChaincodeStubInterface, address string) (*modules.PledgeStatusJson, error)
- func (d DepositChaincode) QueryPledgeWithdraw(stub shim.ChaincodeStubInterface) ([]*modules.AddressAmount, error)
- func (d DepositChaincode) UpdateKeyValue(stub shim.ChaincodeStubInterface, key, value string) pb.Response
- func (d *DepositChaincode) UpdateMediatorInfo(stub shim.ChaincodeStubInterface, mediatorUpdateArgs string) pb.Response
- type JurorUpdateArgs
Constants ¶
View Source
const ALL = "all"
Variables ¶
This section is empty.
Functions ¶
func DelJuryBalance ¶
func DelJuryBalance(stub shim.ChaincodeStubInterface, addr string) error
删除Jury账户
func GetJuryBalance ¶
func GetJuryBalance(stub shim.ChaincodeStubInterface, addr string) (*modules.JurorDeposit, error)
获取Jury账户
Types ¶
type DepositChaincode ¶
type DepositChaincode struct { }
func (*DepositChaincode) ApplyBecomeMediator ¶
func (d *DepositChaincode) ApplyBecomeMediator(stub shim.ChaincodeStubInterface, mediatorCreateArgs string) error
超级节点申请加入
func (DepositChaincode) ApplyForForfeitureDeposit ¶
func (d DepositChaincode) ApplyForForfeitureDeposit(stub shim.ChaincodeStubInterface, forfeitureAddress string, role string, reason string) pb.Response
申请没收节点保证金
func (DepositChaincode) DeteleKey ¶
func (d DepositChaincode) DeteleKey(stub shim.ChaincodeStubInterface, key string) pb.Response
func (*DepositChaincode) DevApplyQuit ¶
func (d *DepositChaincode) DevApplyQuit(stub shim.ChaincodeStubInterface) pb.Response
开发者申请退出列表
func (*DepositChaincode) DeveloperPayToDepositContract ¶
func (d *DepositChaincode) DeveloperPayToDepositContract(stub shim.ChaincodeStubInterface) pb.Response
开发者交付保证金
func (*DepositChaincode) GetAgreeForBecomeMediatorList ¶
func (d *DepositChaincode) GetAgreeForBecomeMediatorList(stub shim.ChaincodeStubInterface) (map[string]bool, error)
func (DepositChaincode) GetAllJury ¶
func (d DepositChaincode) GetAllJury(stub shim.ChaincodeStubInterface) pb.Response
func (DepositChaincode) GetAllMediator ¶
func (d DepositChaincode) GetAllMediator(stub shim.ChaincodeStubInterface) pb.Response
func (DepositChaincode) GetAllNode ¶
func (d DepositChaincode) GetAllNode(stub shim.ChaincodeStubInterface) pb.Response
func (*DepositChaincode) GetBecomeMediatorApplyList ¶
func (d *DepositChaincode) GetBecomeMediatorApplyList(stub shim.ChaincodeStubInterface) (map[string]bool, error)
func (*DepositChaincode) GetJuryDeposit ¶
func (d *DepositChaincode) GetJuryDeposit(stub shim.ChaincodeStubInterface, address string) (*modules.JuryDepositJson, error)
func (*DepositChaincode) GetListForDeveloper ¶
func (d *DepositChaincode) GetListForDeveloper(stub shim.ChaincodeStubInterface) (map[string]bool, error)
func (*DepositChaincode) GetListForForfeitureApplication ¶
func (d *DepositChaincode) GetListForForfeitureApplication(stub shim.ChaincodeStubInterface) pb.Response
func (*DepositChaincode) GetListForJuryCandidate ¶
func (d *DepositChaincode) GetListForJuryCandidate(stub shim.ChaincodeStubInterface) (map[string]bool, error)
func (*DepositChaincode) GetListForMediatorCandidate ¶
func (d *DepositChaincode) GetListForMediatorCandidate(stub shim.ChaincodeStubInterface) (map[string]bool, error)
func (*DepositChaincode) GetMediatorDeposit ¶
func (d *DepositChaincode) GetMediatorDeposit(stub shim.ChaincodeStubInterface, address string) (*modules.MediatorDepositJson, error)
func (*DepositChaincode) GetNodeBalance ¶
func (d *DepositChaincode) GetNodeBalance(stub shim.ChaincodeStubInterface, address string) (*modules.DepositBalanceJson, error)
func (*DepositChaincode) GetQuitApplyList ¶
func (d *DepositChaincode) GetQuitApplyList(stub shim.ChaincodeStubInterface) pb.Response
func (*DepositChaincode) HandleForAddMediator ¶ added in v1.0.8
func (d *DepositChaincode) HandleForAddMediator(stub shim.ChaincodeStubInterface, mediatorCreateArgs string) error
基金会手动添加生产节点
func (*DepositChaincode) HandleForApplyBecomeMediator ¶
func (d *DepositChaincode) HandleForApplyBecomeMediator(stub shim.ChaincodeStubInterface, address string, okOrNo string) pb.Response
基金会对申请加入Mediator进行处理
func (*DepositChaincode) HandleForApplyQuitDev ¶
func (d *DepositChaincode) HandleForApplyQuitDev(stub shim.ChaincodeStubInterface, address string, okOrNo string) pb.Response
处理开发者申请退出列表
func (*DepositChaincode) HandleForApplyQuitJury ¶
func (d *DepositChaincode) HandleForApplyQuitJury(stub shim.ChaincodeStubInterface, address string, okOrNo string) pb.Response
处理陪审员申请退出候选列表
func (*DepositChaincode) HandleForApplyQuitMediator ¶
func (d *DepositChaincode) HandleForApplyQuitMediator(stub shim.ChaincodeStubInterface, address string, okOrNo string) pb.Response
基金会对申请退出Mediator进行处理
func (*DepositChaincode) HandleForForfeitureApplication ¶
func (d *DepositChaincode) HandleForForfeitureApplication(stub shim.ChaincodeStubInterface, address string, okOrNo string) pb.Response
处理没收节点
func (DepositChaincode) HandleForRemoveMediator ¶ added in v1.0.8
func (d DepositChaincode) HandleForRemoveMediator(stub shim.ChaincodeStubInterface, address string) error
基金会手动移除超级节点候选列表
func (DepositChaincode) HandleNodeRemoveFromAgreeList ¶
func (d DepositChaincode) HandleNodeRemoveFromAgreeList(stub shim.ChaincodeStubInterface, address string) pb.Response
移除超级节点同意列表
func (DepositChaincode) HandlePledgeReward ¶
func (d DepositChaincode) HandlePledgeReward(stub shim.ChaincodeStubInterface) pb.Response
func (*DepositChaincode) Init ¶
func (d *DepositChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response
func (*DepositChaincode) Invoke ¶
func (d *DepositChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response
func (DepositChaincode) IsFinishAddNewRecords ¶
func (d DepositChaincode) IsFinishAddNewRecords(stub shim.ChaincodeStubInterface) bool
func (DepositChaincode) IsFinishAllocated ¶
func (d DepositChaincode) IsFinishAllocated(stub shim.ChaincodeStubInterface) bool
func (*DepositChaincode) IsInAgreeList ¶
func (d *DepositChaincode) IsInAgreeList(stub shim.ChaincodeStubInterface, address string) bool
func (*DepositChaincode) IsInBecomeList ¶
func (d *DepositChaincode) IsInBecomeList(stub shim.ChaincodeStubInterface, address string) bool
func (*DepositChaincode) IsInDeveloperList ¶
func (d *DepositChaincode) IsInDeveloperList(stub shim.ChaincodeStubInterface, address string) bool
func (*DepositChaincode) IsInForfeitureList ¶
func (d *DepositChaincode) IsInForfeitureList(stub shim.ChaincodeStubInterface, address string) bool
func (*DepositChaincode) IsInJuryCandidateList ¶
func (d *DepositChaincode) IsInJuryCandidateList(stub shim.ChaincodeStubInterface, address string) bool
func (*DepositChaincode) IsInMediatorCandidateList ¶
func (d *DepositChaincode) IsInMediatorCandidateList(stub shim.ChaincodeStubInterface, address string) bool
func (*DepositChaincode) IsInQuitList ¶
func (d *DepositChaincode) IsInQuitList(stub shim.ChaincodeStubInterface, address string) bool
func (*DepositChaincode) JuryApplyQuit ¶
func (d *DepositChaincode) JuryApplyQuit(stub shim.ChaincodeStubInterface) pb.Response
陪审员申请退出候选列表
func (*DepositChaincode) JuryPayToDepositContract ¶
func (d *DepositChaincode) JuryPayToDepositContract(stub shim.ChaincodeStubInterface, args string) pb.Response
陪审员交付保证金
func (*DepositChaincode) MediatorApplyQuit ¶
func (d *DepositChaincode) MediatorApplyQuit(stub shim.ChaincodeStubInterface) pb.Response
超级节点申请退出候选列表
func (*DepositChaincode) MediatorPayToDepositContract ¶
func (d *DepositChaincode) MediatorPayToDepositContract(stub shim.ChaincodeStubInterface) error
超级节点交付保证金
func (DepositChaincode) ProcessPledgeDeposit ¶
func (d DepositChaincode) ProcessPledgeDeposit(stub shim.ChaincodeStubInterface) pb.Response
func (DepositChaincode) ProcessPledgeWithdraw ¶
func (d DepositChaincode) ProcessPledgeWithdraw(stub shim.ChaincodeStubInterface, amount string) pb.Response
func (DepositChaincode) QueryAllPledgeHistory ¶
func (d DepositChaincode) QueryAllPledgeHistory(stub shim.ChaincodeStubInterface) ([]*modules.PledgeList, error)
func (DepositChaincode) QueryPledgeList ¶
func (d DepositChaincode) QueryPledgeList(stub shim.ChaincodeStubInterface) (*modules.PledgeList, error)
func (DepositChaincode) QueryPledgeListByDate ¶
func (d DepositChaincode) QueryPledgeListByDate(stub shim.ChaincodeStubInterface, date string) (*modules.PledgeList, error)
func (DepositChaincode) QueryPledgeStatusByAddr ¶
func (d DepositChaincode) QueryPledgeStatusByAddr(stub shim.ChaincodeStubInterface, address string) (*modules.PledgeStatusJson, error)
func (DepositChaincode) QueryPledgeWithdraw ¶
func (d DepositChaincode) QueryPledgeWithdraw(stub shim.ChaincodeStubInterface) ([]*modules.AddressAmount, error)
func (DepositChaincode) UpdateKeyValue ¶
func (d DepositChaincode) UpdateKeyValue(stub shim.ChaincodeStubInterface, key, value string) pb.Response
更新某个key
func (*DepositChaincode) UpdateMediatorInfo ¶
func (d *DepositChaincode) UpdateMediatorInfo(stub shim.ChaincodeStubInterface, mediatorUpdateArgs string) pb.Response
超级节点更新信息
type JurorUpdateArgs ¶
type JurorUpdateArgs struct {
RewardAddr *string `json:"reward_address"` // 奖励地址,用于奖励
}
更新 juror 信息所需参数
Click to show internal directories.
Click to hide internal directories.