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

package operation

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
)

// LedgerOperationABI is the input ABI used to generate the binding from.
const LedgerOperationABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"tokenType\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"peerAddrs\",\"type\":\"address[2]\"},{\"indexed\":false,\"name\":\"initialDeposits\",\"type\":\"uint256[2]\"}],\"name\":\"OpenChannel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"peerAddrs\",\"type\":\"address[2]\"},{\"indexed\":false,\"name\":\"deposits\",\"type\":\"uint256[2]\"},{\"indexed\":false,\"name\":\"withdrawals\",\"type\":\"uint256[2]\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"seqNums\",\"type\":\"uint256[2]\"}],\"name\":\"SnapshotStates\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"seqNums\",\"type\":\"uint256[2]\"}],\"name\":\"IntendSettle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"payId\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"peerFrom\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ClearOnePay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"settleBalance\",\"type\":\"uint256[2]\"}],\"name\":\"ConfirmSettle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"channelId\",\"type\":\"bytes32\"}],\"name\":\"ConfirmSettleFail\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"IntendWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"withdrawnAmount\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"recipientChannelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"deposits\",\"type\":\"uint256[2]\"},{\"indexed\":false,\"name\":\"withdrawals\",\"type\":\"uint256[2]\"}],\"name\":\"ConfirmWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"channelId\",\"type\":\"bytes32\"}],\"name\":\"VetoWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"withdrawnAmount\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"recipientChannelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"deposits\",\"type\":\"uint256[2]\"},{\"indexed\":false,\"name\":\"withdrawals\",\"type\":\"uint256[2]\"},{\"indexed\":false,\"name\":\"seqNum\",\"type\":\"uint256\"}],\"name\":\"CooperativeWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"channelId\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"settleBalance\",\"type\":\"uint256[2]\"}],\"name\":\"CooperativeSettle\",\"type\":\"event\"}]"

// LedgerOperationBin is the compiled bytecode used for deploying new contracts.
var LedgerOperationBin = "0x6159e862000027600b82828239805160001a60731461001a57fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106101035760003560e060020a9004806383e0fef5116100a5578063c98c925111610074578063c98c925114610486578063e59f3686146104a3578063eb4de33714610527578063ff7fb4111461055757610103565b806383e0fef5146103c4578063bb3d0f2b146103f4578063bd199ca514610424578063bd9d31571461044157610103565b806360297df3116100e157806360297df31461024b578063742fb5071461028057806379e90087146103045780637a2654ed1461038857610103565b80630bdc54111461010857806344e58d511461018e578063594db6e3146101c7575b600080fd5b81801561011457600080fd5b5061018c6004803603604081101561012b57600080fd5b8135919081019060408101602082013564010000000081111561014d57600080fd5b82018360208201111561015f57600080fd5b8035906020019184600183028401116401000000008311171561018157600080fd5b5090925090506105f0565b005b6101ab600480360360208110156101a457600080fd5b5035610b7d565b60408051600160a060020a039092168252519081900360200190f35b8180156101d357600080fd5b5061018c600480360360408110156101ea57600080fd5b8135919081019060408101602082013564010000000081111561020c57600080fd5b82018360208201111561021e57600080fd5b8035906020019184600183028401116401000000008311171561024057600080fd5b509092509050610b91565b61026e6004803603604081101561026157600080fd5b50803590602001356114ff565b60408051918252519081900360200190f35b81801561028c57600080fd5b5061018c600480360360408110156102a357600080fd5b813591908101906040810160208201356401000000008111156102c557600080fd5b8201836020820111156102d757600080fd5b803590602001918460018302840111640100000000831117156102f957600080fd5b509092509050611515565b81801561031057600080fd5b5061018c6004803603604081101561032757600080fd5b8135919081019060408101602082013564010000000081111561034957600080fd5b82018360208201111561035b57600080fd5b8035906020019184600183028401116401000000008311171561037d57600080fd5b5090925090506118e4565b81801561039457600080fd5b5061018c600480360360808110156103ab57600080fd5b5080359060208101359060408101359060600135611e10565b8180156103d057600080fd5b5061018c600480360360408110156103e757600080fd5b5080359060200135612079565b81801561040057600080fd5b5061018c6004803603604081101561041757600080fd5b5080359060200135612376565b6101ab6004803603602081101561043a57600080fd5b50356125c9565b81801561044d57600080fd5b5061018c6004803603608081101561046457600080fd5b50803590602081013590600160a060020a0360408201351690606001356125d9565b6101ab6004803603602081101561049c57600080fd5b50356128ad565b8180156104af57600080fd5b5061018c600480360360408110156104c657600080fd5b813591908101906040810160208201356401000000008111156104e857600080fd5b8201836020820111156104fa57600080fd5b8035906020019184600183028401116401000000008311171561051c57600080fd5b5090925090506128bd565b81801561053357600080fd5b5061018c6004803603604081101561054a57600080fd5b5080359060200135612c8b565b81801561056357600080fd5b5061018c6004803603608081101561057a57600080fd5b813591602081013591600160a060020a0360408301351691908101906080810160608201356401000000008111156105b157600080fd5b8201836020820111156105c357600080fd5b803590602001918460018302840111640100000000831117156105e557600080fd5b509092509050612e1c565b6105f86156e8565b61063783838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612f9492505050565b8051519091506106456156fb565b61066a836000015160008151811061065957fe5b6020026020010151600001516130dd565b905060005b82811015610b74578151600081815260068901602052604090206001600382015460ff16600481111561069e57fe5b14806106bc57506002600382015460ff1660048111156106ba57fe5b145b6106fe576040805160e560020a62461bcd0281526020600482015260146024820152600080516020615931833981519152604482015290519081900360640190fd5b8054158061070c5750805443105b610760576040805160e560020a62461bcd02815260206004820152601c60248201527f536574746c652068617320616c72656164792066696e616c697a656400000000604482015290519081900360640190fd5b60008660000151848151811061077257fe5b6020026020010151600001516040518082805190602001908083835b602083106107ad5780518252601f19909201916020918201910161078e565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902090506060876000015185815181106107ee57fe5b60200260200101516020015190506000866040015111156109b75761081a83838363ffffffff61322716565b61085c576040805160e560020a62461bcd0281526020600482015260146024820152600080516020615994833981519152604482015290519081900360640190fd5b60006108758760200151856132c590919063ffffffff16565b9050600084600401826002811061088857fe5b6008020160030190506001600481111561089e57fe5b600386015460ff1660048111156108b157fe5b141561090757805460408901511015610902576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615974833981519152604482015290519081900360640190fd5b61096e565b6002600386015460ff16600481111561091c57fe5b141561096c578054604089015111610902576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615974833981519152604482015290519081900360640190fd5bfe5b6040880151815560608801516020908101518101516001830155608089015190810151600283015560a08901516003830155516109b0908e9088908590613358565b5050610aa0565b604086015161096c57825415610a17576040805160e560020a62461bcd02815260206004820152601360248201527f696e74656e64536574746c65206265666f726500000000000000000000000000604482015290519081900360640190fd5b80516001148015610a4c5750610a4c8282600081518110610a3457fe5b6020026020010151856135bb9092919063ffffffff16565b610aa0576040805160e560020a62461bcd02815260206004820152601060248201527f436865636b20736967206661696c656400000000000000000000000000000000604482015290519081900360640190fd5b610ab187600163ffffffff6135ec16565b851415610ac757610ac28b85613601565b610b64565b610ad887600163ffffffff6135ec16565b85101561096c57610af58860000151866001018151811061065957fe5b8051909650841115610b51576040805160e560020a62461bcd02815260206004820152601860248201527f4e6f6e2d617363656e64696e67206368616e6e656c4964730000000000000000604482015290519081900360640190fd5b8551841015610ac257610ac28b85613601565b50506001909201915061066f9050565b50505050505050565b6002810154600160a060020a03165b919050565b610b99615751565b610bd883838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061369f92505050565b9050610be261576b565b8151610bed906137ed565b80516020015151909150600214610c4e576040805160e560020a62461bcd02815260206004820152600c60248201527f57726f6e67206c656e6774680000000000000000000000000000000000000000604482015290519081900360640190fd5b8060200151431115610caa576040805160e560020a62461bcd02815260206004820152601460248201527f4f70656e20646561646c696e6520706173736564000000000000000000000000604482015290519081900360640190fd5b610cb2615799565b50805151610cbe6157b0565b6040518060400160405280846000015160200151600081518110610cde57fe5b6020026020010151602001518152602001846000015160200151600181518110610d0457fe5b6020026020010151602001518152509050610d1d6157b0565b6040518060400160405280856000015160200151600081518110610d3d57fe5b602002602001015160000151600160a060020a0316600160a060020a03168152602001856000015160200151600181518110610d7557fe5b60209081029190910181015151600160a060020a0390811690925282015182519293508116911610610df1576040805160e560020a62461bcd02815260206004820152601c60248201527f5065657220616464727320617265206e6f7420617363656e64696e6700000000604482015290519081900360640190fd5b600388015485516040518151600160a060020a03909316926000929190819060208401908083835b60208310610e385780518252601f199092019160209182019101610e19565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050600080610e768c8587866138b2565b9150915087604001518160010181905550610e938c826001613ae0565b610e9c87613c00565b805160028084018054909291839160ff1916906001908490811115610ebd57fe5b0217905550602091820151815474ffffffffffffffffffffffffffffffffffffffff001916610100600160a060020a039283160217909155865160048401805491831673ffffffffffffffffffffffffffffffffffffffff199283161790558851600585015587830151600c85018054909216921691909117905586810151600d830155890151610f519082908590613227565b610f93576040805160e560020a62461bcd0281526020600482015260146024820152600080516020615994833981519152604482015290519081900360640190fd5b8660200151600160a060020a0316827f9d9f66221370175606b4085f28a419b201c9b6dafd9e0c4520e5bf69ea3e166d89600001516002811115610fd357fe5b888a6040518084815260200183600260200280838360005b83811015611003578181015183820152602001610feb565b5050505090500182600260200280838360005b8381101561102e578181015183820152602001611016565b50505050905001935050505060405180910390a3600061106487600160200201518860005b60200201519063ffffffff613c8916565b9050806110d05734156110c1576040805160e560020a62461bcd02815260206004820152601260248201527f6d73672e76616c7565206973206e6f7420300000000000000000000000000000604482015290519081900360640190fd5b505050505050505050506114fa565b60058d015460ff161561115457602080890151600160a060020a0316600090815260048f019091526040902054811115611154576040805160e560020a62461bcd02815260206004820152601560248201527f42616c616e63652065786365656473206c696d69740000000000000000000000604482015290519081900360640190fd5b60018851600281111561116357fe5b141561136c57606089015187816002811061117a57fe5b602002015134146111d5576040805160e560020a62461bcd02815260206004820152601260248201527f6d73672e76616c7565206d69736d617463680000000000000000000000000000604482015290519081900360640190fd5b60008882600281106111e357fe5b602002015111156112615785600160a060020a031663d68d9d4e89836002811061120957fe5b6020020151866040518363ffffffff1660e060020a028152600401808281526020019150506000604051808303818588803b15801561124757600080fd5b505af115801561125b573d6000803e3d6000fd5b50505050505b600061127460018363ffffffff6135ec16565b9050600089826002811061128457fe5b602002015111156113655760018f0154600160a060020a0316637e1cd4318983600281106112ae57fe5b602002015189888d86600281106112c157fe5b60200201516040518563ffffffff1660e060020a0281526004018085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a03168152602001838152602001828152602001945050505050602060405180830381600087803b15801561133857600080fd5b505af115801561134c573d6000803e3d6000fd5b505050506040513d602081101561136257600080fd5b50505b50506114ef565b60028851600281111561137b57fe5b141561096c5734156113d7576040805160e560020a62461bcd02815260206004820152601260248201527f6d73672e76616c7565206973206e6f7420300000000000000000000000000000604482015290519081900360640190fd5b602088015160005b6002811015611448578881600281106113f457fe5b602002015161140257611440565b61144088826002811061141157fe5b6020020151308b846002811061142357fe5b6020020151600160a060020a03861692919063ffffffff613c9b16565b6001016113df565b50611463600160a060020a038216878463ffffffff613d4a16565b604080517fc108bb4000000000000000000000000000000000000000000000000000000000815260048101869052600160a060020a0383811660248301526044820185905291519188169163c108bb409160648082019260009290919082900301818387803b1580156114d557600080fd5b505af11580156114e9573d6000803e3d6000fd5b50505050505b505050505050505050505b505050565b6000818152602083905260409020545b92915050565b61151d615751565b61155c83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613e8a92505050565b90506115666157ce565b815161157190613fd8565b805160808201516000828152600689016020526040902092935090916001600382015460ff1660048111156115a257fe5b146115e5576040805160e560020a62461bcd0281526020600482015260146024820152600080516020615931833981519152604482015290519081900360640190fd5b600085600001516040518082805190602001908083835b6020831061161b5780518252601f1990920191602091820191016115fc565b51815160209384036101000a6000190180199092169116179052604051919093018190039020918a0151919450611659935085925084919050613227565b61169b576040805160e560020a62461bcd0281526020600482015260146024820152600080516020615994833981519152604482015290519081900360640190fd5b601482015460208601516116b49163ffffffff6135ec16565b6001146116f9576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615974833981519152604482015290519081900360640190fd5b8460600151431115611755576040805160e560020a62461bcd02815260206004820152601860248201527f576974686472617720646561646c696e65207061737365640000000000000000604482015290519081900360640190fd5b6040850151805160208088015160148601559091015161177e848383600163ffffffff6140bf16565b6117866157b0565b61178e6157b0565b8573__LedgerChannel_________________________63c8ed149e90916040518263ffffffff1660e060020a0281526004018082815260200191505060c06040518083038186803b1580156117e257600080fd5b505af41580156117f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525060c081101561181b57600080fd5b506020808b0151604080518781528185019650608090940194508a93600160a060020a038916938d937f1b87d077d9b706e42883b454b67730633fd6b4b29f9a9cf5f57c278c54f51c8f938a938a938a939290820190859080838360005b83811015611891578181015183820152602001611879565b5050505090500183600260200280838360005b838110156118bc5781810151838201526020016118a4565b5050505090500182815260200194505050505060405180910390a46114ef8d8986868b614133565b6118ec615751565b61192b83838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061433392505050565b9050611935615801565b815161194090614481565b805160008181526006880160205260409020919250906001600382015460ff16600481111561196b57fe5b148061198957506002600382015460ff16600481111561198757fe5b145b6119cb576040805160e560020a62461bcd0281526020600482015260146024820152600080516020615931833981519152604482015290519081900360640190fd5b600084600001516040518082805190602001908083835b60208310611a015780518252601f1990920191602091820191016119e2565b51815160209384036101000a600019018019909216911617905260405191909301819003902091890151919450611a3f935085925084919050613227565b611a81576040805160e560020a62461bcd0281526020600482015260146024820152600080516020615994833981519152604482015290519081900360640190fd5b611a896157b0565b50604080518082019091526004830154600160a060020a039081168252600c84015416602080830191909152600784015490860151118015611ad25750600f8301546020860151115b611b14576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615974833981519152604482015290519081900360640190fd5b4385606001511015611b70576040805160e560020a62461bcd02815260206004820152601660248201527f536574746c6520646561646c696e652070617373656400000000000000000000604482015290519081900360640190fd5b8060006020020151600160a060020a03168560400151600081518110611b9257fe5b602002602001015160000151600160a060020a0316148015611be857508060016020020151600160a060020a03168560400151600181518110611bd157fe5b602002602001015160000151600160a060020a0316145b611c3c576040805160e560020a62461bcd02815260206004820152601860248201527f536574746c65206163636f756e7473206d69736d617463680000000000000000604482015290519081900360640190fd5b611c446157b0565b60405180604001604052808760400151600081518110611c6057fe5b60200260200101516020015181526020018760400151600181518110611c8257fe5b60200260200101516020015181525090508373__LedgerChannel_________________________63d6b89e3a90916040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b158015611ce757600080fd5b505af4158015611cfb573d6000803e3d6000fd5b505050506040513d6020811015611d1157600080fd5b50516020820151611d2490836000611053565b14611d79576040805160e560020a62461bcd02815260206004820152601460248201527f42616c616e63652073756d206d69736d61746368000000000000000000000000604482015290519081900360640190fd5b611d858a856003613ae0565b847f6c666557dc97fd52cd2d9d6dd6d109e501ffdb831abeecf13aafeeaf762ee1fd826040518082600260200280838360005b83811015611dd0578181015183820152602001611db8565b5050505090500191505060405180910390a26002840154611e04908b9087906101009004600160a060020a03168585614613565b50505050505050505050565b600083815260068501602052604090206004810160158201336001600385015460ff166004811115611e3e57fe5b14611e81576040805160e560020a62461bcd0281526020600482015260146024820152600080516020615931833981519152604482015290519081900360640190fd5b8154600160a060020a031615611ee1576040805160e560020a62461bcd02815260206004820152601e60248201527f50656e64696e6720776974686472617720696e74656e74206578697374730000604482015290519081900360640190fd5b6000611ef3858363ffffffff6132c516565b90506000611f0860018363ffffffff6135ec16565b90506000611f9f868460028110611f1b57fe5b6008020160030160040154611f93888660028110611f3557fe5b6008020160030160010154611f938a8860028110611f4f57fe5b6008020160020154611f938c8960028110611f6657fe5b60080201600301600101548d8b60028110611f7d57fe5b6008020160010154613c8990919063ffffffff16565b9063ffffffff6135ec16565b905080891115611ff9576040805160e560020a62461bcd02815260206004820152601560248201527f457863656564207769746864726177206c696d69740000000000000000000000604482015290519081900360640190fd5b8454600160a060020a03851673ffffffffffffffffffffffffffffffffffffffff1990911681178655600186018a905543600287015560038601899055604080518b815290518c917f97883669625c4ff7f5432b4ca33fe75fb5fee985deb196a967e5758f846170fe919081900360200190a35050505050505050505050565b600081815260068301602052604090206001600382015460ff16600481111561209e57fe5b146120e1576040805160e560020a62461bcd0281526020600482015260146024820152600080516020615931833981519152604482015290519081900360640190fd5b6015810154600160a060020a0316612143576040805160e560020a62461bcd02815260206004820152601a60248201527f4e6f2070656e64696e6720776974686472617720696e74656e74000000000000604482015290519081900360640190fd5b6001810154601782015461215c9163ffffffff613c8916565b4310156121b3576040805160e560020a62461bcd02815260206004820152601360248201527f44697370757465206e6f742074696d656f757400000000000000000000000000604482015290519081900360640190fd5b60158101805460168301805460188501805473ffffffffffffffffffffffffffffffffffffffff19851690955560009283905560178601839055829055600160a060020a0390921692906122129085908590859063ffffffff6140bf16565b61221a6157b0565b6122226157b0565b8573__LedgerChannel_________________________63c8ed149e90916040518263ffffffff1660e060020a0281526004018082815260200191505060c06040518083038186803b15801561227657600080fd5b505af415801561228a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525060c08110156122af57600080fd5b50604080518681528183019450608090920192508491600160a060020a038816918a917fe8110b4ee08638c48f6a4d5f726927df4e541893efa9d2c2c47a6b889041826e91899188918891906020820190849080838360005b83811015612320578181015183820152602001612308565b5050505090500182600260200280838360005b8381101561234b578181015183820152602001612333565b50505050905001935050505060405180910390a461236c8888878787614133565b5050505050505050565b6000818152600683016020526040902060048101436002600384015460ff1660048111156123a057fe5b146123e3576040805160e560020a62461bcd0281526020600482015260146024820152600080516020615931833981519152604482015290519081900360640190fd5b825481101561243c576040805160e560020a62461bcd02815260206004820152601760248201527f536574746c65206973206e6f742066696e616c697a6564000000000000000000604482015290519081900360640190fd5b600582015415806124505750600682015481115b801561246b5750600d820154158061246b5750600e82015481115b6124bf576040805160e560020a62461bcd02815260206004820152601a60248201527f5061796d656e747320617265206e6f742066696e616c697a6564000000000000604482015290519081900360640190fd5b60006124c96157b0565b6124d285614703565b915091508161251a576124e587866148f5565b60405186907fa6549eb18490d42e7ec93f42115d1ee11b706d04077be9597034dd73ec8bcb3690600090a250505050506125c5565b61252687866003613ae0565b857f728ddd8c5acda5947c34db8d759c66ae70884f526ff9b93637d351b012ef3206826040518082600260200280838360005b83811015612571578181015183820152602001612559565b5050505090500191505060405180910390a26002850154604080518082019091528554600160a060020a039081168252600887015481166020830152610b74928a928a926101009092049091169085614613565b5050565b60030154600160a060020a031690565b346125f58585856125f0868663ffffffff613c8916565b614983565b60008481526006860160205260409020600160028083015460ff169081111561261a57fe5b14156127645781156126a9576003860154604080517fd68d9d4e000000000000000000000000000000000000000000000000000000008152600481018890529051600160a060020a039092169163d68d9d4e918591602480830192600092919082900301818588803b15801561268f57600080fd5b505af11580156126a3573d6000803e3d6000fd5b50505050505b821561275f5760018601546003870154604080517f7e1cd431000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a039283166024820152604481018990526064810187905290519190921691637e1cd4319160848083019260209291908290030181600087803b15801561273257600080fd5b505af1158015612746573d6000803e3d6000fd5b505050506040513d602081101561275c57600080fd5b50505b6128a5565b60028181015460ff168181111561277757fe5b141561096c5781156127d3576040805160e560020a62461bcd02815260206004820152601260248201527f6d73672e76616c7565206973206e6f7420300000000000000000000000000000604482015290519081900360640190fd5b60028101546101009004600160a060020a03166127f281333087613c9b565b600387015461281490600160a060020a0383811691168663ffffffff613d4a16565b6003870154604080517fc108bb4000000000000000000000000000000000000000000000000000000000815260048101899052600160a060020a038481166024830152604482018890529151919092169163c108bb4091606480830192600092919082900301818387803b15801561288b57600080fd5b505af115801561289f573d6000803e3d6000fd5b50505050505b505050505050565b60010154600160a060020a031690565b6128c56156e8565b61290483838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612f9492505050565b8051519091506129126156fb565b612926836000015160008151811061065957fe5b905060005b82811015610b74578151600081815260068901602052604090206001600382015460ff16600481111561295a57fe5b1461299d576040805160e560020a62461bcd0281526020600482015260146024820152600080516020615931833981519152604482015290519081900360640190fd5b6000866000015184815181106129af57fe5b6020026020010151600001516040518082805190602001908083835b602083106129ea5780518252601f1990920191602091820191016129cb565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050606087600001518581518110612a2b57fe5b6020026020010151602001519050612a4e8282856132279092919063ffffffff16565b612a90576040805160e560020a62461bcd0281526020600482015260146024820152600080516020615994833981519152604482015290519081900360640190fd5b6000612aa98760200151856132c590919063ffffffff16565b90506000846004018260028110612abc57fe5b6008020160030190508060000154886040015111612b12576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615974833981519152604482015290519081900360640190fd5b604088015181556060880151602090810151015160018083019190915560c08901516004830155612b4a908a9063ffffffff6135ec16565b871415612bbb57857fd0793cc4198bf052a6d91a9a1273c4af39f02a91b0e19029477511c278c5b271612b7c87614cd3565b6040518082600260200280838360005b83811015612ba4578181015183820152602001612b8c565b5050505090500191505060405180910390a2612c79565b612bcc89600163ffffffff6135ec16565b87101561096c57612be98a60000151886001018151811061065957fe5b8051909850861115612c45576040805160e560020a62461bcd02815260206004820152601860248201527f4e6f6e2d617363656e64696e67206368616e6e656c4964730000000000000000604482015290519081900360640190fd5b8751861015612c7957857fd0793cc4198bf052a6d91a9a1273c4af39f02a91b0e19029477511c278c5b271612b7c87614cd3565b50506001909401935061292b92505050565b600081815260068301602052604090206001600382015460ff166004811115612cb057fe5b14612cf3576040805160e560020a62461bcd0281526020600482015260146024820152600080516020615931833981519152604482015290519081900360640190fd5b6015810154600160a060020a0316612d55576040805160e560020a62461bcd02815260206004820152601a60248201527f4e6f2070656e64696e6720776974686472617720696e74656e74000000000000604482015290519081900360640190fd5b612d65813363ffffffff614cfb16565b612db9576040805160e560020a62461bcd02815260206004820152601660248201527f6d73672e73656e646572206973206e6f74207065657200000000000000000000604482015290519081900360640190fd5b60158101805473ffffffffffffffffffffffffffffffffffffffff19169055600060168201819055601782018190556018820181905560405183917f9a8a5493b616f074b3f754b5fd66049c8e7980f01547289e5e31808485c6002c91a2505050565b600084815260068601602052604090206002600382015460ff166004811115612e4157fe5b14612e84576040805160e560020a62461bcd0281526020600482015260146024820152600080516020615931833981519152604482015290519081900360640190fd5b6000612e96828663ffffffff6132c516565b90506000848460405180838380828437604051920182900390912094506000935050506004850190508360028110612eca57fe5b60080201600301905081816002015414612f2e576040805160e560020a62461bcd02815260206004820152601260248201527f4c6973742068617368206d69736d617463680000000000000000000000000000604482015290519081900360640190fd5b612f3661582c565b612f7587878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250614d2f92505050565b905080602001518260020181905550611e048a8a868460000151613358565b612f9c6156e8565b612fa4615844565b612fad83614e7a565b90506060612fc282600163ffffffff614e9116565b905080600181518110612fd157fe5b602002602001015160405190808252806020026020018201604052801561301257816020015b612fff615751565b815260200190600190039081612ff75790505b50835280516000908290600190811061302757fe5b6020026020010181815250506000805b61304084614f21565b156130d45761304e84614f2d565b909250905081600114156130bf5761306d61306885614f5a565b614fe7565b85600001518460018151811061307f57fe5b60200260200101518151811061309157fe5b6020026020010181905250826001815181106130a957fe5b60209081029190910101805160010190526130cf565b6130cf848263ffffffff61513516565b613037565b50505050919050565b6130e56156fb565b6130ed615844565b6130f683614e7a565b90506000805b61310583614f21565b1561321f5761311383614f2d565b909250905081600114156131395761313261312d84614f5a565b615192565b845261321a565b81600214156131665761315361314e84614f5a565b6151aa565b600160a060020a0316602085015261321a565b816003141561318257613178836151b5565b604085015261321a565b81600414156131a65761319c61319784614f5a565b615213565b606085015261321a565b81600514156131ca576131c06131bb84614f5a565b614d2f565b608085015261321a565b81600614156131e6576131dc836151b5565b60a085015261321a565b816007141561320a576132006131fb84614f5a565b6152a3565b60c085015261321a565b61321a838263ffffffff61513516565b6130fc565b505050919050565b6000815160021461323a575060006132be565b6000613245846152ca565b90506000805b60028110156132b65761327a85828151811061326357fe5b60200260200101518461531b90919063ffffffff16565b915086600401816002811061328b57fe5b6008020154600160a060020a038381169116146132ae57600093505050506132be565b60010161324b565b506001925050505b9392505050565b6004820154600090600160a060020a03838116911614156132e85750600061150f565b600c830154600160a060020a03838116911614156133085750600161150f565b6040805160e560020a62461bcd02815260206004820152600d60248201527f4e6f6e6578697374207065657200000000000000000000000000000000000000604482015290519081900360640190fd5b60008381526006850160205260409020600280860154606091600160a060020a0390911690637cac39cf90859060048601908890811061339457fe5b60080201600301600301546040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019060200280838360005b838110156133f75781810151838201526020016133df565b50505050905001935050505060006040518083038186803b15801561341b57600080fd5b505afa15801561342f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561345857600080fd5b81019080805164010000000081111561347057600080fd5b8201602081018481111561348357600080fd5b81518560208202830111640100000000821117156134a057600080fd5b509094506000935083925050505b8251811015613568576134dd8382815181106134c657fe5b602002602001015183613c8990919063ffffffff16565b91508360040186600281106134ee57fe5b60080201548551600160a060020a039091169086908390811061350d57fe5b6020026020010151887f33252d4bc5cee2ad248475e8c39239a79dc64b2691c9ca1a63ff9af0c75b877686858151811061354357fe5b60200260200101516040518082815260200191505060405180910390a46001016134ae565b506135958184600401876002811061357c57fe5b6008020160030160010154613c8990919063ffffffff16565b8360040186600281106135a457fe5b600802016003016001018190555050505050505050565b6000806135d7836135cb866152ca565b9063ffffffff61531b16565b90506135e38582614cfb565b95945050505050565b6000828211156135fb57600080fd5b50900390565b60008181526006830160205260409020600181015461362790439063ffffffff613c8916565b815561363583826002613ae0565b817f296143e7e25aa055fbb871702776a67da540876e2be721d5c38ba23c97c90d6461366083614cd3565b6040518082600260200280838360005b83811015613688578181015183820152602001613670565b5050505090500191505060405180910390a2505050565b6136a7615751565b6136af615844565b6136b883614e7a565b905060606136cd82600263ffffffff614e9116565b9050806002815181106136dc57fe5b602002602001015160405190808252806020026020018201604052801561371757816020015b60608152602001906001900390816137025790505b50836020018190525060008160028151811061372f57fe5b6020026020010181815250506000805b61374884614f21565b156130d45761375684614f2d565b909250905081600114156137745761376d84614f5a565b85526137e8565b81600214156137d85761378684614f5a565b85602001518460028151811061379857fe5b6020026020010151815181106137aa57fe5b6020026020010181905250826002815181106137c257fe5b60209081029190910101805160010190526137e8565b6137e8848263ffffffff61513516565b61373f565b6137f561576b565b6137fd615844565b61380683614e7a565b90506000805b61381583614f21565b1561321f5761382383614f2d565b909250905081600114156138495761384261383d84614f5a565b6153ec565b84526138ad565b81600214156138655761385b836151b5565b60208501526138ad565b816003141561388157613877836151b5565b60408501526138ad565b816004141561389d57613893836151b5565b60608501526138ad565b6138ad838263ffffffff61513516565b61380c565b604080516002808252606080830184526000938493919290602083019080388339505086518251929350918391506000906138e957fe5b600160a060020a039290921660209283029190910182015285015181518290600190811061391357fe5b600160a060020a039283166020918202929092018101919091526040517f0d63a1fd0000000000000000000000000000000000000000000000000000000081523060248201819052604482018890526060600483019081528551606484015285516000958c1694630d63a1fd948894938c93909283926084019187820191028083838d5b838110156139af578181015183820152602001613997565b50505050905001945050505050602060405180830381600087803b1580156139d657600080fd5b505af11580156139ea573d6000803e3d6000fd5b505050506040513d6020811015613a0057600080fd5b5051905080613a59576040805160e560020a62461bcd02815260206004820152601060248201527f6368616e6e656c49642067657473203000000000000000000000000000000000604482015290519081900360640190fd5b6000818152600689016020526040812090600382015460ff166004811115613a7d57fe5b14613ad2576040805160e560020a62461bcd02815260206004820152601260248201527f4f63637570696564206368616e6e656c49640000000000000000000000000000604482015290519081900360640190fd5b909890975095505050505050565b806004811115613aec57fe5b600383015460ff166004811115613aff57fe5b1415613b0a576114fa565b6000600383015460ff166004811115613b1f57fe5b14613b8a576003820154613b6090600190859060009060ff166004811115613b4357fe5b8152602001908152602001600020546135ec90919063ffffffff16565b6003830154849060009060ff166004811115613b7857fe5b81526020810191909152604001600020555b613bbb6001846000846004811115613b9e57fe5b815260200190815260200160002054613c8990919063ffffffff16565b836000836004811115613bca57fe5b815260208101919091526040016000205560038201805482919060ff19166001836004811115613bf657fe5b0217905550505050565b613c08615799565b600182516002811115613c1757fe5b1415613c3a576020820151600160a060020a031615613c3557600080fd5b613c85565b600282516002811115613c4957fe5b141561096c576020820151600160a060020a0316613c6657600080fd5b613c7c8260200151600160a060020a0316615546565b613c3557600080fd5b5090565b6000828201838110156132be57600080fd5b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0385811660048301528481166024830152604482018490529151918616916323b872dd916064808201926020929091908290030181600087803b158015613d0f57600080fd5b505af1158015613d23573d6000803e3d6000fd5b505050506040513d6020811015613d3957600080fd5b5051613d4457600080fd5b50505050565b801580613de95750604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015613dbb57600080fd5b505afa158015613dcf573d6000803e3d6000fd5b505050506040513d6020811015613de557600080fd5b5051155b613df257600080fd5b82600160a060020a031663095ea7b383836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015613e5557600080fd5b505af1158015613e69573d6000803e3d6000fd5b505050506040513d6020811015613e7f57600080fd5b50516114fa57600080fd5b613e92615751565b613e9a615844565b613ea383614e7a565b90506060613eb882600263ffffffff614e9116565b905080600281518110613ec757fe5b6020026020010151604051908082528060200260200182016040528015613f0257816020015b6060815260200190600190039081613eed5790505b508360200181905250600081600281518110613f1a57fe5b6020026020010181815250506000805b613f3384614f21565b156130d457613f4184614f2d565b90925090508160011415613f5f57613f5884614f5a565b8552613fd3565b8160021415613fc357613f7184614f5a565b856020015184600281518110613f8357fe5b602002602001015181518110613f9557fe5b602002602001018190525082600281518110613fad57fe5b6020908102919091010180516001019052613fd3565b613fd3848263ffffffff61513516565b613f2a565b613fe06157ce565b613fe8615844565b613ff183614e7a565b90506000805b61400083614f21565b1561321f5761400e83614f2d565b9092509050816001141561402f5761402861312d84614f5a565b84526140ba565b816002141561404b57614041836151b5565b60208501526140ba565b816003141561406f5761406561406084614f5a565b61554c565b60408501526140ba565b816004141561408b57614081836151b5565b60608501526140ba565b81600514156140aa576140a061312d84614f5a565b60808501526140ba565b6140ba838263ffffffff61513516565b613ff7565b60006140cb85856132c5565b90506140f6838660040183600281106140e057fe5b6008020160020154613c8990919063ffffffff16565b85600401826002811061410557fe5b6008020160020181905550811561412c576000614121866155e0565b101561412c57600080fd5b5050505050565b8161413d5761412c565b60008481526006860160205260409020816141f85760038601546002820154604080517f8e0cc17600000000000000000000000000000000000000000000000000000000815260048101899052610100909204600160a060020a0390811660248401528781166044840152606483018790529051921691638e0cc1769160848082019260009290919082900301818387803b1580156141db57600080fd5b505af11580156141ef573d6000803e3d6000fd5b505050506128a5565b6000828152600687016020526040902060028082015460ff169081111561421b57fe5b60028084015460ff169081111561422e57fe5b14801561425957506002818101549083015461010091829004600160a060020a039081169290910416145b6142975760405160e560020a62461bcd0281526004018080602001828103825260238152602001806159516023913960400191505060405180910390fd5b6142a387848787614983565b60038701546002830154604080517f80ba952e000000000000000000000000000000000000000000000000000000008152600481018a905260248101879052610100909204600160a060020a03908116604484015288811660648401526084830188905290519216916380ba952e9160a48082019260009290919082900301818387803b15801561288b57600080fd5b61433b615751565b614343615844565b61434c83614e7a565b9050606061436182600263ffffffff614e9116565b90508060028151811061437057fe5b60200260200101516040519080825280602002602001820160405280156143ab57816020015b60608152602001906001900390816143965790505b5083602001819052506000816002815181106143c357fe5b6020026020010181815250506000805b6143dc84614f21565b156130d4576143ea84614f2d565b909250905081600114156144085761440184614f5a565b855261447c565b816002141561446c5761441a84614f5a565b85602001518460028151811061442c57fe5b60200260200101518151811061443e57fe5b60200260200101819052508260028151811061445657fe5b602090810291909101018051600101905261447c565b61447c848263ffffffff61513516565b6143d3565b614489615801565b614491615844565b61449a83614e7a565b905060606144af82600463ffffffff614e9116565b9050806003815181106144be57fe5b60200260200101516040519080825280602002602001820160405280156144ff57816020015b6144ec615799565b8152602001906001900390816144e45790505b50836040018190525060008160038151811061451757fe5b6020026020010181815250506000805b61453084614f21565b156130d45761453e84614f2d565b9092509050816001141561455f5761455861312d85614f5a565b855261460e565b816002141561457b57614571846151b5565b602086015261460e565b81600314156145e25761459061406085614f5a565b8560400151846003815181106145a257fe5b6020026020010151815181106145b457fe5b6020026020010181905250826003815181106145cc57fe5b602090810291909101018051600101905261460e565b81600414156145fe576145f4846151b5565b606086015261460e565b61460e848263ffffffff61513516565b614527565b60005b60028110156128a55781816002811061462b57fe5b6020020151614639576146fb565b6003860154600160a060020a0316638e0cc176868686856002811061465a57fe5b602002015186866002811061466b57fe5b60200201516040518563ffffffff1660e060020a0281526004018085815260200184600160a060020a0316600160a060020a0316815260200183600160a060020a0316600160a060020a03168152602001828152602001945050505050600060405180830381600087803b1580156146e257600080fd5b505af11580156146f6573d6000803e3d6000fd5b505050505b600101614616565b600061470d6157b0565b61471561585e565b604080518082019091526004850160026000835b828210156147b95760408051608080820183526008850287018054600160a060020a03168352600180820154602080860191909152600283015485870152855160a081018752600384015481526004840154818301526005840154968101969096526006830154606087810191909152600790930154938601939093529083019390935290835292019101614729565b5050505090506147c76157b0565b6040805180820190915260208084015160600151015181906147fe908560005b602002015160200151613c8990919063ffffffff16565b815283516060015160209081015191019061481b908560016147e7565b9052905060005b60028110156148e757600061486c84836002811061483c57fe5b60200201516040015185846002811061485157fe5b60200201516060015160200151613c8990919063ffffffff16565b90508083836002811061487b57fe5b602002015110156148ac576000604051806040016040528060008152602001600081525095509550505050506148f0565b6148cd818484600281106148bc57fe5b60200201519063ffffffff6135ec16565b8383600281106148d957fe5b602002015250600101614822565b50600193509150505b915091565b6000815561490582826001613ae0565b6000600782018190556008820181905560098201819055600a8201819055600b8201819055600f82018190556010820181905560118201819055601282018190556013820181905560158201805473ffffffffffffffffffffffffffffffffffffffff19169055601682018190556017820181905560189091015550565b600083815260068501602052604090206001600382015460ff1660048111156149a857fe5b146149eb576040805160e560020a62461bcd0281526020600482015260146024820152600080516020615931833981519152604482015290519081900360640190fd5b60006149fd828563ffffffff6132c516565b600587015490915060ff1615614b2c5760028201546101009004600160a060020a03166000908152600487810160209081526040928390205483517fd6b89e3a0000000000000000000000000000000000000000000000000000000081529283018690529251614ad69273__LedgerChannel_________________________9263d6b89e3a92602480840193829003018186803b158015614a9d57600080fd5b505af4158015614ab1573d6000803e3d6000fd5b505050506040513d6020811015614ac757600080fd5b5051859063ffffffff613c8916565b1115614b2c576040805160e560020a62461bcd02815260206004820152601560248201527f42616c616e63652065786365656473206c696d69740000000000000000000000604482015290519081900360640190fd5b614b3f83836004018360028110611f7d57fe5b826004018260028110614b4e57fe5b6008020160010181905550614b616157b0565b614b696157b0565b614b716157b0565b8473__LedgerChannel_________________________63c8ed149e90916040518263ffffffff1660e060020a0281526004018082815260200191505060c06040518083038186803b158015614bc557600080fd5b505af4158015614bd9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525060c0811015614bfe57600080fd5b5060408051919450808501935060808501925089917fb63f5dc096f516663ffb5ef2b611f0e2acca8617a868c2a3653cba5e3ed0e92c91869186918691908190859080838360005b83811015614c5e578181015183820152602001614c46565b5050505090500183600260200280838360005b83811015614c89578181015183820152602001614c71565b5050505090500182600260200280838360005b83811015614cb4578181015183820152602001614c9c565b50505050905001935050505060405180910390a2505050505050505050565b614cdb6157b0565b506040805180820190915260078201548152600f90910154602082015290565b6004820154600090600160a060020a03838116911614806132be575050600c90910154600160a060020a0390811691161490565b614d3761582c565b614d3f615844565b614d4883614e7a565b90506060614d5d82600263ffffffff614e9116565b905080600181518110614d6c57fe5b6020026020010151604051908082528060200260200182016040528015614d9d578160200160208202803883390190505b508352805160009082906001908110614db257fe5b6020026020010181815250506000805b614dcb84614f21565b156130d457614dd984614f2d565b90925090508160011415614e4657614df361312d85614f5a565b856000015184600181518110614e0557fe5b602002602001015181518110614e1757fe5b60200260200101818152505082600181518110614e3057fe5b6020908102919091010180516001019052614e75565b8160021415614e6557614e5b61312d85614f5a565b6020860152614e75565b614e75848263ffffffff61513516565b614dc2565b614e82615844565b60208101919091526000815290565b815160408051600184018082526020808202830101909252606092918015614ec3578160200160208202803883390190505b5091506000805b614ed386614f21565b15614f1857614ee186614f2d565b80925081935050506001848381518110614ef757fe5b602002602001018181510191508181525050614f138682615135565b614eca565b50509092525090565b60208101515190511090565b6000806000614f3b846151b5565b9050600881049250806007166005811115614f5257fe5b915050915091565b60606000614f67836151b5565b8351602085015151919250820190811115614f8157600080fd5b816040519080825280601f01601f191660200182016040528015614fac576020820181803883390190505b50602080860151865192955091818601919083010160005b85811015614fdc578181015183820152602001614fc4565b505050935250919050565b614fef615751565b614ff7615844565b61500083614e7a565b9050606061501582600263ffffffff614e9116565b90508060028151811061502457fe5b602002602001015160405190808252806020026020018201604052801561505f57816020015b606081526020019060019003908161504a5790505b50836020018190525060008160028151811061507757fe5b6020026020010181815250506000805b61509084614f21565b156130d45761509e84614f2d565b909250905081600114156150bc576150b584614f5a565b8552615130565b8160021415615120576150ce84614f5a565b8560200151846002815181106150e057fe5b6020026020010151815181106150f257fe5b60200260200101819052508260028151811061510a57fe5b6020908102919091010180516001019052615130565b615130848263ffffffff61513516565b615087565b600081600581111561514357fe5b141561515857615152826151b5565b506125c5565b600281600581111561516657fe5b1415610103576000615177836151b5565b83518101808552602085015151919250111561515257600080fd5b600081516020146151a257600080fd5b506020015190565b600061150f82615609565b602080820151825181019091015160009182805b600a81101561520d5783811a91508060070282607f169060020a0285179450816080166000141561520557855101600101855250610b8c915050565b6001016151c9565b50600080fd5b61521b61588c565b615223615844565b61522c83614e7a565b90506000805b61523b83614f21565b1561321f5761524983614f2d565b9092509050816001141561526f5761526861526384614f5a565b615631565b845261529e565b816002141561528e5761528461406084614f5a565b602085015261529e565b61529e838263ffffffff61513516565b615232565b60006020825111156152b457600080fd5b506020818101519151600891030260020a900490565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b6000806000808451604114615336576000935050505061150f565b50505060208201516040830151606084015160001a601b81101561535857601b015b8060ff16601b1415801561537057508060ff16601c14155b15615381576000935050505061150f565b6040805160008152602080820180845289905260ff8416828401526060820186905260808201859052915160019260a0808401939192601f1981019281900390910190855afa1580156153d8573d6000803e3d6000fd5b50505060206040510351935050505061150f565b6153f46158b1565b6153fc615844565b61540583614e7a565b9050606061541a82600263ffffffff614e9116565b90508060028151811061542957fe5b602002602001015160405190808252806020026020018201604052801561546a57816020015b615457615799565b81526020019060019003908161544f5790505b50836020018190525060008160028151811061548257fe5b6020026020010181815250506000805b61549b84614f21565b156130d4576154a984614f2d565b909250905081600114156154ca576154c361526385614f5a565b8552615541565b8160021415615531576154df61406085614f5a565b8560200151846002815181106154f157fe5b60200260200101518151811061550357fe5b60200260200101819052508260028151811061551b57fe5b6020908102919091010180516001019052615541565b615541848263ffffffff61513516565b615492565b3b151590565b615554615799565b61555c615844565b61556583614e7a565b90506000805b61557483614f21565b1561321f5761558283614f2d565b909250905081600114156155ac5761559c61314e84614f5a565b600160a060020a031684526155db565b81600214156155cb576155c16131fb84614f5a565b60208501526155db565b6155db838263ffffffff61513516565b61556b565b600e8101546006820154600d83015460009283926132be92611f93919082906004890187611f7d565b6000815160141461561957600080fd5b50602001516c01000000000000000000000000900490565b615639615799565b615641615844565b61564a83614e7a565b90506000805b61565983614f21565b1561321f5761566783614f2d565b909250905081600114156156ab5761567e836151b5565b600281111561568957fe5b8490600281111561569657fe5b908160028111156156a357fe5b9052506156e3565b81600214156156d3576156c061314e84614f5a565b600160a060020a031660208501526156e3565b6156e3838263ffffffff61513516565b615650565b6040518060200160405280606081525090565b604051806101600160405280600080191681526020016000600160a060020a031681526020016000815260200161573061588c565b815260200161573d61582c565b815260200160008152602001600081525090565b604051806040016040528060608152602001606081525090565b6040518060c0016040528061577e6158b1565b81526020016000815260200160008152602001600081525090565b604080518082019091526000808252602082015290565b60405180604001604052806002906020820280388339509192915050565b6040805160c081018252600080825260208201529081016157ed615799565b815260006020820181905260409091015290565b6040518060800160405280600080191681526020016000815260200160608152602001600081525090565b60408051808201909152606081526000602082015290565b604051806040016040528060008152602001606081525090565b6040518061020001604052806002905b6158766158d1565b81526020019060019003908161586e5790505090565b604051806080016040528061589f615799565b81526020016158ac615799565b905290565b60405180606001604052806158c4615799565b8152602001606081525090565b6040518061010001604052806000600160a060020a0316815260200160008152602001600081526020016158ac6040518060a001604052806000815260200160008152602001600080191681526020016000815260200160008152509056fe4368616e6e656c20737461747573206572726f72000000000000000000000000546f6b656e206d69736d61746368206f6620726563697069656e74206368616e6e656c7365714e756d206572726f720000000000000000000000000000000000000000436865636b20636f2d73696773206661696c6564000000000000000000000000a265627a7a7230582049043582cb3f7acaf105f75a91b647dd29d237e56b20a88a8bb89002db16b8cd64736f6c634300050a0032"

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

	address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(LedgerOperationBin), backend)
	if err != nil {
		return common.Address{}, nil, nil, err
	}
	return address, tx, &LedgerOperation{LedgerOperationCaller: LedgerOperationCaller{contract: contract}, LedgerOperationTransactor: LedgerOperationTransactor{contract: contract}, LedgerOperationFilterer: LedgerOperationFilterer{contract: contract}}, nil
}

// LedgerOperation is an auto generated Go binding around an Ethereum contract.
type LedgerOperation struct {
	LedgerOperationCaller     // Read-only binding to the contract
	LedgerOperationTransactor // Write-only binding to the contract
	LedgerOperationFilterer   // Log filterer for contract events
}

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

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

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

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

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

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

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

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

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

// NewLedgerOperation creates a new instance of LedgerOperation, bound to a specific deployed contract.
func NewLedgerOperation(address common.Address, backend bind.ContractBackend) (*LedgerOperation, error) {
	contract, err := bindLedgerOperation(address, backend, backend, backend)
	if err != nil {
		return nil, err
	}
	return &LedgerOperation{LedgerOperationCaller: LedgerOperationCaller{contract: contract}, LedgerOperationTransactor: LedgerOperationTransactor{contract: contract}, LedgerOperationFilterer: LedgerOperationFilterer{contract: contract}}, nil
}

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

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

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

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

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

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

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

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

// LedgerOperationClearOnePay represents a ClearOnePay event raised by the LedgerOperation contract.
type LedgerOperationClearOnePay struct {
	ChannelId [32]byte
	PayId     [32]byte
	PeerFrom  common.Address
	Amount    *big.Int
	Raw       types.Log // Blockchain specific contextual infos
}

// FilterClearOnePay is a free log retrieval operation binding the contract event 0x33252d4bc5cee2ad248475e8c39239a79dc64b2691c9ca1a63ff9af0c75b8776.
//
// Solidity: event ClearOnePay(bytes32 indexed channelId, bytes32 indexed payId, address indexed peerFrom, uint256 amount)
func (_LedgerOperation *LedgerOperationFilterer) FilterClearOnePay(opts *bind.FilterOpts, channelId [][32]byte, payId [][32]byte, peerFrom []common.Address) (*LedgerOperationClearOnePayIterator, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}
	var payIdRule []interface{}
	for _, payIdItem := range payId {
		payIdRule = append(payIdRule, payIdItem)
	}
	var peerFromRule []interface{}
	for _, peerFromItem := range peerFrom {
		peerFromRule = append(peerFromRule, peerFromItem)
	}

	logs, sub, err := _LedgerOperation.contract.FilterLogs(opts, "ClearOnePay", channelIdRule, payIdRule, peerFromRule)
	if err != nil {
		return nil, err
	}
	return &LedgerOperationClearOnePayIterator{contract: _LedgerOperation.contract, event: "ClearOnePay", logs: logs, sub: sub}, nil
}

// WatchClearOnePay is a free log subscription operation binding the contract event 0x33252d4bc5cee2ad248475e8c39239a79dc64b2691c9ca1a63ff9af0c75b8776.
//
// Solidity: event ClearOnePay(bytes32 indexed channelId, bytes32 indexed payId, address indexed peerFrom, uint256 amount)
func (_LedgerOperation *LedgerOperationFilterer) WatchClearOnePay(opts *bind.WatchOpts, sink chan<- *LedgerOperationClearOnePay, channelId [][32]byte, payId [][32]byte, peerFrom []common.Address) (event.Subscription, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}
	var payIdRule []interface{}
	for _, payIdItem := range payId {
		payIdRule = append(payIdRule, payIdItem)
	}
	var peerFromRule []interface{}
	for _, peerFromItem := range peerFrom {
		peerFromRule = append(peerFromRule, peerFromItem)
	}

	logs, sub, err := _LedgerOperation.contract.WatchLogs(opts, "ClearOnePay", channelIdRule, payIdRule, peerFromRule)
	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(LedgerOperationClearOnePay)
				if err := _LedgerOperation.contract.UnpackLog(event, "ClearOnePay", 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
}

// ParseClearOnePay is a log parse operation binding the contract event 0x33252d4bc5cee2ad248475e8c39239a79dc64b2691c9ca1a63ff9af0c75b8776.
//
// Solidity: event ClearOnePay(bytes32 indexed channelId, bytes32 indexed payId, address indexed peerFrom, uint256 amount)
func (_LedgerOperation *LedgerOperationFilterer) ParseClearOnePay(log types.Log) (*LedgerOperationClearOnePay, error) {
	event := new(LedgerOperationClearOnePay)
	if err := _LedgerOperation.contract.UnpackLog(event, "ClearOnePay", log); err != nil {
		return nil, err
	}
	return event, nil
}

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

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

// LedgerOperationConfirmSettle represents a ConfirmSettle event raised by the LedgerOperation contract.
type LedgerOperationConfirmSettle struct {
	ChannelId     [32]byte
	SettleBalance [2]*big.Int
	Raw           types.Log // Blockchain specific contextual infos
}

// FilterConfirmSettle is a free log retrieval operation binding the contract event 0x728ddd8c5acda5947c34db8d759c66ae70884f526ff9b93637d351b012ef3206.
//
// Solidity: event ConfirmSettle(bytes32 indexed channelId, uint256[2] settleBalance)
func (_LedgerOperation *LedgerOperationFilterer) FilterConfirmSettle(opts *bind.FilterOpts, channelId [][32]byte) (*LedgerOperationConfirmSettleIterator, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.FilterLogs(opts, "ConfirmSettle", channelIdRule)
	if err != nil {
		return nil, err
	}
	return &LedgerOperationConfirmSettleIterator{contract: _LedgerOperation.contract, event: "ConfirmSettle", logs: logs, sub: sub}, nil
}

// WatchConfirmSettle is a free log subscription operation binding the contract event 0x728ddd8c5acda5947c34db8d759c66ae70884f526ff9b93637d351b012ef3206.
//
// Solidity: event ConfirmSettle(bytes32 indexed channelId, uint256[2] settleBalance)
func (_LedgerOperation *LedgerOperationFilterer) WatchConfirmSettle(opts *bind.WatchOpts, sink chan<- *LedgerOperationConfirmSettle, channelId [][32]byte) (event.Subscription, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.WatchLogs(opts, "ConfirmSettle", channelIdRule)
	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(LedgerOperationConfirmSettle)
				if err := _LedgerOperation.contract.UnpackLog(event, "ConfirmSettle", 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
}

// ParseConfirmSettle is a log parse operation binding the contract event 0x728ddd8c5acda5947c34db8d759c66ae70884f526ff9b93637d351b012ef3206.
//
// Solidity: event ConfirmSettle(bytes32 indexed channelId, uint256[2] settleBalance)
func (_LedgerOperation *LedgerOperationFilterer) ParseConfirmSettle(log types.Log) (*LedgerOperationConfirmSettle, error) {
	event := new(LedgerOperationConfirmSettle)
	if err := _LedgerOperation.contract.UnpackLog(event, "ConfirmSettle", log); err != nil {
		return nil, err
	}
	return event, nil
}

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

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

// LedgerOperationConfirmSettleFail represents a ConfirmSettleFail event raised by the LedgerOperation contract.
type LedgerOperationConfirmSettleFail struct {
	ChannelId [32]byte
	Raw       types.Log // Blockchain specific contextual infos
}

// FilterConfirmSettleFail is a free log retrieval operation binding the contract event 0xa6549eb18490d42e7ec93f42115d1ee11b706d04077be9597034dd73ec8bcb36.
//
// Solidity: event ConfirmSettleFail(bytes32 indexed channelId)
func (_LedgerOperation *LedgerOperationFilterer) FilterConfirmSettleFail(opts *bind.FilterOpts, channelId [][32]byte) (*LedgerOperationConfirmSettleFailIterator, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.FilterLogs(opts, "ConfirmSettleFail", channelIdRule)
	if err != nil {
		return nil, err
	}
	return &LedgerOperationConfirmSettleFailIterator{contract: _LedgerOperation.contract, event: "ConfirmSettleFail", logs: logs, sub: sub}, nil
}

// WatchConfirmSettleFail is a free log subscription operation binding the contract event 0xa6549eb18490d42e7ec93f42115d1ee11b706d04077be9597034dd73ec8bcb36.
//
// Solidity: event ConfirmSettleFail(bytes32 indexed channelId)
func (_LedgerOperation *LedgerOperationFilterer) WatchConfirmSettleFail(opts *bind.WatchOpts, sink chan<- *LedgerOperationConfirmSettleFail, channelId [][32]byte) (event.Subscription, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.WatchLogs(opts, "ConfirmSettleFail", channelIdRule)
	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(LedgerOperationConfirmSettleFail)
				if err := _LedgerOperation.contract.UnpackLog(event, "ConfirmSettleFail", 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
}

// ParseConfirmSettleFail is a log parse operation binding the contract event 0xa6549eb18490d42e7ec93f42115d1ee11b706d04077be9597034dd73ec8bcb36.
//
// Solidity: event ConfirmSettleFail(bytes32 indexed channelId)
func (_LedgerOperation *LedgerOperationFilterer) ParseConfirmSettleFail(log types.Log) (*LedgerOperationConfirmSettleFail, error) {
	event := new(LedgerOperationConfirmSettleFail)
	if err := _LedgerOperation.contract.UnpackLog(event, "ConfirmSettleFail", log); err != nil {
		return nil, err
	}
	return event, nil
}

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

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

// LedgerOperationConfirmWithdraw represents a ConfirmWithdraw event raised by the LedgerOperation contract.
type LedgerOperationConfirmWithdraw struct {
	ChannelId          [32]byte
	WithdrawnAmount    *big.Int
	Receiver           common.Address
	RecipientChannelId [32]byte
	Deposits           [2]*big.Int
	Withdrawals        [2]*big.Int
	Raw                types.Log // Blockchain specific contextual infos
}

// FilterConfirmWithdraw is a free log retrieval operation binding the contract event 0xe8110b4ee08638c48f6a4d5f726927df4e541893efa9d2c2c47a6b889041826e.
//
// Solidity: event ConfirmWithdraw(bytes32 indexed channelId, uint256 withdrawnAmount, address indexed receiver, bytes32 indexed recipientChannelId, uint256[2] deposits, uint256[2] withdrawals)
func (_LedgerOperation *LedgerOperationFilterer) FilterConfirmWithdraw(opts *bind.FilterOpts, channelId [][32]byte, receiver []common.Address, recipientChannelId [][32]byte) (*LedgerOperationConfirmWithdrawIterator, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	var receiverRule []interface{}
	for _, receiverItem := range receiver {
		receiverRule = append(receiverRule, receiverItem)
	}
	var recipientChannelIdRule []interface{}
	for _, recipientChannelIdItem := range recipientChannelId {
		recipientChannelIdRule = append(recipientChannelIdRule, recipientChannelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.FilterLogs(opts, "ConfirmWithdraw", channelIdRule, receiverRule, recipientChannelIdRule)
	if err != nil {
		return nil, err
	}
	return &LedgerOperationConfirmWithdrawIterator{contract: _LedgerOperation.contract, event: "ConfirmWithdraw", logs: logs, sub: sub}, nil
}

// WatchConfirmWithdraw is a free log subscription operation binding the contract event 0xe8110b4ee08638c48f6a4d5f726927df4e541893efa9d2c2c47a6b889041826e.
//
// Solidity: event ConfirmWithdraw(bytes32 indexed channelId, uint256 withdrawnAmount, address indexed receiver, bytes32 indexed recipientChannelId, uint256[2] deposits, uint256[2] withdrawals)
func (_LedgerOperation *LedgerOperationFilterer) WatchConfirmWithdraw(opts *bind.WatchOpts, sink chan<- *LedgerOperationConfirmWithdraw, channelId [][32]byte, receiver []common.Address, recipientChannelId [][32]byte) (event.Subscription, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	var receiverRule []interface{}
	for _, receiverItem := range receiver {
		receiverRule = append(receiverRule, receiverItem)
	}
	var recipientChannelIdRule []interface{}
	for _, recipientChannelIdItem := range recipientChannelId {
		recipientChannelIdRule = append(recipientChannelIdRule, recipientChannelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.WatchLogs(opts, "ConfirmWithdraw", channelIdRule, receiverRule, recipientChannelIdRule)
	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(LedgerOperationConfirmWithdraw)
				if err := _LedgerOperation.contract.UnpackLog(event, "ConfirmWithdraw", 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
}

// ParseConfirmWithdraw is a log parse operation binding the contract event 0xe8110b4ee08638c48f6a4d5f726927df4e541893efa9d2c2c47a6b889041826e.
//
// Solidity: event ConfirmWithdraw(bytes32 indexed channelId, uint256 withdrawnAmount, address indexed receiver, bytes32 indexed recipientChannelId, uint256[2] deposits, uint256[2] withdrawals)
func (_LedgerOperation *LedgerOperationFilterer) ParseConfirmWithdraw(log types.Log) (*LedgerOperationConfirmWithdraw, error) {
	event := new(LedgerOperationConfirmWithdraw)
	if err := _LedgerOperation.contract.UnpackLog(event, "ConfirmWithdraw", log); err != nil {
		return nil, err
	}
	return event, nil
}

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

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

// LedgerOperationCooperativeSettle represents a CooperativeSettle event raised by the LedgerOperation contract.
type LedgerOperationCooperativeSettle struct {
	ChannelId     [32]byte
	SettleBalance [2]*big.Int
	Raw           types.Log // Blockchain specific contextual infos
}

// FilterCooperativeSettle is a free log retrieval operation binding the contract event 0x6c666557dc97fd52cd2d9d6dd6d109e501ffdb831abeecf13aafeeaf762ee1fd.
//
// Solidity: event CooperativeSettle(bytes32 indexed channelId, uint256[2] settleBalance)
func (_LedgerOperation *LedgerOperationFilterer) FilterCooperativeSettle(opts *bind.FilterOpts, channelId [][32]byte) (*LedgerOperationCooperativeSettleIterator, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.FilterLogs(opts, "CooperativeSettle", channelIdRule)
	if err != nil {
		return nil, err
	}
	return &LedgerOperationCooperativeSettleIterator{contract: _LedgerOperation.contract, event: "CooperativeSettle", logs: logs, sub: sub}, nil
}

// WatchCooperativeSettle is a free log subscription operation binding the contract event 0x6c666557dc97fd52cd2d9d6dd6d109e501ffdb831abeecf13aafeeaf762ee1fd.
//
// Solidity: event CooperativeSettle(bytes32 indexed channelId, uint256[2] settleBalance)
func (_LedgerOperation *LedgerOperationFilterer) WatchCooperativeSettle(opts *bind.WatchOpts, sink chan<- *LedgerOperationCooperativeSettle, channelId [][32]byte) (event.Subscription, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.WatchLogs(opts, "CooperativeSettle", channelIdRule)
	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(LedgerOperationCooperativeSettle)
				if err := _LedgerOperation.contract.UnpackLog(event, "CooperativeSettle", 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
}

// ParseCooperativeSettle is a log parse operation binding the contract event 0x6c666557dc97fd52cd2d9d6dd6d109e501ffdb831abeecf13aafeeaf762ee1fd.
//
// Solidity: event CooperativeSettle(bytes32 indexed channelId, uint256[2] settleBalance)
func (_LedgerOperation *LedgerOperationFilterer) ParseCooperativeSettle(log types.Log) (*LedgerOperationCooperativeSettle, error) {
	event := new(LedgerOperationCooperativeSettle)
	if err := _LedgerOperation.contract.UnpackLog(event, "CooperativeSettle", log); err != nil {
		return nil, err
	}
	return event, nil
}

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

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

// LedgerOperationCooperativeWithdraw represents a CooperativeWithdraw event raised by the LedgerOperation contract.
type LedgerOperationCooperativeWithdraw struct {
	ChannelId          [32]byte
	WithdrawnAmount    *big.Int
	Receiver           common.Address
	RecipientChannelId [32]byte
	Deposits           [2]*big.Int
	Withdrawals        [2]*big.Int
	SeqNum             *big.Int
	Raw                types.Log // Blockchain specific contextual infos
}

// FilterCooperativeWithdraw is a free log retrieval operation binding the contract event 0x1b87d077d9b706e42883b454b67730633fd6b4b29f9a9cf5f57c278c54f51c8f.
//
// Solidity: event CooperativeWithdraw(bytes32 indexed channelId, uint256 withdrawnAmount, address indexed receiver, bytes32 indexed recipientChannelId, uint256[2] deposits, uint256[2] withdrawals, uint256 seqNum)
func (_LedgerOperation *LedgerOperationFilterer) FilterCooperativeWithdraw(opts *bind.FilterOpts, channelId [][32]byte, receiver []common.Address, recipientChannelId [][32]byte) (*LedgerOperationCooperativeWithdrawIterator, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	var receiverRule []interface{}
	for _, receiverItem := range receiver {
		receiverRule = append(receiverRule, receiverItem)
	}
	var recipientChannelIdRule []interface{}
	for _, recipientChannelIdItem := range recipientChannelId {
		recipientChannelIdRule = append(recipientChannelIdRule, recipientChannelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.FilterLogs(opts, "CooperativeWithdraw", channelIdRule, receiverRule, recipientChannelIdRule)
	if err != nil {
		return nil, err
	}
	return &LedgerOperationCooperativeWithdrawIterator{contract: _LedgerOperation.contract, event: "CooperativeWithdraw", logs: logs, sub: sub}, nil
}

// WatchCooperativeWithdraw is a free log subscription operation binding the contract event 0x1b87d077d9b706e42883b454b67730633fd6b4b29f9a9cf5f57c278c54f51c8f.
//
// Solidity: event CooperativeWithdraw(bytes32 indexed channelId, uint256 withdrawnAmount, address indexed receiver, bytes32 indexed recipientChannelId, uint256[2] deposits, uint256[2] withdrawals, uint256 seqNum)
func (_LedgerOperation *LedgerOperationFilterer) WatchCooperativeWithdraw(opts *bind.WatchOpts, sink chan<- *LedgerOperationCooperativeWithdraw, channelId [][32]byte, receiver []common.Address, recipientChannelId [][32]byte) (event.Subscription, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	var receiverRule []interface{}
	for _, receiverItem := range receiver {
		receiverRule = append(receiverRule, receiverItem)
	}
	var recipientChannelIdRule []interface{}
	for _, recipientChannelIdItem := range recipientChannelId {
		recipientChannelIdRule = append(recipientChannelIdRule, recipientChannelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.WatchLogs(opts, "CooperativeWithdraw", channelIdRule, receiverRule, recipientChannelIdRule)
	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(LedgerOperationCooperativeWithdraw)
				if err := _LedgerOperation.contract.UnpackLog(event, "CooperativeWithdraw", 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
}

// ParseCooperativeWithdraw is a log parse operation binding the contract event 0x1b87d077d9b706e42883b454b67730633fd6b4b29f9a9cf5f57c278c54f51c8f.
//
// Solidity: event CooperativeWithdraw(bytes32 indexed channelId, uint256 withdrawnAmount, address indexed receiver, bytes32 indexed recipientChannelId, uint256[2] deposits, uint256[2] withdrawals, uint256 seqNum)
func (_LedgerOperation *LedgerOperationFilterer) ParseCooperativeWithdraw(log types.Log) (*LedgerOperationCooperativeWithdraw, error) {
	event := new(LedgerOperationCooperativeWithdraw)
	if err := _LedgerOperation.contract.UnpackLog(event, "CooperativeWithdraw", log); err != nil {
		return nil, err
	}
	return event, nil
}

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

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

// LedgerOperationDeposit represents a Deposit event raised by the LedgerOperation contract.
type LedgerOperationDeposit struct {
	ChannelId   [32]byte
	PeerAddrs   [2]common.Address
	Deposits    [2]*big.Int
	Withdrawals [2]*big.Int
	Raw         types.Log // Blockchain specific contextual infos
}

// FilterDeposit is a free log retrieval operation binding the contract event 0xb63f5dc096f516663ffb5ef2b611f0e2acca8617a868c2a3653cba5e3ed0e92c.
//
// Solidity: event Deposit(bytes32 indexed channelId, address[2] peerAddrs, uint256[2] deposits, uint256[2] withdrawals)
func (_LedgerOperation *LedgerOperationFilterer) FilterDeposit(opts *bind.FilterOpts, channelId [][32]byte) (*LedgerOperationDepositIterator, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.FilterLogs(opts, "Deposit", channelIdRule)
	if err != nil {
		return nil, err
	}
	return &LedgerOperationDepositIterator{contract: _LedgerOperation.contract, event: "Deposit", logs: logs, sub: sub}, nil
}

// WatchDeposit is a free log subscription operation binding the contract event 0xb63f5dc096f516663ffb5ef2b611f0e2acca8617a868c2a3653cba5e3ed0e92c.
//
// Solidity: event Deposit(bytes32 indexed channelId, address[2] peerAddrs, uint256[2] deposits, uint256[2] withdrawals)
func (_LedgerOperation *LedgerOperationFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *LedgerOperationDeposit, channelId [][32]byte) (event.Subscription, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.WatchLogs(opts, "Deposit", channelIdRule)
	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(LedgerOperationDeposit)
				if err := _LedgerOperation.contract.UnpackLog(event, "Deposit", 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
}

// ParseDeposit is a log parse operation binding the contract event 0xb63f5dc096f516663ffb5ef2b611f0e2acca8617a868c2a3653cba5e3ed0e92c.
//
// Solidity: event Deposit(bytes32 indexed channelId, address[2] peerAddrs, uint256[2] deposits, uint256[2] withdrawals)
func (_LedgerOperation *LedgerOperationFilterer) ParseDeposit(log types.Log) (*LedgerOperationDeposit, error) {
	event := new(LedgerOperationDeposit)
	if err := _LedgerOperation.contract.UnpackLog(event, "Deposit", log); err != nil {
		return nil, err
	}
	return event, nil
}

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

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

// LedgerOperationIntendSettle represents a IntendSettle event raised by the LedgerOperation contract.
type LedgerOperationIntendSettle struct {
	ChannelId [32]byte
	SeqNums   [2]*big.Int
	Raw       types.Log // Blockchain specific contextual infos
}

// FilterIntendSettle is a free log retrieval operation binding the contract event 0x296143e7e25aa055fbb871702776a67da540876e2be721d5c38ba23c97c90d64.
//
// Solidity: event IntendSettle(bytes32 indexed channelId, uint256[2] seqNums)
func (_LedgerOperation *LedgerOperationFilterer) FilterIntendSettle(opts *bind.FilterOpts, channelId [][32]byte) (*LedgerOperationIntendSettleIterator, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.FilterLogs(opts, "IntendSettle", channelIdRule)
	if err != nil {
		return nil, err
	}
	return &LedgerOperationIntendSettleIterator{contract: _LedgerOperation.contract, event: "IntendSettle", logs: logs, sub: sub}, nil
}

// WatchIntendSettle is a free log subscription operation binding the contract event 0x296143e7e25aa055fbb871702776a67da540876e2be721d5c38ba23c97c90d64.
//
// Solidity: event IntendSettle(bytes32 indexed channelId, uint256[2] seqNums)
func (_LedgerOperation *LedgerOperationFilterer) WatchIntendSettle(opts *bind.WatchOpts, sink chan<- *LedgerOperationIntendSettle, channelId [][32]byte) (event.Subscription, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.WatchLogs(opts, "IntendSettle", channelIdRule)
	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(LedgerOperationIntendSettle)
				if err := _LedgerOperation.contract.UnpackLog(event, "IntendSettle", 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
}

// ParseIntendSettle is a log parse operation binding the contract event 0x296143e7e25aa055fbb871702776a67da540876e2be721d5c38ba23c97c90d64.
//
// Solidity: event IntendSettle(bytes32 indexed channelId, uint256[2] seqNums)
func (_LedgerOperation *LedgerOperationFilterer) ParseIntendSettle(log types.Log) (*LedgerOperationIntendSettle, error) {
	event := new(LedgerOperationIntendSettle)
	if err := _LedgerOperation.contract.UnpackLog(event, "IntendSettle", log); err != nil {
		return nil, err
	}
	return event, nil
}

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

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

// LedgerOperationIntendWithdraw represents a IntendWithdraw event raised by the LedgerOperation contract.
type LedgerOperationIntendWithdraw struct {
	ChannelId [32]byte
	Receiver  common.Address
	Amount    *big.Int
	Raw       types.Log // Blockchain specific contextual infos
}

// FilterIntendWithdraw is a free log retrieval operation binding the contract event 0x97883669625c4ff7f5432b4ca33fe75fb5fee985deb196a967e5758f846170fe.
//
// Solidity: event IntendWithdraw(bytes32 indexed channelId, address indexed receiver, uint256 amount)
func (_LedgerOperation *LedgerOperationFilterer) FilterIntendWithdraw(opts *bind.FilterOpts, channelId [][32]byte, receiver []common.Address) (*LedgerOperationIntendWithdrawIterator, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}
	var receiverRule []interface{}
	for _, receiverItem := range receiver {
		receiverRule = append(receiverRule, receiverItem)
	}

	logs, sub, err := _LedgerOperation.contract.FilterLogs(opts, "IntendWithdraw", channelIdRule, receiverRule)
	if err != nil {
		return nil, err
	}
	return &LedgerOperationIntendWithdrawIterator{contract: _LedgerOperation.contract, event: "IntendWithdraw", logs: logs, sub: sub}, nil
}

// WatchIntendWithdraw is a free log subscription operation binding the contract event 0x97883669625c4ff7f5432b4ca33fe75fb5fee985deb196a967e5758f846170fe.
//
// Solidity: event IntendWithdraw(bytes32 indexed channelId, address indexed receiver, uint256 amount)
func (_LedgerOperation *LedgerOperationFilterer) WatchIntendWithdraw(opts *bind.WatchOpts, sink chan<- *LedgerOperationIntendWithdraw, channelId [][32]byte, receiver []common.Address) (event.Subscription, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}
	var receiverRule []interface{}
	for _, receiverItem := range receiver {
		receiverRule = append(receiverRule, receiverItem)
	}

	logs, sub, err := _LedgerOperation.contract.WatchLogs(opts, "IntendWithdraw", channelIdRule, receiverRule)
	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(LedgerOperationIntendWithdraw)
				if err := _LedgerOperation.contract.UnpackLog(event, "IntendWithdraw", 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
}

// ParseIntendWithdraw is a log parse operation binding the contract event 0x97883669625c4ff7f5432b4ca33fe75fb5fee985deb196a967e5758f846170fe.
//
// Solidity: event IntendWithdraw(bytes32 indexed channelId, address indexed receiver, uint256 amount)
func (_LedgerOperation *LedgerOperationFilterer) ParseIntendWithdraw(log types.Log) (*LedgerOperationIntendWithdraw, error) {
	event := new(LedgerOperationIntendWithdraw)
	if err := _LedgerOperation.contract.UnpackLog(event, "IntendWithdraw", log); err != nil {
		return nil, err
	}
	return event, nil
}

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

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

// LedgerOperationOpenChannel represents a OpenChannel event raised by the LedgerOperation contract.
type LedgerOperationOpenChannel struct {
	ChannelId       [32]byte
	TokenType       *big.Int
	TokenAddress    common.Address
	PeerAddrs       [2]common.Address
	InitialDeposits [2]*big.Int
	Raw             types.Log // Blockchain specific contextual infos
}

// FilterOpenChannel is a free log retrieval operation binding the contract event 0x9d9f66221370175606b4085f28a419b201c9b6dafd9e0c4520e5bf69ea3e166d.
//
// Solidity: event OpenChannel(bytes32 indexed channelId, uint256 tokenType, address indexed tokenAddress, address[2] peerAddrs, uint256[2] initialDeposits)
func (_LedgerOperation *LedgerOperationFilterer) FilterOpenChannel(opts *bind.FilterOpts, channelId [][32]byte, tokenAddress []common.Address) (*LedgerOperationOpenChannelIterator, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	var tokenAddressRule []interface{}
	for _, tokenAddressItem := range tokenAddress {
		tokenAddressRule = append(tokenAddressRule, tokenAddressItem)
	}

	logs, sub, err := _LedgerOperation.contract.FilterLogs(opts, "OpenChannel", channelIdRule, tokenAddressRule)
	if err != nil {
		return nil, err
	}
	return &LedgerOperationOpenChannelIterator{contract: _LedgerOperation.contract, event: "OpenChannel", logs: logs, sub: sub}, nil
}

// WatchOpenChannel is a free log subscription operation binding the contract event 0x9d9f66221370175606b4085f28a419b201c9b6dafd9e0c4520e5bf69ea3e166d.
//
// Solidity: event OpenChannel(bytes32 indexed channelId, uint256 tokenType, address indexed tokenAddress, address[2] peerAddrs, uint256[2] initialDeposits)
func (_LedgerOperation *LedgerOperationFilterer) WatchOpenChannel(opts *bind.WatchOpts, sink chan<- *LedgerOperationOpenChannel, channelId [][32]byte, tokenAddress []common.Address) (event.Subscription, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	var tokenAddressRule []interface{}
	for _, tokenAddressItem := range tokenAddress {
		tokenAddressRule = append(tokenAddressRule, tokenAddressItem)
	}

	logs, sub, err := _LedgerOperation.contract.WatchLogs(opts, "OpenChannel", channelIdRule, tokenAddressRule)
	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(LedgerOperationOpenChannel)
				if err := _LedgerOperation.contract.UnpackLog(event, "OpenChannel", 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
}

// ParseOpenChannel is a log parse operation binding the contract event 0x9d9f66221370175606b4085f28a419b201c9b6dafd9e0c4520e5bf69ea3e166d.
//
// Solidity: event OpenChannel(bytes32 indexed channelId, uint256 tokenType, address indexed tokenAddress, address[2] peerAddrs, uint256[2] initialDeposits)
func (_LedgerOperation *LedgerOperationFilterer) ParseOpenChannel(log types.Log) (*LedgerOperationOpenChannel, error) {
	event := new(LedgerOperationOpenChannel)
	if err := _LedgerOperation.contract.UnpackLog(event, "OpenChannel", log); err != nil {
		return nil, err
	}
	return event, nil
}

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

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

// LedgerOperationSnapshotStates represents a SnapshotStates event raised by the LedgerOperation contract.
type LedgerOperationSnapshotStates struct {
	ChannelId [32]byte
	SeqNums   [2]*big.Int
	Raw       types.Log // Blockchain specific contextual infos
}

// FilterSnapshotStates is a free log retrieval operation binding the contract event 0xd0793cc4198bf052a6d91a9a1273c4af39f02a91b0e19029477511c278c5b271.
//
// Solidity: event SnapshotStates(bytes32 indexed channelId, uint256[2] seqNums)
func (_LedgerOperation *LedgerOperationFilterer) FilterSnapshotStates(opts *bind.FilterOpts, channelId [][32]byte) (*LedgerOperationSnapshotStatesIterator, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.FilterLogs(opts, "SnapshotStates", channelIdRule)
	if err != nil {
		return nil, err
	}
	return &LedgerOperationSnapshotStatesIterator{contract: _LedgerOperation.contract, event: "SnapshotStates", logs: logs, sub: sub}, nil
}

// WatchSnapshotStates is a free log subscription operation binding the contract event 0xd0793cc4198bf052a6d91a9a1273c4af39f02a91b0e19029477511c278c5b271.
//
// Solidity: event SnapshotStates(bytes32 indexed channelId, uint256[2] seqNums)
func (_LedgerOperation *LedgerOperationFilterer) WatchSnapshotStates(opts *bind.WatchOpts, sink chan<- *LedgerOperationSnapshotStates, channelId [][32]byte) (event.Subscription, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.WatchLogs(opts, "SnapshotStates", channelIdRule)
	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(LedgerOperationSnapshotStates)
				if err := _LedgerOperation.contract.UnpackLog(event, "SnapshotStates", 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
}

// ParseSnapshotStates is a log parse operation binding the contract event 0xd0793cc4198bf052a6d91a9a1273c4af39f02a91b0e19029477511c278c5b271.
//
// Solidity: event SnapshotStates(bytes32 indexed channelId, uint256[2] seqNums)
func (_LedgerOperation *LedgerOperationFilterer) ParseSnapshotStates(log types.Log) (*LedgerOperationSnapshotStates, error) {
	event := new(LedgerOperationSnapshotStates)
	if err := _LedgerOperation.contract.UnpackLog(event, "SnapshotStates", log); err != nil {
		return nil, err
	}
	return event, nil
}

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

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

// LedgerOperationVetoWithdraw represents a VetoWithdraw event raised by the LedgerOperation contract.
type LedgerOperationVetoWithdraw struct {
	ChannelId [32]byte
	Raw       types.Log // Blockchain specific contextual infos
}

// FilterVetoWithdraw is a free log retrieval operation binding the contract event 0x9a8a5493b616f074b3f754b5fd66049c8e7980f01547289e5e31808485c6002c.
//
// Solidity: event VetoWithdraw(bytes32 indexed channelId)
func (_LedgerOperation *LedgerOperationFilterer) FilterVetoWithdraw(opts *bind.FilterOpts, channelId [][32]byte) (*LedgerOperationVetoWithdrawIterator, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.FilterLogs(opts, "VetoWithdraw", channelIdRule)
	if err != nil {
		return nil, err
	}
	return &LedgerOperationVetoWithdrawIterator{contract: _LedgerOperation.contract, event: "VetoWithdraw", logs: logs, sub: sub}, nil
}

// WatchVetoWithdraw is a free log subscription operation binding the contract event 0x9a8a5493b616f074b3f754b5fd66049c8e7980f01547289e5e31808485c6002c.
//
// Solidity: event VetoWithdraw(bytes32 indexed channelId)
func (_LedgerOperation *LedgerOperationFilterer) WatchVetoWithdraw(opts *bind.WatchOpts, sink chan<- *LedgerOperationVetoWithdraw, channelId [][32]byte) (event.Subscription, error) {

	var channelIdRule []interface{}
	for _, channelIdItem := range channelId {
		channelIdRule = append(channelIdRule, channelIdItem)
	}

	logs, sub, err := _LedgerOperation.contract.WatchLogs(opts, "VetoWithdraw", channelIdRule)
	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(LedgerOperationVetoWithdraw)
				if err := _LedgerOperation.contract.UnpackLog(event, "VetoWithdraw", 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
}

// ParseVetoWithdraw is a log parse operation binding the contract event 0x9a8a5493b616f074b3f754b5fd66049c8e7980f01547289e5e31808485c6002c.
//
// Solidity: event VetoWithdraw(bytes32 indexed channelId)
func (_LedgerOperation *LedgerOperationFilterer) ParseVetoWithdraw(log types.Log) (*LedgerOperationVetoWithdraw, error) {
	event := new(LedgerOperationVetoWithdraw)
	if err := _LedgerOperation.contract.UnpackLog(event, "VetoWithdraw", log); err != nil {
		return nil, err
	}
	return event, nil
}
