// 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
)

// OptimismMintableERC721FactoryMetaData contains all meta data concerning the OptimismMintableERC721Factory contract.
var OptimismMintableERC721FactoryMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_remoteChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"remoteToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"}],\"name\":\"OptimismMintableERC721Created\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BRIDGE\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REMOTE_CHAIN_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_remoteToken\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"name\":\"createOptimismMintableERC721\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isOptimismMintableERC721\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
	Bin: "[encoded data, 29262 characters]",
}

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

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

// DeployOptimismMintableERC721Factory deploys a new Ethereum contract, binding an instance of OptimismMintableERC721Factory to it.
func DeployOptimismMintableERC721Factory(auth *bind.TransactOpts, backend bind.ContractBackend, _bridge common.Address, _remoteChainId *big.Int) (common.Address, *types.Transaction, *OptimismMintableERC721Factory, error) {
	parsed, err := OptimismMintableERC721FactoryMetaData.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(OptimismMintableERC721FactoryBin), backend, _bridge, _remoteChainId)
	if err != nil {
		return common.Address{}, nil, nil, err
	}
	return address, tx, &OptimismMintableERC721Factory{OptimismMintableERC721FactoryCaller: OptimismMintableERC721FactoryCaller{contract: contract}, OptimismMintableERC721FactoryTransactor: OptimismMintableERC721FactoryTransactor{contract: contract}, OptimismMintableERC721FactoryFilterer: OptimismMintableERC721FactoryFilterer{contract: contract}}, nil
}

// OptimismMintableERC721Factory is an auto generated Go binding around an Ethereum contract.
type OptimismMintableERC721Factory struct {
	OptimismMintableERC721FactoryCaller     // Read-only binding to the contract
	OptimismMintableERC721FactoryTransactor // Write-only binding to the contract
	OptimismMintableERC721FactoryFilterer   // Log filterer for contract events
}

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

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

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

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

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

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

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

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

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

// NewOptimismMintableERC721Factory creates a new instance of OptimismMintableERC721Factory, bound to a specific deployed contract.
func NewOptimismMintableERC721Factory(address common.Address, backend bind.ContractBackend) (*OptimismMintableERC721Factory, error) {
	contract, err := bindOptimismMintableERC721Factory(address, backend, backend, backend)
	if err != nil {
		return nil, err
	}
	return &OptimismMintableERC721Factory{OptimismMintableERC721FactoryCaller: OptimismMintableERC721FactoryCaller{contract: contract}, OptimismMintableERC721FactoryTransactor: OptimismMintableERC721FactoryTransactor{contract: contract}, OptimismMintableERC721FactoryFilterer: OptimismMintableERC721FactoryFilterer{contract: contract}}, nil
}

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

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

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

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

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

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

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

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

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

	return out0, err

}

// BRIDGE is a free data retrieval call binding the contract method 0xee9a31a2.
//
// Solidity: function BRIDGE() view returns(address)
func (_OptimismMintableERC721Factory *OptimismMintableERC721FactorySession) BRIDGE() (common.Address, error) {
	return _OptimismMintableERC721Factory.Contract.BRIDGE(&_OptimismMintableERC721Factory.CallOpts)
}

// BRIDGE is a free data retrieval call binding the contract method 0xee9a31a2.
//
// Solidity: function BRIDGE() view returns(address)
func (_OptimismMintableERC721Factory *OptimismMintableERC721FactoryCallerSession) BRIDGE() (common.Address, error) {
	return _OptimismMintableERC721Factory.Contract.BRIDGE(&_OptimismMintableERC721Factory.CallOpts)
}

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

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

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

	return out0, err

}

// REMOTECHAINID is a free data retrieval call binding the contract method 0x7d1d0c5b.
//
// Solidity: function REMOTE_CHAIN_ID() view returns(uint256)
func (_OptimismMintableERC721Factory *OptimismMintableERC721FactorySession) REMOTECHAINID() (*big.Int, error) {
	return _OptimismMintableERC721Factory.Contract.REMOTECHAINID(&_OptimismMintableERC721Factory.CallOpts)
}

// REMOTECHAINID is a free data retrieval call binding the contract method 0x7d1d0c5b.
//
// Solidity: function REMOTE_CHAIN_ID() view returns(uint256)
func (_OptimismMintableERC721Factory *OptimismMintableERC721FactoryCallerSession) REMOTECHAINID() (*big.Int, error) {
	return _OptimismMintableERC721Factory.Contract.REMOTECHAINID(&_OptimismMintableERC721Factory.CallOpts)
}

// IsOptimismMintableERC721 is a free data retrieval call binding the contract method 0x5572acae.
//
// Solidity: function isOptimismMintableERC721(address ) view returns(bool)
func (_OptimismMintableERC721Factory *OptimismMintableERC721FactoryCaller) IsOptimismMintableERC721(opts *bind.CallOpts, arg0 common.Address) (bool, error) {
	var out []interface{}
	err := _OptimismMintableERC721Factory.contract.Call(opts, &out, "isOptimismMintableERC721", arg0)

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

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

	return out0, err

}

// IsOptimismMintableERC721 is a free data retrieval call binding the contract method 0x5572acae.
//
// Solidity: function isOptimismMintableERC721(address ) view returns(bool)
func (_OptimismMintableERC721Factory *OptimismMintableERC721FactorySession) IsOptimismMintableERC721(arg0 common.Address) (bool, error) {
	return _OptimismMintableERC721Factory.Contract.IsOptimismMintableERC721(&_OptimismMintableERC721Factory.CallOpts, arg0)
}

// IsOptimismMintableERC721 is a free data retrieval call binding the contract method 0x5572acae.
//
// Solidity: function isOptimismMintableERC721(address ) view returns(bool)
func (_OptimismMintableERC721Factory *OptimismMintableERC721FactoryCallerSession) IsOptimismMintableERC721(arg0 common.Address) (bool, error) {
	return _OptimismMintableERC721Factory.Contract.IsOptimismMintableERC721(&_OptimismMintableERC721Factory.CallOpts, arg0)
}

// Version is a free data retrieval call binding the contract method 0x54fd4d50.
//
// Solidity: function version() view returns(string)
func (_OptimismMintableERC721Factory *OptimismMintableERC721FactoryCaller) Version(opts *bind.CallOpts) (string, error) {
	var out []interface{}
	err := _OptimismMintableERC721Factory.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 (_OptimismMintableERC721Factory *OptimismMintableERC721FactorySession) Version() (string, error) {
	return _OptimismMintableERC721Factory.Contract.Version(&_OptimismMintableERC721Factory.CallOpts)
}

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

// CreateOptimismMintableERC721 is a paid mutator transaction binding the contract method 0xd97df652.
//
// Solidity: function createOptimismMintableERC721(address _remoteToken, string _name, string _symbol) returns(address)
func (_OptimismMintableERC721Factory *OptimismMintableERC721FactoryTransactor) CreateOptimismMintableERC721(opts *bind.TransactOpts, _remoteToken common.Address, _name string, _symbol string) (*types.Transaction, error) {
	return _OptimismMintableERC721Factory.contract.Transact(opts, "createOptimismMintableERC721", _remoteToken, _name, _symbol)
}

// CreateOptimismMintableERC721 is a paid mutator transaction binding the contract method 0xd97df652.
//
// Solidity: function createOptimismMintableERC721(address _remoteToken, string _name, string _symbol) returns(address)
func (_OptimismMintableERC721Factory *OptimismMintableERC721FactorySession) CreateOptimismMintableERC721(_remoteToken common.Address, _name string, _symbol string) (*types.Transaction, error) {
	return _OptimismMintableERC721Factory.Contract.CreateOptimismMintableERC721(&_OptimismMintableERC721Factory.TransactOpts, _remoteToken, _name, _symbol)
}

// CreateOptimismMintableERC721 is a paid mutator transaction binding the contract method 0xd97df652.
//
// Solidity: function createOptimismMintableERC721(address _remoteToken, string _name, string _symbol) returns(address)
func (_OptimismMintableERC721Factory *OptimismMintableERC721FactoryTransactorSession) CreateOptimismMintableERC721(_remoteToken common.Address, _name string, _symbol string) (*types.Transaction, error) {
	return _OptimismMintableERC721Factory.Contract.CreateOptimismMintableERC721(&_OptimismMintableERC721Factory.TransactOpts, _remoteToken, _name, _symbol)
}

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

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

// OptimismMintableERC721FactoryOptimismMintableERC721Created represents a OptimismMintableERC721Created event raised by the OptimismMintableERC721Factory contract.
type OptimismMintableERC721FactoryOptimismMintableERC721Created struct {
	LocalToken  common.Address
	RemoteToken common.Address
	Deployer    common.Address
	Raw         types.Log // Blockchain specific contextual infos
}

// FilterOptimismMintableERC721Created is a free log retrieval operation binding the contract event 0xe72783bb8e0ca31286b85278da59684dd814df9762a52f0837f89edd1483b299.
//
// Solidity: event OptimismMintableERC721Created(address indexed localToken, address indexed remoteToken, address deployer)
func (_OptimismMintableERC721Factory *OptimismMintableERC721FactoryFilterer) FilterOptimismMintableERC721Created(opts *bind.FilterOpts, localToken []common.Address, remoteToken []common.Address) (*OptimismMintableERC721FactoryOptimismMintableERC721CreatedIterator, error) {

	var localTokenRule []interface{}
	for _, localTokenItem := range localToken {
		localTokenRule = append(localTokenRule, localTokenItem)
	}
	var remoteTokenRule []interface{}
	for _, remoteTokenItem := range remoteToken {
		remoteTokenRule = append(remoteTokenRule, remoteTokenItem)
	}

	logs, sub, err := _OptimismMintableERC721Factory.contract.FilterLogs(opts, "OptimismMintableERC721Created", localTokenRule, remoteTokenRule)
	if err != nil {
		return nil, err
	}
	return &OptimismMintableERC721FactoryOptimismMintableERC721CreatedIterator{contract: _OptimismMintableERC721Factory.contract, event: "OptimismMintableERC721Created", logs: logs, sub: sub}, nil
}

// WatchOptimismMintableERC721Created is a free log subscription operation binding the contract event 0xe72783bb8e0ca31286b85278da59684dd814df9762a52f0837f89edd1483b299.
//
// Solidity: event OptimismMintableERC721Created(address indexed localToken, address indexed remoteToken, address deployer)
func (_OptimismMintableERC721Factory *OptimismMintableERC721FactoryFilterer) WatchOptimismMintableERC721Created(opts *bind.WatchOpts, sink chan<- *OptimismMintableERC721FactoryOptimismMintableERC721Created, localToken []common.Address, remoteToken []common.Address) (event.Subscription, error) {

	var localTokenRule []interface{}
	for _, localTokenItem := range localToken {
		localTokenRule = append(localTokenRule, localTokenItem)
	}
	var remoteTokenRule []interface{}
	for _, remoteTokenItem := range remoteToken {
		remoteTokenRule = append(remoteTokenRule, remoteTokenItem)
	}

	logs, sub, err := _OptimismMintableERC721Factory.contract.WatchLogs(opts, "OptimismMintableERC721Created", localTokenRule, remoteTokenRule)
	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(OptimismMintableERC721FactoryOptimismMintableERC721Created)
				if err := _OptimismMintableERC721Factory.contract.UnpackLog(event, "OptimismMintableERC721Created", 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
}

// ParseOptimismMintableERC721Created is a log parse operation binding the contract event 0xe72783bb8e0ca31286b85278da59684dd814df9762a52f0837f89edd1483b299.
//
// Solidity: event OptimismMintableERC721Created(address indexed localToken, address indexed remoteToken, address deployer)
func (_OptimismMintableERC721Factory *OptimismMintableERC721FactoryFilterer) ParseOptimismMintableERC721Created(log types.Log) (*OptimismMintableERC721FactoryOptimismMintableERC721Created, error) {
	event := new(OptimismMintableERC721FactoryOptimismMintableERC721Created)
	if err := _OptimismMintableERC721Factory.contract.UnpackLog(event, "OptimismMintableERC721Created", log); err != nil {
		return nil, err
	}
	event.Raw = log
	return event, nil
}
