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

package payresolver

import (
	"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 (
	_ = big.NewInt
	_ = strings.NewReader
	_ = ethereum.NotFound
	_ = bind.Bind
	_ = common.Big1
	_ = types.BloomLookup
	_ = event.NewSubscription
)

// PayResolverABI is the input ABI used to generate the binding from.
const PayResolverABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"payRegistry\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"virtResolver\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_registryAddr\",\"type\":\"address\"},{\"name\":\"_virtResolverAddr\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"payId\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"resolveDeadline\",\"type\":\"uint256\"}],\"name\":\"ResolvePayment\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[{\"name\":\"_resolvePayRequest\",\"type\":\"bytes\"}],\"name\":\"resolvePaymentByConditions\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_vouchedPayResult\",\"type\":\"bytes\"}],\"name\":\"resolvePaymentByVouchedResult\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"

// PayResolverBin is the compiled bytecode used for deploying new contracts.
var PayResolverBin = "0x608060405234801561001057600080fd5b506040516129363803806129368339818101604052604081101561003357600080fd5b50805160209091015160008054600160a060020a03938416600160a060020a031991821617909155600180549390921692169190911790556128bc8061007a6000396000f3fe608060405234801561001057600080fd5b5060043610610068577c010000000000000000000000000000000000000000000000000000000060003504634367e45e811461006d57806353fc513f146100df5780635fff88c814610103578063ead54c1b14610173575b600080fd5b6100dd6004803603602081101561008357600080fd5b81019060208101813564010000000081111561009e57600080fd5b8201836020820111156100b057600080fd5b803590602001918460018302840111640100000000831117156100d257600080fd5b50909250905061017b565b005b6100e76102c5565b60408051600160a060020a039092168252519081900360200190f35b6100dd6004803603602081101561011957600080fd5b81019060208101813564010000000081111561013457600080fd5b82018360208201111561014657600080fd5b8035906020019184600183028401116401000000008311171561016857600080fd5b5090925090506102d4565b6100e7610563565b6101836126d9565b6101c283838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061057292505050565b90506101cc6126f3565b81516101d7906106c9565b608081015151909150600090818160058111156101f057fe5b141561020b576102048385602001516108fe565b915061024c565b600181600581111561021957fe5b141561022d57610204838560200151610cc5565b6102368161109b565b1561024a57610204838560200151836110e0565bfe5b600084600001516040518082805190602001908083835b602083106102825780518252601f199092019160209182019101610263565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902090506102bc84828561181f565b50505050505050565b600054600160a060020a031681565b6102dc612759565b61031b83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ccd92505050565b905061032561277a565b815161033090611d76565b905061033a6126f3565b8151610345906106c9565b90508060800151602001516020015160200151826020015111156103b3576040805160e560020a62461bcd02815260206004820152601a60248201527f457863656564206d6178207472616e7366657220616d6f756e74000000000000604482015290519081900360640190fd5b600061041e84600001516040518082805190602001908083835b602083106103ec5780518252601f1990920191602091820191016103cd565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020611e03565b90506000610439856020015183611e5490919063ffffffff16565b90506000610454866040015184611e5490919063ffffffff16565b90508360200151600160a060020a031682600160a060020a031614801561049057508360400151600160a060020a031681600160a060020a0316145b6104e4576040805160e560020a62461bcd02815260206004820152601160248201527f436865636b2073696773206661696c6564000000000000000000000000000000604482015290519081900360640190fd5b600085600001516040518082805190602001908083835b6020831061051a5780518252601f1990920191602091820191016104fb565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902090506105588582886020015161181f565b505050505050505050565b600154600160a060020a031681565b61057a6126d9565b610582612794565b61058b83611f25565b905060606105a082600263ffffffff611f3c16565b9050806002815181106105af57fe5b60200260200101516040519080825280602002602001820160405280156105ea57816020015b60608152602001906001900390816105d55790505b50836020018190525060008160028151811061060257fe5b6020026020010181815250506000805b61061b84611fcc565b156106c05761062984611fd8565b909250905081600114156106475761064084612005565b85526106bb565b81600214156106ab5761065984612005565b85602001518460028151811061066b57fe5b60200260200101518151811061067d57fe5b60200260200101819052508260028151811061069557fe5b60209081029190910101805160010190526106bb565b6106bb848263ffffffff61209216565b610612565b50505050919050565b6106d16126f3565b6106d9612794565b6106e283611f25565b905060606106f782600863ffffffff611f3c16565b90508060048151811061070657fe5b602002602001015160405190808252806020026020018201604052801561074757816020015b6107346127ae565b81526020019060019003908161072c5790505b50836060018190525060008160048151811061075f57fe5b6020026020010181815250506000805b61077884611fcc565b156106c05761078684611fd8565b909250905081600114156107a45761079d846120f3565b85526108f9565b81600214156107d1576107be6107b985612005565b612151565b600160a060020a031660208601526108f9565b81600314156107f9576107e66107b985612005565b600160a060020a031660408601526108f9565b81600414156108655761081361080e85612005565b61215c565b85606001518460048151811061082557fe5b60200260200101518151811061083757fe5b60200260200101819052508260048151811061084f57fe5b60209081029190910101805160010190526108f9565b81600514156108895761087f61087a85612005565b61228e565b60808601526108f9565b81600614156108a55761089b846120f3565b60a08601526108f9565b81600714156108c1576108b7846120f3565b60c08601526108f9565b81600814156108e9576108d66107b985612005565b600160a060020a031660e08601526108f9565b6108f9848263ffffffff61209216565b61076f565b60008080805b856060015151811015610c97576109196127ae565b8660600151828151811061092957fe5b602002602001015190506000600281111561094057fe5b8151600281111561094d57fe5b1415610a2857806020015186858151811061096457fe5b60200260200101516040518082805190602001908083835b6020831061099b5780518252601f19909201916020918201910161097c565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902014610a1d576040805160e560020a62461bcd02815260206004820152600e60248201527f57726f6e6720707265696d616765000000000000000000000000000000000000604482015290519081900360640190fd5b600190930192610c8e565b600181516002811115610a3757fe5b1480610a4f5750600281516002811115610a4d57fe5b145b1561024a576000610a5f82612341565b60808301516040517fbcdbda940000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519495508594600160a060020a0386169463bcdbda9494909383926044909201919085019080838360005b83811015610ade578181015183820152602001610ac6565b50505050905090810190601f168015610b0b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b158015610b2857600080fd5b505afa158015610b3c573d6000803e3d6000fd5b505050506040513d6020811015610b5257600080fd5b5051610ba8576040805160e560020a62461bcd02815260206004820152601a60248201527f436f6e646974696f6e206973206e6f742066696e616c697a6564000000000000604482015290519081900360640190fd5b60a083015160405160e060020a63ea4ba8eb028152602060048201818152835160248401528351600160a060020a0386169463ea4ba8eb94909383926044909201919085019080838360005b83811015610c0c578181015183820152602001610bf4565b50505050905090810190601f168015610c395780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b158015610c5657600080fd5b505afa158015610c6a573d6000803e3d6000fd5b505050506040513d6020811015610c8057600080fd5b5051610c8b57600194505b50505b50600101610904565b508015610ca957600092505050610cbf565b8460800151602001516020015160200151925050505b92915050565b6000808080805b86606001515181101561106457610ce16127ae565b87606001518281518110610cf157fe5b6020026020010151905060006002811115610d0857fe5b81516002811115610d1557fe5b1415610df0578060200151878681518110610d2c57fe5b60200260200101516040518082805190602001908083835b60208310610d635780518252601f199092019160209182019101610d44565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902014610de5576040805160e560020a62461bcd02815260206004820152600e60248201527f57726f6e6720707265696d616765000000000000000000000000000000000000604482015290519081900360640190fd5b60019094019361105b565b600181516002811115610dff57fe5b1480610e175750600281516002811115610e1557fe5b145b1561024a576000610e2782612341565b60808301516040517fbcdbda940000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519495508594600160a060020a0386169463bcdbda9494909383926044909201919085019080838360005b83811015610ea6578181015183820152602001610e8e565b50505050905090810190601f168015610ed35780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b158015610ef057600080fd5b505afa158015610f04573d6000803e3d6000fd5b505050506040513d6020811015610f1a57600080fd5b5051610f70576040805160e560020a62461bcd02815260206004820152601a60248201527f436f6e646974696f6e206973206e6f742066696e616c697a6564000000000000604482015290519081900360640190fd5b60a083015160405160e060020a63ea4ba8eb02815260206004820181815283516024840152835160019a50600160a060020a0386169463ea4ba8eb94909383926044909201919085019080838360005b83811015610fd8578181015183820152602001610fc0565b50505050905090810190601f1680156110055780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561102257600080fd5b505afa158015611036573d6000803e3d6000fd5b505050506040513d602081101561104c57600080fd5b50511561105857600194505b50505b50600101610ccc565b5081158061106f5750805b1561108f5785608001516020015160200151602001519350505050610cbf565b60009350505050610cbf565b600060038260058111156110ab57fe5b14806110c2575060048260058111156110c057fe5b145b806110d8575060058260058111156110d657fe5b145b90505b919050565b6000808080805b876060015151811015611787576110fc6127ae565b8860600151828151811061110c57fe5b602002602001015190506000600281111561112357fe5b8151600281111561113057fe5b141561120b57806020015188858151811061114757fe5b60200260200101516040518082805190602001908083835b6020831061117e5780518252601f19909201916020918201910161115f565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902014611200576040805160e560020a62461bcd02815260206004820152600e60248201527f57726f6e6720707265696d616765000000000000000000000000000000000000604482015290519081900360640190fd5b60019093019261177e565b60018151600281111561121a57fe5b1480611232575060028151600281111561123057fe5b145b1561024a57600061124282612341565b60808301516040517fbcdbda940000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519495508594600160a060020a0386169463bcdbda9494909383926044909201919085019080838360005b838110156112c15781810151838201526020016112a9565b50505050905090810190601f1680156112ee5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561130b57600080fd5b505afa15801561131f573d6000803e3d6000fd5b505050506040513d602081101561133557600080fd5b505161138b576040805160e560020a62461bcd02815260206004820152601a60248201527f436f6e646974696f6e206973206e6f742066696e616c697a6564000000000000604482015290519081900360640190fd5b600389600581111561139957fe5b14156114a8576114a181600160a060020a031663ea4ba8eb8560a001516040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561141e578181015183820152602001611406565b50505050905090810190601f16801561144b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561146857600080fd5b505afa15801561147c573d6000803e3d6000fd5b505050506040513d602081101561149257600080fd5b5051889063ffffffff61241516565b9650611777565b60048960058111156114b657fe5b141561159e5760a083015160405160e060020a63ea4ba8eb0281526020600482018181528351602484015283516114a1948c94600160a060020a0388169463ea4ba8eb94929383926044019185019080838360005b8381101561152357818101518382015260200161150b565b50505050905090810190601f1680156115505780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561156d57600080fd5b505afa158015611581573d6000803e3d6000fd5b505050506040513d602081101561159757600080fd5b5051612427565b60058960058111156115ac57fe5b141561024a57841561169a5760a083015160405160e060020a63ea4ba8eb0281526020600482018181528351602484015283516114a1948c94600160a060020a0388169463ea4ba8eb94929383926044019185019080838360005b8381101561161f578181015183820152602001611607565b50505050905090810190601f16801561164c5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561166957600080fd5b505afa15801561167d573d6000803e3d6000fd5b505050506040513d602081101561169357600080fd5b505161243e565b60a083015160405160e060020a63ea4ba8eb028152602060048201818152835160248401528351600160a060020a0386169463ea4ba8eb94909383926044909201919085019080838360005b838110156116fe5781810151838201526020016116e6565b50505050905090810190601f16801561172b5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561174857600080fd5b505afa15801561175c573d6000803e3d6000fd5b505050506040513d602081101561177257600080fd5b505196505b6001945050505b506001016110e7565b5080156118015786608001516020015160200151602001518311156117f6576040805160e560020a62461bcd02815260206004820152601a60248201527f457863656564206d6178207472616e7366657220616d6f756e74000000000000604482015290519081900360640190fd5b829350505050611818565b866080015160200151602001516020015193505050505b9392505050565b60a083015143908111156118675760405160e560020a62461bcd02815260040180806020018281038252602a81526020018061285e602a913960400191505060405180910390fd5b6000611873843061244d565b60008054604080517f27b0e05800000000000000000000000000000000000000000000000000000000815260048101859052815194955092938493600160a060020a03909316926327b0e058926024808301939192829003018186803b1580156118dc57600080fd5b505afa1580156118f0573d6000803e3d6000fd5b505050506040513d604081101561190657600080fd5b50805160209091015190925090508015806119215750808411155b61195f5760405160e560020a62461bcd02815260040180806020018281038252602381526020018061283b6023913960400191505060405180910390fd5b8015611b60578185116119bc576040805160e560020a62461bcd02815260206004820152601860248201527f4e657720616d6f756e74206973206e6f74206c61726765720000000000000000604482015290519081900360640190fd5b8660800151602001516020015160200151851415611a9d5760008054604080517fe1e35490000000000000000000000000000000000000000000000000000000008152600481018a905260248101899052604481018890529051600160a060020a039092169263e1e354909260648084019382900301818387803b158015611a4357600080fd5b505af1158015611a57573d6000803e3d6000fd5b5050604080518881526020810188905281518794507fa87e293885636c5018108e8ee0e41d65206d1dfc0a9066f26f2a91a78b2beb1793509081900390910190a2611b5b565b60008054604080517ff8fb012f000000000000000000000000000000000000000000000000000000008152600481018a9052602481018990529051600160a060020a039092169263f8fb012f9260448084019382900301818387803b158015611b0557600080fd5b505af1158015611b19573d6000803e3d6000fd5b5050604080518881526020810185905281518794507fa87e293885636c5018108e8ee0e41d65206d1dfc0a9066f26f2a91a78b2beb1793509081900390910190a25b6102bc565b60008760800151602001516020015160200151861415611b81575083611bff565b611ba5611b9b8960c001518761241590919063ffffffff16565b8960a0015161243e565b905060008111611bff576040805160e560020a62461bcd02815260206004820152601960248201527f4e6577207265736f6c766520646561646c696e65206973203000000000000000604482015290519081900360640190fd5b60008054604080517fe1e35490000000000000000000000000000000000000000000000000000000008152600481018b9052602481018a9052604481018590529051600160a060020a039092169263e1e354909260648084019382900301818387803b158015611c6e57600080fd5b505af1158015611c82573d6000803e3d6000fd5b5050604080518981526020810185905281518894507fa87e293885636c5018108e8ee0e41d65206d1dfc0a9066f26f2a91a78b2beb1793509081900390910190a25050505050505050565b611cd5612759565b611cdd612794565b611ce683611f25565b90506000805b611cf583611fcc565b15611d6e57611d0383611fd8565b90925090508160011415611d2157611d1a83612005565b8452611d69565b8160021415611d3d57611d3383612005565b6020850152611d69565b8160031415611d5957611d4f83612005565b6040850152611d69565b611d69838263ffffffff61209216565b611cec565b505050919050565b611d7e61277a565b611d86612794565b611d8f83611f25565b90506000805b611d9e83611fcc565b15611d6e57611dac83611fd8565b90925090508160011415611dca57611dc383612005565b8452611dfe565b8160021415611dee57611de4611ddf84612005565b612492565b6020850152611dfe565b611dfe838263ffffffff61209216565b611d95565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b6000806000808451604114611e6f5760009350505050610cbf565b50505060208201516040830151606084015160001a601b811015611e9157601b015b8060ff16601b14158015611ea957508060ff16601c14155b15611eba5760009350505050610cbf565b6040805160008152602080820180845289905260ff8416828401526060820186905260808201859052915160019260a0808401939192601f1981019281900390910190855afa158015611f11573d6000803e3d6000fd5b505050602060405103519350505050610cbf565b611f2d612794565b60208101919091526000815290565b815160408051600184018082526020808202830101909252606092918015611f6e578160200160208202803883390190505b5091506000805b611f7e86611fcc565b15611fc357611f8c86611fd8565b80925081935050506001848381518110611fa257fe5b602002602001018181510191508181525050611fbe8682612092565b611f75565b50509092525090565b60208101515190511090565b6000806000611fe6846120f3565b9050600881049250806007166005811115611ffd57fe5b915050915091565b60606000612012836120f3565b835160208501515191925082019081111561202c57600080fd5b816040519080825280601f01601f191660200182016040528015612057576020820181803883390190505b50602080860151865192955091818601919083010160005b8581101561208757818101518382015260200161206f565b505050935250919050565b60008160058111156120a057fe5b14156120b5576120af826120f3565b506120ef565b60028160058111156120c357fe5b14156100685760006120d4836120f3565b8351810180855260208501515191925011156120af57600080fd5b5050565b602080820151825181019091015160009182805b600a81101561214b5783811a91508060070282607f169060020a02851794508160801660001415612143578551016001018552506110db915050565b600101612107565b50600080fd5b60006110d8826124b9565b6121646127ae565b61216c612794565b61217583611f25565b90506000805b61218483611fcc565b15611d6e5761219283611fd8565b909250905081600114156121d6576121a9836120f3565b60028111156121b457fe5b849060028111156121c157fe5b908160028111156121ce57fe5b905250612289565b81600214156121fa576121f06121eb84612005565b6124e1565b6020850152612289565b81600314156122225761220f6107b984612005565b600160a060020a03166040850152612289565b8160041415612241576122376121eb84612005565b6060850152612289565b816005141561225d5761225383612005565b6080850152612289565b81600614156122795761226f83612005565b60a0850152612289565b612289838263ffffffff61209216565b61217b565b6122966127e7565b61229e612794565b6122a783611f25565b90506000805b6122b683611fcc565b15611d6e576122c483611fd8565b90925090508160011415612308576122db836120f3565b60058111156122e657fe5b849060058111156122f357fe5b9081600581111561230057fe5b90525061233c565b816002141561232c5761232261231d84612005565b6124f9565b602085015261233c565b61233c838263ffffffff61209216565b6122ad565b600060018251600281111561235257fe5b1415612363575060408101516110db565b60028251600281111561237257fe5b141561024a576001546060830151604080517f5c23bdf5000000000000000000000000000000000000000000000000000000008152600481019290925251600160a060020a0390921691635c23bdf591602480820192602092909190829003018186803b1580156123e257600080fd5b505afa1580156123f6573d6000803e3d6000fd5b505050506040513d602081101561240c57600080fd5b505190506110db565b60008282018381101561181857600080fd5b6000818310156124375781611818565b5090919050565b60008183106124375781611818565b60408051602080820194909452600160a060020a03929092166c0100000000000000000000000002828201528051808303603401815260549092019052805191012090565b60006020825111156124a357600080fd5b506020818101519151600891030260020a900490565b600081516014146124c957600080fd5b50602001516c01000000000000000000000000900490565b600081516020146124f157600080fd5b506020015190565b612501612807565b612509612794565b61251283611f25565b90506000805b61252183611fcc565b15611d6e5761252f83611fd8565b909250905081600114156125555761254e61254984612005565b61258e565b8452612589565b81600214156125795761256f61256a84612005565b612645565b6020850152612589565b612589838263ffffffff61209216565b612518565b612596612823565b61259e612794565b6125a783611f25565b90506000805b6125b683611fcc565b15611d6e576125c483611fd8565b90925090508160011415612608576125db836120f3565b60028111156125e657fe5b849060028111156125f357fe5b9081600281111561260057fe5b905250612640565b81600214156126305761261d6107b984612005565b600160a060020a03166020850152612640565b612640838263ffffffff61209216565b6125ad565b61264d612823565b612655612794565b61265e83611f25565b90506000805b61266d83611fcc565b15611d6e5761267b83611fd8565b909250905081600114156126a5576126956107b984612005565b600160a060020a031684526126d4565b81600214156126c4576126ba611ddf84612005565b60208501526126d4565b6126d4838263ffffffff61209216565b612664565b604051806040016040528060608152602001606081525090565b604051806101800160405280600081526020016000600160a060020a031681526020016000600160a060020a03168152602001606081526020016127356127e7565b815260200160008152602001600081526020016000600160a060020a031681525090565b60405180606001604052806060815260200160608152602001606081525090565b604051806040016040528060608152602001600081525090565b604051806040016040528060008152602001606081525090565b6040805160c081019091528060008152600060208201819052604082018190526060808301919091526080820181905260a09091015290565b6040805160a081019091528060008152602001612802612807565b905290565b604051806080016040528061281a612823565b81526020016128025b60408051808201909152600080825260208201529056fe506173736564206f6e636861696e207265736f6c76652070617920646561646c696e6550617373656420706179207265736f6c766520646561646c696e6520696e20636f6e64506179206d7367a265627a7a7230582093f898be22b58cd90c9ab0973e537da4563a3f8560e795ecf5776258e9b315fe64736f6c634300050a0032"

// DeployPayResolver deploys a new Ethereum contract, binding an instance of PayResolver to it.
func DeployPayResolver(auth *bind.TransactOpts, backend bind.ContractBackend, _registryAddr common.Address, _virtResolverAddr common.Address) (common.Address, *types.Transaction, *PayResolver, error) {
	parsed, err := abi.JSON(strings.NewReader(PayResolverABI))
	if err != nil {
		return common.Address{}, nil, nil, err
	}

	address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(PayResolverBin), backend, _registryAddr, _virtResolverAddr)
	if err != nil {
		return common.Address{}, nil, nil, err
	}
	return address, tx, &PayResolver{PayResolverCaller: PayResolverCaller{contract: contract}, PayResolverTransactor: PayResolverTransactor{contract: contract}, PayResolverFilterer: PayResolverFilterer{contract: contract}}, nil
}

// PayResolver is an auto generated Go binding around an Ethereum contract.
type PayResolver struct {
	PayResolverCaller     // Read-only binding to the contract
	PayResolverTransactor // Write-only binding to the contract
	PayResolverFilterer   // Log filterer for contract events
}

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

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

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

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

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

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

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

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

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

// NewPayResolver creates a new instance of PayResolver, bound to a specific deployed contract.
func NewPayResolver(address common.Address, backend bind.ContractBackend) (*PayResolver, error) {
	contract, err := bindPayResolver(address, backend, backend, backend)
	if err != nil {
		return nil, err
	}
	return &PayResolver{PayResolverCaller: PayResolverCaller{contract: contract}, PayResolverTransactor: PayResolverTransactor{contract: contract}, PayResolverFilterer: PayResolverFilterer{contract: contract}}, nil
}

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

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

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

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

// Transact invokes the (paid) contract method with params as input values.
func (_PayResolver *PayResolverRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
	return _PayResolver.Contract.PayResolverTransactor.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 (_PayResolver *PayResolverCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
	return _PayResolver.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 (_PayResolver *PayResolverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _PayResolver.Contract.contract.Transfer(opts)
}

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

// PayRegistry is a free data retrieval call binding the contract method 0x53fc513f.
//
// Solidity: function payRegistry() view returns(address)
func (_PayResolver *PayResolverCaller) PayRegistry(opts *bind.CallOpts) (common.Address, error) {
	var (
		ret0 = new(common.Address)
	)
	out := ret0
	err := _PayResolver.contract.Call(opts, out, "payRegistry")
	return *ret0, err
}

// PayRegistry is a free data retrieval call binding the contract method 0x53fc513f.
//
// Solidity: function payRegistry() view returns(address)
func (_PayResolver *PayResolverSession) PayRegistry() (common.Address, error) {
	return _PayResolver.Contract.PayRegistry(&_PayResolver.CallOpts)
}

// PayRegistry is a free data retrieval call binding the contract method 0x53fc513f.
//
// Solidity: function payRegistry() view returns(address)
func (_PayResolver *PayResolverCallerSession) PayRegistry() (common.Address, error) {
	return _PayResolver.Contract.PayRegistry(&_PayResolver.CallOpts)
}

// VirtResolver is a free data retrieval call binding the contract method 0xead54c1b.
//
// Solidity: function virtResolver() view returns(address)
func (_PayResolver *PayResolverCaller) VirtResolver(opts *bind.CallOpts) (common.Address, error) {
	var (
		ret0 = new(common.Address)
	)
	out := ret0
	err := _PayResolver.contract.Call(opts, out, "virtResolver")
	return *ret0, err
}

// VirtResolver is a free data retrieval call binding the contract method 0xead54c1b.
//
// Solidity: function virtResolver() view returns(address)
func (_PayResolver *PayResolverSession) VirtResolver() (common.Address, error) {
	return _PayResolver.Contract.VirtResolver(&_PayResolver.CallOpts)
}

// VirtResolver is a free data retrieval call binding the contract method 0xead54c1b.
//
// Solidity: function virtResolver() view returns(address)
func (_PayResolver *PayResolverCallerSession) VirtResolver() (common.Address, error) {
	return _PayResolver.Contract.VirtResolver(&_PayResolver.CallOpts)
}

// ResolvePaymentByConditions is a paid mutator transaction binding the contract method 0x4367e45e.
//
// Solidity: function resolvePaymentByConditions(bytes _resolvePayRequest) returns()
func (_PayResolver *PayResolverTransactor) ResolvePaymentByConditions(opts *bind.TransactOpts, _resolvePayRequest []byte) (*types.Transaction, error) {
	return _PayResolver.contract.Transact(opts, "resolvePaymentByConditions", _resolvePayRequest)
}

// ResolvePaymentByConditions is a paid mutator transaction binding the contract method 0x4367e45e.
//
// Solidity: function resolvePaymentByConditions(bytes _resolvePayRequest) returns()
func (_PayResolver *PayResolverSession) ResolvePaymentByConditions(_resolvePayRequest []byte) (*types.Transaction, error) {
	return _PayResolver.Contract.ResolvePaymentByConditions(&_PayResolver.TransactOpts, _resolvePayRequest)
}

// ResolvePaymentByConditions is a paid mutator transaction binding the contract method 0x4367e45e.
//
// Solidity: function resolvePaymentByConditions(bytes _resolvePayRequest) returns()
func (_PayResolver *PayResolverTransactorSession) ResolvePaymentByConditions(_resolvePayRequest []byte) (*types.Transaction, error) {
	return _PayResolver.Contract.ResolvePaymentByConditions(&_PayResolver.TransactOpts, _resolvePayRequest)
}

// ResolvePaymentByVouchedResult is a paid mutator transaction binding the contract method 0x5fff88c8.
//
// Solidity: function resolvePaymentByVouchedResult(bytes _vouchedPayResult) returns()
func (_PayResolver *PayResolverTransactor) ResolvePaymentByVouchedResult(opts *bind.TransactOpts, _vouchedPayResult []byte) (*types.Transaction, error) {
	return _PayResolver.contract.Transact(opts, "resolvePaymentByVouchedResult", _vouchedPayResult)
}

// ResolvePaymentByVouchedResult is a paid mutator transaction binding the contract method 0x5fff88c8.
//
// Solidity: function resolvePaymentByVouchedResult(bytes _vouchedPayResult) returns()
func (_PayResolver *PayResolverSession) ResolvePaymentByVouchedResult(_vouchedPayResult []byte) (*types.Transaction, error) {
	return _PayResolver.Contract.ResolvePaymentByVouchedResult(&_PayResolver.TransactOpts, _vouchedPayResult)
}

// ResolvePaymentByVouchedResult is a paid mutator transaction binding the contract method 0x5fff88c8.
//
// Solidity: function resolvePaymentByVouchedResult(bytes _vouchedPayResult) returns()
func (_PayResolver *PayResolverTransactorSession) ResolvePaymentByVouchedResult(_vouchedPayResult []byte) (*types.Transaction, error) {
	return _PayResolver.Contract.ResolvePaymentByVouchedResult(&_PayResolver.TransactOpts, _vouchedPayResult)
}

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

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

// PayResolverResolvePayment represents a ResolvePayment event raised by the PayResolver contract.
type PayResolverResolvePayment struct {
	PayId           [32]byte
	Amount          *big.Int
	ResolveDeadline *big.Int
	Raw             types.Log // Blockchain specific contextual infos
}

// FilterResolvePayment is a free log retrieval operation binding the contract event 0xa87e293885636c5018108e8ee0e41d65206d1dfc0a9066f26f2a91a78b2beb17.
//
// Solidity: event ResolvePayment(bytes32 indexed payId, uint256 amount, uint256 resolveDeadline)
func (_PayResolver *PayResolverFilterer) FilterResolvePayment(opts *bind.FilterOpts, payId [][32]byte) (*PayResolverResolvePaymentIterator, error) {

	var payIdRule []interface{}
	for _, payIdItem := range payId {
		payIdRule = append(payIdRule, payIdItem)
	}

	logs, sub, err := _PayResolver.contract.FilterLogs(opts, "ResolvePayment", payIdRule)
	if err != nil {
		return nil, err
	}
	return &PayResolverResolvePaymentIterator{contract: _PayResolver.contract, event: "ResolvePayment", logs: logs, sub: sub}, nil
}

// WatchResolvePayment is a free log subscription operation binding the contract event 0xa87e293885636c5018108e8ee0e41d65206d1dfc0a9066f26f2a91a78b2beb17.
//
// Solidity: event ResolvePayment(bytes32 indexed payId, uint256 amount, uint256 resolveDeadline)
func (_PayResolver *PayResolverFilterer) WatchResolvePayment(opts *bind.WatchOpts, sink chan<- *PayResolverResolvePayment, payId [][32]byte) (event.Subscription, error) {

	var payIdRule []interface{}
	for _, payIdItem := range payId {
		payIdRule = append(payIdRule, payIdItem)
	}

	logs, sub, err := _PayResolver.contract.WatchLogs(opts, "ResolvePayment", payIdRule)
	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(PayResolverResolvePayment)
				if err := _PayResolver.contract.UnpackLog(event, "ResolvePayment", 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
}

// ParseResolvePayment is a log parse operation binding the contract event 0xa87e293885636c5018108e8ee0e41d65206d1dfc0a9066f26f2a91a78b2beb17.
//
// Solidity: event ResolvePayment(bytes32 indexed payId, uint256 amount, uint256 resolveDeadline)
func (_PayResolver *PayResolverFilterer) ParseResolvePayment(log types.Log) (*PayResolverResolvePayment, error) {
	event := new(PayResolverResolvePayment)
	if err := _PayResolver.contract.UnpackLog(event, "ResolvePayment", log); err != nil {
		return nil, err
	}
	return event, nil
}
