Documentation ¶
Index ¶
- Constants
- func CalculateRewardForHolders(foudationWalletAddr common.Address, validator *contractValidator.TomoValidator, ...) error
- func CalculateRewardForSigner(chainReward *big.Int, signers map[common.Address]*rewardLog, ...) (map[common.Address]*big.Int, error)
- func CreateTransactionSign(chainConfig *params.ChainConfig, pool *core.TxPool, manager *accounts.Manager, ...) error
- func CreateTxSign(blockNumber *big.Int, blockHash common.Hash, nonce uint64, ...) *types.Transaction
- func GetCandidatesOwnerBySigner(validator *contractValidator.TomoValidator, signerAddr common.Address) common.Address
- func GetRewardBalancesRate(foudationWalletAddr common.Address, masterAddr common.Address, ...) (map[common.Address]*big.Int, error)
- func GetRewardForCheckpoint(chain consensus.ChainReader, blockSignerAddr common.Address, number uint64, ...) (map[common.Address]*rewardLog, error)
- func GetSignersFromContract(addrBlockSigner common.Address, client bind.ContractBackend, ...) ([]common.Address, error)
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.