chaingovernance

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const ChainGovernanceABI = "" /* 2944-byte string literal not displayed */

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

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountInfo

type AccountInfo struct {
	Address   string `json:"address"`
	EnableNum string `json:"enable_num"`
}

type ChainGovernance

type ChainGovernance struct {
	ChainGovernanceCaller     // Read-only binding to the contract
	ChainGovernanceTransactor // Write-only binding to the contract
	ChainGovernanceFilterer   // Log filterer for contract events
}

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

func NewChainGovernance

func NewChainGovernance(address common.Address, backend bind.ContractBackend) (*ChainGovernance, error)

NewChainGovernance creates a new instance of ChainGovernance, bound to a specific deployed contract.

type ChainGovernanceCaller

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

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

func NewChainGovernanceCaller

func NewChainGovernanceCaller(address common.Address, caller bind.ContractCaller) (*ChainGovernanceCaller, error)

NewChainGovernanceCaller creates a new read-only instance of ChainGovernance, bound to a specific deployed contract.

func (*ChainGovernanceCaller) GetAccountStatus

func (_ChainGovernance *ChainGovernanceCaller) GetAccountStatus(opts *bind.CallOpts, account common.Address) (string, error)

GetAccountStatus is a free data retrieval call binding the contract method 0xfd4fa05a.

Solidity: function getAccountStatus(address account) constant returns(string)

func (*ChainGovernanceCaller) ListCommitteeMembers

func (_ChainGovernance *ChainGovernanceCaller) ListCommitteeMembers(opts *bind.CallOpts) (string, error)

ListCommitteeMembers is a free data retrieval call binding the contract method 0x885a3a72.

Solidity: function listCommitteeMembers() constant returns(string)

func (*ChainGovernanceCaller) ListOperators

func (_ChainGovernance *ChainGovernanceCaller) ListOperators(opts *bind.CallOpts) (string, error)

ListOperators is a free data retrieval call binding the contract method 0x039a93ca.

Solidity: function listOperators() constant returns(string)

func (*ChainGovernanceCaller) QueryCommitteeMemberWeight

func (_ChainGovernance *ChainGovernanceCaller) QueryCommitteeMemberWeight(opts *bind.CallOpts, user common.Address) (bool, *big.Int, error)

QueryCommitteeMemberWeight is a free data retrieval call binding the contract method 0x6c147119.

Solidity: function queryCommitteeMemberWeight(address user) constant returns(bool, int256)

func (*ChainGovernanceCaller) QueryThreshold

func (_ChainGovernance *ChainGovernanceCaller) QueryThreshold(opts *bind.CallOpts) (*big.Int, error)

QueryThreshold is a free data retrieval call binding the contract method 0x281af27d.

Solidity: function queryThreshold() constant returns(int256)

type ChainGovernanceCallerRaw

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

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

func (*ChainGovernanceCallerRaw) Call

func (_ChainGovernance *ChainGovernanceCallerRaw) 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 ChainGovernanceCallerSession

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

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

func (*ChainGovernanceCallerSession) GetAccountStatus

func (_ChainGovernance *ChainGovernanceCallerSession) GetAccountStatus(account common.Address) (string, error)

GetAccountStatus is a free data retrieval call binding the contract method 0xfd4fa05a.

Solidity: function getAccountStatus(address account) constant returns(string)

func (*ChainGovernanceCallerSession) ListCommitteeMembers

func (_ChainGovernance *ChainGovernanceCallerSession) ListCommitteeMembers() (string, error)

ListCommitteeMembers is a free data retrieval call binding the contract method 0x885a3a72.

Solidity: function listCommitteeMembers() constant returns(string)

func (*ChainGovernanceCallerSession) ListOperators

func (_ChainGovernance *ChainGovernanceCallerSession) ListOperators() (string, error)

ListOperators is a free data retrieval call binding the contract method 0x039a93ca.

Solidity: function listOperators() constant returns(string)

func (*ChainGovernanceCallerSession) QueryCommitteeMemberWeight

func (_ChainGovernance *ChainGovernanceCallerSession) QueryCommitteeMemberWeight(user common.Address) (bool, *big.Int, error)

QueryCommitteeMemberWeight is a free data retrieval call binding the contract method 0x6c147119.

Solidity: function queryCommitteeMemberWeight(address user) constant returns(bool, int256)

func (*ChainGovernanceCallerSession) QueryThreshold

func (_ChainGovernance *ChainGovernanceCallerSession) QueryThreshold() (*big.Int, error)

QueryThreshold is a free data retrieval call binding the contract method 0x281af27d.

Solidity: function queryThreshold() constant returns(int256)

type ChainGovernanceFilterer

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

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

func NewChainGovernanceFilterer

func NewChainGovernanceFilterer(address common.Address, filterer bind.ContractFilterer) (*ChainGovernanceFilterer, error)

NewChainGovernanceFilterer creates a new log filterer instance of ChainGovernance, bound to a specific deployed contract.

type ChainGovernanceRaw

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

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

func (*ChainGovernanceRaw) Call

func (_ChainGovernance *ChainGovernanceRaw) 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 (*ChainGovernanceRaw) Transact

func (_ChainGovernance *ChainGovernanceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, *types.Receipt, error)

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

func (*ChainGovernanceRaw) Transfer

func (_ChainGovernance *ChainGovernanceRaw) 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 ChainGovernanceSession

type ChainGovernanceSession struct {
	Contract     *ChainGovernance  // 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
}

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

func (*ChainGovernanceSession) FreezeAccount

func (_ChainGovernance *ChainGovernanceSession) FreezeAccount(account common.Address) (*types.Transaction, *types.Receipt, error)

FreezeAccount is a paid mutator transaction binding the contract method 0xf26c159f.

Solidity: function freezeAccount(address account) returns(int256)

func (*ChainGovernanceSession) GetAccountStatus

func (_ChainGovernance *ChainGovernanceSession) GetAccountStatus(account common.Address) (string, error)

GetAccountStatus is a free data retrieval call binding the contract method 0xfd4fa05a.

Solidity: function getAccountStatus(address account) constant returns(string)

func (*ChainGovernanceSession) GrantCommitteeMember

func (_ChainGovernance *ChainGovernanceSession) GrantCommitteeMember(user common.Address) (*types.Transaction, *types.Receipt, error)

GrantCommitteeMember is a paid mutator transaction binding the contract method 0x6f8f521f.

Solidity: function grantCommitteeMember(address user) returns(int256)

func (*ChainGovernanceSession) GrantOperator

func (_ChainGovernance *ChainGovernanceSession) GrantOperator(user common.Address) (*types.Transaction, *types.Receipt, error)

GrantOperator is a paid mutator transaction binding the contract method 0xe348da13.

Solidity: function grantOperator(address user) returns(int256)

func (*ChainGovernanceSession) ListCommitteeMembers

func (_ChainGovernance *ChainGovernanceSession) ListCommitteeMembers() (string, error)

ListCommitteeMembers is a free data retrieval call binding the contract method 0x885a3a72.

Solidity: function listCommitteeMembers() constant returns(string)

func (*ChainGovernanceSession) ListOperators

func (_ChainGovernance *ChainGovernanceSession) ListOperators() (string, error)

ListOperators is a free data retrieval call binding the contract method 0x039a93ca.

Solidity: function listOperators() constant returns(string)

func (*ChainGovernanceSession) QueryCommitteeMemberWeight

func (_ChainGovernance *ChainGovernanceSession) QueryCommitteeMemberWeight(user common.Address) (bool, *big.Int, error)

QueryCommitteeMemberWeight is a free data retrieval call binding the contract method 0x6c147119.

Solidity: function queryCommitteeMemberWeight(address user) constant returns(bool, int256)

func (*ChainGovernanceSession) QueryThreshold

func (_ChainGovernance *ChainGovernanceSession) QueryThreshold() (*big.Int, error)

QueryThreshold is a free data retrieval call binding the contract method 0x281af27d.

Solidity: function queryThreshold() constant returns(int256)

func (*ChainGovernanceSession) RevokeCommitteeMember

func (_ChainGovernance *ChainGovernanceSession) RevokeCommitteeMember(user common.Address) (*types.Transaction, *types.Receipt, error)

RevokeCommitteeMember is a paid mutator transaction binding the contract method 0xcafb4d1b.

Solidity: function revokeCommitteeMember(address user) returns(int256)

func (*ChainGovernanceSession) RevokeOperator

func (_ChainGovernance *ChainGovernanceSession) RevokeOperator(user common.Address) (*types.Transaction, *types.Receipt, error)

RevokeOperator is a paid mutator transaction binding the contract method 0xfad8b32a.

Solidity: function revokeOperator(address user) returns(int256)

func (*ChainGovernanceSession) UnfreezeAccount

func (_ChainGovernance *ChainGovernanceSession) UnfreezeAccount(account common.Address) (*types.Transaction, *types.Receipt, error)

UnfreezeAccount is a paid mutator transaction binding the contract method 0x788649ea.

Solidity: function unfreezeAccount(address account) returns(int256)

func (*ChainGovernanceSession) UpdateCommitteeMemberWeight

func (_ChainGovernance *ChainGovernanceSession) UpdateCommitteeMemberWeight(user common.Address, weight *big.Int) (*types.Transaction, *types.Receipt, error)

UpdateCommitteeMemberWeight is a paid mutator transaction binding the contract method 0x246c3376.

Solidity: function updateCommitteeMemberWeight(address user, int256 weight) returns(int256)

func (*ChainGovernanceSession) UpdateThreshold

func (_ChainGovernance *ChainGovernanceSession) UpdateThreshold(threshold *big.Int) (*types.Transaction, *types.Receipt, error)

UpdateThreshold is a paid mutator transaction binding the contract method 0x97b00861.

Solidity: function updateThreshold(int256 threshold) returns(int256)

type ChainGovernanceTransactor

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

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

func NewChainGovernanceTransactor

func NewChainGovernanceTransactor(address common.Address, transactor bind.ContractTransactor) (*ChainGovernanceTransactor, error)

NewChainGovernanceTransactor creates a new write-only instance of ChainGovernance, bound to a specific deployed contract.

func (*ChainGovernanceTransactor) FreezeAccount

func (_ChainGovernance *ChainGovernanceTransactor) FreezeAccount(opts *bind.TransactOpts, account common.Address) (*types.Transaction, *types.Receipt, error)

FreezeAccount is a paid mutator transaction binding the contract method 0xf26c159f.

Solidity: function freezeAccount(address account) returns(int256)

func (*ChainGovernanceTransactor) GrantCommitteeMember

func (_ChainGovernance *ChainGovernanceTransactor) GrantCommitteeMember(opts *bind.TransactOpts, user common.Address) (*types.Transaction, *types.Receipt, error)

GrantCommitteeMember is a paid mutator transaction binding the contract method 0x6f8f521f.

Solidity: function grantCommitteeMember(address user) returns(int256)

func (*ChainGovernanceTransactor) GrantOperator

func (_ChainGovernance *ChainGovernanceTransactor) GrantOperator(opts *bind.TransactOpts, user common.Address) (*types.Transaction, *types.Receipt, error)

GrantOperator is a paid mutator transaction binding the contract method 0xe348da13.

Solidity: function grantOperator(address user) returns(int256)

func (*ChainGovernanceTransactor) RevokeCommitteeMember

func (_ChainGovernance *ChainGovernanceTransactor) RevokeCommitteeMember(opts *bind.TransactOpts, user common.Address) (*types.Transaction, *types.Receipt, error)

RevokeCommitteeMember is a paid mutator transaction binding the contract method 0xcafb4d1b.

Solidity: function revokeCommitteeMember(address user) returns(int256)

func (*ChainGovernanceTransactor) RevokeOperator

func (_ChainGovernance *ChainGovernanceTransactor) RevokeOperator(opts *bind.TransactOpts, user common.Address) (*types.Transaction, *types.Receipt, error)

RevokeOperator is a paid mutator transaction binding the contract method 0xfad8b32a.

Solidity: function revokeOperator(address user) returns(int256)

func (*ChainGovernanceTransactor) UnfreezeAccount

func (_ChainGovernance *ChainGovernanceTransactor) UnfreezeAccount(opts *bind.TransactOpts, account common.Address) (*types.Transaction, *types.Receipt, error)

UnfreezeAccount is a paid mutator transaction binding the contract method 0x788649ea.

Solidity: function unfreezeAccount(address account) returns(int256)

func (*ChainGovernanceTransactor) UpdateCommitteeMemberWeight

func (_ChainGovernance *ChainGovernanceTransactor) UpdateCommitteeMemberWeight(opts *bind.TransactOpts, user common.Address, weight *big.Int) (*types.Transaction, *types.Receipt, error)

UpdateCommitteeMemberWeight is a paid mutator transaction binding the contract method 0x246c3376.

Solidity: function updateCommitteeMemberWeight(address user, int256 weight) returns(int256)

func (*ChainGovernanceTransactor) UpdateThreshold

func (_ChainGovernance *ChainGovernanceTransactor) UpdateThreshold(opts *bind.TransactOpts, threshold *big.Int) (*types.Transaction, *types.Receipt, error)

UpdateThreshold is a paid mutator transaction binding the contract method 0x97b00861.

Solidity: function updateThreshold(int256 threshold) returns(int256)

type ChainGovernanceTransactorRaw

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

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

func (*ChainGovernanceTransactorRaw) Transact

func (_ChainGovernance *ChainGovernanceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, *types.Receipt, error)

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

func (*ChainGovernanceTransactorRaw) Transfer

func (_ChainGovernance *ChainGovernanceTransactorRaw) 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 ChainGovernanceTransactorSession

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

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

func (*ChainGovernanceTransactorSession) FreezeAccount

func (_ChainGovernance *ChainGovernanceTransactorSession) FreezeAccount(account common.Address) (*types.Transaction, *types.Receipt, error)

FreezeAccount is a paid mutator transaction binding the contract method 0xf26c159f.

Solidity: function freezeAccount(address account) returns(int256)

func (*ChainGovernanceTransactorSession) GrantCommitteeMember

func (_ChainGovernance *ChainGovernanceTransactorSession) GrantCommitteeMember(user common.Address) (*types.Transaction, *types.Receipt, error)

GrantCommitteeMember is a paid mutator transaction binding the contract method 0x6f8f521f.

Solidity: function grantCommitteeMember(address user) returns(int256)

func (*ChainGovernanceTransactorSession) GrantOperator

func (_ChainGovernance *ChainGovernanceTransactorSession) GrantOperator(user common.Address) (*types.Transaction, *types.Receipt, error)

GrantOperator is a paid mutator transaction binding the contract method 0xe348da13.

Solidity: function grantOperator(address user) returns(int256)

func (*ChainGovernanceTransactorSession) RevokeCommitteeMember

func (_ChainGovernance *ChainGovernanceTransactorSession) RevokeCommitteeMember(user common.Address) (*types.Transaction, *types.Receipt, error)

RevokeCommitteeMember is a paid mutator transaction binding the contract method 0xcafb4d1b.

Solidity: function revokeCommitteeMember(address user) returns(int256)

func (*ChainGovernanceTransactorSession) RevokeOperator

func (_ChainGovernance *ChainGovernanceTransactorSession) RevokeOperator(user common.Address) (*types.Transaction, *types.Receipt, error)

RevokeOperator is a paid mutator transaction binding the contract method 0xfad8b32a.

Solidity: function revokeOperator(address user) returns(int256)

func (*ChainGovernanceTransactorSession) UnfreezeAccount

func (_ChainGovernance *ChainGovernanceTransactorSession) UnfreezeAccount(account common.Address) (*types.Transaction, *types.Receipt, error)

UnfreezeAccount is a paid mutator transaction binding the contract method 0x788649ea.

Solidity: function unfreezeAccount(address account) returns(int256)

func (*ChainGovernanceTransactorSession) UpdateCommitteeMemberWeight

func (_ChainGovernance *ChainGovernanceTransactorSession) UpdateCommitteeMemberWeight(user common.Address, weight *big.Int) (*types.Transaction, *types.Receipt, error)

UpdateCommitteeMemberWeight is a paid mutator transaction binding the contract method 0x246c3376.

Solidity: function updateCommitteeMemberWeight(address user, int256 weight) returns(int256)

func (*ChainGovernanceTransactorSession) UpdateThreshold

func (_ChainGovernance *ChainGovernanceTransactorSession) UpdateThreshold(threshold *big.Int) (*types.Transaction, *types.Receipt, error)

UpdateThreshold is a paid mutator transaction binding the contract method 0x97b00861.

Solidity: function updateThreshold(int256 threshold) returns(int256)

type Service

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

Service is a precompile contract service.

func NewService

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

NewService returns ptr of Service

func (*Service) FreezeAccount

func (service *Service) FreezeAccount(accountAddress common.Address) (int64, error)

FreezeAccount freezes user account

func (*Service) GetAccountStatus

func (service *Service) GetAccountStatus(accountAddress common.Address) (string, error)

GetAccountStatus gets the status of account

func (*Service) GrantCommitteeMember

func (service *Service) GrantCommitteeMember(accountAddress common.Address) (int64, error)

GrantCommitteeMember grants committee member

func (*Service) GrantOperator

func (service *Service) GrantOperator(accountAddress common.Address) (int64, error)

GrantOperator grants operator

func (*Service) ListCommitteeMembers

func (service *Service) ListCommitteeMembers() ([]AccountInfo, error)

ListCommitteeMembers lists committee members

func (*Service) ListOperators

func (service *Service) ListOperators() ([]AccountInfo, error)

ListOperators lists operators

func (*Service) QueryCommitteeMemberWeight

func (service *Service) QueryCommitteeMemberWeight(accountAddress common.Address) (uint64, error)

QueryCommitteeMemberWeight queries committee member

func (*Service) QueryThreshold

func (service *Service) QueryThreshold() (uint64, error)

QueryThreshold queries the threshold of committee member

func (*Service) RevokeCommitteeMember

func (service *Service) RevokeCommitteeMember(accountAddress common.Address) (int64, error)

RevokeCommitteeMember revokes committee member

func (*Service) RevokeOperator

func (service *Service) RevokeOperator(accountAddress common.Address) (int64, error)

RevokeOperator revokes operator

func (*Service) UnfreezeAccount

func (service *Service) UnfreezeAccount(accountAddress common.Address) (int64, error)

UnfreezeAccount unfreezes operator

func (*Service) UpdateCommitteeMemberWeight

func (service *Service) UpdateCommitteeMemberWeight(accountAddress common.Address, weight uint64) (int64, error)

UpdateCommitteeMemberWeight updates the weight of committee member

func (*Service) UpdateThreshold

func (service *Service) UpdateThreshold(threshold uint64) (int64, error)

UpdateThreshold updates the threshold that the committee vote needs to reach

Jump to

Keyboard shortcuts

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