contracts-go/contribution/contribution.go
2022-10-01 11:18:44 +02:00

1286 lines
59 KiB
Go

// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package contribution
import (
"errors"
"math/big"
"strings"
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
)
// Reference imports to suppress errors if they are not otherwise used.
var (
_ = errors.New
_ = big.NewInt
_ = strings.NewReader
_ = ethereum.NotFound
_ = bind.Bind
_ = common.Big1
_ = types.BloomLookup
_ = event.NewSubscription
)
// ContributionMetaData contains all meta data concerning the Contribution contract.
var ContributionMetaData = &bind.MetaData{
ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"contributorId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"amount\",\"type\":\"uint32\"}],\"name\":\"ContributionAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vetoedByAccount\",\"type\":\"address\"}],\"name\":\"ContributionVetoed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"amount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"contributorId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"hashDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"hashFunction\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"hashSize\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"confirmedAtBlock\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"vetoed\",\"type\":\"bool\"}],\"name\":\"add\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blocksToWait\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"contributionOwner\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"contributions\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"contributorId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"amount\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"hashDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"hashFunction\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"hashSize\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenMetadataURL\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"confirmedAtBlock\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"vetoed\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"exists\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"contributionsCount\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"contributorContract\",\"outputs\":[{\"internalType\":\"contractContributorInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deployer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"contributionId\",\"type\":\"uint32\"}],\"name\":\"exists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finishMigration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"contributionId\",\"type\":\"uint32\"}],\"name\":\"getContribution\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"contributorId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"amount\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"hashDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"hashFunction\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"hashSize\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"confirmedAtBlock\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"exists\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"vetoed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"contributorId\",\"type\":\"uint32\"}],\"name\":\"getContributorAddressById\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contributorAccount\",\"type\":\"address\"}],\"name\":\"getContributorIdByAddress\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"blocksToWait_\",\"type\":\"uint32\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"migrationDone\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"ownedContributions\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"contributionId\",\"type\":\"uint32\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contributor\",\"type\":\"address\"}],\"name\":\"setContributorContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"contributionId\",\"type\":\"uint32\"}],\"name\":\"tokenMetadata\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"index\",\"type\":\"uint32\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"confirmedOnly\",\"type\":\"bool\"}],\"name\":\"totalKreditsEarned\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"amount\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"contributorId\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"confirmedOnly\",\"type\":\"bool\"}],\"name\":\"totalKreditsEarnedByContributor\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"amount\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"contributionId\",\"type\":\"uint32\"}],\"name\":\"veto\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
}
// ContributionABI is the input ABI used to generate the binding from.
// Deprecated: Use ContributionMetaData.ABI instead.
var ContributionABI = ContributionMetaData.ABI
// Contribution is an auto generated Go binding around an Ethereum contract.
type Contribution struct {
ContributionCaller // Read-only binding to the contract
ContributionTransactor // Write-only binding to the contract
ContributionFilterer // Log filterer for contract events
}
// ContributionCaller is an auto generated read-only Go binding around an Ethereum contract.
type ContributionCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// ContributionTransactor is an auto generated write-only Go binding around an Ethereum contract.
type ContributionTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// ContributionFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type ContributionFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// ContributionSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type ContributionSession struct {
Contract *Contribution // 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
}
// ContributionCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type ContributionCallerSession struct {
Contract *ContributionCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// ContributionTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type ContributionTransactorSession struct {
Contract *ContributionTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// ContributionRaw is an auto generated low-level Go binding around an Ethereum contract.
type ContributionRaw struct {
Contract *Contribution // Generic contract binding to access the raw methods on
}
// ContributionCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type ContributionCallerRaw struct {
Contract *ContributionCaller // Generic read-only contract binding to access the raw methods on
}
// ContributionTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type ContributionTransactorRaw struct {
Contract *ContributionTransactor // Generic write-only contract binding to access the raw methods on
}
// NewContribution creates a new instance of Contribution, bound to a specific deployed contract.
func NewContribution(address common.Address, backend bind.ContractBackend) (*Contribution, error) {
contract, err := bindContribution(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &Contribution{ContributionCaller: ContributionCaller{contract: contract}, ContributionTransactor: ContributionTransactor{contract: contract}, ContributionFilterer: ContributionFilterer{contract: contract}}, nil
}
// NewContributionCaller creates a new read-only instance of Contribution, bound to a specific deployed contract.
func NewContributionCaller(address common.Address, caller bind.ContractCaller) (*ContributionCaller, error) {
contract, err := bindContribution(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &ContributionCaller{contract: contract}, nil
}
// NewContributionTransactor creates a new write-only instance of Contribution, bound to a specific deployed contract.
func NewContributionTransactor(address common.Address, transactor bind.ContractTransactor) (*ContributionTransactor, error) {
contract, err := bindContribution(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &ContributionTransactor{contract: contract}, nil
}
// NewContributionFilterer creates a new log filterer instance of Contribution, bound to a specific deployed contract.
func NewContributionFilterer(address common.Address, filterer bind.ContractFilterer) (*ContributionFilterer, error) {
contract, err := bindContribution(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &ContributionFilterer{contract: contract}, nil
}
// bindContribution binds a generic wrapper to an already deployed contract.
func bindContribution(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(ContributionABI))
if err != nil {
return nil, err
}
return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
}
// 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 (_Contribution *ContributionRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Contribution.Contract.ContributionCaller.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_Contribution *ContributionRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Contribution.Contract.ContributionTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Contribution *ContributionRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Contribution.Contract.ContributionTransactor.contract.Transact(opts, method, params...)
}
// 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 (_Contribution *ContributionCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Contribution.Contract.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_Contribution *ContributionTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Contribution.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Contribution *ContributionTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Contribution.Contract.contract.Transact(opts, method, params...)
}
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
//
// Solidity: function balanceOf(address owner) view returns(uint256)
func (_Contribution *ContributionCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "balanceOf", owner)
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
//
// Solidity: function balanceOf(address owner) view returns(uint256)
func (_Contribution *ContributionSession) BalanceOf(owner common.Address) (*big.Int, error) {
return _Contribution.Contract.BalanceOf(&_Contribution.CallOpts, owner)
}
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
//
// Solidity: function balanceOf(address owner) view returns(uint256)
func (_Contribution *ContributionCallerSession) BalanceOf(owner common.Address) (*big.Int, error) {
return _Contribution.Contract.BalanceOf(&_Contribution.CallOpts, owner)
}
// BlocksToWait is a free data retrieval call binding the contract method 0xd8dcac4f.
//
// Solidity: function blocksToWait() view returns(uint32)
func (_Contribution *ContributionCaller) BlocksToWait(opts *bind.CallOpts) (uint32, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "blocksToWait")
if err != nil {
return *new(uint32), err
}
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32)
return out0, err
}
// BlocksToWait is a free data retrieval call binding the contract method 0xd8dcac4f.
//
// Solidity: function blocksToWait() view returns(uint32)
func (_Contribution *ContributionSession) BlocksToWait() (uint32, error) {
return _Contribution.Contract.BlocksToWait(&_Contribution.CallOpts)
}
// BlocksToWait is a free data retrieval call binding the contract method 0xd8dcac4f.
//
// Solidity: function blocksToWait() view returns(uint32)
func (_Contribution *ContributionCallerSession) BlocksToWait() (uint32, error) {
return _Contribution.Contract.BlocksToWait(&_Contribution.CallOpts)
}
// ContributionOwner is a free data retrieval call binding the contract method 0xb6c5883f.
//
// Solidity: function contributionOwner(uint32 ) view returns(uint32)
func (_Contribution *ContributionCaller) ContributionOwner(opts *bind.CallOpts, arg0 uint32) (uint32, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "contributionOwner", arg0)
if err != nil {
return *new(uint32), err
}
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32)
return out0, err
}
// ContributionOwner is a free data retrieval call binding the contract method 0xb6c5883f.
//
// Solidity: function contributionOwner(uint32 ) view returns(uint32)
func (_Contribution *ContributionSession) ContributionOwner(arg0 uint32) (uint32, error) {
return _Contribution.Contract.ContributionOwner(&_Contribution.CallOpts, arg0)
}
// ContributionOwner is a free data retrieval call binding the contract method 0xb6c5883f.
//
// Solidity: function contributionOwner(uint32 ) view returns(uint32)
func (_Contribution *ContributionCallerSession) ContributionOwner(arg0 uint32) (uint32, error) {
return _Contribution.Contract.ContributionOwner(&_Contribution.CallOpts, arg0)
}
// Contributions is a free data retrieval call binding the contract method 0xc4ff91bd.
//
// Solidity: function contributions(uint32 ) view returns(uint32 contributorId, uint32 amount, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize, string tokenMetadataURL, uint256 confirmedAtBlock, bool vetoed, bool exists)
func (_Contribution *ContributionCaller) Contributions(opts *bind.CallOpts, arg0 uint32) (struct {
ContributorId uint32
Amount uint32
HashDigest [32]byte
HashFunction uint8
HashSize uint8
TokenMetadataURL string
ConfirmedAtBlock *big.Int
Vetoed bool
Exists bool
}, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "contributions", arg0)
outstruct := new(struct {
ContributorId uint32
Amount uint32
HashDigest [32]byte
HashFunction uint8
HashSize uint8
TokenMetadataURL string
ConfirmedAtBlock *big.Int
Vetoed bool
Exists bool
})
if err != nil {
return *outstruct, err
}
outstruct.ContributorId = *abi.ConvertType(out[0], new(uint32)).(*uint32)
outstruct.Amount = *abi.ConvertType(out[1], new(uint32)).(*uint32)
outstruct.HashDigest = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte)
outstruct.HashFunction = *abi.ConvertType(out[3], new(uint8)).(*uint8)
outstruct.HashSize = *abi.ConvertType(out[4], new(uint8)).(*uint8)
outstruct.TokenMetadataURL = *abi.ConvertType(out[5], new(string)).(*string)
outstruct.ConfirmedAtBlock = *abi.ConvertType(out[6], new(*big.Int)).(**big.Int)
outstruct.Vetoed = *abi.ConvertType(out[7], new(bool)).(*bool)
outstruct.Exists = *abi.ConvertType(out[8], new(bool)).(*bool)
return *outstruct, err
}
// Contributions is a free data retrieval call binding the contract method 0xc4ff91bd.
//
// Solidity: function contributions(uint32 ) view returns(uint32 contributorId, uint32 amount, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize, string tokenMetadataURL, uint256 confirmedAtBlock, bool vetoed, bool exists)
func (_Contribution *ContributionSession) Contributions(arg0 uint32) (struct {
ContributorId uint32
Amount uint32
HashDigest [32]byte
HashFunction uint8
HashSize uint8
TokenMetadataURL string
ConfirmedAtBlock *big.Int
Vetoed bool
Exists bool
}, error) {
return _Contribution.Contract.Contributions(&_Contribution.CallOpts, arg0)
}
// Contributions is a free data retrieval call binding the contract method 0xc4ff91bd.
//
// Solidity: function contributions(uint32 ) view returns(uint32 contributorId, uint32 amount, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize, string tokenMetadataURL, uint256 confirmedAtBlock, bool vetoed, bool exists)
func (_Contribution *ContributionCallerSession) Contributions(arg0 uint32) (struct {
ContributorId uint32
Amount uint32
HashDigest [32]byte
HashFunction uint8
HashSize uint8
TokenMetadataURL string
ConfirmedAtBlock *big.Int
Vetoed bool
Exists bool
}, error) {
return _Contribution.Contract.Contributions(&_Contribution.CallOpts, arg0)
}
// ContributionsCount is a free data retrieval call binding the contract method 0x38658175.
//
// Solidity: function contributionsCount() view returns(uint32)
func (_Contribution *ContributionCaller) ContributionsCount(opts *bind.CallOpts) (uint32, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "contributionsCount")
if err != nil {
return *new(uint32), err
}
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32)
return out0, err
}
// ContributionsCount is a free data retrieval call binding the contract method 0x38658175.
//
// Solidity: function contributionsCount() view returns(uint32)
func (_Contribution *ContributionSession) ContributionsCount() (uint32, error) {
return _Contribution.Contract.ContributionsCount(&_Contribution.CallOpts)
}
// ContributionsCount is a free data retrieval call binding the contract method 0x38658175.
//
// Solidity: function contributionsCount() view returns(uint32)
func (_Contribution *ContributionCallerSession) ContributionsCount() (uint32, error) {
return _Contribution.Contract.ContributionsCount(&_Contribution.CallOpts)
}
// ContributorContract is a free data retrieval call binding the contract method 0x7b8917d1.
//
// Solidity: function contributorContract() view returns(address)
func (_Contribution *ContributionCaller) ContributorContract(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "contributorContract")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// ContributorContract is a free data retrieval call binding the contract method 0x7b8917d1.
//
// Solidity: function contributorContract() view returns(address)
func (_Contribution *ContributionSession) ContributorContract() (common.Address, error) {
return _Contribution.Contract.ContributorContract(&_Contribution.CallOpts)
}
// ContributorContract is a free data retrieval call binding the contract method 0x7b8917d1.
//
// Solidity: function contributorContract() view returns(address)
func (_Contribution *ContributionCallerSession) ContributorContract() (common.Address, error) {
return _Contribution.Contract.ContributorContract(&_Contribution.CallOpts)
}
// Deployer is a free data retrieval call binding the contract method 0xd5f39488.
//
// Solidity: function deployer() view returns(address)
func (_Contribution *ContributionCaller) Deployer(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "deployer")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Deployer is a free data retrieval call binding the contract method 0xd5f39488.
//
// Solidity: function deployer() view returns(address)
func (_Contribution *ContributionSession) Deployer() (common.Address, error) {
return _Contribution.Contract.Deployer(&_Contribution.CallOpts)
}
// Deployer is a free data retrieval call binding the contract method 0xd5f39488.
//
// Solidity: function deployer() view returns(address)
func (_Contribution *ContributionCallerSession) Deployer() (common.Address, error) {
return _Contribution.Contract.Deployer(&_Contribution.CallOpts)
}
// Exists is a free data retrieval call binding the contract method 0x13c369ed.
//
// Solidity: function exists(uint32 contributionId) view returns(bool)
func (_Contribution *ContributionCaller) Exists(opts *bind.CallOpts, contributionId uint32) (bool, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "exists", contributionId)
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// Exists is a free data retrieval call binding the contract method 0x13c369ed.
//
// Solidity: function exists(uint32 contributionId) view returns(bool)
func (_Contribution *ContributionSession) Exists(contributionId uint32) (bool, error) {
return _Contribution.Contract.Exists(&_Contribution.CallOpts, contributionId)
}
// Exists is a free data retrieval call binding the contract method 0x13c369ed.
//
// Solidity: function exists(uint32 contributionId) view returns(bool)
func (_Contribution *ContributionCallerSession) Exists(contributionId uint32) (bool, error) {
return _Contribution.Contract.Exists(&_Contribution.CallOpts, contributionId)
}
// GetContribution is a free data retrieval call binding the contract method 0x9eb20b86.
//
// Solidity: function getContribution(uint32 contributionId) view returns(uint32 id, uint32 contributorId, uint32 amount, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize, uint256 confirmedAtBlock, bool exists, bool vetoed)
func (_Contribution *ContributionCaller) GetContribution(opts *bind.CallOpts, contributionId uint32) (struct {
Id uint32
ContributorId uint32
Amount uint32
HashDigest [32]byte
HashFunction uint8
HashSize uint8
ConfirmedAtBlock *big.Int
Exists bool
Vetoed bool
}, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "getContribution", contributionId)
outstruct := new(struct {
Id uint32
ContributorId uint32
Amount uint32
HashDigest [32]byte
HashFunction uint8
HashSize uint8
ConfirmedAtBlock *big.Int
Exists bool
Vetoed bool
})
if err != nil {
return *outstruct, err
}
outstruct.Id = *abi.ConvertType(out[0], new(uint32)).(*uint32)
outstruct.ContributorId = *abi.ConvertType(out[1], new(uint32)).(*uint32)
outstruct.Amount = *abi.ConvertType(out[2], new(uint32)).(*uint32)
outstruct.HashDigest = *abi.ConvertType(out[3], new([32]byte)).(*[32]byte)
outstruct.HashFunction = *abi.ConvertType(out[4], new(uint8)).(*uint8)
outstruct.HashSize = *abi.ConvertType(out[5], new(uint8)).(*uint8)
outstruct.ConfirmedAtBlock = *abi.ConvertType(out[6], new(*big.Int)).(**big.Int)
outstruct.Exists = *abi.ConvertType(out[7], new(bool)).(*bool)
outstruct.Vetoed = *abi.ConvertType(out[8], new(bool)).(*bool)
return *outstruct, err
}
// GetContribution is a free data retrieval call binding the contract method 0x9eb20b86.
//
// Solidity: function getContribution(uint32 contributionId) view returns(uint32 id, uint32 contributorId, uint32 amount, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize, uint256 confirmedAtBlock, bool exists, bool vetoed)
func (_Contribution *ContributionSession) GetContribution(contributionId uint32) (struct {
Id uint32
ContributorId uint32
Amount uint32
HashDigest [32]byte
HashFunction uint8
HashSize uint8
ConfirmedAtBlock *big.Int
Exists bool
Vetoed bool
}, error) {
return _Contribution.Contract.GetContribution(&_Contribution.CallOpts, contributionId)
}
// GetContribution is a free data retrieval call binding the contract method 0x9eb20b86.
//
// Solidity: function getContribution(uint32 contributionId) view returns(uint32 id, uint32 contributorId, uint32 amount, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize, uint256 confirmedAtBlock, bool exists, bool vetoed)
func (_Contribution *ContributionCallerSession) GetContribution(contributionId uint32) (struct {
Id uint32
ContributorId uint32
Amount uint32
HashDigest [32]byte
HashFunction uint8
HashSize uint8
ConfirmedAtBlock *big.Int
Exists bool
Vetoed bool
}, error) {
return _Contribution.Contract.GetContribution(&_Contribution.CallOpts, contributionId)
}
// GetContributorAddressById is a free data retrieval call binding the contract method 0x27266309.
//
// Solidity: function getContributorAddressById(uint32 contributorId) view returns(address)
func (_Contribution *ContributionCaller) GetContributorAddressById(opts *bind.CallOpts, contributorId uint32) (common.Address, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "getContributorAddressById", contributorId)
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// GetContributorAddressById is a free data retrieval call binding the contract method 0x27266309.
//
// Solidity: function getContributorAddressById(uint32 contributorId) view returns(address)
func (_Contribution *ContributionSession) GetContributorAddressById(contributorId uint32) (common.Address, error) {
return _Contribution.Contract.GetContributorAddressById(&_Contribution.CallOpts, contributorId)
}
// GetContributorAddressById is a free data retrieval call binding the contract method 0x27266309.
//
// Solidity: function getContributorAddressById(uint32 contributorId) view returns(address)
func (_Contribution *ContributionCallerSession) GetContributorAddressById(contributorId uint32) (common.Address, error) {
return _Contribution.Contract.GetContributorAddressById(&_Contribution.CallOpts, contributorId)
}
// GetContributorIdByAddress is a free data retrieval call binding the contract method 0x28dcb8f2.
//
// Solidity: function getContributorIdByAddress(address contributorAccount) view returns(uint32)
func (_Contribution *ContributionCaller) GetContributorIdByAddress(opts *bind.CallOpts, contributorAccount common.Address) (uint32, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "getContributorIdByAddress", contributorAccount)
if err != nil {
return *new(uint32), err
}
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32)
return out0, err
}
// GetContributorIdByAddress is a free data retrieval call binding the contract method 0x28dcb8f2.
//
// Solidity: function getContributorIdByAddress(address contributorAccount) view returns(uint32)
func (_Contribution *ContributionSession) GetContributorIdByAddress(contributorAccount common.Address) (uint32, error) {
return _Contribution.Contract.GetContributorIdByAddress(&_Contribution.CallOpts, contributorAccount)
}
// GetContributorIdByAddress is a free data retrieval call binding the contract method 0x28dcb8f2.
//
// Solidity: function getContributorIdByAddress(address contributorAccount) view returns(uint32)
func (_Contribution *ContributionCallerSession) GetContributorIdByAddress(contributorAccount common.Address) (uint32, error) {
return _Contribution.Contract.GetContributorIdByAddress(&_Contribution.CallOpts, contributorAccount)
}
// MigrationDone is a free data retrieval call binding the contract method 0x0d81a570.
//
// Solidity: function migrationDone() view returns(bool)
func (_Contribution *ContributionCaller) MigrationDone(opts *bind.CallOpts) (bool, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "migrationDone")
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// MigrationDone is a free data retrieval call binding the contract method 0x0d81a570.
//
// Solidity: function migrationDone() view returns(bool)
func (_Contribution *ContributionSession) MigrationDone() (bool, error) {
return _Contribution.Contract.MigrationDone(&_Contribution.CallOpts)
}
// MigrationDone is a free data retrieval call binding the contract method 0x0d81a570.
//
// Solidity: function migrationDone() view returns(bool)
func (_Contribution *ContributionCallerSession) MigrationDone() (bool, error) {
return _Contribution.Contract.MigrationDone(&_Contribution.CallOpts)
}
// Name is a free data retrieval call binding the contract method 0x06fdde03.
//
// Solidity: function name() view returns(string)
func (_Contribution *ContributionCaller) Name(opts *bind.CallOpts) (string, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "name")
if err != nil {
return *new(string), err
}
out0 := *abi.ConvertType(out[0], new(string)).(*string)
return out0, err
}
// Name is a free data retrieval call binding the contract method 0x06fdde03.
//
// Solidity: function name() view returns(string)
func (_Contribution *ContributionSession) Name() (string, error) {
return _Contribution.Contract.Name(&_Contribution.CallOpts)
}
// Name is a free data retrieval call binding the contract method 0x06fdde03.
//
// Solidity: function name() view returns(string)
func (_Contribution *ContributionCallerSession) Name() (string, error) {
return _Contribution.Contract.Name(&_Contribution.CallOpts)
}
// OwnedContributions is a free data retrieval call binding the contract method 0xca38968f.
//
// Solidity: function ownedContributions(uint32 , uint256 ) view returns(uint32)
func (_Contribution *ContributionCaller) OwnedContributions(opts *bind.CallOpts, arg0 uint32, arg1 *big.Int) (uint32, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "ownedContributions", arg0, arg1)
if err != nil {
return *new(uint32), err
}
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32)
return out0, err
}
// OwnedContributions is a free data retrieval call binding the contract method 0xca38968f.
//
// Solidity: function ownedContributions(uint32 , uint256 ) view returns(uint32)
func (_Contribution *ContributionSession) OwnedContributions(arg0 uint32, arg1 *big.Int) (uint32, error) {
return _Contribution.Contract.OwnedContributions(&_Contribution.CallOpts, arg0, arg1)
}
// OwnedContributions is a free data retrieval call binding the contract method 0xca38968f.
//
// Solidity: function ownedContributions(uint32 , uint256 ) view returns(uint32)
func (_Contribution *ContributionCallerSession) OwnedContributions(arg0 uint32, arg1 *big.Int) (uint32, error) {
return _Contribution.Contract.OwnedContributions(&_Contribution.CallOpts, arg0, arg1)
}
// OwnerOf is a free data retrieval call binding the contract method 0x23b7ec3b.
//
// Solidity: function ownerOf(uint32 contributionId) view returns(address)
func (_Contribution *ContributionCaller) OwnerOf(opts *bind.CallOpts, contributionId uint32) (common.Address, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "ownerOf", contributionId)
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// OwnerOf is a free data retrieval call binding the contract method 0x23b7ec3b.
//
// Solidity: function ownerOf(uint32 contributionId) view returns(address)
func (_Contribution *ContributionSession) OwnerOf(contributionId uint32) (common.Address, error) {
return _Contribution.Contract.OwnerOf(&_Contribution.CallOpts, contributionId)
}
// OwnerOf is a free data retrieval call binding the contract method 0x23b7ec3b.
//
// Solidity: function ownerOf(uint32 contributionId) view returns(address)
func (_Contribution *ContributionCallerSession) OwnerOf(contributionId uint32) (common.Address, error) {
return _Contribution.Contract.OwnerOf(&_Contribution.CallOpts, contributionId)
}
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
//
// Solidity: function symbol() view returns(string)
func (_Contribution *ContributionCaller) Symbol(opts *bind.CallOpts) (string, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "symbol")
if err != nil {
return *new(string), err
}
out0 := *abi.ConvertType(out[0], new(string)).(*string)
return out0, err
}
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
//
// Solidity: function symbol() view returns(string)
func (_Contribution *ContributionSession) Symbol() (string, error) {
return _Contribution.Contract.Symbol(&_Contribution.CallOpts)
}
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
//
// Solidity: function symbol() view returns(string)
func (_Contribution *ContributionCallerSession) Symbol() (string, error) {
return _Contribution.Contract.Symbol(&_Contribution.CallOpts)
}
// TokenMetadata is a free data retrieval call binding the contract method 0x884a5b00.
//
// Solidity: function tokenMetadata(uint32 contributionId) view returns(string)
func (_Contribution *ContributionCaller) TokenMetadata(opts *bind.CallOpts, contributionId uint32) (string, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "tokenMetadata", contributionId)
if err != nil {
return *new(string), err
}
out0 := *abi.ConvertType(out[0], new(string)).(*string)
return out0, err
}
// TokenMetadata is a free data retrieval call binding the contract method 0x884a5b00.
//
// Solidity: function tokenMetadata(uint32 contributionId) view returns(string)
func (_Contribution *ContributionSession) TokenMetadata(contributionId uint32) (string, error) {
return _Contribution.Contract.TokenMetadata(&_Contribution.CallOpts, contributionId)
}
// TokenMetadata is a free data retrieval call binding the contract method 0x884a5b00.
//
// Solidity: function tokenMetadata(uint32 contributionId) view returns(string)
func (_Contribution *ContributionCallerSession) TokenMetadata(contributionId uint32) (string, error) {
return _Contribution.Contract.TokenMetadata(&_Contribution.CallOpts, contributionId)
}
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x690942d2.
//
// Solidity: function tokenOfOwnerByIndex(address owner, uint32 index) view returns(uint32)
func (_Contribution *ContributionCaller) TokenOfOwnerByIndex(opts *bind.CallOpts, owner common.Address, index uint32) (uint32, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "tokenOfOwnerByIndex", owner, index)
if err != nil {
return *new(uint32), err
}
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32)
return out0, err
}
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x690942d2.
//
// Solidity: function tokenOfOwnerByIndex(address owner, uint32 index) view returns(uint32)
func (_Contribution *ContributionSession) TokenOfOwnerByIndex(owner common.Address, index uint32) (uint32, error) {
return _Contribution.Contract.TokenOfOwnerByIndex(&_Contribution.CallOpts, owner, index)
}
// TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x690942d2.
//
// Solidity: function tokenOfOwnerByIndex(address owner, uint32 index) view returns(uint32)
func (_Contribution *ContributionCallerSession) TokenOfOwnerByIndex(owner common.Address, index uint32) (uint32, error) {
return _Contribution.Contract.TokenOfOwnerByIndex(&_Contribution.CallOpts, owner, index)
}
// TotalKreditsEarned is a free data retrieval call binding the contract method 0x15864c3d.
//
// Solidity: function totalKreditsEarned(bool confirmedOnly) view returns(uint32 amount)
func (_Contribution *ContributionCaller) TotalKreditsEarned(opts *bind.CallOpts, confirmedOnly bool) (uint32, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "totalKreditsEarned", confirmedOnly)
if err != nil {
return *new(uint32), err
}
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32)
return out0, err
}
// TotalKreditsEarned is a free data retrieval call binding the contract method 0x15864c3d.
//
// Solidity: function totalKreditsEarned(bool confirmedOnly) view returns(uint32 amount)
func (_Contribution *ContributionSession) TotalKreditsEarned(confirmedOnly bool) (uint32, error) {
return _Contribution.Contract.TotalKreditsEarned(&_Contribution.CallOpts, confirmedOnly)
}
// TotalKreditsEarned is a free data retrieval call binding the contract method 0x15864c3d.
//
// Solidity: function totalKreditsEarned(bool confirmedOnly) view returns(uint32 amount)
func (_Contribution *ContributionCallerSession) TotalKreditsEarned(confirmedOnly bool) (uint32, error) {
return _Contribution.Contract.TotalKreditsEarned(&_Contribution.CallOpts, confirmedOnly)
}
// TotalKreditsEarnedByContributor is a free data retrieval call binding the contract method 0x02cc3cfa.
//
// Solidity: function totalKreditsEarnedByContributor(uint32 contributorId, bool confirmedOnly) view returns(uint32 amount)
func (_Contribution *ContributionCaller) TotalKreditsEarnedByContributor(opts *bind.CallOpts, contributorId uint32, confirmedOnly bool) (uint32, error) {
var out []interface{}
err := _Contribution.contract.Call(opts, &out, "totalKreditsEarnedByContributor", contributorId, confirmedOnly)
if err != nil {
return *new(uint32), err
}
out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32)
return out0, err
}
// TotalKreditsEarnedByContributor is a free data retrieval call binding the contract method 0x02cc3cfa.
//
// Solidity: function totalKreditsEarnedByContributor(uint32 contributorId, bool confirmedOnly) view returns(uint32 amount)
func (_Contribution *ContributionSession) TotalKreditsEarnedByContributor(contributorId uint32, confirmedOnly bool) (uint32, error) {
return _Contribution.Contract.TotalKreditsEarnedByContributor(&_Contribution.CallOpts, contributorId, confirmedOnly)
}
// TotalKreditsEarnedByContributor is a free data retrieval call binding the contract method 0x02cc3cfa.
//
// Solidity: function totalKreditsEarnedByContributor(uint32 contributorId, bool confirmedOnly) view returns(uint32 amount)
func (_Contribution *ContributionCallerSession) TotalKreditsEarnedByContributor(contributorId uint32, confirmedOnly bool) (uint32, error) {
return _Contribution.Contract.TotalKreditsEarnedByContributor(&_Contribution.CallOpts, contributorId, confirmedOnly)
}
// Add is a paid mutator transaction binding the contract method 0x565075ce.
//
// Solidity: function add(uint32 amount, uint32 contributorId, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize, uint256 confirmedAtBlock, bool vetoed) returns()
func (_Contribution *ContributionTransactor) Add(opts *bind.TransactOpts, amount uint32, contributorId uint32, hashDigest [32]byte, hashFunction uint8, hashSize uint8, confirmedAtBlock *big.Int, vetoed bool) (*types.Transaction, error) {
return _Contribution.contract.Transact(opts, "add", amount, contributorId, hashDigest, hashFunction, hashSize, confirmedAtBlock, vetoed)
}
// Add is a paid mutator transaction binding the contract method 0x565075ce.
//
// Solidity: function add(uint32 amount, uint32 contributorId, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize, uint256 confirmedAtBlock, bool vetoed) returns()
func (_Contribution *ContributionSession) Add(amount uint32, contributorId uint32, hashDigest [32]byte, hashFunction uint8, hashSize uint8, confirmedAtBlock *big.Int, vetoed bool) (*types.Transaction, error) {
return _Contribution.Contract.Add(&_Contribution.TransactOpts, amount, contributorId, hashDigest, hashFunction, hashSize, confirmedAtBlock, vetoed)
}
// Add is a paid mutator transaction binding the contract method 0x565075ce.
//
// Solidity: function add(uint32 amount, uint32 contributorId, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize, uint256 confirmedAtBlock, bool vetoed) returns()
func (_Contribution *ContributionTransactorSession) Add(amount uint32, contributorId uint32, hashDigest [32]byte, hashFunction uint8, hashSize uint8, confirmedAtBlock *big.Int, vetoed bool) (*types.Transaction, error) {
return _Contribution.Contract.Add(&_Contribution.TransactOpts, amount, contributorId, hashDigest, hashFunction, hashSize, confirmedAtBlock, vetoed)
}
// FinishMigration is a paid mutator transaction binding the contract method 0x88d761f2.
//
// Solidity: function finishMigration() returns()
func (_Contribution *ContributionTransactor) FinishMigration(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Contribution.contract.Transact(opts, "finishMigration")
}
// FinishMigration is a paid mutator transaction binding the contract method 0x88d761f2.
//
// Solidity: function finishMigration() returns()
func (_Contribution *ContributionSession) FinishMigration() (*types.Transaction, error) {
return _Contribution.Contract.FinishMigration(&_Contribution.TransactOpts)
}
// FinishMigration is a paid mutator transaction binding the contract method 0x88d761f2.
//
// Solidity: function finishMigration() returns()
func (_Contribution *ContributionTransactorSession) FinishMigration() (*types.Transaction, error) {
return _Contribution.Contract.FinishMigration(&_Contribution.TransactOpts)
}
// Initialize is a paid mutator transaction binding the contract method 0x8d8965bd.
//
// Solidity: function initialize(uint32 blocksToWait_) returns()
func (_Contribution *ContributionTransactor) Initialize(opts *bind.TransactOpts, blocksToWait_ uint32) (*types.Transaction, error) {
return _Contribution.contract.Transact(opts, "initialize", blocksToWait_)
}
// Initialize is a paid mutator transaction binding the contract method 0x8d8965bd.
//
// Solidity: function initialize(uint32 blocksToWait_) returns()
func (_Contribution *ContributionSession) Initialize(blocksToWait_ uint32) (*types.Transaction, error) {
return _Contribution.Contract.Initialize(&_Contribution.TransactOpts, blocksToWait_)
}
// Initialize is a paid mutator transaction binding the contract method 0x8d8965bd.
//
// Solidity: function initialize(uint32 blocksToWait_) returns()
func (_Contribution *ContributionTransactorSession) Initialize(blocksToWait_ uint32) (*types.Transaction, error) {
return _Contribution.Contract.Initialize(&_Contribution.TransactOpts, blocksToWait_)
}
// SetContributorContract is a paid mutator transaction binding the contract method 0xdc08776d.
//
// Solidity: function setContributorContract(address contributor) returns()
func (_Contribution *ContributionTransactor) SetContributorContract(opts *bind.TransactOpts, contributor common.Address) (*types.Transaction, error) {
return _Contribution.contract.Transact(opts, "setContributorContract", contributor)
}
// SetContributorContract is a paid mutator transaction binding the contract method 0xdc08776d.
//
// Solidity: function setContributorContract(address contributor) returns()
func (_Contribution *ContributionSession) SetContributorContract(contributor common.Address) (*types.Transaction, error) {
return _Contribution.Contract.SetContributorContract(&_Contribution.TransactOpts, contributor)
}
// SetContributorContract is a paid mutator transaction binding the contract method 0xdc08776d.
//
// Solidity: function setContributorContract(address contributor) returns()
func (_Contribution *ContributionTransactorSession) SetContributorContract(contributor common.Address) (*types.Transaction, error) {
return _Contribution.Contract.SetContributorContract(&_Contribution.TransactOpts, contributor)
}
// Veto is a paid mutator transaction binding the contract method 0xae02f94e.
//
// Solidity: function veto(uint32 contributionId) returns()
func (_Contribution *ContributionTransactor) Veto(opts *bind.TransactOpts, contributionId uint32) (*types.Transaction, error) {
return _Contribution.contract.Transact(opts, "veto", contributionId)
}
// Veto is a paid mutator transaction binding the contract method 0xae02f94e.
//
// Solidity: function veto(uint32 contributionId) returns()
func (_Contribution *ContributionSession) Veto(contributionId uint32) (*types.Transaction, error) {
return _Contribution.Contract.Veto(&_Contribution.TransactOpts, contributionId)
}
// Veto is a paid mutator transaction binding the contract method 0xae02f94e.
//
// Solidity: function veto(uint32 contributionId) returns()
func (_Contribution *ContributionTransactorSession) Veto(contributionId uint32) (*types.Transaction, error) {
return _Contribution.Contract.Veto(&_Contribution.TransactOpts, contributionId)
}
// ContributionContributionAddedIterator is returned from FilterContributionAdded and is used to iterate over the raw logs and unpacked data for ContributionAdded events raised by the Contribution contract.
type ContributionContributionAddedIterator struct {
Event *ContributionContributionAdded // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// 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.
func (it *ContributionContributionAddedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(ContributionContributionAdded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(ContributionContributionAdded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *ContributionContributionAddedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *ContributionContributionAddedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// ContributionContributionAdded represents a ContributionAdded event raised by the Contribution contract.
type ContributionContributionAdded struct {
Id uint32
ContributorId uint32
Amount uint32
Raw types.Log // Blockchain specific contextual infos
}
// FilterContributionAdded is a free log retrieval operation binding the contract event 0x2c823389cf5f7448115ce6507d185cb6ce8390e3433f5fe31aace1199aba8481.
//
// Solidity: event ContributionAdded(uint32 id, uint32 indexed contributorId, uint32 amount)
func (_Contribution *ContributionFilterer) FilterContributionAdded(opts *bind.FilterOpts, contributorId []uint32) (*ContributionContributionAddedIterator, error) {
var contributorIdRule []interface{}
for _, contributorIdItem := range contributorId {
contributorIdRule = append(contributorIdRule, contributorIdItem)
}
logs, sub, err := _Contribution.contract.FilterLogs(opts, "ContributionAdded", contributorIdRule)
if err != nil {
return nil, err
}
return &ContributionContributionAddedIterator{contract: _Contribution.contract, event: "ContributionAdded", logs: logs, sub: sub}, nil
}
// WatchContributionAdded is a free log subscription operation binding the contract event 0x2c823389cf5f7448115ce6507d185cb6ce8390e3433f5fe31aace1199aba8481.
//
// Solidity: event ContributionAdded(uint32 id, uint32 indexed contributorId, uint32 amount)
func (_Contribution *ContributionFilterer) WatchContributionAdded(opts *bind.WatchOpts, sink chan<- *ContributionContributionAdded, contributorId []uint32) (event.Subscription, error) {
var contributorIdRule []interface{}
for _, contributorIdItem := range contributorId {
contributorIdRule = append(contributorIdRule, contributorIdItem)
}
logs, sub, err := _Contribution.contract.WatchLogs(opts, "ContributionAdded", contributorIdRule)
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(ContributionContributionAdded)
if err := _Contribution.contract.UnpackLog(event, "ContributionAdded", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseContributionAdded is a log parse operation binding the contract event 0x2c823389cf5f7448115ce6507d185cb6ce8390e3433f5fe31aace1199aba8481.
//
// Solidity: event ContributionAdded(uint32 id, uint32 indexed contributorId, uint32 amount)
func (_Contribution *ContributionFilterer) ParseContributionAdded(log types.Log) (*ContributionContributionAdded, error) {
event := new(ContributionContributionAdded)
if err := _Contribution.contract.UnpackLog(event, "ContributionAdded", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// ContributionContributionVetoedIterator is returned from FilterContributionVetoed and is used to iterate over the raw logs and unpacked data for ContributionVetoed events raised by the Contribution contract.
type ContributionContributionVetoedIterator struct {
Event *ContributionContributionVetoed // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// 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.
func (it *ContributionContributionVetoedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(ContributionContributionVetoed)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(ContributionContributionVetoed)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *ContributionContributionVetoedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *ContributionContributionVetoedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// ContributionContributionVetoed represents a ContributionVetoed event raised by the Contribution contract.
type ContributionContributionVetoed struct {
Id uint32
VetoedByAccount common.Address
Raw types.Log // Blockchain specific contextual infos
}
// FilterContributionVetoed is a free log retrieval operation binding the contract event 0x44ada7c00d44a7df790a576f0e6037c634def2424163246d5492ecb734cc214e.
//
// Solidity: event ContributionVetoed(uint32 id, address vetoedByAccount)
func (_Contribution *ContributionFilterer) FilterContributionVetoed(opts *bind.FilterOpts) (*ContributionContributionVetoedIterator, error) {
logs, sub, err := _Contribution.contract.FilterLogs(opts, "ContributionVetoed")
if err != nil {
return nil, err
}
return &ContributionContributionVetoedIterator{contract: _Contribution.contract, event: "ContributionVetoed", logs: logs, sub: sub}, nil
}
// WatchContributionVetoed is a free log subscription operation binding the contract event 0x44ada7c00d44a7df790a576f0e6037c634def2424163246d5492ecb734cc214e.
//
// Solidity: event ContributionVetoed(uint32 id, address vetoedByAccount)
func (_Contribution *ContributionFilterer) WatchContributionVetoed(opts *bind.WatchOpts, sink chan<- *ContributionContributionVetoed) (event.Subscription, error) {
logs, sub, err := _Contribution.contract.WatchLogs(opts, "ContributionVetoed")
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(ContributionContributionVetoed)
if err := _Contribution.contract.UnpackLog(event, "ContributionVetoed", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseContributionVetoed is a log parse operation binding the contract event 0x44ada7c00d44a7df790a576f0e6037c634def2424163246d5492ecb734cc214e.
//
// Solidity: event ContributionVetoed(uint32 id, address vetoedByAccount)
func (_Contribution *ContributionFilterer) ParseContributionVetoed(log types.Log) (*ContributionContributionVetoed, error) {
event := new(ContributionContributionVetoed)
if err := _Contribution.contract.UnpackLog(event, "ContributionVetoed", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}