// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.

package bindings

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
)

// ProtocolVersionsMetaData contains all meta data concerning the ProtocolVersions contract.
var ProtocolVersionsMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"enumProtocolVersions.UpdateType\",\"name\":\"updateType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"ConfigUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"RECOMMENDED_SLOT\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REQUIRED_SLOT\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"ProtocolVersion\",\"name\":\"_required\",\"type\":\"uint256\"},{\"internalType\":\"ProtocolVersion\",\"name\":\"_recommended\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recommended\",\"outputs\":[{\"internalType\":\"ProtocolVersion\",\"name\":\"out_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"required\",\"outputs\":[{\"internalType\":\"ProtocolVersion\",\"name\":\"out_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"ProtocolVersion\",\"name\":\"_recommended\",\"type\":\"uint256\"}],\"name\":\"setRecommended\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"ProtocolVersion\",\"name\":\"_required\",\"type\":\"uint256\"}],\"name\":\"setRequired\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
	Bin: " ",
}

// ProtocolVersionsABI is the input ABI used to generate the binding from.
// Deprecated: Use ProtocolVersionsMetaData.ABI instead.
var ProtocolVersionsABI = ProtocolVersionsMetaData.ABI

// ProtocolVersionsBin is the compiled bytecode used for deploying new contracts.
// Deprecated: Use ProtocolVersionsMetaData.Bin instead.
var ProtocolVersionsBin = ProtocolVersionsMetaData.Bin

// DeployProtocolVersions deploys a new Ethereum contract, binding an instance of ProtocolVersions to it.
func DeployProtocolVersions(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ProtocolVersions, error) {
	parsed, err := ProtocolVersionsMetaData.GetAbi()
	if err != nil {
		return common.Address{}, nil, nil, err
	}
	if parsed == nil {
		return common.Address{}, nil, nil, errors.New("GetABI returned nil")
	}

	address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ProtocolVersionsBin), backend)
	if err != nil {
		return common.Address{}, nil, nil, err
	}
	return address, tx, &ProtocolVersions{ProtocolVersionsCaller: ProtocolVersionsCaller{contract: contract}, ProtocolVersionsTransactor: ProtocolVersionsTransactor{contract: contract}, ProtocolVersionsFilterer: ProtocolVersionsFilterer{contract: contract}}, nil
}

// ProtocolVersions is an auto generated Go binding around an Ethereum contract.
type ProtocolVersions struct {
	ProtocolVersionsCaller     // Read-only binding to the contract
	ProtocolVersionsTransactor // Write-only binding to the contract
	ProtocolVersionsFilterer   // Log filterer for contract events
}

// ProtocolVersionsCaller is an auto generated read-only Go binding around an Ethereum contract.
type ProtocolVersionsCaller struct {
	contract *bind.BoundContract // Generic contract wrapper for the low level calls
}

// ProtocolVersionsTransactor is an auto generated write-only Go binding around an Ethereum contract.
type ProtocolVersionsTransactor struct {
	contract *bind.BoundContract // Generic contract wrapper for the low level calls
}

// ProtocolVersionsFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type ProtocolVersionsFilterer struct {
	contract *bind.BoundContract // Generic contract wrapper for the low level calls
}

// ProtocolVersionsSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type ProtocolVersionsSession struct {
	Contract     *ProtocolVersions // 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
}

// ProtocolVersionsCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type ProtocolVersionsCallerSession struct {
	Contract *ProtocolVersionsCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts           // Call options to use throughout this session
}

// ProtocolVersionsTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type ProtocolVersionsTransactorSession struct {
	Contract     *ProtocolVersionsTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts           // Transaction auth options to use throughout this session
}

// ProtocolVersionsRaw is an auto generated low-level Go binding around an Ethereum contract.
type ProtocolVersionsRaw struct {
	Contract *ProtocolVersions // Generic contract binding to access the raw methods on
}

// ProtocolVersionsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type ProtocolVersionsCallerRaw struct {
	Contract *ProtocolVersionsCaller // Generic read-only contract binding to access the raw methods on
}

// ProtocolVersionsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type ProtocolVersionsTransactorRaw struct {
	Contract *ProtocolVersionsTransactor // Generic write-only contract binding to access the raw methods on
}

// NewProtocolVersions creates a new instance of ProtocolVersions, bound to a specific deployed contract.
func NewProtocolVersions(address common.Address, backend bind.ContractBackend) (*ProtocolVersions, error) {
	contract, err := bindProtocolVersions(address, backend, backend, backend)
	if err != nil {
		return nil, err
	}
	return &ProtocolVersions{ProtocolVersionsCaller: ProtocolVersionsCaller{contract: contract}, ProtocolVersionsTransactor: ProtocolVersionsTransactor{contract: contract}, ProtocolVersionsFilterer: ProtocolVersionsFilterer{contract: contract}}, nil
}

// NewProtocolVersionsCaller creates a new read-only instance of ProtocolVersions, bound to a specific deployed contract.
func NewProtocolVersionsCaller(address common.Address, caller bind.ContractCaller) (*ProtocolVersionsCaller, error) {
	contract, err := bindProtocolVersions(address, caller, nil, nil)
	if err != nil {
		return nil, err
	}
	return &ProtocolVersionsCaller{contract: contract}, nil
}

// NewProtocolVersionsTransactor creates a new write-only instance of ProtocolVersions, bound to a specific deployed contract.
func NewProtocolVersionsTransactor(address common.Address, transactor bind.ContractTransactor) (*ProtocolVersionsTransactor, error) {
	contract, err := bindProtocolVersions(address, nil, transactor, nil)
	if err != nil {
		return nil, err
	}
	return &ProtocolVersionsTransactor{contract: contract}, nil
}

// NewProtocolVersionsFilterer creates a new log filterer instance of ProtocolVersions, bound to a specific deployed contract.
func NewProtocolVersionsFilterer(address common.Address, filterer bind.ContractFilterer) (*ProtocolVersionsFilterer, error) {
	contract, err := bindProtocolVersions(address, nil, nil, filterer)
	if err != nil {
		return nil, err
	}
	return &ProtocolVersionsFilterer{contract: contract}, nil
}

// bindProtocolVersions binds a generic wrapper to an already deployed contract.
func bindProtocolVersions(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
	parsed, err := abi.JSON(strings.NewReader(ProtocolVersionsABI))
	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 (_ProtocolVersions *ProtocolVersionsRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
	return _ProtocolVersions.Contract.ProtocolVersionsCaller.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 (_ProtocolVersions *ProtocolVersionsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _ProtocolVersions.Contract.ProtocolVersionsTransactor.contract.Transfer(opts)
}

// Transact invokes the (paid) contract method with params as input values.
func (_ProtocolVersions *ProtocolVersionsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
	return _ProtocolVersions.Contract.ProtocolVersionsTransactor.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 (_ProtocolVersions *ProtocolVersionsCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
	return _ProtocolVersions.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 (_ProtocolVersions *ProtocolVersionsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _ProtocolVersions.Contract.contract.Transfer(opts)
}

// Transact invokes the (paid) contract method with params as input values.
func (_ProtocolVersions *ProtocolVersionsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
	return _ProtocolVersions.Contract.contract.Transact(opts, method, params...)
}

// RECOMMENDEDSLOT is a free data retrieval call binding the contract method 0xf7d12760.
//
// Solidity: function RECOMMENDED_SLOT() view returns(bytes32)
func (_ProtocolVersions *ProtocolVersionsCaller) RECOMMENDEDSLOT(opts *bind.CallOpts) ([32]byte, error) {
	var out []interface{}
	err := _ProtocolVersions.contract.Call(opts, &out, "RECOMMENDED_SLOT")

	if err != nil {
		return *new([32]byte), err
	}

	out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)

	return out0, err

}

// RECOMMENDEDSLOT is a free data retrieval call binding the contract method 0xf7d12760.
//
// Solidity: function RECOMMENDED_SLOT() view returns(bytes32)
func (_ProtocolVersions *ProtocolVersionsSession) RECOMMENDEDSLOT() ([32]byte, error) {
	return _ProtocolVersions.Contract.RECOMMENDEDSLOT(&_ProtocolVersions.CallOpts)
}

// RECOMMENDEDSLOT is a free data retrieval call binding the contract method 0xf7d12760.
//
// Solidity: function RECOMMENDED_SLOT() view returns(bytes32)
func (_ProtocolVersions *ProtocolVersionsCallerSession) RECOMMENDEDSLOT() ([32]byte, error) {
	return _ProtocolVersions.Contract.RECOMMENDEDSLOT(&_ProtocolVersions.CallOpts)
}

// REQUIREDSLOT is a free data retrieval call binding the contract method 0x206a8300.
//
// Solidity: function REQUIRED_SLOT() view returns(bytes32)
func (_ProtocolVersions *ProtocolVersionsCaller) REQUIREDSLOT(opts *bind.CallOpts) ([32]byte, error) {
	var out []interface{}
	err := _ProtocolVersions.contract.Call(opts, &out, "REQUIRED_SLOT")

	if err != nil {
		return *new([32]byte), err
	}

	out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)

	return out0, err

}

// REQUIREDSLOT is a free data retrieval call binding the contract method 0x206a8300.
//
// Solidity: function REQUIRED_SLOT() view returns(bytes32)
func (_ProtocolVersions *ProtocolVersionsSession) REQUIREDSLOT() ([32]byte, error) {
	return _ProtocolVersions.Contract.REQUIREDSLOT(&_ProtocolVersions.CallOpts)
}

// REQUIREDSLOT is a free data retrieval call binding the contract method 0x206a8300.
//
// Solidity: function REQUIRED_SLOT() view returns(bytes32)
func (_ProtocolVersions *ProtocolVersionsCallerSession) REQUIREDSLOT() ([32]byte, error) {
	return _ProtocolVersions.Contract.REQUIREDSLOT(&_ProtocolVersions.CallOpts)
}

// VERSION is a free data retrieval call binding the contract method 0xffa1ad74.
//
// Solidity: function VERSION() view returns(uint256)
func (_ProtocolVersions *ProtocolVersionsCaller) VERSION(opts *bind.CallOpts) (*big.Int, error) {
	var out []interface{}
	err := _ProtocolVersions.contract.Call(opts, &out, "VERSION")

	if err != nil {
		return *new(*big.Int), err
	}

	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)

	return out0, err

}

// VERSION is a free data retrieval call binding the contract method 0xffa1ad74.
//
// Solidity: function VERSION() view returns(uint256)
func (_ProtocolVersions *ProtocolVersionsSession) VERSION() (*big.Int, error) {
	return _ProtocolVersions.Contract.VERSION(&_ProtocolVersions.CallOpts)
}

// VERSION is a free data retrieval call binding the contract method 0xffa1ad74.
//
// Solidity: function VERSION() view returns(uint256)
func (_ProtocolVersions *ProtocolVersionsCallerSession) VERSION() (*big.Int, error) {
	return _ProtocolVersions.Contract.VERSION(&_ProtocolVersions.CallOpts)
}

// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_ProtocolVersions *ProtocolVersionsCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
	var out []interface{}
	err := _ProtocolVersions.contract.Call(opts, &out, "owner")

	if err != nil {
		return *new(common.Address), err
	}

	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)

	return out0, err

}

// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_ProtocolVersions *ProtocolVersionsSession) Owner() (common.Address, error) {
	return _ProtocolVersions.Contract.Owner(&_ProtocolVersions.CallOpts)
}

// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_ProtocolVersions *ProtocolVersionsCallerSession) Owner() (common.Address, error) {
	return _ProtocolVersions.Contract.Owner(&_ProtocolVersions.CallOpts)
}

// Recommended is a free data retrieval call binding the contract method 0xd798b1ac.
//
// Solidity: function recommended() view returns(uint256 out_)
func (_ProtocolVersions *ProtocolVersionsCaller) Recommended(opts *bind.CallOpts) (*big.Int, error) {
	var out []interface{}
	err := _ProtocolVersions.contract.Call(opts, &out, "recommended")

	if err != nil {
		return *new(*big.Int), err
	}

	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)

	return out0, err

}

// Recommended is a free data retrieval call binding the contract method 0xd798b1ac.
//
// Solidity: function recommended() view returns(uint256 out_)
func (_ProtocolVersions *ProtocolVersionsSession) Recommended() (*big.Int, error) {
	return _ProtocolVersions.Contract.Recommended(&_ProtocolVersions.CallOpts)
}

// Recommended is a free data retrieval call binding the contract method 0xd798b1ac.
//
// Solidity: function recommended() view returns(uint256 out_)
func (_ProtocolVersions *ProtocolVersionsCallerSession) Recommended() (*big.Int, error) {
	return _ProtocolVersions.Contract.Recommended(&_ProtocolVersions.CallOpts)
}

// Required is a free data retrieval call binding the contract method 0xdc8452cd.
//
// Solidity: function required() view returns(uint256 out_)
func (_ProtocolVersions *ProtocolVersionsCaller) Required(opts *bind.CallOpts) (*big.Int, error) {
	var out []interface{}
	err := _ProtocolVersions.contract.Call(opts, &out, "required")

	if err != nil {
		return *new(*big.Int), err
	}

	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)

	return out0, err

}

// Required is a free data retrieval call binding the contract method 0xdc8452cd.
//
// Solidity: function required() view returns(uint256 out_)
func (_ProtocolVersions *ProtocolVersionsSession) Required() (*big.Int, error) {
	return _ProtocolVersions.Contract.Required(&_ProtocolVersions.CallOpts)
}

// Required is a free data retrieval call binding the contract method 0xdc8452cd.
//
// Solidity: function required() view returns(uint256 out_)
func (_ProtocolVersions *ProtocolVersionsCallerSession) Required() (*big.Int, error) {
	return _ProtocolVersions.Contract.Required(&_ProtocolVersions.CallOpts)
}

// Version is a free data retrieval call binding the contract method 0x54fd4d50.
//
// Solidity: function version() view returns(string)
func (_ProtocolVersions *ProtocolVersionsCaller) Version(opts *bind.CallOpts) (string, error) {
	var out []interface{}
	err := _ProtocolVersions.contract.Call(opts, &out, "version")

	if err != nil {
		return *new(string), err
	}

	out0 := *abi.ConvertType(out[0], new(string)).(*string)

	return out0, err

}

// Version is a free data retrieval call binding the contract method 0x54fd4d50.
//
// Solidity: function version() view returns(string)
func (_ProtocolVersions *ProtocolVersionsSession) Version() (string, error) {
	return _ProtocolVersions.Contract.Version(&_ProtocolVersions.CallOpts)
}

// Version is a free data retrieval call binding the contract method 0x54fd4d50.
//
// Solidity: function version() view returns(string)
func (_ProtocolVersions *ProtocolVersionsCallerSession) Version() (string, error) {
	return _ProtocolVersions.Contract.Version(&_ProtocolVersions.CallOpts)
}

// Initialize is a paid mutator transaction binding the contract method 0x7a1ac61e.
//
// Solidity: function initialize(address _owner, uint256 _required, uint256 _recommended) returns()
func (_ProtocolVersions *ProtocolVersionsTransactor) Initialize(opts *bind.TransactOpts, _owner common.Address, _required *big.Int, _recommended *big.Int) (*types.Transaction, error) {
	return _ProtocolVersions.contract.Transact(opts, "initialize", _owner, _required, _recommended)
}

// Initialize is a paid mutator transaction binding the contract method 0x7a1ac61e.
//
// Solidity: function initialize(address _owner, uint256 _required, uint256 _recommended) returns()
func (_ProtocolVersions *ProtocolVersionsSession) Initialize(_owner common.Address, _required *big.Int, _recommended *big.Int) (*types.Transaction, error) {
	return _ProtocolVersions.Contract.Initialize(&_ProtocolVersions.TransactOpts, _owner, _required, _recommended)
}

// Initialize is a paid mutator transaction binding the contract method 0x7a1ac61e.
//
// Solidity: function initialize(address _owner, uint256 _required, uint256 _recommended) returns()
func (_ProtocolVersions *ProtocolVersionsTransactorSession) Initialize(_owner common.Address, _required *big.Int, _recommended *big.Int) (*types.Transaction, error) {
	return _ProtocolVersions.Contract.Initialize(&_ProtocolVersions.TransactOpts, _owner, _required, _recommended)
}

// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_ProtocolVersions *ProtocolVersionsTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _ProtocolVersions.contract.Transact(opts, "renounceOwnership")
}

// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_ProtocolVersions *ProtocolVersionsSession) RenounceOwnership() (*types.Transaction, error) {
	return _ProtocolVersions.Contract.RenounceOwnership(&_ProtocolVersions.TransactOpts)
}

// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_ProtocolVersions *ProtocolVersionsTransactorSession) RenounceOwnership() (*types.Transaction, error) {
	return _ProtocolVersions.Contract.RenounceOwnership(&_ProtocolVersions.TransactOpts)
}

// SetRecommended is a paid mutator transaction binding the contract method 0x5fd579af.
//
// Solidity: function setRecommended(uint256 _recommended) returns()
func (_ProtocolVersions *ProtocolVersionsTransactor) SetRecommended(opts *bind.TransactOpts, _recommended *big.Int) (*types.Transaction, error) {
	return _ProtocolVersions.contract.Transact(opts, "setRecommended", _recommended)
}

// SetRecommended is a paid mutator transaction binding the contract method 0x5fd579af.
//
// Solidity: function setRecommended(uint256 _recommended) returns()
func (_ProtocolVersions *ProtocolVersionsSession) SetRecommended(_recommended *big.Int) (*types.Transaction, error) {
	return _ProtocolVersions.Contract.SetRecommended(&_ProtocolVersions.TransactOpts, _recommended)
}

// SetRecommended is a paid mutator transaction binding the contract method 0x5fd579af.
//
// Solidity: function setRecommended(uint256 _recommended) returns()
func (_ProtocolVersions *ProtocolVersionsTransactorSession) SetRecommended(_recommended *big.Int) (*types.Transaction, error) {
	return _ProtocolVersions.Contract.SetRecommended(&_ProtocolVersions.TransactOpts, _recommended)
}

// SetRequired is a paid mutator transaction binding the contract method 0x0457d6f2.
//
// Solidity: function setRequired(uint256 _required) returns()
func (_ProtocolVersions *ProtocolVersionsTransactor) SetRequired(opts *bind.TransactOpts, _required *big.Int) (*types.Transaction, error) {
	return _ProtocolVersions.contract.Transact(opts, "setRequired", _required)
}

// SetRequired is a paid mutator transaction binding the contract method 0x0457d6f2.
//
// Solidity: function setRequired(uint256 _required) returns()
func (_ProtocolVersions *ProtocolVersionsSession) SetRequired(_required *big.Int) (*types.Transaction, error) {
	return _ProtocolVersions.Contract.SetRequired(&_ProtocolVersions.TransactOpts, _required)
}

// SetRequired is a paid mutator transaction binding the contract method 0x0457d6f2.
//
// Solidity: function setRequired(uint256 _required) returns()
func (_ProtocolVersions *ProtocolVersionsTransactorSession) SetRequired(_required *big.Int) (*types.Transaction, error) {
	return _ProtocolVersions.Contract.SetRequired(&_ProtocolVersions.TransactOpts, _required)
}

// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_ProtocolVersions *ProtocolVersionsTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) {
	return _ProtocolVersions.contract.Transact(opts, "transferOwnership", newOwner)
}

// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_ProtocolVersions *ProtocolVersionsSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
	return _ProtocolVersions.Contract.TransferOwnership(&_ProtocolVersions.TransactOpts, newOwner)
}

// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_ProtocolVersions *ProtocolVersionsTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
	return _ProtocolVersions.Contract.TransferOwnership(&_ProtocolVersions.TransactOpts, newOwner)
}

// ProtocolVersionsConfigUpdateIterator is returned from FilterConfigUpdate and is used to iterate over the raw logs and unpacked data for ConfigUpdate events raised by the ProtocolVersions contract.
type ProtocolVersionsConfigUpdateIterator struct {
	Event *ProtocolVersionsConfigUpdate // 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 *ProtocolVersionsConfigUpdateIterator) 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(ProtocolVersionsConfigUpdate)
			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(ProtocolVersionsConfigUpdate)
		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 *ProtocolVersionsConfigUpdateIterator) Error() error {
	return it.fail
}

// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *ProtocolVersionsConfigUpdateIterator) Close() error {
	it.sub.Unsubscribe()
	return nil
}

// ProtocolVersionsConfigUpdate represents a ConfigUpdate event raised by the ProtocolVersions contract.
type ProtocolVersionsConfigUpdate struct {
	Version    *big.Int
	UpdateType uint8
	Data       []byte
	Raw        types.Log // Blockchain specific contextual infos
}

// FilterConfigUpdate is a free log retrieval operation binding the contract event 0x1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be.
//
// Solidity: event ConfigUpdate(uint256 indexed version, uint8 indexed updateType, bytes data)
func (_ProtocolVersions *ProtocolVersionsFilterer) FilterConfigUpdate(opts *bind.FilterOpts, version []*big.Int, updateType []uint8) (*ProtocolVersionsConfigUpdateIterator, error) {

	var versionRule []interface{}
	for _, versionItem := range version {
		versionRule = append(versionRule, versionItem)
	}
	var updateTypeRule []interface{}
	for _, updateTypeItem := range updateType {
		updateTypeRule = append(updateTypeRule, updateTypeItem)
	}

	logs, sub, err := _ProtocolVersions.contract.FilterLogs(opts, "ConfigUpdate", versionRule, updateTypeRule)
	if err != nil {
		return nil, err
	}
	return &ProtocolVersionsConfigUpdateIterator{contract: _ProtocolVersions.contract, event: "ConfigUpdate", logs: logs, sub: sub}, nil
}

// WatchConfigUpdate is a free log subscription operation binding the contract event 0x1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be.
//
// Solidity: event ConfigUpdate(uint256 indexed version, uint8 indexed updateType, bytes data)
func (_ProtocolVersions *ProtocolVersionsFilterer) WatchConfigUpdate(opts *bind.WatchOpts, sink chan<- *ProtocolVersionsConfigUpdate, version []*big.Int, updateType []uint8) (event.Subscription, error) {

	var versionRule []interface{}
	for _, versionItem := range version {
		versionRule = append(versionRule, versionItem)
	}
	var updateTypeRule []interface{}
	for _, updateTypeItem := range updateType {
		updateTypeRule = append(updateTypeRule, updateTypeItem)
	}

	logs, sub, err := _ProtocolVersions.contract.WatchLogs(opts, "ConfigUpdate", versionRule, updateTypeRule)
	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(ProtocolVersionsConfigUpdate)
				if err := _ProtocolVersions.contract.UnpackLog(event, "ConfigUpdate", 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
}

// ParseConfigUpdate is a log parse operation binding the contract event 0x1d2b0bda21d56b8bd12d4f94ebacffdfb35f5e226f84b461103bb8beab6353be.
//
// Solidity: event ConfigUpdate(uint256 indexed version, uint8 indexed updateType, bytes data)
func (_ProtocolVersions *ProtocolVersionsFilterer) ParseConfigUpdate(log types.Log) (*ProtocolVersionsConfigUpdate, error) {
	event := new(ProtocolVersionsConfigUpdate)
	if err := _ProtocolVersions.contract.UnpackLog(event, "ConfigUpdate", log); err != nil {
		return nil, err
	}
	event.Raw = log
	return event, nil
}

// ProtocolVersionsInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the ProtocolVersions contract.
type ProtocolVersionsInitializedIterator struct {
	Event *ProtocolVersionsInitialized // 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 *ProtocolVersionsInitializedIterator) 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(ProtocolVersionsInitialized)
			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(ProtocolVersionsInitialized)
		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 *ProtocolVersionsInitializedIterator) Error() error {
	return it.fail
}

// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *ProtocolVersionsInitializedIterator) Close() error {
	it.sub.Unsubscribe()
	return nil
}

// ProtocolVersionsInitialized represents a Initialized event raised by the ProtocolVersions contract.
type ProtocolVersionsInitialized struct {
	Version uint8
	Raw     types.Log // Blockchain specific contextual infos
}

// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
//
// Solidity: event Initialized(uint8 version)
func (_ProtocolVersions *ProtocolVersionsFilterer) FilterInitialized(opts *bind.FilterOpts) (*ProtocolVersionsInitializedIterator, error) {

	logs, sub, err := _ProtocolVersions.contract.FilterLogs(opts, "Initialized")
	if err != nil {
		return nil, err
	}
	return &ProtocolVersionsInitializedIterator{contract: _ProtocolVersions.contract, event: "Initialized", logs: logs, sub: sub}, nil
}

// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
//
// Solidity: event Initialized(uint8 version)
func (_ProtocolVersions *ProtocolVersionsFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ProtocolVersionsInitialized) (event.Subscription, error) {

	logs, sub, err := _ProtocolVersions.contract.WatchLogs(opts, "Initialized")
	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(ProtocolVersionsInitialized)
				if err := _ProtocolVersions.contract.UnpackLog(event, "Initialized", 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
}

// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
//
// Solidity: event Initialized(uint8 version)
func (_ProtocolVersions *ProtocolVersionsFilterer) ParseInitialized(log types.Log) (*ProtocolVersionsInitialized, error) {
	event := new(ProtocolVersionsInitialized)
	if err := _ProtocolVersions.contract.UnpackLog(event, "Initialized", log); err != nil {
		return nil, err
	}
	event.Raw = log
	return event, nil
}

// ProtocolVersionsOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ProtocolVersions contract.
type ProtocolVersionsOwnershipTransferredIterator struct {
	Event *ProtocolVersionsOwnershipTransferred // 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 *ProtocolVersionsOwnershipTransferredIterator) 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(ProtocolVersionsOwnershipTransferred)
			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(ProtocolVersionsOwnershipTransferred)
		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 *ProtocolVersionsOwnershipTransferredIterator) Error() error {
	return it.fail
}

// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *ProtocolVersionsOwnershipTransferredIterator) Close() error {
	it.sub.Unsubscribe()
	return nil
}

// ProtocolVersionsOwnershipTransferred represents a OwnershipTransferred event raised by the ProtocolVersions contract.
type ProtocolVersionsOwnershipTransferred struct {
	PreviousOwner common.Address
	NewOwner      common.Address
	Raw           types.Log // Blockchain specific contextual infos
}

// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (_ProtocolVersions *ProtocolVersionsFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ProtocolVersionsOwnershipTransferredIterator, error) {

	var previousOwnerRule []interface{}
	for _, previousOwnerItem := range previousOwner {
		previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
	}
	var newOwnerRule []interface{}
	for _, newOwnerItem := range newOwner {
		newOwnerRule = append(newOwnerRule, newOwnerItem)
	}

	logs, sub, err := _ProtocolVersions.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
	if err != nil {
		return nil, err
	}
	return &ProtocolVersionsOwnershipTransferredIterator{contract: _ProtocolVersions.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
}

// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (_ProtocolVersions *ProtocolVersionsFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ProtocolVersionsOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {

	var previousOwnerRule []interface{}
	for _, previousOwnerItem := range previousOwner {
		previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
	}
	var newOwnerRule []interface{}
	for _, newOwnerItem := range newOwner {
		newOwnerRule = append(newOwnerRule, newOwnerItem)
	}

	logs, sub, err := _ProtocolVersions.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
	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(ProtocolVersionsOwnershipTransferred)
				if err := _ProtocolVersions.contract.UnpackLog(event, "OwnershipTransferred", 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
}

// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
func (_ProtocolVersions *ProtocolVersionsFilterer) ParseOwnershipTransferred(log types.Log) (*ProtocolVersionsOwnershipTransferred, error) {
	event := new(ProtocolVersionsOwnershipTransferred)
	if err := _ProtocolVersions.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
		return nil, err
	}
	event.Raw = log
	return event, nil
}
