Validator.go 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742
  1. // Code generated - DO NOT EDIT.
  2. // This file is a generated binding and any manual changes will be lost.
  3. package validator
  4. import (
  5. "errors"
  6. "math/big"
  7. "strings"
  8. ethereum "github.com/ethereum/go-ethereum"
  9. "github.com/ethereum/go-ethereum/accounts/abi"
  10. "github.com/ethereum/go-ethereum/accounts/abi/bind"
  11. "github.com/ethereum/go-ethereum/common"
  12. "github.com/ethereum/go-ethereum/core/types"
  13. "github.com/ethereum/go-ethereum/event"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var (
  17. _ = errors.New
  18. _ = big.NewInt
  19. _ = strings.NewReader
  20. _ = ethereum.NotFound
  21. _ = bind.Bind
  22. _ = common.Big1
  23. _ = types.BloomLookup
  24. _ = event.NewSubscription
  25. )
  26. // ECDSAMetaData contains all meta data concerning the ECDSA contract.
  27. var ECDSAMetaData = &bind.MetaData{
  28. ABI: "[]",
  29. Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207399d7bed8861595eae1922da30eaff01349050487eb3c339a8f061492540c2364736f6c63430008000033",
  30. }
  31. // ECDSAABI is the input ABI used to generate the binding from.
  32. // Deprecated: Use ECDSAMetaData.ABI instead.
  33. var ECDSAABI = ECDSAMetaData.ABI
  34. // ECDSABin is the compiled bytecode used for deploying new contracts.
  35. // Deprecated: Use ECDSAMetaData.Bin instead.
  36. var ECDSABin = ECDSAMetaData.Bin
  37. // DeployECDSA deploys a new Ethereum contract, binding an instance of ECDSA to it.
  38. func DeployECDSA(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ECDSA, error) {
  39. parsed, err := ECDSAMetaData.GetAbi()
  40. if err != nil {
  41. return common.Address{}, nil, nil, err
  42. }
  43. if parsed == nil {
  44. return common.Address{}, nil, nil, errors.New("GetABI returned nil")
  45. }
  46. address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ECDSABin), backend)
  47. if err != nil {
  48. return common.Address{}, nil, nil, err
  49. }
  50. return address, tx, &ECDSA{ECDSACaller: ECDSACaller{contract: contract}, ECDSATransactor: ECDSATransactor{contract: contract}, ECDSAFilterer: ECDSAFilterer{contract: contract}}, nil
  51. }
  52. // ECDSA is an auto generated Go binding around an Ethereum contract.
  53. type ECDSA struct {
  54. ECDSACaller // Read-only binding to the contract
  55. ECDSATransactor // Write-only binding to the contract
  56. ECDSAFilterer // Log filterer for contract events
  57. }
  58. // ECDSACaller is an auto generated read-only Go binding around an Ethereum contract.
  59. type ECDSACaller struct {
  60. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  61. }
  62. // ECDSATransactor is an auto generated write-only Go binding around an Ethereum contract.
  63. type ECDSATransactor struct {
  64. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  65. }
  66. // ECDSAFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  67. type ECDSAFilterer struct {
  68. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  69. }
  70. // ECDSASession is an auto generated Go binding around an Ethereum contract,
  71. // with pre-set call and transact options.
  72. type ECDSASession struct {
  73. Contract *ECDSA // Generic contract binding to set the session for
  74. CallOpts bind.CallOpts // Call options to use throughout this session
  75. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  76. }
  77. // ECDSACallerSession is an auto generated read-only Go binding around an Ethereum contract,
  78. // with pre-set call options.
  79. type ECDSACallerSession struct {
  80. Contract *ECDSACaller // Generic contract caller binding to set the session for
  81. CallOpts bind.CallOpts // Call options to use throughout this session
  82. }
  83. // ECDSATransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  84. // with pre-set transact options.
  85. type ECDSATransactorSession struct {
  86. Contract *ECDSATransactor // Generic contract transactor binding to set the session for
  87. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  88. }
  89. // ECDSARaw is an auto generated low-level Go binding around an Ethereum contract.
  90. type ECDSARaw struct {
  91. Contract *ECDSA // Generic contract binding to access the raw methods on
  92. }
  93. // ECDSACallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  94. type ECDSACallerRaw struct {
  95. Contract *ECDSACaller // Generic read-only contract binding to access the raw methods on
  96. }
  97. // ECDSATransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  98. type ECDSATransactorRaw struct {
  99. Contract *ECDSATransactor // Generic write-only contract binding to access the raw methods on
  100. }
  101. // NewECDSA creates a new instance of ECDSA, bound to a specific deployed contract.
  102. func NewECDSA(address common.Address, backend bind.ContractBackend) (*ECDSA, error) {
  103. contract, err := bindECDSA(address, backend, backend, backend)
  104. if err != nil {
  105. return nil, err
  106. }
  107. return &ECDSA{ECDSACaller: ECDSACaller{contract: contract}, ECDSATransactor: ECDSATransactor{contract: contract}, ECDSAFilterer: ECDSAFilterer{contract: contract}}, nil
  108. }
  109. // NewECDSACaller creates a new read-only instance of ECDSA, bound to a specific deployed contract.
  110. func NewECDSACaller(address common.Address, caller bind.ContractCaller) (*ECDSACaller, error) {
  111. contract, err := bindECDSA(address, caller, nil, nil)
  112. if err != nil {
  113. return nil, err
  114. }
  115. return &ECDSACaller{contract: contract}, nil
  116. }
  117. // NewECDSATransactor creates a new write-only instance of ECDSA, bound to a specific deployed contract.
  118. func NewECDSATransactor(address common.Address, transactor bind.ContractTransactor) (*ECDSATransactor, error) {
  119. contract, err := bindECDSA(address, nil, transactor, nil)
  120. if err != nil {
  121. return nil, err
  122. }
  123. return &ECDSATransactor{contract: contract}, nil
  124. }
  125. // NewECDSAFilterer creates a new log filterer instance of ECDSA, bound to a specific deployed contract.
  126. func NewECDSAFilterer(address common.Address, filterer bind.ContractFilterer) (*ECDSAFilterer, error) {
  127. contract, err := bindECDSA(address, nil, nil, filterer)
  128. if err != nil {
  129. return nil, err
  130. }
  131. return &ECDSAFilterer{contract: contract}, nil
  132. }
  133. // bindECDSA binds a generic wrapper to an already deployed contract.
  134. func bindECDSA(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  135. parsed, err := abi.JSON(strings.NewReader(ECDSAABI))
  136. if err != nil {
  137. return nil, err
  138. }
  139. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  140. }
  141. // Call invokes the (constant) contract method with params as input values and
  142. // sets the output to result. The result type might be a single field for simple
  143. // returns, a slice of interfaces for anonymous returns and a struct for named
  144. // returns.
  145. func (_ECDSA *ECDSARaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  146. return _ECDSA.Contract.ECDSACaller.contract.Call(opts, result, method, params...)
  147. }
  148. // Transfer initiates a plain transaction to move funds to the contract, calling
  149. // its default method if one is available.
  150. func (_ECDSA *ECDSARaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  151. return _ECDSA.Contract.ECDSATransactor.contract.Transfer(opts)
  152. }
  153. // Transact invokes the (paid) contract method with params as input values.
  154. func (_ECDSA *ECDSARaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  155. return _ECDSA.Contract.ECDSATransactor.contract.Transact(opts, method, params...)
  156. }
  157. // Call invokes the (constant) contract method with params as input values and
  158. // sets the output to result. The result type might be a single field for simple
  159. // returns, a slice of interfaces for anonymous returns and a struct for named
  160. // returns.
  161. func (_ECDSA *ECDSACallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  162. return _ECDSA.Contract.contract.Call(opts, result, method, params...)
  163. }
  164. // Transfer initiates a plain transaction to move funds to the contract, calling
  165. // its default method if one is available.
  166. func (_ECDSA *ECDSATransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  167. return _ECDSA.Contract.contract.Transfer(opts)
  168. }
  169. // Transact invokes the (paid) contract method with params as input values.
  170. func (_ECDSA *ECDSATransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  171. return _ECDSA.Contract.contract.Transact(opts, method, params...)
  172. }
  173. // StringsMetaData contains all meta data concerning the Strings contract.
  174. var StringsMetaData = &bind.MetaData{
  175. ABI: "[]",
  176. Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207edb8077e74c13cedbc2fb5fd5736eee7e0684a72011c3cf1afca22ef41419e364736f6c63430008000033",
  177. }
  178. // StringsABI is the input ABI used to generate the binding from.
  179. // Deprecated: Use StringsMetaData.ABI instead.
  180. var StringsABI = StringsMetaData.ABI
  181. // StringsBin is the compiled bytecode used for deploying new contracts.
  182. // Deprecated: Use StringsMetaData.Bin instead.
  183. var StringsBin = StringsMetaData.Bin
  184. // DeployStrings deploys a new Ethereum contract, binding an instance of Strings to it.
  185. func DeployStrings(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Strings, error) {
  186. parsed, err := StringsMetaData.GetAbi()
  187. if err != nil {
  188. return common.Address{}, nil, nil, err
  189. }
  190. if parsed == nil {
  191. return common.Address{}, nil, nil, errors.New("GetABI returned nil")
  192. }
  193. address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(StringsBin), backend)
  194. if err != nil {
  195. return common.Address{}, nil, nil, err
  196. }
  197. return address, tx, &Strings{StringsCaller: StringsCaller{contract: contract}, StringsTransactor: StringsTransactor{contract: contract}, StringsFilterer: StringsFilterer{contract: contract}}, nil
  198. }
  199. // Strings is an auto generated Go binding around an Ethereum contract.
  200. type Strings struct {
  201. StringsCaller // Read-only binding to the contract
  202. StringsTransactor // Write-only binding to the contract
  203. StringsFilterer // Log filterer for contract events
  204. }
  205. // StringsCaller is an auto generated read-only Go binding around an Ethereum contract.
  206. type StringsCaller struct {
  207. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  208. }
  209. // StringsTransactor is an auto generated write-only Go binding around an Ethereum contract.
  210. type StringsTransactor struct {
  211. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  212. }
  213. // StringsFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  214. type StringsFilterer struct {
  215. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  216. }
  217. // StringsSession is an auto generated Go binding around an Ethereum contract,
  218. // with pre-set call and transact options.
  219. type StringsSession struct {
  220. Contract *Strings // Generic contract binding to set the session for
  221. CallOpts bind.CallOpts // Call options to use throughout this session
  222. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  223. }
  224. // StringsCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  225. // with pre-set call options.
  226. type StringsCallerSession struct {
  227. Contract *StringsCaller // Generic contract caller binding to set the session for
  228. CallOpts bind.CallOpts // Call options to use throughout this session
  229. }
  230. // StringsTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  231. // with pre-set transact options.
  232. type StringsTransactorSession struct {
  233. Contract *StringsTransactor // Generic contract transactor binding to set the session for
  234. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  235. }
  236. // StringsRaw is an auto generated low-level Go binding around an Ethereum contract.
  237. type StringsRaw struct {
  238. Contract *Strings // Generic contract binding to access the raw methods on
  239. }
  240. // StringsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  241. type StringsCallerRaw struct {
  242. Contract *StringsCaller // Generic read-only contract binding to access the raw methods on
  243. }
  244. // StringsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  245. type StringsTransactorRaw struct {
  246. Contract *StringsTransactor // Generic write-only contract binding to access the raw methods on
  247. }
  248. // NewStrings creates a new instance of Strings, bound to a specific deployed contract.
  249. func NewStrings(address common.Address, backend bind.ContractBackend) (*Strings, error) {
  250. contract, err := bindStrings(address, backend, backend, backend)
  251. if err != nil {
  252. return nil, err
  253. }
  254. return &Strings{StringsCaller: StringsCaller{contract: contract}, StringsTransactor: StringsTransactor{contract: contract}, StringsFilterer: StringsFilterer{contract: contract}}, nil
  255. }
  256. // NewStringsCaller creates a new read-only instance of Strings, bound to a specific deployed contract.
  257. func NewStringsCaller(address common.Address, caller bind.ContractCaller) (*StringsCaller, error) {
  258. contract, err := bindStrings(address, caller, nil, nil)
  259. if err != nil {
  260. return nil, err
  261. }
  262. return &StringsCaller{contract: contract}, nil
  263. }
  264. // NewStringsTransactor creates a new write-only instance of Strings, bound to a specific deployed contract.
  265. func NewStringsTransactor(address common.Address, transactor bind.ContractTransactor) (*StringsTransactor, error) {
  266. contract, err := bindStrings(address, nil, transactor, nil)
  267. if err != nil {
  268. return nil, err
  269. }
  270. return &StringsTransactor{contract: contract}, nil
  271. }
  272. // NewStringsFilterer creates a new log filterer instance of Strings, bound to a specific deployed contract.
  273. func NewStringsFilterer(address common.Address, filterer bind.ContractFilterer) (*StringsFilterer, error) {
  274. contract, err := bindStrings(address, nil, nil, filterer)
  275. if err != nil {
  276. return nil, err
  277. }
  278. return &StringsFilterer{contract: contract}, nil
  279. }
  280. // bindStrings binds a generic wrapper to an already deployed contract.
  281. func bindStrings(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  282. parsed, err := abi.JSON(strings.NewReader(StringsABI))
  283. if err != nil {
  284. return nil, err
  285. }
  286. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  287. }
  288. // Call invokes the (constant) contract method with params as input values and
  289. // sets the output to result. The result type might be a single field for simple
  290. // returns, a slice of interfaces for anonymous returns and a struct for named
  291. // returns.
  292. func (_Strings *StringsRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  293. return _Strings.Contract.StringsCaller.contract.Call(opts, result, method, params...)
  294. }
  295. // Transfer initiates a plain transaction to move funds to the contract, calling
  296. // its default method if one is available.
  297. func (_Strings *StringsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  298. return _Strings.Contract.StringsTransactor.contract.Transfer(opts)
  299. }
  300. // Transact invokes the (paid) contract method with params as input values.
  301. func (_Strings *StringsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  302. return _Strings.Contract.StringsTransactor.contract.Transact(opts, method, params...)
  303. }
  304. // Call invokes the (constant) contract method with params as input values and
  305. // sets the output to result. The result type might be a single field for simple
  306. // returns, a slice of interfaces for anonymous returns and a struct for named
  307. // returns.
  308. func (_Strings *StringsCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  309. return _Strings.Contract.contract.Call(opts, result, method, params...)
  310. }
  311. // Transfer initiates a plain transaction to move funds to the contract, calling
  312. // its default method if one is available.
  313. func (_Strings *StringsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  314. return _Strings.Contract.contract.Transfer(opts)
  315. }
  316. // Transact invokes the (paid) contract method with params as input values.
  317. func (_Strings *StringsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  318. return _Strings.Contract.contract.Transact(opts, method, params...)
  319. }
  320. // ValidatorMetaData contains all meta data concerning the Validator contract.
  321. var ValidatorMetaData = &bind.MetaData{
  322. ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"LogSigner\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"recoverAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"verify\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
  323. Sigs: map[string]string{
  324. "8428cf83": "recoverAddress(bytes32,uint8,bytes32,bytes32)",
  325. "5ade6633": "verify(address,bytes,bytes)",
  326. },
  327. Bin: "0x608060405234801561001057600080fd5b506107e7806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80635ade66331461003b5780638428cf8314610064575b600080fd5b61004e610049366004610527565b610084565b60405161005b9190610617565b60405180910390f35b6100776100723660046105b2565b61013e565b60405161005b9190610603565b60008085856040516100979291906105f3565b6040518091039020905060006100e38286868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061020192505050565b90507f543e6a4f57a8966c6cad9257756e03ec9e09da64f3a8e5c09a164b643dc2542a816040516101149190610603565b60405180910390a1876001600160a01b0316816001600160a01b0316149250505095945050505050565b6000806040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525090506000818760405160200161018e929190610640565b604051602081830303815290604052805190602001209050600181878787604051600081526020016040526040516101c99493929190610622565b6020604051602081039080840390855afa1580156101eb573d6000803e3d6000fd5b5050604051601f19015198975050505050505050565b60008060006102108585610225565b9150915061021d81610295565b509392505050565b60008082516041141561025c5760208301516040840151606085015160001a610250878285856103ce565b9450945050505061028e565b825160401415610286576020830151604084015161027b8683836104ae565b93509350505061028e565b506000905060025b9250929050565b60008160048111156102b757634e487b7160e01b600052602160045260246000fd5b14156102c2576103cb565b60018160048111156102e457634e487b7160e01b600052602160045260246000fd5b141561030b5760405162461bcd60e51b81526004016103029061069b565b60405180910390fd5b600281600481111561032d57634e487b7160e01b600052602160045260246000fd5b141561034b5760405162461bcd60e51b8152600401610302906106d2565b600381600481111561036d57634e487b7160e01b600052602160045260246000fd5b141561038b5760405162461bcd60e51b815260040161030290610709565b60048160048111156103ad57634e487b7160e01b600052602160045260246000fd5b14156103cb5760405162461bcd60e51b81526004016103029061074b565b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561040557506000905060036104a5565b8460ff16601b1415801561041d57508460ff16601c14155b1561042e57506000905060046104a5565b6000600187878787604051600081526020016040526040516104539493929190610622565b6020604051602081039080840390855afa158015610475573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661049e576000600192509250506104a5565b9150600090505b94509492505050565b6000806001600160ff1b038316816104cb60ff86901c601b61078d565b90506104d9878288856103ce565b935093505050935093915050565b60008083601f8401126104f8578182fd5b50813567ffffffffffffffff81111561050f578182fd5b60208301915083602082850101111561028e57600080fd5b60008060008060006060868803121561053e578081fd5b85356001600160a01b0381168114610554578182fd5b9450602086013567ffffffffffffffff80821115610570578283fd5b61057c89838a016104e7565b90965094506040880135915080821115610594578283fd5b506105a1888289016104e7565b969995985093965092949392505050565b600080600080608085870312156105c7578384fd5b84359350602085013560ff811681146105de578384fd5b93969395505050506040820135916060013590565b6000828483379101908152919050565b6001600160a01b0391909116815260200190565b901515815260200190565b93845260ff9290921660208401526040830152606082015260800190565b6000604082528351806040840152815b8181101561066d5760208187018101516060868401015201610650565b8181111561067e5782606083860101525b50602083019390935250601f91909101601f191601606001919050565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b6020808252601f908201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604082015261756560f01b606082015260800190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604082015261756560f01b606082015260800190565b600082198211156107ac57634e487b7160e01b81526011600452602481fd5b50019056fea26469706673582212207cd369a35af431e26ff43e26dd995ca5d03bdbd65a8ae4ca6774c69719d6886c64736f6c63430008000033",
  328. }
  329. // ValidatorABI is the input ABI used to generate the binding from.
  330. // Deprecated: Use ValidatorMetaData.ABI instead.
  331. var ValidatorABI = ValidatorMetaData.ABI
  332. // Deprecated: Use ValidatorMetaData.Sigs instead.
  333. // ValidatorFuncSigs maps the 4-byte function signature to its string representation.
  334. var ValidatorFuncSigs = ValidatorMetaData.Sigs
  335. // ValidatorBin is the compiled bytecode used for deploying new contracts.
  336. // Deprecated: Use ValidatorMetaData.Bin instead.
  337. var ValidatorBin = ValidatorMetaData.Bin
  338. // DeployValidator deploys a new Ethereum contract, binding an instance of Validator to it.
  339. func DeployValidator(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Validator, error) {
  340. parsed, err := ValidatorMetaData.GetAbi()
  341. if err != nil {
  342. return common.Address{}, nil, nil, err
  343. }
  344. if parsed == nil {
  345. return common.Address{}, nil, nil, errors.New("GetABI returned nil")
  346. }
  347. address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ValidatorBin), backend)
  348. if err != nil {
  349. return common.Address{}, nil, nil, err
  350. }
  351. return address, tx, &Validator{ValidatorCaller: ValidatorCaller{contract: contract}, ValidatorTransactor: ValidatorTransactor{contract: contract}, ValidatorFilterer: ValidatorFilterer{contract: contract}}, nil
  352. }
  353. // Validator is an auto generated Go binding around an Ethereum contract.
  354. type Validator struct {
  355. ValidatorCaller // Read-only binding to the contract
  356. ValidatorTransactor // Write-only binding to the contract
  357. ValidatorFilterer // Log filterer for contract events
  358. }
  359. // ValidatorCaller is an auto generated read-only Go binding around an Ethereum contract.
  360. type ValidatorCaller struct {
  361. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  362. }
  363. // ValidatorTransactor is an auto generated write-only Go binding around an Ethereum contract.
  364. type ValidatorTransactor struct {
  365. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  366. }
  367. // ValidatorFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  368. type ValidatorFilterer struct {
  369. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  370. }
  371. // ValidatorSession is an auto generated Go binding around an Ethereum contract,
  372. // with pre-set call and transact options.
  373. type ValidatorSession struct {
  374. Contract *Validator // Generic contract binding to set the session for
  375. CallOpts bind.CallOpts // Call options to use throughout this session
  376. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  377. }
  378. // ValidatorCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  379. // with pre-set call options.
  380. type ValidatorCallerSession struct {
  381. Contract *ValidatorCaller // Generic contract caller binding to set the session for
  382. CallOpts bind.CallOpts // Call options to use throughout this session
  383. }
  384. // ValidatorTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  385. // with pre-set transact options.
  386. type ValidatorTransactorSession struct {
  387. Contract *ValidatorTransactor // Generic contract transactor binding to set the session for
  388. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  389. }
  390. // ValidatorRaw is an auto generated low-level Go binding around an Ethereum contract.
  391. type ValidatorRaw struct {
  392. Contract *Validator // Generic contract binding to access the raw methods on
  393. }
  394. // ValidatorCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  395. type ValidatorCallerRaw struct {
  396. Contract *ValidatorCaller // Generic read-only contract binding to access the raw methods on
  397. }
  398. // ValidatorTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  399. type ValidatorTransactorRaw struct {
  400. Contract *ValidatorTransactor // Generic write-only contract binding to access the raw methods on
  401. }
  402. // NewValidator creates a new instance of Validator, bound to a specific deployed contract.
  403. func NewValidator(address common.Address, backend bind.ContractBackend) (*Validator, error) {
  404. contract, err := bindValidator(address, backend, backend, backend)
  405. if err != nil {
  406. return nil, err
  407. }
  408. return &Validator{ValidatorCaller: ValidatorCaller{contract: contract}, ValidatorTransactor: ValidatorTransactor{contract: contract}, ValidatorFilterer: ValidatorFilterer{contract: contract}}, nil
  409. }
  410. // NewValidatorCaller creates a new read-only instance of Validator, bound to a specific deployed contract.
  411. func NewValidatorCaller(address common.Address, caller bind.ContractCaller) (*ValidatorCaller, error) {
  412. contract, err := bindValidator(address, caller, nil, nil)
  413. if err != nil {
  414. return nil, err
  415. }
  416. return &ValidatorCaller{contract: contract}, nil
  417. }
  418. // NewValidatorTransactor creates a new write-only instance of Validator, bound to a specific deployed contract.
  419. func NewValidatorTransactor(address common.Address, transactor bind.ContractTransactor) (*ValidatorTransactor, error) {
  420. contract, err := bindValidator(address, nil, transactor, nil)
  421. if err != nil {
  422. return nil, err
  423. }
  424. return &ValidatorTransactor{contract: contract}, nil
  425. }
  426. // NewValidatorFilterer creates a new log filterer instance of Validator, bound to a specific deployed contract.
  427. func NewValidatorFilterer(address common.Address, filterer bind.ContractFilterer) (*ValidatorFilterer, error) {
  428. contract, err := bindValidator(address, nil, nil, filterer)
  429. if err != nil {
  430. return nil, err
  431. }
  432. return &ValidatorFilterer{contract: contract}, nil
  433. }
  434. // bindValidator binds a generic wrapper to an already deployed contract.
  435. func bindValidator(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  436. parsed, err := abi.JSON(strings.NewReader(ValidatorABI))
  437. if err != nil {
  438. return nil, err
  439. }
  440. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  441. }
  442. // Call invokes the (constant) contract method with params as input values and
  443. // sets the output to result. The result type might be a single field for simple
  444. // returns, a slice of interfaces for anonymous returns and a struct for named
  445. // returns.
  446. func (_Validator *ValidatorRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  447. return _Validator.Contract.ValidatorCaller.contract.Call(opts, result, method, params...)
  448. }
  449. // Transfer initiates a plain transaction to move funds to the contract, calling
  450. // its default method if one is available.
  451. func (_Validator *ValidatorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  452. return _Validator.Contract.ValidatorTransactor.contract.Transfer(opts)
  453. }
  454. // Transact invokes the (paid) contract method with params as input values.
  455. func (_Validator *ValidatorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  456. return _Validator.Contract.ValidatorTransactor.contract.Transact(opts, method, params...)
  457. }
  458. // Call invokes the (constant) contract method with params as input values and
  459. // sets the output to result. The result type might be a single field for simple
  460. // returns, a slice of interfaces for anonymous returns and a struct for named
  461. // returns.
  462. func (_Validator *ValidatorCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  463. return _Validator.Contract.contract.Call(opts, result, method, params...)
  464. }
  465. // Transfer initiates a plain transaction to move funds to the contract, calling
  466. // its default method if one is available.
  467. func (_Validator *ValidatorTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  468. return _Validator.Contract.contract.Transfer(opts)
  469. }
  470. // Transact invokes the (paid) contract method with params as input values.
  471. func (_Validator *ValidatorTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  472. return _Validator.Contract.contract.Transact(opts, method, params...)
  473. }
  474. // RecoverAddress is a free data retrieval call binding the contract method 0x8428cf83.
  475. //
  476. // Solidity: function recoverAddress(bytes32 msgHash, uint8 v, bytes32 r, bytes32 s) pure returns(address)
  477. func (_Validator *ValidatorCaller) RecoverAddress(opts *bind.CallOpts, msgHash [32]byte, v uint8, r [32]byte, s [32]byte) (common.Address, error) {
  478. var out []interface{}
  479. err := _Validator.contract.Call(opts, &out, "recoverAddress", msgHash, v, r, s)
  480. if err != nil {
  481. return *new(common.Address), err
  482. }
  483. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  484. return out0, err
  485. }
  486. // RecoverAddress is a free data retrieval call binding the contract method 0x8428cf83.
  487. //
  488. // Solidity: function recoverAddress(bytes32 msgHash, uint8 v, bytes32 r, bytes32 s) pure returns(address)
  489. func (_Validator *ValidatorSession) RecoverAddress(msgHash [32]byte, v uint8, r [32]byte, s [32]byte) (common.Address, error) {
  490. return _Validator.Contract.RecoverAddress(&_Validator.CallOpts, msgHash, v, r, s)
  491. }
  492. // RecoverAddress is a free data retrieval call binding the contract method 0x8428cf83.
  493. //
  494. // Solidity: function recoverAddress(bytes32 msgHash, uint8 v, bytes32 r, bytes32 s) pure returns(address)
  495. func (_Validator *ValidatorCallerSession) RecoverAddress(msgHash [32]byte, v uint8, r [32]byte, s [32]byte) (common.Address, error) {
  496. return _Validator.Contract.RecoverAddress(&_Validator.CallOpts, msgHash, v, r, s)
  497. }
  498. // Verify is a paid mutator transaction binding the contract method 0x5ade6633.
  499. //
  500. // Solidity: function verify(address claimer, bytes data, bytes signature) returns(bool)
  501. func (_Validator *ValidatorTransactor) Verify(opts *bind.TransactOpts, claimer common.Address, data []byte, signature []byte) (*types.Transaction, error) {
  502. return _Validator.contract.Transact(opts, "verify", claimer, data, signature)
  503. }
  504. // Verify is a paid mutator transaction binding the contract method 0x5ade6633.
  505. //
  506. // Solidity: function verify(address claimer, bytes data, bytes signature) returns(bool)
  507. func (_Validator *ValidatorSession) Verify(claimer common.Address, data []byte, signature []byte) (*types.Transaction, error) {
  508. return _Validator.Contract.Verify(&_Validator.TransactOpts, claimer, data, signature)
  509. }
  510. // Verify is a paid mutator transaction binding the contract method 0x5ade6633.
  511. //
  512. // Solidity: function verify(address claimer, bytes data, bytes signature) returns(bool)
  513. func (_Validator *ValidatorTransactorSession) Verify(claimer common.Address, data []byte, signature []byte) (*types.Transaction, error) {
  514. return _Validator.Contract.Verify(&_Validator.TransactOpts, claimer, data, signature)
  515. }
  516. // ValidatorLogSignerIterator is returned from FilterLogSigner and is used to iterate over the raw logs and unpacked data for LogSigner events raised by the Validator contract.
  517. type ValidatorLogSignerIterator struct {
  518. Event *ValidatorLogSigner // Event containing the contract specifics and raw log
  519. contract *bind.BoundContract // Generic contract to use for unpacking event data
  520. event string // Event name to use for unpacking event data
  521. logs chan types.Log // Log channel receiving the found contract events
  522. sub ethereum.Subscription // Subscription for errors, completion and termination
  523. done bool // Whether the subscription completed delivering logs
  524. fail error // Occurred error to stop iteration
  525. }
  526. // Next advances the iterator to the subsequent event, returning whether there
  527. // are any more events found. In case of a retrieval or parsing error, false is
  528. // returned and Error() can be queried for the exact failure.
  529. func (it *ValidatorLogSignerIterator) Next() bool {
  530. // If the iterator failed, stop iterating
  531. if it.fail != nil {
  532. return false
  533. }
  534. // If the iterator completed, deliver directly whatever's available
  535. if it.done {
  536. select {
  537. case log := <-it.logs:
  538. it.Event = new(ValidatorLogSigner)
  539. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  540. it.fail = err
  541. return false
  542. }
  543. it.Event.Raw = log
  544. return true
  545. default:
  546. return false
  547. }
  548. }
  549. // Iterator still in progress, wait for either a data or an error event
  550. select {
  551. case log := <-it.logs:
  552. it.Event = new(ValidatorLogSigner)
  553. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  554. it.fail = err
  555. return false
  556. }
  557. it.Event.Raw = log
  558. return true
  559. case err := <-it.sub.Err():
  560. it.done = true
  561. it.fail = err
  562. return it.Next()
  563. }
  564. }
  565. // Error returns any retrieval or parsing error occurred during filtering.
  566. func (it *ValidatorLogSignerIterator) Error() error {
  567. return it.fail
  568. }
  569. // Close terminates the iteration process, releasing any pending underlying
  570. // resources.
  571. func (it *ValidatorLogSignerIterator) Close() error {
  572. it.sub.Unsubscribe()
  573. return nil
  574. }
  575. // ValidatorLogSigner represents a LogSigner event raised by the Validator contract.
  576. type ValidatorLogSigner struct {
  577. Signer common.Address
  578. Raw types.Log // Blockchain specific contextual infos
  579. }
  580. // FilterLogSigner is a free log retrieval operation binding the contract event 0x543e6a4f57a8966c6cad9257756e03ec9e09da64f3a8e5c09a164b643dc2542a.
  581. //
  582. // Solidity: event LogSigner(address signer)
  583. func (_Validator *ValidatorFilterer) FilterLogSigner(opts *bind.FilterOpts) (*ValidatorLogSignerIterator, error) {
  584. logs, sub, err := _Validator.contract.FilterLogs(opts, "LogSigner")
  585. if err != nil {
  586. return nil, err
  587. }
  588. return &ValidatorLogSignerIterator{contract: _Validator.contract, event: "LogSigner", logs: logs, sub: sub}, nil
  589. }
  590. // WatchLogSigner is a free log subscription operation binding the contract event 0x543e6a4f57a8966c6cad9257756e03ec9e09da64f3a8e5c09a164b643dc2542a.
  591. //
  592. // Solidity: event LogSigner(address signer)
  593. func (_Validator *ValidatorFilterer) WatchLogSigner(opts *bind.WatchOpts, sink chan<- *ValidatorLogSigner) (event.Subscription, error) {
  594. logs, sub, err := _Validator.contract.WatchLogs(opts, "LogSigner")
  595. if err != nil {
  596. return nil, err
  597. }
  598. return event.NewSubscription(func(quit <-chan struct{}) error {
  599. defer sub.Unsubscribe()
  600. for {
  601. select {
  602. case log := <-logs:
  603. // New log arrived, parse the event and forward to the user
  604. event := new(ValidatorLogSigner)
  605. if err := _Validator.contract.UnpackLog(event, "LogSigner", log); err != nil {
  606. return err
  607. }
  608. event.Raw = log
  609. select {
  610. case sink <- event:
  611. case err := <-sub.Err():
  612. return err
  613. case <-quit:
  614. return nil
  615. }
  616. case err := <-sub.Err():
  617. return err
  618. case <-quit:
  619. return nil
  620. }
  621. }
  622. }), nil
  623. }
  624. // ParseLogSigner is a log parse operation binding the contract event 0x543e6a4f57a8966c6cad9257756e03ec9e09da64f3a8e5c09a164b643dc2542a.
  625. //
  626. // Solidity: event LogSigner(address signer)
  627. func (_Validator *ValidatorFilterer) ParseLogSigner(log types.Log) (*ValidatorLogSigner, error) {
  628. event := new(ValidatorLogSigner)
  629. if err := _Validator.contract.UnpackLog(event, "LogSigner", log); err != nil {
  630. return nil, err
  631. }
  632. event.Raw = log
  633. return event, nil
  634. }