contracts

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HexSignMethod           = "e341eaa4"
	RewardMasterPercent     = 40
	RewardVoterPercent      = 50
	RewardFoundationPercent = 10
)

Variables

This section is empty.

Functions

func CalculateRewardForHolders

func CalculateRewardForHolders(foudationWalletAddr common.Address, validator *contractValidator.TomoValidator, state *state.StateDB, signer common.Address, calcReward *big.Int) error

Calculate reward for holders.

func CalculateRewardForSigner

func CalculateRewardForSigner(chainReward *big.Int, signers map[common.Address]*rewardLog, totalSigner uint64) (map[common.Address]*big.Int, error)

Calculate reward for signers.

func CreateTransactionSign

func CreateTransactionSign(chainConfig *params.ChainConfig, pool *core.TxPool, manager *accounts.Manager, block *types.Block) error

Send tx sign for block number to smart contract blockSigner.

func CreateTxSign

func CreateTxSign(blockNumber *big.Int, blockHash common.Hash, nonce uint64, blockSigner common.Address) *types.Transaction

Create tx sign.

func GetCandidatesOwnerBySigner

func GetCandidatesOwnerBySigner(validator *contractValidator.TomoValidator, signerAddr common.Address) common.Address

Get candidate owner by address.

func GetRewardBalancesRate

func GetRewardBalancesRate(foudationWalletAddr common.Address, masterAddr common.Address, totalReward *big.Int, validator *contractValidator.TomoValidator) (map[common.Address]*big.Int, error)

Get reward balance rates for master node, founder and holders.

func GetRewardForCheckpoint

func GetRewardForCheckpoint(chain consensus.ChainReader, blockSignerAddr common.Address, number uint64, rCheckpoint uint64, client bind.ContractBackend, totalSigner *uint64) (map[common.Address]*rewardLog, error)

Calculate reward for reward checkpoint.

func GetSignersFromContract

func GetSignersFromContract(addrBlockSigner common.Address, client bind.ContractBackend, blockHash common.Hash) ([]common.Address, error)

Get signers signed for blockNumber from blockSigner contract.

Types

This section is empty.

Directories

Path Synopsis
Package chequebook package wraps the 'chequebook' Ethereum smart contract.
Package chequebook package wraps the 'chequebook' Ethereum smart contract.
ens

Jump to

Keyboard shortcuts

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