wrapper

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func CallOptsFromTxOpts added in v0.3.0

func CallOptsFromTxOpts(txOpts *bind.TransactOpts) *bind.CallOpts

Types

type AccountsWrapper added in v0.3.0

type AccountsWrapper struct {
	*contract.Accounts
}

func NewAccounts added in v0.3.0

func NewAccounts(contract *contract.Accounts) *AccountsWrapper

func (*AccountsWrapper) AuthorizeMetadata added in v0.3.0

func (w *AccountsWrapper) AuthorizeMetadata(popSignature []byte) (*EncodedSignature, error)

type AddressLesserGreater added in v0.3.0

type AddressLesserGreater struct {
	Lesser  common.Address
	Greater common.Address
}

type ElectionVotes

type ElectionVotes struct {
	Active  VotesByGroup
	Pending VotesByGroup
}

type ElectionWrapper

type ElectionWrapper struct {
	*contract.Election
}

func NewElection

func NewElection(contract *contract.Election) *ElectionWrapper

func (*ElectionWrapper) ActivateAll added in v0.3.0

func (w *ElectionWrapper) ActivateAll(opts *bind.TransactOpts) ([]*types.Transaction, error)

func (*ElectionWrapper) ActivateAllMetadata added in v0.3.0

func (w *ElectionWrapper) ActivateAllMetadata(opts *bind.CallOpts, account common.Address) ([]common.Address, error)

func (*ElectionWrapper) GetAccountElectionVotes

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

func (*ElectionWrapper) RevokeAll added in v0.3.0

func (w *ElectionWrapper) RevokeAll(opts *bind.TransactOpts, account common.Address, group common.Address) (*RevokeAll, error)

func (*ElectionWrapper) RevokeAllMetadata added in v0.3.0

func (w *ElectionWrapper) RevokeAllMetadata(opts *bind.CallOpts, account common.Address, group common.Address) (*RevokeBothMetadata, error)

func (*ElectionWrapper) RevokeBothMetadata added in v0.3.0

func (w *ElectionWrapper) RevokeBothMetadata(opts *bind.CallOpts, account common.Address, group common.Address, value *big.Int) (*RevokeBothMetadata, error)

func (*ElectionWrapper) RevokeMetadata added in v0.3.0

func (w *ElectionWrapper) RevokeMetadata(opts *bind.CallOpts, account common.Address, group common.Address, value *big.Int) (*RevokeMetadata, error)

func (*ElectionWrapper) Vote added in v0.3.0

func (w *ElectionWrapper) Vote(opts *bind.TransactOpts, group common.Address, value *big.Int) (*types.Transaction, error)

func (*ElectionWrapper) VoteMetadata added in v0.3.0

func (w *ElectionWrapper) VoteMetadata(opts *bind.CallOpts, group common.Address, value *big.Int) (*AddressLesserGreater, error)

type EncodedSignature added in v0.3.0

type EncodedSignature struct {
	R [32]byte
	S [32]byte
	V uint8
}

type LockedGoldWrapper

type LockedGoldWrapper struct {
	*contract.LockedGold
}

func NewLockedGold

func NewLockedGold(contract *contract.LockedGold) *LockedGoldWrapper

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(cc *client.CeloClient) (*RegistryWrapper, error)

func (*RegistryWrapper) Contract

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

func (*RegistryWrapper) GetAccounts

func (w *RegistryWrapper) GetAccounts(ctx context.Context, block *big.Int) (*contract.Accounts, error)

func (*RegistryWrapper) GetAccountsWrapper added in v0.3.0

func (w *RegistryWrapper) GetAccountsWrapper(ctx context.Context, block *big.Int) (*AccountsWrapper, 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(ctx context.Context, block *big.Int, identifier string) (common.Address, error)

func (*RegistryWrapper) GetElection

func (w *RegistryWrapper) GetElection(ctx context.Context, block *big.Int) (*contract.Election, error)

func (*RegistryWrapper) GetElectionWrapper added in v0.3.0

func (w *RegistryWrapper) GetElectionWrapper(ctx context.Context, block *big.Int) (*ElectionWrapper, error)

func (*RegistryWrapper) GetLockedGold

func (w *RegistryWrapper) GetLockedGold(ctx context.Context, block *big.Int) (*contract.LockedGold, error)

func (*RegistryWrapper) GetLockedGoldWrapper added in v0.3.0

func (w *RegistryWrapper) GetLockedGoldWrapper(ctx context.Context, block *big.Int) (*LockedGoldWrapper, error)

type RevokeAll added in v0.3.0

type RevokeAll struct {
	Pending *types.Transaction
	Active  *types.Transaction
}

type RevokeBothMetadata added in v0.3.0

type RevokeBothMetadata struct {
	Pending *RevokeMetadata
	Active  *RevokeMetadata
}

type RevokeMetadata added in v0.3.0

type RevokeMetadata struct {
	Index *big.Int
	Value *big.Int
	*AddressLesserGreater
}

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