test

package
v0.0.0-...-ded4da2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ONE_WEEK      int64 = 86400 * 7
	VOTE_DAY      int64 = 86400 * 4
	MIN_DELAY     int64 = 86400 * 1
	VOTING_PERIOD int64 = ONE_WEEK - VOTE_DAY
)

Variables

View Source
var (
	WIN_CLAIM     = utils.ToWei(0.5)
	LOSE_CLAIM    = utils.ToWei(0.1)
	ABSTAIN_CLAIM = utils.ToWei(0.2)
)
View Source
var ProposalState = proposalState{0, 1, 2, 3, 4, 5, 6, 7}
View Source
var VoteType = voteType{0, 1, 2}

Functions

This section is empty.

Types

type BMGovernor

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

func DeployBMGovernor

func DeployBMGovernor(owner *bind.TransactOpts, backend Backend) (*BMGovernor, error)

func DeployBMGovernorWithBackend

func DeployBMGovernorWithBackend(t *testing.T) (*bms.Backend, *BMGovernor)

func (*BMGovernor) ChargeERC20

func (bm *BMGovernor) ChargeERC20(t *testing.T, backend Backend, eoas []*bind.TransactOpts) []*bind.TransactOpts

func (*BMGovernor) NewProposalToTarget

func (bm *BMGovernor) NewProposalToTarget(t *testing.T, desc string, values ...interface{}) *Proposal

func (*BMGovernor) NextProposalTime

func (bm *BMGovernor) NextProposalTime(t *testing.T, backend interface {
	AdjustTime(adjustment time.Duration) error
	Commit() common.Hash
})

func (*BMGovernor) ToProposalSnapshotTime

func (bm *BMGovernor) ToProposalSnapshotTime(t *testing.T, backend interface {
	AdjustTime(adjustment time.Duration) error
	Commit() common.Hash
}, proposalID *big.Int)

func (*BMGovernor) UnpackProposalCreated

func (bm *BMGovernor) UnpackProposalCreated(t *testing.T, receipt *types.Receipt) *abis.BmGovernorProposalCreated

type Backend

type Backend interface {
	bind.DeployBackend
	bind.ContractBackend
}

type Proposal

type Proposal struct {
	Targets     []common.Address `json:"targets"`
	Values      []*big.Int       `json:"values"`
	CallDatas   [][]byte         `json:"calldatas"`
	Description string           `json:"description"`
}

Jump to

Keyboard shortcuts

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