security

package
v2.0.0-b2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: GPL-3.0 Imports: 11 Imported by: 6

Documentation

Index

Constants

View Source
const (
	AuctionNamespace  string = "auction"
	DepositNamespace  string = "deposit"
	MinipoolNamespace string = "minipool"
	NetworkNamespace  string = "network"
	NodeNamespace     string = "node"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ISecurityCouncilSetting

type ISecurityCouncilSetting[ProposeType core.CallReturnType] interface {
	eth.IQueryable
	GetProtocolDaoSetting() protocol.IProtocolDaoSetting[ProposeType]
	ProposeSet(value ProposeType, opts *bind.TransactOpts) (*eth.TransactionInfo, error)
}

A general interface for settings, parameterized by the type required for proposals

type SecurityCouncilBoolSetting

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

A simple boolean setting

func (*SecurityCouncilBoolSetting) GetProtocolDaoSetting

func (s *SecurityCouncilBoolSetting) GetProtocolDaoSetting() *protocol.ProtocolDaoBoolSetting

Gets the underlying path for the setting within the contracts

func (*SecurityCouncilBoolSetting) ProposeSet

func (s *SecurityCouncilBoolSetting) ProposeSet(value bool, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Creates a proposal to change the setting

type SecurityCouncilManager

type SecurityCouncilManager struct {
	// The number of members in the security council
	MemberCount *core.FormattedUint256Field[uint64]

	// The total amount of votesneeded for a proposal to pass
	MemberQuorumVotesRequired *core.FormattedUint256Field[float64]

	// Settings for the Protocol DAO
	Settings *SecurityCouncilSettings
	// contains filtered or unexported fields
}

Binding for RocketDAOSecurity

func NewSecurityCouncilManager

func NewSecurityCouncilManager(rp *rocketpool.RocketPool, pSettings *protocol.ProtocolDaoSettings) (*SecurityCouncilManager, error)

Creates a new SecurityCouncilManager contract binding

func (*SecurityCouncilManager) CreateMemberFromAddress

func (c *SecurityCouncilManager) CreateMemberFromAddress(address common.Address, includeDetails bool, opts *bind.CallOpts) (*SecurityCouncilMember, error)

Get a security council member by address.

func (*SecurityCouncilManager) CreateMembersFromAddresses

func (c *SecurityCouncilManager) CreateMembersFromAddresses(addresses []common.Address, includeDetails bool, opts *bind.CallOpts) ([]*SecurityCouncilMember, error)

Get the list of all security council members.

func (*SecurityCouncilManager) GetMemberAddress

func (c *SecurityCouncilManager) GetMemberAddress(mc *batch.MultiCaller, address_Out *common.Address, index uint64)

Get a security council member address by index

func (*SecurityCouncilManager) GetMemberAddresses

func (c *SecurityCouncilManager) GetMemberAddresses(memberCount uint64, opts *bind.CallOpts) ([]common.Address, error)

Get the list of security council member addresses.

func (*SecurityCouncilManager) Join

Get info for joining the security council

func (*SecurityCouncilManager) Kick

Get info for removing a member from the security council

func (*SecurityCouncilManager) KickMulti

func (c *SecurityCouncilManager) KickMulti(addresses []common.Address, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for removing multiple members from the security council

func (*SecurityCouncilManager) Leave

Get info for leaving the security council

func (*SecurityCouncilManager) ProposeSetBool

func (c *SecurityCouncilManager) ProposeSetBool(message string, namespace string, setting protocol.SettingName, value bool, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for proposing a bool setting

func (*SecurityCouncilManager) ProposeSetUint

func (c *SecurityCouncilManager) ProposeSetUint(message string, namespace string, setting protocol.SettingName, value *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for proposing a uint setting

func (*SecurityCouncilManager) RequestLeave

func (c *SecurityCouncilManager) RequestLeave(opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for requesting to leave the security council

type SecurityCouncilMember

type SecurityCouncilMember struct {
	// The address of this member
	Address common.Address

	// True if this member exists (is part of the security council)
	Exists *core.SimpleField[bool]

	// The member's ID
	ID *core.SimpleField[string]

	// The time the member was invited to the Oracle DAO
	InvitedTime *core.FormattedUint256Field[time.Time]

	// The time the member joined the Oracle DAO
	JoinedTime *core.FormattedUint256Field[time.Time]

	// The time the member voluntarily left the Oracle DAO
	LeftTime *core.FormattedUint256Field[time.Time]
	// contains filtered or unexported fields
}

Binding for security council members

func NewSecurityCouncilMember

func NewSecurityCouncilMember(rp *rocketpool.RocketPool, address common.Address) (*SecurityCouncilMember, error)

Creates a new SecurityCouncilMember instance

type SecurityCouncilSettings

type SecurityCouncilSettings struct {
	Auction struct {
		IsCreateLotEnabled *SecurityCouncilBoolSetting `json:"isCreateLotEnabled"`
		IsBidOnLotEnabled  *SecurityCouncilBoolSetting `json:"isBidOnLotEnabled"`
	} `json:"auction"`

	Deposit struct {
		IsDepositingEnabled          *SecurityCouncilBoolSetting `json:"isDepositingEnabled"`
		AreDepositAssignmentsEnabled *SecurityCouncilBoolSetting `json:"areDepositAssignmentsEnabled"`
	} `json:"deposit"`

	Minipool struct {
		IsSubmitWithdrawableEnabled *SecurityCouncilBoolSetting `json:"isSubmitWithdrawableEnabled"`
		IsBondReductionEnabled      *SecurityCouncilBoolSetting `json:"isBondReductionEnabled"`
	} `json:"minipool"`

	Network struct {
		IsSubmitBalancesEnabled *SecurityCouncilBoolSetting `json:"isSubmitBalancesEnabled"`
		IsSubmitRewardsEnabled  *SecurityCouncilBoolSetting `json:"isSubmitRewardsEnabled"`
	} `json:"network"`

	Node struct {
		IsRegistrationEnabled              *SecurityCouncilBoolSetting `json:"isRegistrationEnabled"`
		IsSmoothingPoolRegistrationEnabled *SecurityCouncilBoolSetting `json:"isSmoothingPoolRegistrationEnabled"`
		IsDepositingEnabled                *SecurityCouncilBoolSetting `json:"isDepositingEnabled"`
		AreVacantMinipoolsEnabled          *SecurityCouncilBoolSetting `json:"areVacantMinipoolsEnabled"`
	} `json:"node"`
	// contains filtered or unexported fields
}

Binding for security council settings

func (*SecurityCouncilSettings) GetSettings

Get all of the settings, organized by the type used in proposals and boostraps

type SettingsCategory

type SettingsCategory struct {
	ContractName rocketpool.ContractName
	BoolSettings []ISecurityCouncilSetting[bool]
}

Wrapper for a settings category, with all of its settings

Jump to

Keyboard shortcuts

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