-
Notifications
You must be signed in to change notification settings - Fork 0
/
wrapper.go
387 lines (325 loc) · 26.6 KB
/
wrapper.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package circuit
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
)
// PairingABI is the input ABI used to generate the binding from.
const PairingABI = "[]"
// PairingBin is the compiled bytecode used for deploying new contracts.
var PairingBin = "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212206a98eb5ddc0d1a1c507aca1234887010a00f537fdba2a5a63afb4cda657fb10664736f6c63430008070033"
// DeployPairing deploys a new Ethereum contract, binding an instance of Pairing to it.
func DeployPairing(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Pairing, error) {
parsed, err := abi.JSON(strings.NewReader(PairingABI))
if err != nil {
return common.Address{}, nil, nil, err
}
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(PairingBin), backend)
if err != nil {
return common.Address{}, nil, nil, err
}
return address, tx, &Pairing{PairingCaller: PairingCaller{contract: contract}, PairingTransactor: PairingTransactor{contract: contract}, PairingFilterer: PairingFilterer{contract: contract}}, nil
}
// Pairing is an auto generated Go binding around an Ethereum contract.
type Pairing struct {
PairingCaller // Read-only binding to the contract
PairingTransactor // Write-only binding to the contract
PairingFilterer // Log filterer for contract events
}
// PairingCaller is an auto generated read-only Go binding around an Ethereum contract.
type PairingCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// PairingTransactor is an auto generated write-only Go binding around an Ethereum contract.
type PairingTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// PairingFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type PairingFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// PairingSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type PairingSession struct {
Contract *Pairing // 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
}
// PairingCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type PairingCallerSession struct {
Contract *PairingCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// PairingTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type PairingTransactorSession struct {
Contract *PairingTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// PairingRaw is an auto generated low-level Go binding around an Ethereum contract.
type PairingRaw struct {
Contract *Pairing // Generic contract binding to access the raw methods on
}
// PairingCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type PairingCallerRaw struct {
Contract *PairingCaller // Generic read-only contract binding to access the raw methods on
}
// PairingTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type PairingTransactorRaw struct {
Contract *PairingTransactor // Generic write-only contract binding to access the raw methods on
}
// NewPairing creates a new instance of Pairing, bound to a specific deployed contract.
func NewPairing(address common.Address, backend bind.ContractBackend) (*Pairing, error) {
contract, err := bindPairing(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &Pairing{PairingCaller: PairingCaller{contract: contract}, PairingTransactor: PairingTransactor{contract: contract}, PairingFilterer: PairingFilterer{contract: contract}}, nil
}
// NewPairingCaller creates a new read-only instance of Pairing, bound to a specific deployed contract.
func NewPairingCaller(address common.Address, caller bind.ContractCaller) (*PairingCaller, error) {
contract, err := bindPairing(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &PairingCaller{contract: contract}, nil
}
// NewPairingTransactor creates a new write-only instance of Pairing, bound to a specific deployed contract.
func NewPairingTransactor(address common.Address, transactor bind.ContractTransactor) (*PairingTransactor, error) {
contract, err := bindPairing(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &PairingTransactor{contract: contract}, nil
}
// NewPairingFilterer creates a new log filterer instance of Pairing, bound to a specific deployed contract.
func NewPairingFilterer(address common.Address, filterer bind.ContractFilterer) (*PairingFilterer, error) {
contract, err := bindPairing(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &PairingFilterer{contract: contract}, nil
}
// bindPairing binds a generic wrapper to an already deployed contract.
func bindPairing(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(PairingABI))
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 (_Pairing *PairingRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Pairing.Contract.PairingCaller.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 (_Pairing *PairingRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Pairing.Contract.PairingTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Pairing *PairingRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Pairing.Contract.PairingTransactor.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 (_Pairing *PairingCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Pairing.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 (_Pairing *PairingTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Pairing.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Pairing *PairingTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Pairing.Contract.contract.Transact(opts, method, params...)
}
// VerifierABI is the input ABI used to generate the binding from.
const VerifierABI = "[{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"a\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2][2]\",\"name\":\"b\",\"type\":\"uint256[2][2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"c\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[1]\",\"name\":\"input\",\"type\":\"uint256[1]\"}],\"name\":\"verifyProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"r\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"
// VerifierFuncSigs maps the 4-byte function signature to its string representation.
var VerifierFuncSigs = map[string]string{
"43753b4d": "verifyProof(uint256[2],uint256[2][2],uint256[2],uint256[1])",
}
// VerifierBin is the compiled bytecode used for deploying new contracts.
var VerifierBin = "0x608060405234801561001057600080fd5b5061114d806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806343753b4d14610030575b600080fd5b61004361003e366004610ee7565b610057565b604051901515815260200160405180910390f35b6000610061610d1c565b6040805180820182528751815260208089015181830152908352815160808101835287515181840190815288518301516060830152815282518084018452888301805151825251830151818401528183015283820152815180830183528651815286820151918101919091529082015260006100db61055c565b6040805180820190915260008082526020820152835151919250906000805160206110f8833981519152116101575760405162461bcd60e51b815260206004820152601760248201527f76657269666965722d61582d6774652d7072696d652d7100000000000000000060448201526064015b60405180910390fd5b8251602001516000805160206110f8833981519152116101b95760405162461bcd60e51b815260206004820152601760248201527f76657269666965722d61592d6774652d7072696d652d71000000000000000000604482015260640161014e565b602083015151516000805160206110f88339815191521161021c5760405162461bcd60e51b815260206004820152601860248201527f76657269666965722d6258302d6774652d7072696d652d710000000000000000604482015260640161014e565b6020838101510151516000805160206110f8833981519152116102815760405162461bcd60e51b815260206004820152601860248201527f76657269666965722d6259302d6774652d7072696d652d710000000000000000604482015260640161014e565b6020838101515101516000805160206110f8833981519152116102e65760405162461bcd60e51b815260206004820152601860248201527f76657269666965722d6258312d6774652d7072696d652d710000000000000000604482015260640161014e565b60208381015181015101516000805160206110f88339815191521161034d5760405162461bcd60e51b815260206004820152601860248201527f76657269666965722d6259312d6774652d7072696d652d710000000000000000604482015260640161014e565b6040830151516000805160206110f8833981519152116103af5760405162461bcd60e51b815260206004820152601760248201527f76657269666965722d63582d6774652d7072696d652d71000000000000000000604482015260640161014e565b6000805160206110f8833981519152836040015160200151106104145760405162461bcd60e51b815260206004820152601760248201527f76657269666965722d63592d6774652d7072696d652d71000000000000000000604482015260640161014e565b60005b6001811015610508577f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001868260018110610453576104536110e1565b6020020151106104a55760405162461bcd60e51b815260206004820152601f60248201527f76657269666965722d6774652d736e61726b2d7363616c61722d6669656c6400604482015260640161014e565b6104f4826104ef85608001518460016104be9190611040565b600281106104ce576104ce6110e1565b60200201518985600181106104e5576104e56110e1565b602002015161087c565b610918565b9150806105008161108e565b915050610417565b5060808201515161051a908290610918565b905061055061052c84600001516109b0565b84602001518460000151856020015185876040015189604001518960600151610a46565b98975050505050505050565b610564610d6d565b6040805180820182527f28b7d77e8b1337be7571f58ee1a885874ea89b131690989d1cdce519be166c0b81527f2862c0407b848a41df9b2834601c645e9f5777803bf7caff35cc339270d0f3216020808301919091529083528151608080820184527f12090aa0b4d2538c8def9779b338e836bb622760f2eb972ff3b49910985ba9a28285019081527f1414d7966f09846903e5e941baa6029deb0433397de9f29b3fcf9d05f674fe3a606080850191909152908352845180860186527f0f551f74da06b847fe4f8a6429a35e176d4f4ccb40cb0d8c903ad7535b1edb4a81527f1bed6780ee2c720fb7b24cec95af12b7f5159fad320173353146749f670c6188818601528385015285840192909252835180820185527f26612a5bdbcc7f587fa2e2c1b8fb9706074e8b0979bcaa466af5fd926cd0c76d8186019081527f29b1cb9b35c497bd53efbcf6ce8f9ada9df46a037018a3665688fbc1a1022ed7828501528152845180860186527f1d001b687716668454e491bbd6072d80e7325af4f2a95ce98b2c356cf2cb9e9981527f03e96e343870d95cdc8d462d78df416a67c70919cbd5d2f46e5e00a01fc2ef6c818601528185015285850152835180820185527f25303150a45c42df6f6c39834664688f7407b77ef1a9a05ed89a4b502b2d2e478186019081527f20fde13fb07a50128b5c8f588ca4a0452a1d13981a2c292e346022c2e2c5f5dd828501528152845180860186527f04311e355b50d6a5f450e0a9e6a12e55d4307e02534bfa3148c009511724d4ba81527f2d447b5af3108b90b94c74c3331f0038fa86172640c0e898335795cbbd51bbaa818601528185015291850191909152825180840184527f1aa78123c1c87759718a070632f0163c07983889f92b3bcf0a69e394fbeda88481527e38b824a389ea3f942b8850a1aa8398c70da5512591276e9100c9d8f9458b638184015290840180519190915282518084019093527f027fe8baa0ac6b1545f4b1d164f0558958d0fa3d6e38055e2e4f140a951ae7b083527f10deb1f1c6d84a01b60a45adf1257debe7c3ad5697e0fadb303011fda4880ef38383015251015290565b6040805180820190915260008082526020820152610898610dbe565b835181526020808501519082015260408101839052600060608360808460076107d05a03fa90508080156108cb576108cd565bfe5b50806109105760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5b5d5b0b59985a5b195960721b604482015260640161014e565b505092915050565b6040805180820190915260008082526020820152610934610ddc565b8351815260208085015181830152835160408301528301516060808301919091526000908360c08460066107d05a03fa90508080156108cb5750806109105760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5859190b59985a5b195960721b604482015260640161014e565b604080518082019091526000808252602082015281511580156109d557506020820151155b156109f3575050604080518082019091526000808252602082015290565b6040518060400160405280836000015181526020016000805160206110f88339815191528460200151610a2691906110a9565b610a3e906000805160206110f8833981519152611077565b905292915050565b60408051608080820183528a825260208083018a90528284018890526060808401879052845192830185528b83528282018a9052828501889052820185905283516018808252610320820190955260009491859190839082016103008036833701905050905060005b6004811015610c9a576000610ac5826006611058565b9050858260048110610ad957610ad96110e1565b60200201515183610aeb836000611040565b81518110610afb57610afb6110e1565b602002602001018181525050858260048110610b1957610b196110e1565b60200201516020015183826001610b309190611040565b81518110610b4057610b406110e1565b602002602001018181525050848260048110610b5e57610b5e6110e1565b6020020151515183610b71836002611040565b81518110610b8157610b816110e1565b602002602001018181525050848260048110610b9f57610b9f6110e1565b6020020151516001602002015183610bb8836003611040565b81518110610bc857610bc86110e1565b602002602001018181525050848260048110610be657610be66110e1565b602002015160200151600060028110610c0157610c016110e1565b602002015183610c12836004611040565b81518110610c2257610c226110e1565b602002602001018181525050848260048110610c4057610c406110e1565b602002015160200151600160028110610c5b57610c5b6110e1565b602002015183610c6c836005611040565b81518110610c7c57610c7c6110e1565b60209081029190910101525080610c928161108e565b915050610aaf565b50610ca3610dfa565b6000602082602086026020860160086107d05a03fa90508080156108cb575080610d075760405162461bcd60e51b81526020600482015260156024820152741c185a5c9a5b99cb5bdc18dbd9194b59985a5b1959605a1b604482015260640161014e565b505115159d9c50505050505050505050505050565b6040805160a081019091526000606082018181526080830191909152815260208101610d46610e18565b8152602001610d68604051806040016040528060008152602001600081525090565b905290565b6040805160e08101909152600060a0820181815260c0830191909152815260208101610d97610e18565b8152602001610da4610e18565b8152602001610db1610e18565b8152602001610d68610e38565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b6040518060400160405280610e2b610e71565b8152602001610d68610e71565b60405180604001604052806002905b6040805180820190915260008082526020820152815260200190600190039081610e475790505090565b60405180604001604052806002906020820280368337509192915050565b600082601f830112610ea057600080fd5b610ea8610fd8565b808385604086011115610eba57600080fd5b60005b6002811015610edc578135845260209384019390910190600101610ebd565b509095945050505050565b600080600080610120808688031215610eff57600080fd5b610f098787610e8f565b9450604087605f880112610f1c57600080fd5b610f24610fd8565b8082890160c08a018b811115610f3957600080fd5b60005b6002811015610f6357610f4f8d84610e8f565b855260209094019391850191600101610f3c565b50829850610f718c82610e8f565b975050505050508661011f870112610f8857600080fd5b610f9061100f565b80610100880189848a011115610fa557600080fd5b600093505b6001841015610fca57803583526001939093019260209283019201610faa565b509598949750929550505050565b6040805190810167ffffffffffffffff8111828210171561100957634e487b7160e01b600052604160045260246000fd5b60405290565b6040516020810167ffffffffffffffff8111828210171561100957634e487b7160e01b600052604160045260246000fd5b60008219821115611053576110536110cb565b500190565b6000816000190483118215151615611072576110726110cb565b500290565b600082821015611089576110896110cb565b500390565b60006000198214156110a2576110a26110cb565b5060010190565b6000826110c657634e487b7160e01b600052601260045260246000fd5b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fdfe30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47a26469706673582212209a5671dc292dc9276b82d7755af5c3aa4afabaffce89403b5a50ef2b8e48805b64736f6c63430008070033"
// DeployVerifier deploys a new Ethereum contract, binding an instance of Verifier to it.
func DeployVerifier(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Verifier, error) {
parsed, err := abi.JSON(strings.NewReader(VerifierABI))
if err != nil {
return common.Address{}, nil, nil, err
}
address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(VerifierBin), backend)
if err != nil {
return common.Address{}, nil, nil, err
}
return address, tx, &Verifier{VerifierCaller: VerifierCaller{contract: contract}, VerifierTransactor: VerifierTransactor{contract: contract}, VerifierFilterer: VerifierFilterer{contract: contract}}, nil
}
// Verifier is an auto generated Go binding around an Ethereum contract.
type Verifier struct {
VerifierCaller // Read-only binding to the contract
VerifierTransactor // Write-only binding to the contract
VerifierFilterer // Log filterer for contract events
}
// VerifierCaller is an auto generated read-only Go binding around an Ethereum contract.
type VerifierCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// VerifierTransactor is an auto generated write-only Go binding around an Ethereum contract.
type VerifierTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// VerifierFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type VerifierFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// VerifierSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type VerifierSession struct {
Contract *Verifier // 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
}
// VerifierCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type VerifierCallerSession struct {
Contract *VerifierCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// VerifierTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type VerifierTransactorSession struct {
Contract *VerifierTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// VerifierRaw is an auto generated low-level Go binding around an Ethereum contract.
type VerifierRaw struct {
Contract *Verifier // Generic contract binding to access the raw methods on
}
// VerifierCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type VerifierCallerRaw struct {
Contract *VerifierCaller // Generic read-only contract binding to access the raw methods on
}
// VerifierTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type VerifierTransactorRaw struct {
Contract *VerifierTransactor // Generic write-only contract binding to access the raw methods on
}
// NewVerifier creates a new instance of Verifier, bound to a specific deployed contract.
func NewVerifier(address common.Address, backend bind.ContractBackend) (*Verifier, error) {
contract, err := bindVerifier(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &Verifier{VerifierCaller: VerifierCaller{contract: contract}, VerifierTransactor: VerifierTransactor{contract: contract}, VerifierFilterer: VerifierFilterer{contract: contract}}, nil
}
// NewVerifierCaller creates a new read-only instance of Verifier, bound to a specific deployed contract.
func NewVerifierCaller(address common.Address, caller bind.ContractCaller) (*VerifierCaller, error) {
contract, err := bindVerifier(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &VerifierCaller{contract: contract}, nil
}
// NewVerifierTransactor creates a new write-only instance of Verifier, bound to a specific deployed contract.
func NewVerifierTransactor(address common.Address, transactor bind.ContractTransactor) (*VerifierTransactor, error) {
contract, err := bindVerifier(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &VerifierTransactor{contract: contract}, nil
}
// NewVerifierFilterer creates a new log filterer instance of Verifier, bound to a specific deployed contract.
func NewVerifierFilterer(address common.Address, filterer bind.ContractFilterer) (*VerifierFilterer, error) {
contract, err := bindVerifier(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &VerifierFilterer{contract: contract}, nil
}
// bindVerifier binds a generic wrapper to an already deployed contract.
func bindVerifier(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(VerifierABI))
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 (_Verifier *VerifierRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Verifier.Contract.VerifierCaller.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 (_Verifier *VerifierRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Verifier.Contract.VerifierTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Verifier *VerifierRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Verifier.Contract.VerifierTransactor.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 (_Verifier *VerifierCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Verifier.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 (_Verifier *VerifierTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Verifier.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Verifier *VerifierTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Verifier.Contract.contract.Transact(opts, method, params...)
}
// VerifyProof is a free data retrieval call binding the contract method 0x43753b4d.
//
// Solidity: function verifyProof(uint256[2] a, uint256[2][2] b, uint256[2] c, uint256[1] input) view returns(bool r)
func (_Verifier *VerifierCaller) VerifyProof(opts *bind.CallOpts, a [2]*big.Int, b [2][2]*big.Int, c [2]*big.Int, input [1]*big.Int) (bool, error) {
var out []interface{}
err := _Verifier.contract.Call(opts, &out, "verifyProof", a, b, c, input)
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// VerifyProof is a free data retrieval call binding the contract method 0x43753b4d.
//
// Solidity: function verifyProof(uint256[2] a, uint256[2][2] b, uint256[2] c, uint256[1] input) view returns(bool r)
func (_Verifier *VerifierSession) VerifyProof(a [2]*big.Int, b [2][2]*big.Int, c [2]*big.Int, input [1]*big.Int) (bool, error) {
return _Verifier.Contract.VerifyProof(&_Verifier.CallOpts, a, b, c, input)
}
// VerifyProof is a free data retrieval call binding the contract method 0x43753b4d.
//
// Solidity: function verifyProof(uint256[2] a, uint256[2][2] b, uint256[2] c, uint256[1] input) view returns(bool r)
func (_Verifier *VerifierCallerSession) VerifyProof(a [2]*big.Int, b [2][2]*big.Int, c [2]*big.Int, input [1]*big.Int) (bool, error) {
return _Verifier.Contract.VerifyProof(&_Verifier.CallOpts, a, b, c, input)
}