governance

package
v0.0.0-...-f79a0de Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GovernanceModuleABI = GovernanceModuleMetaData.ABI

GovernanceModuleABI is the input ABI used to generate the binding from. Deprecated: Use GovernanceModuleMetaData.ABI instead.

View Source
var GovernanceModuleMetaData = &bind.MetaData{
	ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"CancelProposal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"ProposalDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"option\",\"type\":\"string\"}],\"name\":\"ProposalVote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"SubmitProposal\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"}],\"name\":\"cancelProposal\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"}],\"name\":\"getProposal\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"int32\",\"name\":\"status\",\"type\":\"int32\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"yesCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"abstainCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noWithVetoCount\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.TallyResult\",\"name\":\"finalTallyResult\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"submitTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositEndTime\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"totalDeposit\",\"type\":\"tuple[]\"},{\"internalType\":\"uint64\",\"name\":\"votingStartTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"votingEndTime\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"summary\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"proposer\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.Proposal\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"proposalStatus\",\"type\":\"int32\"}],\"name\":\"getProposals\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"int32\",\"name\":\"status\",\"type\":\"int32\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"yesCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"abstainCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noWithVetoCount\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.TallyResult\",\"name\":\"finalTallyResult\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"submitTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositEndTime\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"totalDeposit\",\"type\":\"tuple[]\"},{\"internalType\":\"uint64\",\"name\":\"votingStartTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"votingEndTime\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"summary\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"proposer\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.Proposal[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proposal\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"submitProposal\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"option\",\"type\":\"int32\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"}],\"name\":\"vote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"int32\",\"name\":\"voteOption\",\"type\":\"int32\"},{\"internalType\":\"string\",\"name\":\"weight\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.WeightedVoteOption[]\",\"name\":\"options\",\"type\":\"tuple[]\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"}],\"name\":\"voteWeighted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
}

GovernanceModuleMetaData contains all meta data concerning the GovernanceModule contract.

Functions

This section is empty.

Types

type CosmosCoin

type CosmosCoin struct {
	Amount *big.Int
	Denom  string
}

CosmosCoin is an auto generated low-level Go binding around an user-defined struct.

type GovernanceModule

type GovernanceModule struct {
	GovernanceModuleCaller     // Read-only binding to the contract
	GovernanceModuleTransactor // Write-only binding to the contract
	GovernanceModuleFilterer   // Log filterer for contract events
}

GovernanceModule is an auto generated Go binding around an Ethereum contract.

func NewGovernanceModule

func NewGovernanceModule(address common.Address, backend bind.ContractBackend) (*GovernanceModule, error)

NewGovernanceModule creates a new instance of GovernanceModule, bound to a specific deployed contract.

type GovernanceModuleCaller

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

GovernanceModuleCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewGovernanceModuleCaller

func NewGovernanceModuleCaller(address common.Address, caller bind.ContractCaller) (*GovernanceModuleCaller, error)

NewGovernanceModuleCaller creates a new read-only instance of GovernanceModule, bound to a specific deployed contract.

func (*GovernanceModuleCaller) GetProposal

func (_GovernanceModule *GovernanceModuleCaller) GetProposal(opts *bind.CallOpts, proposalId uint64) (IGovernanceModuleProposal, error)

GetProposal is a free data retrieval call binding the contract method 0xf1610a28.

Solidity: function getProposal(uint64 proposalId) view returns((uint64,bytes,int32,(string,string,string,string),uint64,uint64,(uint256,string)[],uint64,uint64,string,string,string,string))

func (*GovernanceModuleCaller) GetProposals

func (_GovernanceModule *GovernanceModuleCaller) GetProposals(opts *bind.CallOpts, proposalStatus int32) ([]IGovernanceModuleProposal, error)

GetProposals is a free data retrieval call binding the contract method 0xb5828df2.

Solidity: function getProposals(int32 proposalStatus) view returns((uint64,bytes,int32,(string,string,string,string),uint64,uint64,(uint256,string)[],uint64,uint64,string,string,string,string)[])

type GovernanceModuleCallerRaw

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

GovernanceModuleCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*GovernanceModuleCallerRaw) Call

func (_GovernanceModule *GovernanceModuleCallerRaw) 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 GovernanceModuleCallerSession

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

GovernanceModuleCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*GovernanceModuleCallerSession) GetProposal

func (_GovernanceModule *GovernanceModuleCallerSession) GetProposal(proposalId uint64) (IGovernanceModuleProposal, error)

GetProposal is a free data retrieval call binding the contract method 0xf1610a28.

Solidity: function getProposal(uint64 proposalId) view returns((uint64,bytes,int32,(string,string,string,string),uint64,uint64,(uint256,string)[],uint64,uint64,string,string,string,string))

func (*GovernanceModuleCallerSession) GetProposals

func (_GovernanceModule *GovernanceModuleCallerSession) GetProposals(proposalStatus int32) ([]IGovernanceModuleProposal, error)

GetProposals is a free data retrieval call binding the contract method 0xb5828df2.

Solidity: function getProposals(int32 proposalStatus) view returns((uint64,bytes,int32,(string,string,string,string),uint64,uint64,(uint256,string)[],uint64,uint64,string,string,string,string)[])

type GovernanceModuleCancelProposal

type GovernanceModuleCancelProposal struct {
	ProposalId uint64
	Sender     common.Address
	Raw        types.Log // Blockchain specific contextual infos
}

GovernanceModuleCancelProposal represents a CancelProposal event raised by the GovernanceModule contract.

type GovernanceModuleCancelProposalIterator

type GovernanceModuleCancelProposalIterator struct {
	Event *GovernanceModuleCancelProposal // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

GovernanceModuleCancelProposalIterator is returned from FilterCancelProposal and is used to iterate over the raw logs and unpacked data for CancelProposal events raised by the GovernanceModule contract.

func (*GovernanceModuleCancelProposalIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*GovernanceModuleCancelProposalIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*GovernanceModuleCancelProposalIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type GovernanceModuleFilterer

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

GovernanceModuleFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewGovernanceModuleFilterer

func NewGovernanceModuleFilterer(address common.Address, filterer bind.ContractFilterer) (*GovernanceModuleFilterer, error)

NewGovernanceModuleFilterer creates a new log filterer instance of GovernanceModule, bound to a specific deployed contract.

func (*GovernanceModuleFilterer) FilterCancelProposal

func (_GovernanceModule *GovernanceModuleFilterer) FilterCancelProposal(opts *bind.FilterOpts, proposalId []uint64, sender []common.Address) (*GovernanceModuleCancelProposalIterator, error)

FilterCancelProposal is a free log retrieval operation binding the contract event 0xa6503d2a0de5ae1ea468cd5b57a9b85d8dc0d79fb1fea0be143a8333b95328fc.

Solidity: event CancelProposal(uint64 indexed proposalId, address indexed sender)

func (*GovernanceModuleFilterer) FilterProposalDeposit

func (_GovernanceModule *GovernanceModuleFilterer) FilterProposalDeposit(opts *bind.FilterOpts, proposalId []uint64) (*GovernanceModuleProposalDepositIterator, error)

FilterProposalDeposit is a free log retrieval operation binding the contract event 0x0b8153af883fcde0ae58cdf61d0344f4e2a7ed7c15d89542956ffebd34fc3e65.

Solidity: event ProposalDeposit(uint64 indexed proposalId, (uint256,string)[] amount)

func (*GovernanceModuleFilterer) FilterProposalVote

func (_GovernanceModule *GovernanceModuleFilterer) FilterProposalVote(opts *bind.FilterOpts, proposalId []uint64) (*GovernanceModuleProposalVoteIterator, error)

FilterProposalVote is a free log retrieval operation binding the contract event 0xb7c48d344472e58d1709956dc19409f1f2d43f47a95082fb882cc0e98198178e.

Solidity: event ProposalVote(uint64 indexed proposalId, string option)

func (*GovernanceModuleFilterer) FilterSubmitProposal

func (_GovernanceModule *GovernanceModuleFilterer) FilterSubmitProposal(opts *bind.FilterOpts) (*GovernanceModuleSubmitProposalIterator, error)

FilterSubmitProposal is a free log retrieval operation binding the contract event 0xf17df6a779bcad4d8718cb91077e0d8ebff11beef5d9ca6371e49e8314904170.

Solidity: event SubmitProposal()

func (*GovernanceModuleFilterer) ParseCancelProposal

func (_GovernanceModule *GovernanceModuleFilterer) ParseCancelProposal(log types.Log) (*GovernanceModuleCancelProposal, error)

ParseCancelProposal is a log parse operation binding the contract event 0xa6503d2a0de5ae1ea468cd5b57a9b85d8dc0d79fb1fea0be143a8333b95328fc.

Solidity: event CancelProposal(uint64 indexed proposalId, address indexed sender)

func (*GovernanceModuleFilterer) ParseProposalDeposit

func (_GovernanceModule *GovernanceModuleFilterer) ParseProposalDeposit(log types.Log) (*GovernanceModuleProposalDeposit, error)

ParseProposalDeposit is a log parse operation binding the contract event 0x0b8153af883fcde0ae58cdf61d0344f4e2a7ed7c15d89542956ffebd34fc3e65.

Solidity: event ProposalDeposit(uint64 indexed proposalId, (uint256,string)[] amount)

func (*GovernanceModuleFilterer) ParseProposalVote

func (_GovernanceModule *GovernanceModuleFilterer) ParseProposalVote(log types.Log) (*GovernanceModuleProposalVote, error)

ParseProposalVote is a log parse operation binding the contract event 0xb7c48d344472e58d1709956dc19409f1f2d43f47a95082fb882cc0e98198178e.

Solidity: event ProposalVote(uint64 indexed proposalId, string option)

func (*GovernanceModuleFilterer) ParseSubmitProposal

func (_GovernanceModule *GovernanceModuleFilterer) ParseSubmitProposal(log types.Log) (*GovernanceModuleSubmitProposal, error)

ParseSubmitProposal is a log parse operation binding the contract event 0xf17df6a779bcad4d8718cb91077e0d8ebff11beef5d9ca6371e49e8314904170.

Solidity: event SubmitProposal()

func (*GovernanceModuleFilterer) WatchCancelProposal

func (_GovernanceModule *GovernanceModuleFilterer) WatchCancelProposal(opts *bind.WatchOpts, sink chan<- *GovernanceModuleCancelProposal, proposalId []uint64, sender []common.Address) (event.Subscription, error)

WatchCancelProposal is a free log subscription operation binding the contract event 0xa6503d2a0de5ae1ea468cd5b57a9b85d8dc0d79fb1fea0be143a8333b95328fc.

Solidity: event CancelProposal(uint64 indexed proposalId, address indexed sender)

func (*GovernanceModuleFilterer) WatchProposalDeposit

func (_GovernanceModule *GovernanceModuleFilterer) WatchProposalDeposit(opts *bind.WatchOpts, sink chan<- *GovernanceModuleProposalDeposit, proposalId []uint64) (event.Subscription, error)

WatchProposalDeposit is a free log subscription operation binding the contract event 0x0b8153af883fcde0ae58cdf61d0344f4e2a7ed7c15d89542956ffebd34fc3e65.

Solidity: event ProposalDeposit(uint64 indexed proposalId, (uint256,string)[] amount)

func (*GovernanceModuleFilterer) WatchProposalVote

func (_GovernanceModule *GovernanceModuleFilterer) WatchProposalVote(opts *bind.WatchOpts, sink chan<- *GovernanceModuleProposalVote, proposalId []uint64) (event.Subscription, error)

WatchProposalVote is a free log subscription operation binding the contract event 0xb7c48d344472e58d1709956dc19409f1f2d43f47a95082fb882cc0e98198178e.

Solidity: event ProposalVote(uint64 indexed proposalId, string option)

func (*GovernanceModuleFilterer) WatchSubmitProposal

func (_GovernanceModule *GovernanceModuleFilterer) WatchSubmitProposal(opts *bind.WatchOpts, sink chan<- *GovernanceModuleSubmitProposal) (event.Subscription, error)

WatchSubmitProposal is a free log subscription operation binding the contract event 0xf17df6a779bcad4d8718cb91077e0d8ebff11beef5d9ca6371e49e8314904170.

Solidity: event SubmitProposal()

type GovernanceModuleProposalDeposit

type GovernanceModuleProposalDeposit struct {
	ProposalId uint64
	Amount     []CosmosCoin
	Raw        types.Log // Blockchain specific contextual infos
}

GovernanceModuleProposalDeposit represents a ProposalDeposit event raised by the GovernanceModule contract.

type GovernanceModuleProposalDepositIterator

type GovernanceModuleProposalDepositIterator struct {
	Event *GovernanceModuleProposalDeposit // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

GovernanceModuleProposalDepositIterator is returned from FilterProposalDeposit and is used to iterate over the raw logs and unpacked data for ProposalDeposit events raised by the GovernanceModule contract.

func (*GovernanceModuleProposalDepositIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*GovernanceModuleProposalDepositIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*GovernanceModuleProposalDepositIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type GovernanceModuleProposalVote

type GovernanceModuleProposalVote struct {
	ProposalId uint64
	Option     string
	Raw        types.Log // Blockchain specific contextual infos
}

GovernanceModuleProposalVote represents a ProposalVote event raised by the GovernanceModule contract.

type GovernanceModuleProposalVoteIterator

type GovernanceModuleProposalVoteIterator struct {
	Event *GovernanceModuleProposalVote // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

GovernanceModuleProposalVoteIterator is returned from FilterProposalVote and is used to iterate over the raw logs and unpacked data for ProposalVote events raised by the GovernanceModule contract.

func (*GovernanceModuleProposalVoteIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*GovernanceModuleProposalVoteIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*GovernanceModuleProposalVoteIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type GovernanceModuleRaw

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

GovernanceModuleRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*GovernanceModuleRaw) Call

func (_GovernanceModule *GovernanceModuleRaw) 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 (*GovernanceModuleRaw) Transact

func (_GovernanceModule *GovernanceModuleRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

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

func (*GovernanceModuleRaw) Transfer

func (_GovernanceModule *GovernanceModuleRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

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

type GovernanceModuleSession

type GovernanceModuleSession struct {
	Contract     *GovernanceModule // 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
}

GovernanceModuleSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*GovernanceModuleSession) CancelProposal

func (_GovernanceModule *GovernanceModuleSession) CancelProposal(proposalId uint64) (*types.Transaction, error)

CancelProposal is a paid mutator transaction binding the contract method 0x37a9a59e.

Solidity: function cancelProposal(uint64 proposalId) returns(uint64, uint64)

func (*GovernanceModuleSession) GetProposal

func (_GovernanceModule *GovernanceModuleSession) GetProposal(proposalId uint64) (IGovernanceModuleProposal, error)

GetProposal is a free data retrieval call binding the contract method 0xf1610a28.

Solidity: function getProposal(uint64 proposalId) view returns((uint64,bytes,int32,(string,string,string,string),uint64,uint64,(uint256,string)[],uint64,uint64,string,string,string,string))

func (*GovernanceModuleSession) GetProposals

func (_GovernanceModule *GovernanceModuleSession) GetProposals(proposalStatus int32) ([]IGovernanceModuleProposal, error)

GetProposals is a free data retrieval call binding the contract method 0xb5828df2.

Solidity: function getProposals(int32 proposalStatus) view returns((uint64,bytes,int32,(string,string,string,string),uint64,uint64,(uint256,string)[],uint64,uint64,string,string,string,string)[])

func (*GovernanceModuleSession) SubmitProposal

func (_GovernanceModule *GovernanceModuleSession) SubmitProposal(proposal []byte, message []byte) (*types.Transaction, error)

SubmitProposal is a paid mutator transaction binding the contract method 0x474d7f35.

Solidity: function submitProposal(bytes proposal, bytes message) returns(uint64)

func (*GovernanceModuleSession) Vote

func (_GovernanceModule *GovernanceModuleSession) Vote(proposalId uint64, option int32, metadata string) (*types.Transaction, error)

Vote is a paid mutator transaction binding the contract method 0x19f7a0fb.

Solidity: function vote(uint64 proposalId, int32 option, string metadata) returns(bool)

func (*GovernanceModuleSession) VoteWeighted

func (_GovernanceModule *GovernanceModuleSession) VoteWeighted(proposalId uint64, options []IGovernanceModuleWeightedVoteOption, metadata string) (*types.Transaction, error)

VoteWeighted is a paid mutator transaction binding the contract method 0xf028295e.

Solidity: function voteWeighted(uint64 proposalId, (int32,string)[] options, string metadata) returns(bool)

type GovernanceModuleSubmitProposal

type GovernanceModuleSubmitProposal struct {
	Raw types.Log // Blockchain specific contextual infos
}

GovernanceModuleSubmitProposal represents a SubmitProposal event raised by the GovernanceModule contract.

type GovernanceModuleSubmitProposalIterator

type GovernanceModuleSubmitProposalIterator struct {
	Event *GovernanceModuleSubmitProposal // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

GovernanceModuleSubmitProposalIterator is returned from FilterSubmitProposal and is used to iterate over the raw logs and unpacked data for SubmitProposal events raised by the GovernanceModule contract.

func (*GovernanceModuleSubmitProposalIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*GovernanceModuleSubmitProposalIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*GovernanceModuleSubmitProposalIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type GovernanceModuleTransactor

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

GovernanceModuleTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewGovernanceModuleTransactor

func NewGovernanceModuleTransactor(address common.Address, transactor bind.ContractTransactor) (*GovernanceModuleTransactor, error)

NewGovernanceModuleTransactor creates a new write-only instance of GovernanceModule, bound to a specific deployed contract.

func (*GovernanceModuleTransactor) CancelProposal

func (_GovernanceModule *GovernanceModuleTransactor) CancelProposal(opts *bind.TransactOpts, proposalId uint64) (*types.Transaction, error)

CancelProposal is a paid mutator transaction binding the contract method 0x37a9a59e.

Solidity: function cancelProposal(uint64 proposalId) returns(uint64, uint64)

func (*GovernanceModuleTransactor) SubmitProposal

func (_GovernanceModule *GovernanceModuleTransactor) SubmitProposal(opts *bind.TransactOpts, proposal []byte, message []byte) (*types.Transaction, error)

SubmitProposal is a paid mutator transaction binding the contract method 0x474d7f35.

Solidity: function submitProposal(bytes proposal, bytes message) returns(uint64)

func (*GovernanceModuleTransactor) Vote

func (_GovernanceModule *GovernanceModuleTransactor) Vote(opts *bind.TransactOpts, proposalId uint64, option int32, metadata string) (*types.Transaction, error)

Vote is a paid mutator transaction binding the contract method 0x19f7a0fb.

Solidity: function vote(uint64 proposalId, int32 option, string metadata) returns(bool)

func (*GovernanceModuleTransactor) VoteWeighted

func (_GovernanceModule *GovernanceModuleTransactor) VoteWeighted(opts *bind.TransactOpts, proposalId uint64, options []IGovernanceModuleWeightedVoteOption, metadata string) (*types.Transaction, error)

VoteWeighted is a paid mutator transaction binding the contract method 0xf028295e.

Solidity: function voteWeighted(uint64 proposalId, (int32,string)[] options, string metadata) returns(bool)

type GovernanceModuleTransactorRaw

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

GovernanceModuleTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*GovernanceModuleTransactorRaw) Transact

func (_GovernanceModule *GovernanceModuleTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

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

func (*GovernanceModuleTransactorRaw) Transfer

func (_GovernanceModule *GovernanceModuleTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

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

type GovernanceModuleTransactorSession

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

GovernanceModuleTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*GovernanceModuleTransactorSession) CancelProposal

func (_GovernanceModule *GovernanceModuleTransactorSession) CancelProposal(proposalId uint64) (*types.Transaction, error)

CancelProposal is a paid mutator transaction binding the contract method 0x37a9a59e.

Solidity: function cancelProposal(uint64 proposalId) returns(uint64, uint64)

func (*GovernanceModuleTransactorSession) SubmitProposal

func (_GovernanceModule *GovernanceModuleTransactorSession) SubmitProposal(proposal []byte, message []byte) (*types.Transaction, error)

SubmitProposal is a paid mutator transaction binding the contract method 0x474d7f35.

Solidity: function submitProposal(bytes proposal, bytes message) returns(uint64)

func (*GovernanceModuleTransactorSession) Vote

func (_GovernanceModule *GovernanceModuleTransactorSession) Vote(proposalId uint64, option int32, metadata string) (*types.Transaction, error)

Vote is a paid mutator transaction binding the contract method 0x19f7a0fb.

Solidity: function vote(uint64 proposalId, int32 option, string metadata) returns(bool)

func (*GovernanceModuleTransactorSession) VoteWeighted

func (_GovernanceModule *GovernanceModuleTransactorSession) VoteWeighted(proposalId uint64, options []IGovernanceModuleWeightedVoteOption, metadata string) (*types.Transaction, error)

VoteWeighted is a paid mutator transaction binding the contract method 0xf028295e.

Solidity: function voteWeighted(uint64 proposalId, (int32,string)[] options, string metadata) returns(bool)

type IGovernanceModuleProposal

type IGovernanceModuleProposal struct {
	Id               uint64
	Message          []byte
	Status           int32
	FinalTallyResult IGovernanceModuleTallyResult
	SubmitTime       uint64
	DepositEndTime   uint64
	TotalDeposit     []CosmosCoin
	VotingStartTime  uint64
	VotingEndTime    uint64
	Metadata         string
	Title            string
	Summary          string
	Proposer         string
}

IGovernanceModuleProposal is an auto generated low-level Go binding around an user-defined struct.

type IGovernanceModuleTallyResult

type IGovernanceModuleTallyResult struct {
	YesCount        string
	AbstainCount    string
	NoCount         string
	NoWithVetoCount string
}

IGovernanceModuleTallyResult is an auto generated low-level Go binding around an user-defined struct.

type IGovernanceModuleWeightedVoteOption

type IGovernanceModuleWeightedVoteOption struct {
	VoteOption int32
	Weight     string
}

IGovernanceModuleWeightedVoteOption is an auto generated low-level Go binding around an user-defined struct.

Jump to

Keyboard shortcuts

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