governance

package
v0.0.0-...-5fc2af4 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType

type ActionType string
const (
	CREATED  ActionType = "CREATED"
	QUEUED   ActionType = "QUEUED"
	EXECUTED ActionType = "EXECUTED"
	CANCELED ActionType = "CANCELED"
)

type BaseLog

type BaseLog struct {
	TransactionHash  string
	TransactionIndex int64
	LogIndex         int64
}

type Proposal

type Proposal struct {
	Id           *big.Int
	Proposer     common.Address
	Description  string
	Title        string
	CreateTime   *big.Int
	Eta          *big.Int
	ForVotes     *big.Int
	AgainstVotes *big.Int
	Canceled     bool
	Executed     bool
	Parameters   ProposalParameters
}

type ProposalActions

type ProposalActions struct {
	Targets    []common.Address
	Values     []*big.Int
	Signatures []string
	Calldatas  [][]byte
}

type ProposalEvent

type ProposalEvent struct {
	BaseLog
	ProposalID *big.Int
	Caller     common.Address
	Eta        *big.Int
	EventType  ActionType
}

type ProposalParameters

type ProposalParameters struct {
	WarmUpDuration      *big.Int
	ActiveDuration      *big.Int
	QueueDuration       *big.Int
	GracePeriodDuration *big.Int
	AcceptanceThreshold *big.Int
	MinQuorum           *big.Int
}

type Storable

type Storable struct {
	Processed struct {
		// contains filtered or unexported fields
	}
	// contains filtered or unexported fields
}

func New

func New(block *types.Block) *Storable

func (*Storable) Execute

func (s *Storable) Execute(ctx context.Context) error

func (*Storable) ID

func (s *Storable) ID() string

func (*Storable) Result

func (s *Storable) Result() interface{}

func (*Storable) Rollback

func (s *Storable) Rollback(ctx context.Context, tx pgx.Tx) error

func (*Storable) SaveToDatabase

func (s *Storable) SaveToDatabase(ctx context.Context, tx pgx.Tx) error

Jump to

Keyboard shortcuts

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