Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ModuleName is the name of the module ModuleName = "expense" // StoreKey to be used when creating the KVStore StoreKey = ModuleName // RouterKey is the module name router key RouterKey = ModuleName // QuerierRoute to be used for querierer msgs QuerierRoute = ModuleName )
Variables ¶
Create a new Amino Codec instance to be used for serialisation/deserialisation for messages
Functions ¶
Types ¶
type Expense ¶
type Expense struct { Owner sdk.AccAddress `json:"owner"` //The account which is claiming the expense Problem string `json:"problem"` //The problem being solved < 70 chars Solution string `json:"solution"` //Git commit hash of the solution, or a sha256 hash of the evidence package Amount sdk.Coins `json:"amount"` Parent string `json:"parent"` Votes Votes `json:"votes"` }
func NewExpense ¶
func (Expense) GetHash ¶
Calculate the hash of the Expense to use as the index
func (Expense) GetSignBytes ¶
GetSignBytes encodes the message for signing
func (Expense) GetSigners ¶
func (e Expense) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
type Votes ¶
type Votes struct { ForkYes uint64 `json:"fork_yes"` ForkNo uint64 `json:"fork_no"` Yes uint64 `json:"yes"` No uint64 `json:"no"` Why []why `json:"why"` //TODO: why did you vote yes? Then anyone who voted the same way can ELO rank the reasons. Get a mathematician to work out a weighted ELO rank and get someone to implement it. Voted []sdk.AccAddress `json:"voted"` }
Click to show internal directories.
Click to hide internal directories.