// Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. package token 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 ) // TokenMetaData contains all meta data concerning the Token contract. var TokenMetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"KreditsMinted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"contributorContract\",\"outputs\":[{\"internalType\":\"contractContributorInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"contributorContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contributorAccount\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mintFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"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\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // TokenABI is the input ABI used to generate the binding from. // Deprecated: Use TokenMetaData.ABI instead. var TokenABI = TokenMetaData.ABI // Token is an auto generated Go binding around an Ethereum contract. type Token struct { TokenCaller // Read-only binding to the contract TokenTransactor // Write-only binding to the contract TokenFilterer // Log filterer for contract events } // TokenCaller is an auto generated read-only Go binding around an Ethereum contract. type TokenCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // TokenTransactor is an auto generated write-only Go binding around an Ethereum contract. type TokenTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // TokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. type TokenFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // TokenSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type TokenSession struct { Contract *Token // 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 } // TokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type TokenCallerSession struct { Contract *TokenCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // TokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type TokenTransactorSession struct { Contract *TokenTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // TokenRaw is an auto generated low-level Go binding around an Ethereum contract. type TokenRaw struct { Contract *Token // Generic contract binding to access the raw methods on } // TokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type TokenCallerRaw struct { Contract *TokenCaller // Generic read-only contract binding to access the raw methods on } // TokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type TokenTransactorRaw struct { Contract *TokenTransactor // Generic write-only contract binding to access the raw methods on } // NewToken creates a new instance of Token, bound to a specific deployed contract. func NewToken(address common.Address, backend bind.ContractBackend) (*Token, error) { contract, err := bindToken(address, backend, backend, backend) if err != nil { return nil, err } return &Token{TokenCaller: TokenCaller{contract: contract}, TokenTransactor: TokenTransactor{contract: contract}, TokenFilterer: TokenFilterer{contract: contract}}, nil } // NewTokenCaller creates a new read-only instance of Token, bound to a specific deployed contract. func NewTokenCaller(address common.Address, caller bind.ContractCaller) (*TokenCaller, error) { contract, err := bindToken(address, caller, nil, nil) if err != nil { return nil, err } return &TokenCaller{contract: contract}, nil } // NewTokenTransactor creates a new write-only instance of Token, bound to a specific deployed contract. func NewTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*TokenTransactor, error) { contract, err := bindToken(address, nil, transactor, nil) if err != nil { return nil, err } return &TokenTransactor{contract: contract}, nil } // NewTokenFilterer creates a new log filterer instance of Token, bound to a specific deployed contract. func NewTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*TokenFilterer, error) { contract, err := bindToken(address, nil, nil, filterer) if err != nil { return nil, err } return &TokenFilterer{contract: contract}, nil } // bindToken binds a generic wrapper to an already deployed contract. func bindToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := abi.JSON(strings.NewReader(TokenABI)) 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 (_Token *TokenRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Token.Contract.TokenCaller.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 (_Token *TokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _Token.Contract.TokenTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_Token *TokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _Token.Contract.TokenTransactor.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 (_Token *TokenCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Token.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 (_Token *TokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _Token.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_Token *TokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _Token.Contract.contract.Transact(opts, method, params...) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_Token *TokenCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { var out []interface{} err := _Token.contract.Call(opts, &out, "allowance", owner, spender) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_Token *TokenSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _Token.Contract.Allowance(&_Token.CallOpts, owner, spender) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) func (_Token *TokenCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _Token.Contract.Allowance(&_Token.CallOpts, owner, spender) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_Token *TokenCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { var out []interface{} err := _Token.contract.Call(opts, &out, "balanceOf", account) 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 account) view returns(uint256) func (_Token *TokenSession) BalanceOf(account common.Address) (*big.Int, error) { return _Token.Contract.BalanceOf(&_Token.CallOpts, account) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) func (_Token *TokenCallerSession) BalanceOf(account common.Address) (*big.Int, error) { return _Token.Contract.BalanceOf(&_Token.CallOpts, account) } // ContributorContract is a free data retrieval call binding the contract method 0x7b8917d1. // // Solidity: function contributorContract() view returns(address) func (_Token *TokenCaller) ContributorContract(opts *bind.CallOpts) (common.Address, error) { var out []interface{} err := _Token.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 (_Token *TokenSession) ContributorContract() (common.Address, error) { return _Token.Contract.ContributorContract(&_Token.CallOpts) } // ContributorContract is a free data retrieval call binding the contract method 0x7b8917d1. // // Solidity: function contributorContract() view returns(address) func (_Token *TokenCallerSession) ContributorContract() (common.Address, error) { return _Token.Contract.ContributorContract(&_Token.CallOpts) } // ContributorContractAddress is a free data retrieval call binding the contract method 0x2d5fa841. // // Solidity: function contributorContractAddress() view returns(address) func (_Token *TokenCaller) ContributorContractAddress(opts *bind.CallOpts) (common.Address, error) { var out []interface{} err := _Token.contract.Call(opts, &out, "contributorContractAddress") if err != nil { return *new(common.Address), err } out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) return out0, err } // ContributorContractAddress is a free data retrieval call binding the contract method 0x2d5fa841. // // Solidity: function contributorContractAddress() view returns(address) func (_Token *TokenSession) ContributorContractAddress() (common.Address, error) { return _Token.Contract.ContributorContractAddress(&_Token.CallOpts) } // ContributorContractAddress is a free data retrieval call binding the contract method 0x2d5fa841. // // Solidity: function contributorContractAddress() view returns(address) func (_Token *TokenCallerSession) ContributorContractAddress() (common.Address, error) { return _Token.Contract.ContributorContractAddress(&_Token.CallOpts) } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) func (_Token *TokenCaller) Decimals(opts *bind.CallOpts) (uint8, error) { var out []interface{} err := _Token.contract.Call(opts, &out, "decimals") if err != nil { return *new(uint8), err } out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) return out0, err } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) func (_Token *TokenSession) Decimals() (uint8, error) { return _Token.Contract.Decimals(&_Token.CallOpts) } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) func (_Token *TokenCallerSession) Decimals() (uint8, error) { return _Token.Contract.Decimals(&_Token.CallOpts) } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) func (_Token *TokenCaller) Name(opts *bind.CallOpts) (string, error) { var out []interface{} err := _Token.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 (_Token *TokenSession) Name() (string, error) { return _Token.Contract.Name(&_Token.CallOpts) } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) func (_Token *TokenCallerSession) Name() (string, error) { return _Token.Contract.Name(&_Token.CallOpts) } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) func (_Token *TokenCaller) Symbol(opts *bind.CallOpts) (string, error) { var out []interface{} err := _Token.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 (_Token *TokenSession) Symbol() (string, error) { return _Token.Contract.Symbol(&_Token.CallOpts) } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) func (_Token *TokenCallerSession) Symbol() (string, error) { return _Token.Contract.Symbol(&_Token.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_Token *TokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _Token.contract.Call(opts, &out, "totalSupply") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_Token *TokenSession) TotalSupply() (*big.Int, error) { return _Token.Contract.TotalSupply(&_Token.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_Token *TokenCallerSession) TotalSupply() (*big.Int, error) { return _Token.Contract.TotalSupply(&_Token.CallOpts) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 amount) returns(bool) func (_Token *TokenTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { return _Token.contract.Transact(opts, "approve", spender, amount) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 amount) returns(bool) func (_Token *TokenSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { return _Token.Contract.Approve(&_Token.TransactOpts, spender, amount) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 amount) returns(bool) func (_Token *TokenTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { return _Token.Contract.Approve(&_Token.TransactOpts, spender, amount) } // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. // // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) func (_Token *TokenTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { return _Token.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) } // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. // // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) func (_Token *TokenSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { return _Token.Contract.DecreaseAllowance(&_Token.TransactOpts, spender, subtractedValue) } // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. // // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) func (_Token *TokenTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { return _Token.Contract.DecreaseAllowance(&_Token.TransactOpts, spender, subtractedValue) } // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. // // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) func (_Token *TokenTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { return _Token.contract.Transact(opts, "increaseAllowance", spender, addedValue) } // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. // // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) func (_Token *TokenSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { return _Token.Contract.IncreaseAllowance(&_Token.TransactOpts, spender, addedValue) } // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. // // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) func (_Token *TokenTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { return _Token.Contract.IncreaseAllowance(&_Token.TransactOpts, spender, addedValue) } // Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. // // Solidity: function initialize() returns() func (_Token *TokenTransactor) Initialize(opts *bind.TransactOpts) (*types.Transaction, error) { return _Token.contract.Transact(opts, "initialize") } // Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. // // Solidity: function initialize() returns() func (_Token *TokenSession) Initialize() (*types.Transaction, error) { return _Token.Contract.Initialize(&_Token.TransactOpts) } // Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. // // Solidity: function initialize() returns() func (_Token *TokenTransactorSession) Initialize() (*types.Transaction, error) { return _Token.Contract.Initialize(&_Token.TransactOpts) } // MintFor is a paid mutator transaction binding the contract method 0xda1919b3. // // Solidity: function mintFor(address contributorAccount, uint256 amount) returns() func (_Token *TokenTransactor) MintFor(opts *bind.TransactOpts, contributorAccount common.Address, amount *big.Int) (*types.Transaction, error) { return _Token.contract.Transact(opts, "mintFor", contributorAccount, amount) } // MintFor is a paid mutator transaction binding the contract method 0xda1919b3. // // Solidity: function mintFor(address contributorAccount, uint256 amount) returns() func (_Token *TokenSession) MintFor(contributorAccount common.Address, amount *big.Int) (*types.Transaction, error) { return _Token.Contract.MintFor(&_Token.TransactOpts, contributorAccount, amount) } // MintFor is a paid mutator transaction binding the contract method 0xda1919b3. // // Solidity: function mintFor(address contributorAccount, uint256 amount) returns() func (_Token *TokenTransactorSession) MintFor(contributorAccount common.Address, amount *big.Int) (*types.Transaction, error) { return _Token.Contract.MintFor(&_Token.TransactOpts, contributorAccount, amount) } // SetContributorContract is a paid mutator transaction binding the contract method 0xdc08776d. // // Solidity: function setContributorContract(address contributor) returns() func (_Token *TokenTransactor) SetContributorContract(opts *bind.TransactOpts, contributor common.Address) (*types.Transaction, error) { return _Token.contract.Transact(opts, "setContributorContract", contributor) } // SetContributorContract is a paid mutator transaction binding the contract method 0xdc08776d. // // Solidity: function setContributorContract(address contributor) returns() func (_Token *TokenSession) SetContributorContract(contributor common.Address) (*types.Transaction, error) { return _Token.Contract.SetContributorContract(&_Token.TransactOpts, contributor) } // SetContributorContract is a paid mutator transaction binding the contract method 0xdc08776d. // // Solidity: function setContributorContract(address contributor) returns() func (_Token *TokenTransactorSession) SetContributorContract(contributor common.Address) (*types.Transaction, error) { return _Token.Contract.SetContributorContract(&_Token.TransactOpts, contributor) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 amount) returns(bool) func (_Token *TokenTransactor) Transfer(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { return _Token.contract.Transact(opts, "transfer", to, amount) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 amount) returns(bool) func (_Token *TokenSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) { return _Token.Contract.Transfer(&_Token.TransactOpts, to, amount) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address to, uint256 amount) returns(bool) func (_Token *TokenTransactorSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) { return _Token.Contract.Transfer(&_Token.TransactOpts, to, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) func (_Token *TokenTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { return _Token.contract.Transact(opts, "transferFrom", from, to, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) func (_Token *TokenSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { return _Token.Contract.TransferFrom(&_Token.TransactOpts, from, to, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool) func (_Token *TokenTransactorSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { return _Token.Contract.TransferFrom(&_Token.TransactOpts, from, to, amount) } // TokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the Token contract. type TokenApprovalIterator struct { Event *TokenApproval // 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 *TokenApprovalIterator) 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(TokenApproval) 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(TokenApproval) 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 *TokenApprovalIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *TokenApprovalIterator) Close() error { it.sub.Unsubscribe() return nil } // TokenApproval represents a Approval event raised by the Token contract. type TokenApproval struct { Owner common.Address Spender common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_Token *TokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*TokenApprovalIterator, error) { var ownerRule []interface{} for _, ownerItem := range owner { ownerRule = append(ownerRule, ownerItem) } var spenderRule []interface{} for _, spenderItem := range spender { spenderRule = append(spenderRule, spenderItem) } logs, sub, err := _Token.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) if err != nil { return nil, err } return &TokenApprovalIterator{contract: _Token.contract, event: "Approval", logs: logs, sub: sub}, nil } // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_Token *TokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *TokenApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { var ownerRule []interface{} for _, ownerItem := range owner { ownerRule = append(ownerRule, ownerItem) } var spenderRule []interface{} for _, spenderItem := range spender { spenderRule = append(spenderRule, spenderItem) } logs, sub, err := _Token.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) 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(TokenApproval) if err := _Token.contract.UnpackLog(event, "Approval", 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 } // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) func (_Token *TokenFilterer) ParseApproval(log types.Log) (*TokenApproval, error) { event := new(TokenApproval) if err := _Token.contract.UnpackLog(event, "Approval", log); err != nil { return nil, err } event.Raw = log return event, nil } // TokenKreditsMintedIterator is returned from FilterKreditsMinted and is used to iterate over the raw logs and unpacked data for KreditsMinted events raised by the Token contract. type TokenKreditsMintedIterator struct { Event *TokenKreditsMinted // 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 *TokenKreditsMintedIterator) 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(TokenKreditsMinted) 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(TokenKreditsMinted) 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 *TokenKreditsMintedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *TokenKreditsMintedIterator) Close() error { it.sub.Unsubscribe() return nil } // TokenKreditsMinted represents a KreditsMinted event raised by the Token contract. type TokenKreditsMinted struct { Recipient common.Address Amount *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterKreditsMinted is a free log retrieval operation binding the contract event 0xd5f3d67ee271d40efe9d40a0156048cca5981defcf15bcdb9ee7d256f2c01007. // // Solidity: event KreditsMinted(address indexed recipient, uint256 amount) func (_Token *TokenFilterer) FilterKreditsMinted(opts *bind.FilterOpts, recipient []common.Address) (*TokenKreditsMintedIterator, error) { var recipientRule []interface{} for _, recipientItem := range recipient { recipientRule = append(recipientRule, recipientItem) } logs, sub, err := _Token.contract.FilterLogs(opts, "KreditsMinted", recipientRule) if err != nil { return nil, err } return &TokenKreditsMintedIterator{contract: _Token.contract, event: "KreditsMinted", logs: logs, sub: sub}, nil } // WatchKreditsMinted is a free log subscription operation binding the contract event 0xd5f3d67ee271d40efe9d40a0156048cca5981defcf15bcdb9ee7d256f2c01007. // // Solidity: event KreditsMinted(address indexed recipient, uint256 amount) func (_Token *TokenFilterer) WatchKreditsMinted(opts *bind.WatchOpts, sink chan<- *TokenKreditsMinted, recipient []common.Address) (event.Subscription, error) { var recipientRule []interface{} for _, recipientItem := range recipient { recipientRule = append(recipientRule, recipientItem) } logs, sub, err := _Token.contract.WatchLogs(opts, "KreditsMinted", recipientRule) 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(TokenKreditsMinted) if err := _Token.contract.UnpackLog(event, "KreditsMinted", 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 } // ParseKreditsMinted is a log parse operation binding the contract event 0xd5f3d67ee271d40efe9d40a0156048cca5981defcf15bcdb9ee7d256f2c01007. // // Solidity: event KreditsMinted(address indexed recipient, uint256 amount) func (_Token *TokenFilterer) ParseKreditsMinted(log types.Log) (*TokenKreditsMinted, error) { event := new(TokenKreditsMinted) if err := _Token.contract.UnpackLog(event, "KreditsMinted", log); err != nil { return nil, err } event.Raw = log return event, nil } // TokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the Token contract. type TokenTransferIterator struct { Event *TokenTransfer // 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 *TokenTransferIterator) 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(TokenTransfer) 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(TokenTransfer) 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 *TokenTransferIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *TokenTransferIterator) Close() error { it.sub.Unsubscribe() return nil } // TokenTransfer represents a Transfer event raised by the Token contract. type TokenTransfer struct { From common.Address To common.Address Value *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_Token *TokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*TokenTransferIterator, error) { var fromRule []interface{} for _, fromItem := range from { fromRule = append(fromRule, fromItem) } var toRule []interface{} for _, toItem := range to { toRule = append(toRule, toItem) } logs, sub, err := _Token.contract.FilterLogs(opts, "Transfer", fromRule, toRule) if err != nil { return nil, err } return &TokenTransferIterator{contract: _Token.contract, event: "Transfer", logs: logs, sub: sub}, nil } // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_Token *TokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *TokenTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { var fromRule []interface{} for _, fromItem := range from { fromRule = append(fromRule, fromItem) } var toRule []interface{} for _, toItem := range to { toRule = append(toRule, toItem) } logs, sub, err := _Token.contract.WatchLogs(opts, "Transfer", fromRule, toRule) 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(TokenTransfer) if err := _Token.contract.UnpackLog(event, "Transfer", 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 } // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) func (_Token *TokenFilterer) ParseTransfer(log types.Log) (*TokenTransfer, error) { event := new(TokenTransfer) if err := _Token.contract.UnpackLog(event, "Transfer", log); err != nil { return nil, err } event.Raw = log return event, nil }