distribution

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DistributionModuleABI = DistributionModuleMetaData.ABI

DistributionModuleABI is the input ABI used to generate the binding from. Deprecated: Use DistributionModuleMetaData.ABI instead.

View Source
var DistributionModuleMetaData = &bind.MetaData{
	ABI: "[{\"type\":\"function\",\"name\":\"getAllDelegatorRewards\",\"inputs\":[{\"name\":\"delegator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structIDistributionModule.ValidatorReward[]\",\"components\":[{\"name\":\"validator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"rewards\",\"type\":\"tuple[]\",\"internalType\":\"structCosmos.Coin[]\",\"components\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"string\",\"internalType\":\"string\"}]}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDelegatorValidatorReward\",\"inputs\":[{\"name\":\"delegator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"validator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structCosmos.Coin[]\",\"components\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalDelegatorReward\",\"inputs\":[{\"name\":\"delegator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structCosmos.Coin[]\",\"components\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getWithdrawAddress\",\"inputs\":[{\"name\":\"delegator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getWithdrawEnabled\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setWithdrawAddress\",\"inputs\":[{\"name\":\"withdrawAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawDelegatorReward\",\"inputs\":[{\"name\":\"delegator\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"validator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple[]\",\"internalType\":\"structCosmos.Coin[]\",\"components\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"SetWithdrawAddress\",\"inputs\":[{\"name\":\"withdrawAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawRewards\",\"inputs\":[{\"name\":\"validator\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"components\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"denom\",\"type\":\"string\",\"internalType\":\"string\"}]}],\"anonymous\":false}]",
}

DistributionModuleMetaData contains all meta data concerning the DistributionModule 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 DistributionModule

type DistributionModule struct {
	DistributionModuleCaller     // Read-only binding to the contract
	DistributionModuleTransactor // Write-only binding to the contract
	DistributionModuleFilterer   // Log filterer for contract events
}

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

func NewDistributionModule

func NewDistributionModule(address common.Address, backend bind.ContractBackend) (*DistributionModule, error)

NewDistributionModule creates a new instance of DistributionModule, bound to a specific deployed contract.

type DistributionModuleCaller

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

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

func NewDistributionModuleCaller

func NewDistributionModuleCaller(address common.Address, caller bind.ContractCaller) (*DistributionModuleCaller, error)

NewDistributionModuleCaller creates a new read-only instance of DistributionModule, bound to a specific deployed contract.

func (*DistributionModuleCaller) GetAllDelegatorRewards

func (_DistributionModule *DistributionModuleCaller) GetAllDelegatorRewards(opts *bind.CallOpts, delegator common.Address) ([]IDistributionModuleValidatorReward, error)

GetAllDelegatorRewards is a free data retrieval call binding the contract method 0x36e22c98.

Solidity: function getAllDelegatorRewards(address delegator) view returns((address,(uint256,string)[])[])

func (*DistributionModuleCaller) GetDelegatorValidatorReward

func (_DistributionModule *DistributionModuleCaller) GetDelegatorValidatorReward(opts *bind.CallOpts, delegator common.Address, validator common.Address) ([]CosmosCoin, error)

GetDelegatorValidatorReward is a free data retrieval call binding the contract method 0x4d33a513.

Solidity: function getDelegatorValidatorReward(address delegator, address validator) view returns((uint256,string)[])

func (*DistributionModuleCaller) GetTotalDelegatorReward

func (_DistributionModule *DistributionModuleCaller) GetTotalDelegatorReward(opts *bind.CallOpts, delegator common.Address) ([]CosmosCoin, error)

GetTotalDelegatorReward is a free data retrieval call binding the contract method 0xce3341b4.

Solidity: function getTotalDelegatorReward(address delegator) view returns((uint256,string)[])

func (*DistributionModuleCaller) GetWithdrawAddress

func (_DistributionModule *DistributionModuleCaller) GetWithdrawAddress(opts *bind.CallOpts, delegator common.Address) (common.Address, error)

GetWithdrawAddress is a free data retrieval call binding the contract method 0xafe46ea2.

Solidity: function getWithdrawAddress(address delegator) view returns(address)

func (*DistributionModuleCaller) GetWithdrawEnabled

func (_DistributionModule *DistributionModuleCaller) GetWithdrawEnabled(opts *bind.CallOpts) (bool, error)

GetWithdrawEnabled is a free data retrieval call binding the contract method 0x39cc4c86.

Solidity: function getWithdrawEnabled() view returns(bool)

type DistributionModuleCallerRaw

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

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

func (*DistributionModuleCallerRaw) Call

func (_DistributionModule *DistributionModuleCallerRaw) 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 DistributionModuleCallerSession

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

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

func (*DistributionModuleCallerSession) GetAllDelegatorRewards

func (_DistributionModule *DistributionModuleCallerSession) GetAllDelegatorRewards(delegator common.Address) ([]IDistributionModuleValidatorReward, error)

GetAllDelegatorRewards is a free data retrieval call binding the contract method 0x36e22c98.

Solidity: function getAllDelegatorRewards(address delegator) view returns((address,(uint256,string)[])[])

func (*DistributionModuleCallerSession) GetDelegatorValidatorReward

func (_DistributionModule *DistributionModuleCallerSession) GetDelegatorValidatorReward(delegator common.Address, validator common.Address) ([]CosmosCoin, error)

GetDelegatorValidatorReward is a free data retrieval call binding the contract method 0x4d33a513.

Solidity: function getDelegatorValidatorReward(address delegator, address validator) view returns((uint256,string)[])

func (*DistributionModuleCallerSession) GetTotalDelegatorReward

func (_DistributionModule *DistributionModuleCallerSession) GetTotalDelegatorReward(delegator common.Address) ([]CosmosCoin, error)

GetTotalDelegatorReward is a free data retrieval call binding the contract method 0xce3341b4.

Solidity: function getTotalDelegatorReward(address delegator) view returns((uint256,string)[])

func (*DistributionModuleCallerSession) GetWithdrawAddress

func (_DistributionModule *DistributionModuleCallerSession) GetWithdrawAddress(delegator common.Address) (common.Address, error)

GetWithdrawAddress is a free data retrieval call binding the contract method 0xafe46ea2.

Solidity: function getWithdrawAddress(address delegator) view returns(address)

func (*DistributionModuleCallerSession) GetWithdrawEnabled

func (_DistributionModule *DistributionModuleCallerSession) GetWithdrawEnabled() (bool, error)

GetWithdrawEnabled is a free data retrieval call binding the contract method 0x39cc4c86.

Solidity: function getWithdrawEnabled() view returns(bool)

type DistributionModuleFilterer

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

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

func NewDistributionModuleFilterer

func NewDistributionModuleFilterer(address common.Address, filterer bind.ContractFilterer) (*DistributionModuleFilterer, error)

NewDistributionModuleFilterer creates a new log filterer instance of DistributionModule, bound to a specific deployed contract.

func (*DistributionModuleFilterer) FilterSetWithdrawAddress

func (_DistributionModule *DistributionModuleFilterer) FilterSetWithdrawAddress(opts *bind.FilterOpts, withdrawAddress []common.Address) (*DistributionModuleSetWithdrawAddressIterator, error)

FilterSetWithdrawAddress is a free log retrieval operation binding the contract event 0xb13cf87e0a7b64f90565a1b68b63ae634d746fa785450bbdef7cbd281997cfb0.

Solidity: event SetWithdrawAddress(address indexed withdrawAddress)

func (*DistributionModuleFilterer) FilterWithdrawRewards

func (_DistributionModule *DistributionModuleFilterer) FilterWithdrawRewards(opts *bind.FilterOpts, validator []common.Address) (*DistributionModuleWithdrawRewardsIterator, error)

FilterWithdrawRewards is a free log retrieval operation binding the contract event 0x68e5a74be48fc61c2ca4536b8819962850d1d39d7aa32ca670914f8b10aa6e5b.

Solidity: event WithdrawRewards(address indexed validator, (uint256,string)[] amount)

func (*DistributionModuleFilterer) ParseSetWithdrawAddress

func (_DistributionModule *DistributionModuleFilterer) ParseSetWithdrawAddress(log types.Log) (*DistributionModuleSetWithdrawAddress, error)

ParseSetWithdrawAddress is a log parse operation binding the contract event 0xb13cf87e0a7b64f90565a1b68b63ae634d746fa785450bbdef7cbd281997cfb0.

Solidity: event SetWithdrawAddress(address indexed withdrawAddress)

func (*DistributionModuleFilterer) ParseWithdrawRewards

func (_DistributionModule *DistributionModuleFilterer) ParseWithdrawRewards(log types.Log) (*DistributionModuleWithdrawRewards, error)

ParseWithdrawRewards is a log parse operation binding the contract event 0x68e5a74be48fc61c2ca4536b8819962850d1d39d7aa32ca670914f8b10aa6e5b.

Solidity: event WithdrawRewards(address indexed validator, (uint256,string)[] amount)

func (*DistributionModuleFilterer) WatchSetWithdrawAddress

func (_DistributionModule *DistributionModuleFilterer) WatchSetWithdrawAddress(opts *bind.WatchOpts, sink chan<- *DistributionModuleSetWithdrawAddress, withdrawAddress []common.Address) (event.Subscription, error)

WatchSetWithdrawAddress is a free log subscription operation binding the contract event 0xb13cf87e0a7b64f90565a1b68b63ae634d746fa785450bbdef7cbd281997cfb0.

Solidity: event SetWithdrawAddress(address indexed withdrawAddress)

func (*DistributionModuleFilterer) WatchWithdrawRewards

func (_DistributionModule *DistributionModuleFilterer) WatchWithdrawRewards(opts *bind.WatchOpts, sink chan<- *DistributionModuleWithdrawRewards, validator []common.Address) (event.Subscription, error)

WatchWithdrawRewards is a free log subscription operation binding the contract event 0x68e5a74be48fc61c2ca4536b8819962850d1d39d7aa32ca670914f8b10aa6e5b.

Solidity: event WithdrawRewards(address indexed validator, (uint256,string)[] amount)

type DistributionModuleRaw

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

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

func (*DistributionModuleRaw) Call

func (_DistributionModule *DistributionModuleRaw) 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 (*DistributionModuleRaw) Transact

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

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

func (*DistributionModuleRaw) Transfer

func (_DistributionModule *DistributionModuleRaw) 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 DistributionModuleSession

type DistributionModuleSession struct {
	Contract     *DistributionModule // 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
}

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

func (*DistributionModuleSession) GetAllDelegatorRewards

func (_DistributionModule *DistributionModuleSession) GetAllDelegatorRewards(delegator common.Address) ([]IDistributionModuleValidatorReward, error)

GetAllDelegatorRewards is a free data retrieval call binding the contract method 0x36e22c98.

Solidity: function getAllDelegatorRewards(address delegator) view returns((address,(uint256,string)[])[])

func (*DistributionModuleSession) GetDelegatorValidatorReward

func (_DistributionModule *DistributionModuleSession) GetDelegatorValidatorReward(delegator common.Address, validator common.Address) ([]CosmosCoin, error)

GetDelegatorValidatorReward is a free data retrieval call binding the contract method 0x4d33a513.

Solidity: function getDelegatorValidatorReward(address delegator, address validator) view returns((uint256,string)[])

func (*DistributionModuleSession) GetTotalDelegatorReward

func (_DistributionModule *DistributionModuleSession) GetTotalDelegatorReward(delegator common.Address) ([]CosmosCoin, error)

GetTotalDelegatorReward is a free data retrieval call binding the contract method 0xce3341b4.

Solidity: function getTotalDelegatorReward(address delegator) view returns((uint256,string)[])

func (*DistributionModuleSession) GetWithdrawAddress

func (_DistributionModule *DistributionModuleSession) GetWithdrawAddress(delegator common.Address) (common.Address, error)

GetWithdrawAddress is a free data retrieval call binding the contract method 0xafe46ea2.

Solidity: function getWithdrawAddress(address delegator) view returns(address)

func (*DistributionModuleSession) GetWithdrawEnabled

func (_DistributionModule *DistributionModuleSession) GetWithdrawEnabled() (bool, error)

GetWithdrawEnabled is a free data retrieval call binding the contract method 0x39cc4c86.

Solidity: function getWithdrawEnabled() view returns(bool)

func (*DistributionModuleSession) SetWithdrawAddress

func (_DistributionModule *DistributionModuleSession) SetWithdrawAddress(withdrawAddress common.Address) (*types.Transaction, error)

SetWithdrawAddress is a paid mutator transaction binding the contract method 0x3ab1a494.

Solidity: function setWithdrawAddress(address withdrawAddress) returns(bool)

func (*DistributionModuleSession) WithdrawDelegatorReward

func (_DistributionModule *DistributionModuleSession) WithdrawDelegatorReward(delegator common.Address, validator common.Address) (*types.Transaction, error)

WithdrawDelegatorReward is a paid mutator transaction binding the contract method 0x562c67a4.

Solidity: function withdrawDelegatorReward(address delegator, address validator) returns((uint256,string)[])

type DistributionModuleSetWithdrawAddress

type DistributionModuleSetWithdrawAddress struct {
	WithdrawAddress common.Address
	Raw             types.Log // Blockchain specific contextual infos
}

DistributionModuleSetWithdrawAddress represents a SetWithdrawAddress event raised by the DistributionModule contract.

type DistributionModuleSetWithdrawAddressIterator

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

DistributionModuleSetWithdrawAddressIterator is returned from FilterSetWithdrawAddress and is used to iterate over the raw logs and unpacked data for SetWithdrawAddress events raised by the DistributionModule contract.

func (*DistributionModuleSetWithdrawAddressIterator) Close

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

func (*DistributionModuleSetWithdrawAddressIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*DistributionModuleSetWithdrawAddressIterator) 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 DistributionModuleTransactor

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

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

func NewDistributionModuleTransactor

func NewDistributionModuleTransactor(address common.Address, transactor bind.ContractTransactor) (*DistributionModuleTransactor, error)

NewDistributionModuleTransactor creates a new write-only instance of DistributionModule, bound to a specific deployed contract.

func (*DistributionModuleTransactor) SetWithdrawAddress

func (_DistributionModule *DistributionModuleTransactor) SetWithdrawAddress(opts *bind.TransactOpts, withdrawAddress common.Address) (*types.Transaction, error)

SetWithdrawAddress is a paid mutator transaction binding the contract method 0x3ab1a494.

Solidity: function setWithdrawAddress(address withdrawAddress) returns(bool)

func (*DistributionModuleTransactor) WithdrawDelegatorReward

func (_DistributionModule *DistributionModuleTransactor) WithdrawDelegatorReward(opts *bind.TransactOpts, delegator common.Address, validator common.Address) (*types.Transaction, error)

WithdrawDelegatorReward is a paid mutator transaction binding the contract method 0x562c67a4.

Solidity: function withdrawDelegatorReward(address delegator, address validator) returns((uint256,string)[])

type DistributionModuleTransactorRaw

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

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

func (*DistributionModuleTransactorRaw) Transact

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

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

func (*DistributionModuleTransactorRaw) Transfer

func (_DistributionModule *DistributionModuleTransactorRaw) 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 DistributionModuleTransactorSession

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

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

func (*DistributionModuleTransactorSession) SetWithdrawAddress

func (_DistributionModule *DistributionModuleTransactorSession) SetWithdrawAddress(withdrawAddress common.Address) (*types.Transaction, error)

SetWithdrawAddress is a paid mutator transaction binding the contract method 0x3ab1a494.

Solidity: function setWithdrawAddress(address withdrawAddress) returns(bool)

func (*DistributionModuleTransactorSession) WithdrawDelegatorReward

func (_DistributionModule *DistributionModuleTransactorSession) WithdrawDelegatorReward(delegator common.Address, validator common.Address) (*types.Transaction, error)

WithdrawDelegatorReward is a paid mutator transaction binding the contract method 0x562c67a4.

Solidity: function withdrawDelegatorReward(address delegator, address validator) returns((uint256,string)[])

type DistributionModuleWithdrawRewards

type DistributionModuleWithdrawRewards struct {
	Validator common.Address
	Amount    []CosmosCoin
	Raw       types.Log // Blockchain specific contextual infos
}

DistributionModuleWithdrawRewards represents a WithdrawRewards event raised by the DistributionModule contract.

type DistributionModuleWithdrawRewardsIterator

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

DistributionModuleWithdrawRewardsIterator is returned from FilterWithdrawRewards and is used to iterate over the raw logs and unpacked data for WithdrawRewards events raised by the DistributionModule contract.

func (*DistributionModuleWithdrawRewardsIterator) Close

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

func (*DistributionModuleWithdrawRewardsIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*DistributionModuleWithdrawRewardsIterator) 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 IDistributionModuleValidatorReward

type IDistributionModuleValidatorReward struct {
	Validator common.Address
	Rewards   []CosmosCoin
}

IDistributionModuleValidatorReward 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