ethereum

package
v0.3.2-0...-6117ab2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2019 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForKYC

func CheckForKYC() (bool, error)

CheckForKYC will return whether a user has already passed the KYC

func Finalize

func Finalize(_proposalID string) (bool, bool, error)

Finalize will finalize a vote as it will trigger the calculation of the reward of this user including the xDAI and KNW reward in case of a voting for the winning decision or the losing of xDAI and KNW in case of a voting for the losing decision The first caller who executes this will also trigger the calculation whether the vote passed or not

func GetBalances

func GetBalances() (float64, []string, []float64, error)

GetBalances will print the xDAI and KNW balances

func GetHashOfString

func GetHashOfString(_string string) [32]byte

GetHashOfString takes a string a returns it as keccak256

func GetVoteInfo

func GetVoteInfo(_proposalID ...int) error

GetVoteInfo will print information about a vote

func InitDitRepository

func InitDitRepository(_optionalRepository ...string) error

InitDitRepository will initialize a new repository and store its ditContracts address together with additional information into the config When there is no ditContract for this repository, the user will be prompted to deploy one

func Open

func Open(_proposalID string) error

Open will open and thus reveal a vote (that was commited through a hash) to the public during the opening phase

func ProposeCommit

func ProposeCommit(_branch string, _branchHeadHash string) (string, int, error)

ProposeCommit will start a new proposal on the ditContract of this repository

func SearchForHashInVotes

func SearchForHashInVotes(_branchHash string) (int, bool, bool, string, error)

SearchForHashInVotes will search for a vote on a given branch hash and return the outcome

func SetDitCoordinator

func SetDitCoordinator(_ditCoordinatorAddressString string) error

SetDitCoordinator will write the dit coordinators address to the config and retrieve the addresses of the KNWToken and KNWVoting contracts

func Vote

func Vote(_proposalID string, _choice string, _salt string) error

Vote will cast a users vote on a proposal

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL