validatorpool

package
v0.6.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const AcceptOwnershipMethodName = "acceptOwnership"

AcceptOwnershipMethodName is the name of the acceptOwnership method. It matches the name of the method in the contract ABI.

View Source
const AddPrivilegeMethodName = "addPrivilege"

AddPrivilegeMethodName is the name of the addPrivilege method. It matches the name of the method in the contract ABI.

View Source
const ApplicationApprovedEventName = "ApplicationApproved"

ApplicationApprovedName is the name of the ApplicationApproved event. It matches the name of the event in the contract ABI.

View Source
const ApplicationMethodName = "application"

ApplicationMethodName is the name of the applications method. It matches the name of the method in the contract ABI.

View Source
const ApplicationSubmittedEventName = "ApplicationSubmitted"

ApplicationSubmittedEventName is the name of the ApplicationSubmitted event. It matches the name of the event in the contract ABI.

View Source
const ApplicationsCleanedEventName = "ApplicationsCleaned"

ApplicationsCleanedName is the name of the ApplicationsCleaned event. It matches the name of the event in the contract ABI.

View Source
const ApplicationsMethodName = "applications"

ApplicationsMethodName is the name of the Applications method. It matches the name of the method in the contract ABI.

View Source
const ApproveApplicationMethodName = "approveApplication"

ApproveApplicationMethodName is the name of the approveApplication method. It matches the name of the method in the contract ABI.

View Source
const CandidateOwnerMethodName = "candidateOwner"

CandidateOwnerMethodName is the name of the candidateOwner method. It matches the name of the method in the contract ABI.

View Source
const CleanupApplicationsMethodName = "cleanupApplications"

CleanupApplicationsMethodName is the name of the cleanupApplications method. It matches the name of the method in the contract ABI.

EvmAddress is the EVM address of the validatorpool precompile. The address is prefixed with 0x7b7c which was used to derive Mezo chain ID. This prefix is used to avoid potential collisions with EVM native precompiles.

View Source
const EvmByteCode = "" /* 8734-byte string literal not displayed */

EvmByteCode is the EVM bytecode of the ValidatorPool precompile. This code is returned by eth_getCode and ensures the precompile address is detected as a smart contract by external services. note: It should NOT contain a 0x prefix

WARNING! This value is used in the InitChain ABCI hook and affects the app state hash. DO NOT change this value on a live chain, instead, use `setPrecompileByteCode` provided by the `Maintenance` precompile

This bytecode was generated by compiling the ValidatorPoolCaller contract found in the precompile/hardhat package. Then extracting `deployedBytecode` from the build artifacts

View Source
const KickMethodName = "kick"

KickMethodName is the name of the kick method. It matches the name of the method in the contract ABI.

View Source
const LeaveMethodName = "leave"

LeaveMethodName is the name of the leave method. It matches the name of the method in the contract ABI.

View Source
const OwnerMethodName = "owner"

OwnerMethodName is the name of the owner method. It matches the name of the method in the contract ABI.

View Source
const OwnershipTransferStartedEventName = "OwnershipTransferStarted"

OwnershipTransferStartedName is the name of the OwnershipTransferStarted event. It matches the name of the event in the contract ABI.

View Source
const OwnershipTransferredEventName = "OwnershipTransferred"

OwnershipTransferredName is the name of the OwnershipTransferred event. It matches the name of the event in the contract ABI.

View Source
const PrivilegeAddedEventName = "PrivilegeAdded"

PrivilegeAddedEventName is the name of the PrivilegeAdded event. It matches the name of the event in the contract ABI.

View Source
const PrivilegeRemovedEventName = "PrivilegeRemoved"

PrivilegeRemovedEventName is the name of the PrivilegeRemoved event. It matches the name of the event in the contract ABI.

View Source
const PrivilegesMethodName = "privileges"

PrivilegesMethodName is the name of the `privileges` method. It matches the name of the method in the contract ABI.

View Source
const RemovePrivilegeMethodName = "removePrivilege"

RemovePrivilegeMethodName is the name of the removePrivilege method. It matches the name of the method in the contract ABI.

View Source
const SubmitApplicationGasMultiplier uint64 = 4

SubmitApplicationGasMultiplier is used to increase the default gas requirements

View Source
const SubmitApplicationMethodName = "submitApplication"

SubmitApplicationMethodName is the name of the submitApplication method. It matches the name of the method in the contract ABI.

View Source
const TransferOwnershipMethodName = "transferOwnership"

TransferOwnershipMethodName is the name of the transferOwnership method. It matches the name of the method in the contract ABI.

View Source
const ValidatorJoinedEventName = "ValidatorJoined"

ValidatorJoinedName is the name of the ValidatorJoined event. It matches the name of the event in the contract ABI.

View Source
const ValidatorKickedEventName = "ValidatorKicked"

ValidatorKickedName is the name of the ValidatorKicked event. It matches the name of the event in the contract ABI.

View Source
const ValidatorLeftEventName = "ValidatorLeft"

ValidatorLeftName is the name of the ValidatorLeft event. It matches the name of the event in the contract ABI.

View Source
const ValidatorMethodName = "validator"

ValidatorMethodName is the name of the validators method. It matches the name of the method in the contract ABI.

View Source
const ValidatorsByPrivilegeMethodName = "validatorsByPrivilege"

ValidatorsByPrivilegeMethodName is the name of the validatorsByPrivilege method. It matches the name of the method in the contract ABI.

View Source
const ValidatorsMethodName = "validators"

ValidatorsMethodName is the name of the validators method. It matches the name of the method in the contract ABI.

Variables

This section is empty.

Functions

func NewPrecompile

func NewPrecompile(
	pk PoaKeeper,
	submitApplicationLegacyGas bool,
) (*precompile.Contract, error)

NewPrecompile creates a new validator pool precompile.

func NewPrecompileVersionMap

func NewPrecompileVersionMap(pk PoaKeeper) (*precompile.VersionMap, error)

NewPrecompileVersionMap creates a new version map for the validator pool precompile.

Types

type AcceptOwnershipMethod

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

AcceptOwnershipMethod is the implementation of the acceptOwnership method that accepts a pending ownership transfer

func (*AcceptOwnershipMethod) MethodName

func (m *AcceptOwnershipMethod) MethodName() string

func (*AcceptOwnershipMethod) MethodType

func (*AcceptOwnershipMethod) Payable

func (m *AcceptOwnershipMethod) Payable() bool

func (*AcceptOwnershipMethod) RequiredGas

func (m *AcceptOwnershipMethod) RequiredGas(_ []byte) (uint64, bool)

func (*AcceptOwnershipMethod) Run

type AddPrivilegeMethod

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

AddPrivilegeMethod is the implementation of the addPrivilege method that adds the given privilege to the specified operators.

The method has the following input arguments: - operators: list of operator addresses to add the privilege to, - privilegeId: the privilege to add.

func (*AddPrivilegeMethod) MethodName

func (apm *AddPrivilegeMethod) MethodName() string

func (*AddPrivilegeMethod) MethodType

func (apm *AddPrivilegeMethod) MethodType() precompile.MethodType

func (*AddPrivilegeMethod) Payable

func (apm *AddPrivilegeMethod) Payable() bool

func (*AddPrivilegeMethod) RequiredGas

func (apm *AddPrivilegeMethod) RequiredGas(_ []byte) (
	uint64,
	bool,
)

func (*AddPrivilegeMethod) Run

type ApplicationApprovedEvent

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

ApplicationApprovedEvent is the implementation of the ApplicationApproved event that contains the following arguments: - operator (indexed): is the address identifying the validators operator

func NewApplicationApprovedEvent

func NewApplicationApprovedEvent(operator common.Address) *ApplicationApprovedEvent

func (*ApplicationApprovedEvent) Arguments

func (*ApplicationApprovedEvent) EventName

func (e *ApplicationApprovedEvent) EventName() string

type ApplicationMethod

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

ApplicationMethod is the implementation of the application method that returns an application for a given operator address

func (*ApplicationMethod) MethodName

func (m *ApplicationMethod) MethodName() string

func (*ApplicationMethod) MethodType

func (m *ApplicationMethod) MethodType() precompile.MethodType

func (*ApplicationMethod) Payable

func (m *ApplicationMethod) Payable() bool

func (*ApplicationMethod) RequiredGas

func (m *ApplicationMethod) RequiredGas(_ []byte) (uint64, bool)

func (*ApplicationMethod) Run

type ApplicationSubmittedEvent

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

applicationSubmitted is the implementation of the ApplicationSubmitted event that contains the following arguments: - operator (indexed): is the address identifying the validator, - consPubKey (indexed): is the consensus public key of the validator used to vote on blocks. - description: is the validators description info

func NewApplicationSubmittedEvent

func NewApplicationSubmittedEvent(operator common.Address, consPubKey [32]byte, description Description) *ApplicationSubmittedEvent

func (*ApplicationSubmittedEvent) Arguments

func (*ApplicationSubmittedEvent) EventName

func (e *ApplicationSubmittedEvent) EventName() string

type ApplicationsCleanedEvent

type ApplicationsCleanedEvent struct{}

ApplicationsCleanedEvent is the implementation of the ApplicationsCleaned event

func NewApplicationsCleanedEvent

func NewApplicationsCleanedEvent() *ApplicationsCleanedEvent

func (*ApplicationsCleanedEvent) Arguments

func (*ApplicationsCleanedEvent) EventName

func (e *ApplicationsCleanedEvent) EventName() string

type ApplicationsMethod

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

ApplicationsMethod is the implementation of the applications method that returns the the operators addresses of all existing applications

func (*ApplicationsMethod) MethodName

func (m *ApplicationsMethod) MethodName() string

func (*ApplicationsMethod) MethodType

func (m *ApplicationsMethod) MethodType() precompile.MethodType

func (*ApplicationsMethod) Payable

func (m *ApplicationsMethod) Payable() bool

func (*ApplicationsMethod) RequiredGas

func (m *ApplicationsMethod) RequiredGas(_ []byte) (uint64, bool)

func (*ApplicationsMethod) Run

type ApproveApplicationMethod

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

The method has the following input arguments: - operator: the EVM address identifying the validator.

func (*ApproveApplicationMethod) MethodName

func (m *ApproveApplicationMethod) MethodName() string

func (*ApproveApplicationMethod) MethodType

func (*ApproveApplicationMethod) Payable

func (m *ApproveApplicationMethod) Payable() bool

func (*ApproveApplicationMethod) RequiredGas

func (m *ApproveApplicationMethod) RequiredGas(_ []byte) (uint64, bool)

func (*ApproveApplicationMethod) Run

type CandidateOwnerMethod

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

CandidateOwnerMethod is the implementation of the candidateOwner method that returns the pending ownership candidate

func (*CandidateOwnerMethod) MethodName

func (m *CandidateOwnerMethod) MethodName() string

func (*CandidateOwnerMethod) MethodType

func (m *CandidateOwnerMethod) MethodType() precompile.MethodType

func (*CandidateOwnerMethod) Payable

func (m *CandidateOwnerMethod) Payable() bool

func (*CandidateOwnerMethod) RequiredGas

func (m *CandidateOwnerMethod) RequiredGas(_ []byte) (uint64, bool)

func (*CandidateOwnerMethod) Run

type CleanupApplicationsMethod

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

The method has no arguments

func (*CleanupApplicationsMethod) MethodName

func (m *CleanupApplicationsMethod) MethodName() string

func (*CleanupApplicationsMethod) MethodType

func (*CleanupApplicationsMethod) Payable

func (m *CleanupApplicationsMethod) Payable() bool

func (*CleanupApplicationsMethod) RequiredGas

func (m *CleanupApplicationsMethod) RequiredGas(_ []byte) (uint64, bool)

func (*CleanupApplicationsMethod) Run

type Description

type Description = struct {
	// Moniker is the validator's name.
	Moniker string `json:"moniker"`
	// Identity is the optional identity signature (ex. UPort or Keybase).
	Identity string `json:"identity"`
	// Website is the optional website link.
	Website string `json:"website"`
	// SecurityContact is the optional security contact information.
	SecurityContact string `json:"securityContact"`
	// Details is the optional details about the validator.
	Details string `json:"details"`
}

Description is the validator description structure that contains information about the validator.

Note: This struct mimics `poatypes.Description` however is declared with an `= struct`, this is required for correct deserialization within a precompile methods `Run` function

type KickMethod

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

The method has the following input arguments: - operator: the address identifying the validator.

func (*KickMethod) MethodName

func (m *KickMethod) MethodName() string

func (*KickMethod) MethodType

func (m *KickMethod) MethodType() precompile.MethodType

func (*KickMethod) Payable

func (m *KickMethod) Payable() bool

func (*KickMethod) RequiredGas

func (m *KickMethod) RequiredGas(_ []byte) (uint64, bool)

func (*KickMethod) Run

type LeaveMethod

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

LeaveMethod is the implementation of the leave method that removes msg.sender from the validator pool

func (*LeaveMethod) MethodName

func (m *LeaveMethod) MethodName() string

func (*LeaveMethod) MethodType

func (m *LeaveMethod) MethodType() precompile.MethodType

func (*LeaveMethod) Payable

func (m *LeaveMethod) Payable() bool

func (*LeaveMethod) RequiredGas

func (m *LeaveMethod) RequiredGas(_ []byte) (uint64, bool)

func (*LeaveMethod) Run

type OwnerMethod

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

OwnerMethod is the implementation of the owner method that returns the current owner

func (*OwnerMethod) MethodName

func (m *OwnerMethod) MethodName() string

func (*OwnerMethod) MethodType

func (m *OwnerMethod) MethodType() precompile.MethodType

func (*OwnerMethod) Payable

func (m *OwnerMethod) Payable() bool

func (*OwnerMethod) RequiredGas

func (m *OwnerMethod) RequiredGas(_ []byte) (uint64, bool)

func (*OwnerMethod) Run

type OwnershipTransferStartedEvent

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

OwnershipTransferStartedEvent is the implementation of the OwnershipTransferStarted event that contains the following arguments: - previousOwner (indexed): is the EVM address of the current (soon to be previous) owner, - newOwner (indexed): is the EVM address of the new owner

func NewOwnershipTransferStartedEvent

func NewOwnershipTransferStartedEvent(previousOwner, newOwner common.Address) *OwnershipTransferStartedEvent

func (*OwnershipTransferStartedEvent) Arguments

func (*OwnershipTransferStartedEvent) EventName

func (e *OwnershipTransferStartedEvent) EventName() string

type OwnershipTransferredEvent

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

OwnershipTransferredEvent is the implementation of the OwnershipTransferred event that contains the following arguments: - previousOwner (indexed): is the EVM address of the now previous owner - newOwner (indexed): is the EVM address of the new (now current) owner

func NewOwnershipTransferredEvent

func NewOwnershipTransferredEvent(previousOwner, newOwner common.Address) *OwnershipTransferredEvent

func (*OwnershipTransferredEvent) Arguments

func (*OwnershipTransferredEvent) EventName

func (e *OwnershipTransferredEvent) EventName() string

type PoaKeeper

type PoaKeeper interface {
	// GetApplication returns the application for a operator
	GetApplication(types.Context, types.ValAddress) (poatypes.Application, bool)
	// GetAllApplications returns all applications
	GetAllApplications(types.Context) []poatypes.Application
	// SubmitApplication submits a new application to the validator pool
	SubmitApplication(types.Context, types.AccAddress, poatypes.Validator) error
	// ApproveApplication (onlyOwner) approves a pending application and
	// promotes the applications candidate to validator
	ApproveApplication(types.Context, types.AccAddress, types.ValAddress) error
	// CleanupApplications (onlyOwner) removes all pending applications
	CleanupApplications(types.Context, types.AccAddress) error
	// GetValidator returns the validator for a operator address
	GetValidator(types.Context, types.ValAddress) (poatypes.Validator, bool)
	// GetAllValidators returns all validators (in all states)
	GetAllValidators(types.Context) []poatypes.Validator
	// Leave removes the sender from the validator pool
	Leave(types.Context, types.AccAddress) error
	// Kick (onlyOwner) removes a validator from the pool
	Kick(types.Context, types.AccAddress, types.ValAddress) error
	// GetOwner returns the validator pool owner address
	GetOwner(types.Context) types.AccAddress
	// GetCandidateOwner returns the candidate validator pool owner address
	GetCandidateOwner(types.Context) types.AccAddress
	// TransferOwnership (onlyOwner) starts ownership transfer flow with a pending
	// ownership transfer
	TransferOwnership(types.Context, types.AccAddress, types.AccAddress) error
	// AcceptOwnership accepts a pending ownership transfer
	AcceptOwnership(types.Context, types.AccAddress) error
	// AddPrivilege (onlyOwner) adds a privilege to a set of operators.
	AddPrivilege(
		ctx types.Context,
		sender types.AccAddress,
		operators []types.ValAddress,
		privilege string,
	) error
	// RemovePrivilege (onlyOwner) removes a privilege from a set of operators.
	RemovePrivilege(
		ctx types.Context,
		sender types.AccAddress,
		operators []types.ValAddress,
		privilege string,
	) error
	// GetValidatorsOperatorsByPrivilege returns a list of validators with the
	// specified privilege.
	GetValidatorsOperatorsByPrivilege(
		ctx types.Context,
		privilege string,
	) []types.ValAddress
}

PoaKeeper interface used by the precompile

type PrivilegeAddedEvent

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

PrivilegeAddedEvent is the implementation of the PrivilegeAdded event that contains the following arguments: - operator (indexed): is the operator address of the validator, - privilegeId (indexed): is the privilege added.

func NewPrivilegeAddedEvent

func NewPrivilegeAddedEvent(operator common.Address, privilegeId uint8) *PrivilegeAddedEvent

func (*PrivilegeAddedEvent) Arguments

func (pae *PrivilegeAddedEvent) Arguments() []*precompile.EventArgument

func (*PrivilegeAddedEvent) EventName

func (pae *PrivilegeAddedEvent) EventName() string

type PrivilegeRemovedEvent

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

PrivilegeRemovedEvent is the implementation of the PrivilegeRemoved event that contains the following arguments: - operator (indexed): is the operator address of the validator, - privilegeId (indexed): is the privilege removed.

func NewPrivilegeRemovedEvent

func NewPrivilegeRemovedEvent(operator common.Address, privilegeId uint8) *PrivilegeRemovedEvent

func (*PrivilegeRemovedEvent) Arguments

func (pre *PrivilegeRemovedEvent) Arguments() []*precompile.EventArgument

func (*PrivilegeRemovedEvent) EventName

func (pre *PrivilegeRemovedEvent) EventName() string

type PrivilegesMethod

type PrivilegesMethod struct{}

PrivilegesMethod is the implementation of the privileges method that returns all privileges available for validators.

func (*PrivilegesMethod) MethodName

func (pm *PrivilegesMethod) MethodName() string

func (*PrivilegesMethod) MethodType

func (pm *PrivilegesMethod) MethodType() precompile.MethodType

func (*PrivilegesMethod) Payable

func (pm *PrivilegesMethod) Payable() bool

func (*PrivilegesMethod) RequiredGas

func (pm *PrivilegesMethod) RequiredGas(_ []byte) (
	uint64,
	bool,
)

func (*PrivilegesMethod) Run

type RemovePrivilegeMethod

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

RemovePrivilegeMethod is the implementation of the removePrivilege method that removes the given privilege from the specified operators.

The method has the following input arguments: - operators: list of operator addresses to remove the privilege from, - privilegeId: the privilege to remove.

func (*RemovePrivilegeMethod) MethodName

func (rpm *RemovePrivilegeMethod) MethodName() string

func (*RemovePrivilegeMethod) MethodType

func (rpm *RemovePrivilegeMethod) MethodType() precompile.MethodType

func (*RemovePrivilegeMethod) Payable

func (rpm *RemovePrivilegeMethod) Payable() bool

func (*RemovePrivilegeMethod) RequiredGas

func (rpm *RemovePrivilegeMethod) RequiredGas(_ []byte) (
	uint64,
	bool,
)

func (*RemovePrivilegeMethod) Run

type SubmitApplicationMethod

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

The method has the following input arguments: - consPubKey: the consensus public key of the validator used to vote on blocks - description: the validators description info

func (*SubmitApplicationMethod) MethodName

func (m *SubmitApplicationMethod) MethodName() string

func (*SubmitApplicationMethod) MethodType

func (*SubmitApplicationMethod) Payable

func (m *SubmitApplicationMethod) Payable() bool

func (*SubmitApplicationMethod) RequiredGas

func (m *SubmitApplicationMethod) RequiredGas(methodInputArgs []byte) (uint64, bool)

func (*SubmitApplicationMethod) Run

type TransferOwnershipMethod

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

The method has the following input arguments: - newOwner: the EVM address identifying the new owner.

func (*TransferOwnershipMethod) MethodName

func (m *TransferOwnershipMethod) MethodName() string

func (*TransferOwnershipMethod) MethodType

func (*TransferOwnershipMethod) Payable

func (m *TransferOwnershipMethod) Payable() bool

func (*TransferOwnershipMethod) RequiredGas

func (m *TransferOwnershipMethod) RequiredGas(_ []byte) (uint64, bool)

func (*TransferOwnershipMethod) Run

type ValidatorJoinedEvent

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

validatorJoinedEvent is the implementation of the ValidatorJoined event that contains the following arguments: - operator (indexed): is the EVM address identifying the validators operator,

func NewValidatorJoinedEvent

func NewValidatorJoinedEvent(operator common.Address) *ValidatorJoinedEvent

func (*ValidatorJoinedEvent) Arguments

func (e *ValidatorJoinedEvent) Arguments() []*precompile.EventArgument

func (*ValidatorJoinedEvent) EventName

func (e *ValidatorJoinedEvent) EventName() string

type ValidatorKickedEvent

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

ValidatorKickedEvent is the implementation of the ValidatorKicked event that contains the following arguments: - operator (indexed): is the address identifying the validators operator

func NewValidatorKickedEvent

func NewValidatorKickedEvent(operator common.Address) *ValidatorKickedEvent

func (*ValidatorKickedEvent) Arguments

func (e *ValidatorKickedEvent) Arguments() []*precompile.EventArgument

func (*ValidatorKickedEvent) EventName

func (e *ValidatorKickedEvent) EventName() string

type ValidatorLeftEvent

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

ValidatorLeftEvent is the implementation of the ValidatorLeft event that contains the following arguments: - operator (indexed): is the address identifying the validators operator

func NewValidatorLeftEvent

func NewValidatorLeftEvent(operator common.Address) *ValidatorLeftEvent

func (*ValidatorLeftEvent) Arguments

func (e *ValidatorLeftEvent) Arguments() []*precompile.EventArgument

func (*ValidatorLeftEvent) EventName

func (e *ValidatorLeftEvent) EventName() string

type ValidatorMethod

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

ValidatorMethod is the implementation of the validator method that returns the validator information for the given operator address

func (*ValidatorMethod) MethodName

func (m *ValidatorMethod) MethodName() string

func (*ValidatorMethod) MethodType

func (m *ValidatorMethod) MethodType() precompile.MethodType

func (*ValidatorMethod) Payable

func (m *ValidatorMethod) Payable() bool

func (*ValidatorMethod) RequiredGas

func (m *ValidatorMethod) RequiredGas(_ []byte) (uint64, bool)

func (*ValidatorMethod) Run

type ValidatorsByPrivilegeMethod

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

ValidatorsByPrivilegeMethod is the implementation of the validatorsByPrivilege method that returns a list of validators with the specified privilege.

The method has the following input arguments: - privilegeId: the privilege to filter by.

func (*ValidatorsByPrivilegeMethod) MethodName

func (vbpm *ValidatorsByPrivilegeMethod) MethodName() string

func (*ValidatorsByPrivilegeMethod) MethodType

func (*ValidatorsByPrivilegeMethod) Payable

func (vbpm *ValidatorsByPrivilegeMethod) Payable() bool

func (*ValidatorsByPrivilegeMethod) RequiredGas

func (vbpm *ValidatorsByPrivilegeMethod) RequiredGas(_ []byte) (
	uint64,
	bool,
)

func (*ValidatorsByPrivilegeMethod) Run

type ValidatorsMethod

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

ValidatorsMethod is the implementation of the validators method that returns the operator addresses of all existing validators

func (*ValidatorsMethod) MethodName

func (m *ValidatorsMethod) MethodName() string

func (*ValidatorsMethod) MethodType

func (m *ValidatorsMethod) MethodType() precompile.MethodType

func (*ValidatorsMethod) Payable

func (m *ValidatorsMethod) Payable() bool

func (*ValidatorsMethod) RequiredGas

func (m *ValidatorsMethod) RequiredGas(_ []byte) (uint64, bool)

func (*ValidatorsMethod) Run

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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