wrapper

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRegistryNotDeployed = errors.New("Registry Not Deployed")
)

Functions

This section is empty.

Types

type ElectionVotes

type ElectionVotes struct {
	Active  VotesByGroup
	Pending VotesByGroup
}

type ElectionWrapper

type ElectionWrapper struct {
	*contract.Election
}

func NewElection

func NewElection(celoClient *client.CeloClient, registryWrapper *RegistryWrapper) (*ElectionWrapper, error)

func (*ElectionWrapper) GetAccountElectionVotes

func (w *ElectionWrapper) GetAccountElectionVotes(opts *bind.CallOpts, account common.Address) (*ElectionVotes, error)

type LockedGoldWrapper

type LockedGoldWrapper struct {
	*contract.LockedGold
}

func NewLockedGold

func NewLockedGold(celoClient *client.CeloClient, registryWrapper *RegistryWrapper) (*LockedGoldWrapper, error)

func (*LockedGoldWrapper) GetPendingWithdrawals

func (w *LockedGoldWrapper) GetPendingWithdrawals(opts *bind.CallOpts, account common.Address) ([]PendingWithdrawal, error)

func (*LockedGoldWrapper) GetTotalPendingWithdrawals

func (w *LockedGoldWrapper) GetTotalPendingWithdrawals(opts *bind.CallOpts, account common.Address) (*big.Int, error)

type NonVotingLockedGold

type NonVotingLockedGold struct {
	Amount             *big.Int
	PendingWithdrawals []PendingWithdrawal
}

type PendingWithdrawal

type PendingWithdrawal struct {
	Amount    *big.Int
	Timestamp *big.Int
}

type RegistryKey

type RegistryKey string
var (
	LockedGoldRegistryId RegistryKey = "LockedGold"
	ElectionRegistryId   RegistryKey = "Election"
	AccountsRegistryId   RegistryKey = "Accounts"
)

func (RegistryKey) String

func (rk RegistryKey) String() string

type RegistryWrapper

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

func NewRegistry

func NewRegistry(celoClient *client.CeloClient) (*RegistryWrapper, error)

func (*RegistryWrapper) Contract

func (w *RegistryWrapper) Contract() *contract.Registry

func (*RegistryWrapper) GetAccounts

func (w *RegistryWrapper) GetAccounts(opts *bind.CallOpts, backend bind.ContractBackend) (*contract.Accounts, error)

func (*RegistryWrapper) GetAddressFor

func (w *RegistryWrapper) GetAddressFor(opts *bind.CallOpts, identifierHash [32]byte) (common.Address, error)

GetAddressFor is a free data retrieval call binding the contract method 0xdd927233.

Solidity: function getAddressFor(bytes32 identifierHash) constant returns(address)

func (*RegistryWrapper) GetAddressForString

func (w *RegistryWrapper) GetAddressForString(opts *bind.CallOpts, identifier string) (common.Address, error)

func (*RegistryWrapper) GetElection

func (w *RegistryWrapper) GetElection(opts *bind.CallOpts, backend bind.ContractBackend) (*contract.Election, error)

func (*RegistryWrapper) GetLockedGold

func (w *RegistryWrapper) GetLockedGold(opts *bind.CallOpts, backend bind.ContractBackend) (*contract.LockedGold, error)

func (*RegistryWrapper) GetUpdatesOnBlock

func (w *RegistryWrapper) GetUpdatesOnBlock(ctx context.Context, blockNumber uint64, maxTxIndex *uint, identifiers [][32]byte) (map[[32]byte]common.Address, error)

type VotesByGroup

type VotesByGroup map[common.Address]*big.Int

Jump to

Keyboard shortcuts

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