helpers

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventToSlice added in v0.2.0

func EventToSlice(event interface{}) ([]interface{}, error)

EventToSlice transforms an abigen event struct binding to a string/int64/float64 encoded slice (ideal for BigQuery).

type AttestationsAttestationsRequested struct {
	Identifier                 [32]byte
	Account                    common.Address
	AttestationsRequested      *big.Int
	AttestationRequestFeeToken common.Address
	Raw                        types.Log // Blockchain specific contextual infos
}

func FromFixed added in v0.2.0

func FromFixed(number *big.Int) float64

Types

type AddressLesserGreater

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

type Election

type Election struct{ *contracts.Election }

Election helper methods

func (*Election) ActivateAll

func (e *Election) ActivateAll(opts *bind.TransactOpts) ([]*types.Transaction, error)

func (*Election) ActivateAllMetadata

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

func (*Election) GetAccountActiveVotes

func (e *Election) GetAccountActiveVotes(opts *bind.CallOpts, account common.Address) (VotesByGroup, error)

func (*Election) GetAccountElectionVotes

func (e *Election) GetAccountElectionVotes(opts *bind.CallOpts, account common.Address) (*ElectionVotes, error)

func (*Election) GetAccountPendingVotes

func (e *Election) GetAccountPendingVotes(opts *bind.CallOpts, account common.Address) (VotesByGroup, error)

func (*Election) GetVotesForGroupByAccount

func (e *Election) GetVotesForGroupByAccount(opts *bind.CallOpts, groupAddr, account common.Address) (*big.Int, error)

func (*Election) RevokeAll

func (e *Election) RevokeAll(opts *bind.TransactOpts, account common.Address, group common.Address) (*RevokeAll, error)

func (*Election) RevokeAllMetadata

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

func (*Election) RevokeBothMetadata

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

func (*Election) RevokeMetadata

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

func (*Election) Vote

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

func (*Election) VoteMetadata

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

type ElectionVotes

type ElectionVotes struct {
	Active  VotesByGroup
	Pending VotesByGroup
}

type LockedGold

type LockedGold struct{ *contracts.LockedGold }

LockedGold helper methods

func (*LockedGold) GetPendingWithdrawals

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

func (*LockedGold) GetTotalPendingWithdrawals

func (lg *LockedGold) 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 RevokeAll

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

type RevokeBothMetadata

type RevokeBothMetadata struct {
	Pending *RevokeMetadata
	Active  *RevokeMetadata
}

type RevokeMetadata

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

type SignatureValues

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

func GetSignatureValues

func GetSignatureValues(signature []byte) (*SignatureValues, 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