dpos_contract_client

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DposContractClient

type DposContractClient struct {
	// contains filtered or unexported fields
}

DposContractClient contains variables needed for communication with daily dpos smart contract

func NewDposContractClient

func NewDposContractClient(ethClient *ethclient.Client, dposContractAddress common.Address, chainID *big.Int) (*DposContractClient, error)

func (*DposContractClient) CancelUndelegate

func (DposContractClient *DposContractClient) CancelUndelegate(transactor *Transactor, validator common.Address) (*types.Transaction, error)

func (*DposContractClient) ClaimCommissionRewards

func (DposContractClient *DposContractClient) ClaimCommissionRewards(transactor *Transactor, validator common.Address) (*types.Transaction, error)

func (*DposContractClient) ClaimRewards

func (DposContractClient *DposContractClient) ClaimRewards(transactor *Transactor, validator common.Address) (*types.Transaction, error)

func (*DposContractClient) ConfirmUndelegate

func (DposContractClient *DposContractClient) ConfirmUndelegate(transactor *Transactor, validator common.Address) (*types.Transaction, error)

func (*DposContractClient) Delegate

func (DposContractClient *DposContractClient) Delegate(transactor *Transactor, amount *big.Int, validator common.Address) (*types.Transaction, error)

func (*DposContractClient) GetDelegations

func (DposContractClient *DposContractClient) GetDelegations(delegator common.Address) ([]dpos_interface.DposInterfaceDelegationData, error)

func (*DposContractClient) GetOwnerValidators

func (DposContractClient *DposContractClient) GetOwnerValidators(owner common.Address) ([]dpos_interface.DposInterfaceValidatorData, error)

func (*DposContractClient) GetTotalEligibleVotesCount

func (DposContractClient *DposContractClient) GetTotalEligibleVotesCount() (uint64, error)

func (*DposContractClient) GetUndelegations

func (DposContractClient *DposContractClient) GetUndelegations(delegator common.Address) ([]dpos_interface.DposInterfaceUndelegationData, error)

func (*DposContractClient) GetValidator

func (DposContractClient *DposContractClient) GetValidator(validator common.Address) (dpos_interface.DposInterfaceValidatorBasicInfo, error)

func (*DposContractClient) GetValidatorEligibleVotesCount

func (DposContractClient *DposContractClient) GetValidatorEligibleVotesCount(validator common.Address) (uint64, error)

func (*DposContractClient) GetValidators

func (DposContractClient *DposContractClient) GetValidators() ([]dpos_interface.DposInterfaceValidatorData, error)

func (*DposContractClient) GetValidatorsAtBlock

func (DposContractClient *DposContractClient) GetValidatorsAtBlock(block_num *big.Int) ([]dpos_interface.DposInterfaceValidatorData, error)

func (*DposContractClient) IsValidatorEligible

func (DposContractClient *DposContractClient) IsValidatorEligible(validator common.Address) (bool, error)

func (*DposContractClient) NewTransactor

func (DposContractClient *DposContractClient) NewTransactor(privateKeyStr string) (*Transactor, error)

func (*DposContractClient) RedelegateUndelegate

func (DposContractClient *DposContractClient) RedelegateUndelegate(transactor *Transactor, amount *big.Int, validatorFrom common.Address, validatorTo common.Address) (*types.Transaction, error)

func (*DposContractClient) RegisterValidator

func (DposContractClient *DposContractClient) RegisterValidator(transactor *Transactor, validator common.Address, proof []byte, vrf_key []byte, commission uint16, description string, endpoint string) (*types.Transaction, error)

func (*DposContractClient) SetCommission

func (DposContractClient *DposContractClient) SetCommission(transactor *Transactor, validator common.Address, commission uint16) (*types.Transaction, error)

func (*DposContractClient) SetValidatorInfo

func (DposContractClient *DposContractClient) SetValidatorInfo(transactor *Transactor, validator common.Address, description string, endpoint string) (*types.Transaction, error)

func (*DposContractClient) Undelegate

func (DposContractClient *DposContractClient) Undelegate(transactor *Transactor, amount *big.Int, validator common.Address) (*types.Transaction, error)

type Transactor

type Transactor struct {
	TransactOpts *bind.TransactOpts
	Address      common.Address
	Nonce        uint64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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