consensus

package
v0.0.0-...-63185e8 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ConsensusABI = "" /* 1072-byte string literal not displayed */

ConsensusABI is the input ABI used to generate the binding from.

Variables

View Source
var ConsensusBin = "" /* 2020-byte string literal not displayed */

ConsensusBin is the compiled bytecode used for deploying new contracts.

Functions

This section is empty.

Types

type Consensus

type Consensus struct {
	ConsensusCaller     // Read-only binding to the contract
	ConsensusTransactor // Write-only binding to the contract
	ConsensusFilterer   // Log filterer for contract events
}

Consensus is an auto generated Go binding around a Solidity contract.

func NewConsensus

func NewConsensus(address common.Address, backend bind.ContractBackend) (*Consensus, error)

NewConsensus creates a new instance of Consensus, bound to a specific deployed contract.

type ConsensusCaller

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

ConsensusCaller is an auto generated read-only Go binding around a Solidity contract.

func NewConsensusCaller

func NewConsensusCaller(address common.Address, caller bind.ContractCaller) (*ConsensusCaller, error)

NewConsensusCaller creates a new read-only instance of Consensus, bound to a specific deployed contract.

type ConsensusCallerRaw

type ConsensusCallerRaw struct {
	Contract *ConsensusCaller // Generic read-only contract binding to access the raw methods on
}

ConsensusCallerRaw is an auto generated low-level read-only Go binding around a Solidity contract.

func (*ConsensusCallerRaw) Call

func (_Consensus *ConsensusCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type ConsensusCallerSession

type ConsensusCallerSession struct {
	Contract *ConsensusCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts    // Call options to use throughout this session
}

ConsensusCallerSession is an auto generated read-only Go binding around a Solidity contract, with pre-set call options.

type ConsensusFilterer

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

ConsensusFilterer is an auto generated log filtering Go binding around a Solidity contract events.

func NewConsensusFilterer

func NewConsensusFilterer(address common.Address, filterer bind.ContractFilterer) (*ConsensusFilterer, error)

NewConsensusFilterer creates a new log filterer instance of Consensus, bound to a specific deployed contract.

type ConsensusRaw

type ConsensusRaw struct {
	Contract *Consensus // Generic contract binding to access the raw methods on
}

ConsensusRaw is an auto generated low-level Go binding around a Solidity contract.

func (*ConsensusRaw) Call

func (_Consensus *ConsensusRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*ConsensusRaw) TransactWithResult

func (_Consensus *ConsensusRaw) TransactWithResult(opts *bind.TransactOpts, result interface{}, method string, params ...interface{}) (*types.Transaction, *types.Receipt, error)

Transact invokes the (paid) contract method with params as input values.

func (*ConsensusRaw) Transfer

func (_Consensus *ConsensusRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, *types.Receipt, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type ConsensusSession

type ConsensusSession struct {
	Contract     *Consensus        // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

ConsensusSession is an auto generated Go binding around a Solidity contract, with pre-set call and transact options.

func (*ConsensusSession) AddObserver

func (_Consensus *ConsensusSession) AddObserver(arg0 string) (int32, *types.Transaction, *types.Receipt, error)

AddObserver is a paid mutator transaction binding the contract method 0x2800efc0.

Solidity: function addObserver(string ) returns(int32)

func (*ConsensusSession) AddSealer

func (_Consensus *ConsensusSession) AddSealer(arg0 string, arg1 *big.Int) (int32, *types.Transaction, *types.Receipt, error)

AddSealer is a paid mutator transaction binding the contract method 0x35916856.

Solidity: function addSealer(string , uint256 ) returns(int32)

func (*ConsensusSession) AsyncAddObserver

func (_Consensus *ConsensusSession) AsyncAddObserver(handler func(*types.Receipt, error), arg0 string) (*types.Transaction, error)

func (*ConsensusSession) AsyncAddSealer

func (_Consensus *ConsensusSession) AsyncAddSealer(handler func(*types.Receipt, error), arg0 string, arg1 *big.Int) (*types.Transaction, error)

func (*ConsensusSession) AsyncRemove

func (_Consensus *ConsensusSession) AsyncRemove(handler func(*types.Receipt, error), arg0 string) (*types.Transaction, error)

func (*ConsensusSession) AsyncSetWeight

func (_Consensus *ConsensusSession) AsyncSetWeight(handler func(*types.Receipt, error), arg0 string, arg1 *big.Int) (*types.Transaction, error)

func (*ConsensusSession) Remove

func (_Consensus *ConsensusSession) Remove(arg0 string) (int32, *types.Transaction, *types.Receipt, error)

Remove is a paid mutator transaction binding the contract method 0x80599e4b.

Solidity: function remove(string ) returns(int32)

func (*ConsensusSession) SetWeight

func (_Consensus *ConsensusSession) SetWeight(arg0 string, arg1 *big.Int) (int32, *types.Transaction, *types.Receipt, error)

SetWeight is a paid mutator transaction binding the contract method 0xce6fa5c5.

Solidity: function setWeight(string , uint256 ) returns(int32)

type ConsensusTransactor

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

ConsensusTransactor is an auto generated write-only Go binding around a Solidity contract.

func NewConsensusTransactor

func NewConsensusTransactor(address common.Address, transactor bind.ContractTransactor) (*ConsensusTransactor, error)

NewConsensusTransactor creates a new write-only instance of Consensus, bound to a specific deployed contract.

func (*ConsensusTransactor) AddObserver

func (_Consensus *ConsensusTransactor) AddObserver(opts *bind.TransactOpts, arg0 string) (int32, *types.Transaction, *types.Receipt, error)

AddObserver is a paid mutator transaction binding the contract method 0x2800efc0.

Solidity: function addObserver(string ) returns(int32)

func (*ConsensusTransactor) AddSealer

func (_Consensus *ConsensusTransactor) AddSealer(opts *bind.TransactOpts, arg0 string, arg1 *big.Int) (int32, *types.Transaction, *types.Receipt, error)

AddSealer is a paid mutator transaction binding the contract method 0x35916856.

Solidity: function addSealer(string , uint256 ) returns(int32)

func (*ConsensusTransactor) AsyncAddObserver

func (_Consensus *ConsensusTransactor) AsyncAddObserver(handler func(*types.Receipt, error), opts *bind.TransactOpts, arg0 string) (*types.Transaction, error)

func (*ConsensusTransactor) AsyncAddSealer

func (_Consensus *ConsensusTransactor) AsyncAddSealer(handler func(*types.Receipt, error), opts *bind.TransactOpts, arg0 string, arg1 *big.Int) (*types.Transaction, error)

func (*ConsensusTransactor) AsyncRemove

func (_Consensus *ConsensusTransactor) AsyncRemove(handler func(*types.Receipt, error), opts *bind.TransactOpts, arg0 string) (*types.Transaction, error)

func (*ConsensusTransactor) AsyncSetWeight

func (_Consensus *ConsensusTransactor) AsyncSetWeight(handler func(*types.Receipt, error), opts *bind.TransactOpts, arg0 string, arg1 *big.Int) (*types.Transaction, error)

func (*ConsensusTransactor) Remove

func (_Consensus *ConsensusTransactor) Remove(opts *bind.TransactOpts, arg0 string) (int32, *types.Transaction, *types.Receipt, error)

Remove is a paid mutator transaction binding the contract method 0x80599e4b.

Solidity: function remove(string ) returns(int32)

func (*ConsensusTransactor) SetWeight

func (_Consensus *ConsensusTransactor) SetWeight(opts *bind.TransactOpts, arg0 string, arg1 *big.Int) (int32, *types.Transaction, *types.Receipt, error)

SetWeight is a paid mutator transaction binding the contract method 0xce6fa5c5.

Solidity: function setWeight(string , uint256 ) returns(int32)

type ConsensusTransactorRaw

type ConsensusTransactorRaw struct {
	Contract *ConsensusTransactor // Generic write-only contract binding to access the raw methods on
}

ConsensusTransactorRaw is an auto generated low-level write-only Go binding around a Solidity contract.

func (*ConsensusTransactorRaw) TransactWithResult

func (_Consensus *ConsensusTransactorRaw) TransactWithResult(opts *bind.TransactOpts, result interface{}, method string, params ...interface{}) (*types.Transaction, *types.Receipt, error)

Transact invokes the (paid) contract method with params as input values.

func (*ConsensusTransactorRaw) Transfer

func (_Consensus *ConsensusTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, *types.Receipt, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type ConsensusTransactorSession

type ConsensusTransactorSession struct {
	Contract     *ConsensusTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts    // Transaction auth options to use throughout this session
}

ConsensusTransactorSession is an auto generated write-only Go binding around a Solidity contract, with pre-set transact options.

func (*ConsensusTransactorSession) AddObserver

func (_Consensus *ConsensusTransactorSession) AddObserver(arg0 string) (int32, *types.Transaction, *types.Receipt, error)

AddObserver is a paid mutator transaction binding the contract method 0x2800efc0.

Solidity: function addObserver(string ) returns(int32)

func (*ConsensusTransactorSession) AddSealer

func (_Consensus *ConsensusTransactorSession) AddSealer(arg0 string, arg1 *big.Int) (int32, *types.Transaction, *types.Receipt, error)

AddSealer is a paid mutator transaction binding the contract method 0x35916856.

Solidity: function addSealer(string , uint256 ) returns(int32)

func (*ConsensusTransactorSession) AsyncAddObserver

func (_Consensus *ConsensusTransactorSession) AsyncAddObserver(handler func(*types.Receipt, error), arg0 string) (*types.Transaction, error)

func (*ConsensusTransactorSession) AsyncAddSealer

func (_Consensus *ConsensusTransactorSession) AsyncAddSealer(handler func(*types.Receipt, error), arg0 string, arg1 *big.Int) (*types.Transaction, error)

func (*ConsensusTransactorSession) AsyncRemove

func (_Consensus *ConsensusTransactorSession) AsyncRemove(handler func(*types.Receipt, error), arg0 string) (*types.Transaction, error)

func (*ConsensusTransactorSession) AsyncSetWeight

func (_Consensus *ConsensusTransactorSession) AsyncSetWeight(handler func(*types.Receipt, error), arg0 string, arg1 *big.Int) (*types.Transaction, error)

func (*ConsensusTransactorSession) Remove

func (_Consensus *ConsensusTransactorSession) Remove(arg0 string) (int32, *types.Transaction, *types.Receipt, error)

Remove is a paid mutator transaction binding the contract method 0x80599e4b.

Solidity: function remove(string ) returns(int32)

func (*ConsensusTransactorSession) SetWeight

func (_Consensus *ConsensusTransactorSession) SetWeight(arg0 string, arg1 *big.Int) (int32, *types.Transaction, *types.Receipt, error)

SetWeight is a paid mutator transaction binding the contract method 0xce6fa5c5.

Solidity: function setWeight(string , uint256 ) returns(int32)

type Service

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

Service is a precompile contract service.

func NewConsensusService

func NewConsensusService(client *client.Client) (*Service, error)

NewConsensusService returns ptr of ConsensusService

func (*Service) AddObserver

func (service *Service) AddObserver(nodeID string) (int64, error)

AddObserver add a new observe node according to the node ID

func (*Service) AddSealer

func (service *Service) AddSealer(nodeID string, weight int64) (int64, error)

AddSealer add a new sealer node according to the node ID

func (*Service) RemoveNode

func (service *Service) RemoveNode(nodeID string) (int64, error)

RemoveNode remove a sealer node according to the node ID

func (*Service) SetWeight

func (service *Service) SetWeight(nodeID string, weight int64) (int64, error)

Jump to

Keyboard shortcuts

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