github.com/0xPolygon/supernets2-node@v0.0.0-20230711153321-2fe574524eaa/etherman/smartcontracts/mockverifier/mockverifier.go (about) 1 // Code generated - DO NOT EDIT. 2 // This file is a generated binding and any manual changes will be lost. 3 4 package mockverifier 5 6 import ( 7 "errors" 8 "math/big" 9 "strings" 10 11 ethereum "github.com/ethereum/go-ethereum" 12 "github.com/ethereum/go-ethereum/accounts/abi" 13 "github.com/ethereum/go-ethereum/accounts/abi/bind" 14 "github.com/ethereum/go-ethereum/common" 15 "github.com/ethereum/go-ethereum/core/types" 16 "github.com/ethereum/go-ethereum/event" 17 ) 18 19 // Reference imports to suppress errors if they are not otherwise used. 20 var ( 21 _ = errors.New 22 _ = big.NewInt 23 _ = strings.NewReader 24 _ = ethereum.NotFound 25 _ = bind.Bind 26 _ = common.Big1 27 _ = types.BloomLookup 28 _ = event.NewSubscription 29 _ = abi.ConvertType 30 ) 31 32 // MockverifierMetaData contains all meta data concerning the Mockverifier contract. 33 var MockverifierMetaData = &bind.MetaData{ 34 ABI: "[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"},{\"internalType\":\"uint256[1]\",\"name\":\"pubSignals\",\"type\":\"uint256[1]\"}],\"name\":\"verifyProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", 35 Bin: "0x608060405234801561001057600080fd5b50610205806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80638d8f8a5c14610030575b600080fd5b61004661003e366004610128565b600192915050565b604051901515815260200160405180910390f35b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156100b2576100b261005a565b604052919050565b600082601f8301126100cb57600080fd5b604051602080820182811067ffffffffffffffff821117156100ef576100ef61005a565b604052818482018681111561010357600080fd5b855b8181101561011c5780358352918301918301610105565b50929695505050505050565b6000806040838503121561013b57600080fd5b823567ffffffffffffffff8082111561015357600080fd5b818501915085601f83011261016757600080fd5b813560208282111561017b5761017b61005a565b61018d601f8301601f19168201610089565b925081835287818386010111156101a357600080fd5b818185018285013760008183850101528295506101c2888289016100ba565b945050505050925092905056fea26469706673582212204af7f3bda67f3a30e1891af134e290590c6063b5a163b85e57b0c1111e1463a364736f6c63430008110033", 36 } 37 38 // MockverifierABI is the input ABI used to generate the binding from. 39 // Deprecated: Use MockverifierMetaData.ABI instead. 40 var MockverifierABI = MockverifierMetaData.ABI 41 42 // MockverifierBin is the compiled bytecode used for deploying new contracts. 43 // Deprecated: Use MockverifierMetaData.Bin instead. 44 var MockverifierBin = MockverifierMetaData.Bin 45 46 // DeployMockverifier deploys a new Ethereum contract, binding an instance of Mockverifier to it. 47 func DeployMockverifier(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Mockverifier, error) { 48 parsed, err := MockverifierMetaData.GetAbi() 49 if err != nil { 50 return common.Address{}, nil, nil, err 51 } 52 if parsed == nil { 53 return common.Address{}, nil, nil, errors.New("GetABI returned nil") 54 } 55 56 address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(MockverifierBin), backend) 57 if err != nil { 58 return common.Address{}, nil, nil, err 59 } 60 return address, tx, &Mockverifier{MockverifierCaller: MockverifierCaller{contract: contract}, MockverifierTransactor: MockverifierTransactor{contract: contract}, MockverifierFilterer: MockverifierFilterer{contract: contract}}, nil 61 } 62 63 // Mockverifier is an auto generated Go binding around an Ethereum contract. 64 type Mockverifier struct { 65 MockverifierCaller // Read-only binding to the contract 66 MockverifierTransactor // Write-only binding to the contract 67 MockverifierFilterer // Log filterer for contract events 68 } 69 70 // MockverifierCaller is an auto generated read-only Go binding around an Ethereum contract. 71 type MockverifierCaller struct { 72 contract *bind.BoundContract // Generic contract wrapper for the low level calls 73 } 74 75 // MockverifierTransactor is an auto generated write-only Go binding around an Ethereum contract. 76 type MockverifierTransactor struct { 77 contract *bind.BoundContract // Generic contract wrapper for the low level calls 78 } 79 80 // MockverifierFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 81 type MockverifierFilterer struct { 82 contract *bind.BoundContract // Generic contract wrapper for the low level calls 83 } 84 85 // MockverifierSession is an auto generated Go binding around an Ethereum contract, 86 // with pre-set call and transact options. 87 type MockverifierSession struct { 88 Contract *Mockverifier // Generic contract binding to set the session for 89 CallOpts bind.CallOpts // Call options to use throughout this session 90 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 91 } 92 93 // MockverifierCallerSession is an auto generated read-only Go binding around an Ethereum contract, 94 // with pre-set call options. 95 type MockverifierCallerSession struct { 96 Contract *MockverifierCaller // Generic contract caller binding to set the session for 97 CallOpts bind.CallOpts // Call options to use throughout this session 98 } 99 100 // MockverifierTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 101 // with pre-set transact options. 102 type MockverifierTransactorSession struct { 103 Contract *MockverifierTransactor // Generic contract transactor binding to set the session for 104 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 105 } 106 107 // MockverifierRaw is an auto generated low-level Go binding around an Ethereum contract. 108 type MockverifierRaw struct { 109 Contract *Mockverifier // Generic contract binding to access the raw methods on 110 } 111 112 // MockverifierCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 113 type MockverifierCallerRaw struct { 114 Contract *MockverifierCaller // Generic read-only contract binding to access the raw methods on 115 } 116 117 // MockverifierTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 118 type MockverifierTransactorRaw struct { 119 Contract *MockverifierTransactor // Generic write-only contract binding to access the raw methods on 120 } 121 122 // NewMockverifier creates a new instance of Mockverifier, bound to a specific deployed contract. 123 func NewMockverifier(address common.Address, backend bind.ContractBackend) (*Mockverifier, error) { 124 contract, err := bindMockverifier(address, backend, backend, backend) 125 if err != nil { 126 return nil, err 127 } 128 return &Mockverifier{MockverifierCaller: MockverifierCaller{contract: contract}, MockverifierTransactor: MockverifierTransactor{contract: contract}, MockverifierFilterer: MockverifierFilterer{contract: contract}}, nil 129 } 130 131 // NewMockverifierCaller creates a new read-only instance of Mockverifier, bound to a specific deployed contract. 132 func NewMockverifierCaller(address common.Address, caller bind.ContractCaller) (*MockverifierCaller, error) { 133 contract, err := bindMockverifier(address, caller, nil, nil) 134 if err != nil { 135 return nil, err 136 } 137 return &MockverifierCaller{contract: contract}, nil 138 } 139 140 // NewMockverifierTransactor creates a new write-only instance of Mockverifier, bound to a specific deployed contract. 141 func NewMockverifierTransactor(address common.Address, transactor bind.ContractTransactor) (*MockverifierTransactor, error) { 142 contract, err := bindMockverifier(address, nil, transactor, nil) 143 if err != nil { 144 return nil, err 145 } 146 return &MockverifierTransactor{contract: contract}, nil 147 } 148 149 // NewMockverifierFilterer creates a new log filterer instance of Mockverifier, bound to a specific deployed contract. 150 func NewMockverifierFilterer(address common.Address, filterer bind.ContractFilterer) (*MockverifierFilterer, error) { 151 contract, err := bindMockverifier(address, nil, nil, filterer) 152 if err != nil { 153 return nil, err 154 } 155 return &MockverifierFilterer{contract: contract}, nil 156 } 157 158 // bindMockverifier binds a generic wrapper to an already deployed contract. 159 func bindMockverifier(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 160 parsed, err := MockverifierMetaData.GetAbi() 161 if err != nil { 162 return nil, err 163 } 164 return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil 165 } 166 167 // Call invokes the (constant) contract method with params as input values and 168 // sets the output to result. The result type might be a single field for simple 169 // returns, a slice of interfaces for anonymous returns and a struct for named 170 // returns. 171 func (_Mockverifier *MockverifierRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 172 return _Mockverifier.Contract.MockverifierCaller.contract.Call(opts, result, method, params...) 173 } 174 175 // Transfer initiates a plain transaction to move funds to the contract, calling 176 // its default method if one is available. 177 func (_Mockverifier *MockverifierRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 178 return _Mockverifier.Contract.MockverifierTransactor.contract.Transfer(opts) 179 } 180 181 // Transact invokes the (paid) contract method with params as input values. 182 func (_Mockverifier *MockverifierRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 183 return _Mockverifier.Contract.MockverifierTransactor.contract.Transact(opts, method, params...) 184 } 185 186 // Call invokes the (constant) contract method with params as input values and 187 // sets the output to result. The result type might be a single field for simple 188 // returns, a slice of interfaces for anonymous returns and a struct for named 189 // returns. 190 func (_Mockverifier *MockverifierCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 191 return _Mockverifier.Contract.contract.Call(opts, result, method, params...) 192 } 193 194 // Transfer initiates a plain transaction to move funds to the contract, calling 195 // its default method if one is available. 196 func (_Mockverifier *MockverifierTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 197 return _Mockverifier.Contract.contract.Transfer(opts) 198 } 199 200 // Transact invokes the (paid) contract method with params as input values. 201 func (_Mockverifier *MockverifierTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 202 return _Mockverifier.Contract.contract.Transact(opts, method, params...) 203 } 204 205 // VerifyProof is a free data retrieval call binding the contract method 0x8d8f8a5c. 206 // 207 // Solidity: function verifyProof(bytes proof, uint256[1] pubSignals) view returns(bool) 208 func (_Mockverifier *MockverifierCaller) VerifyProof(opts *bind.CallOpts, proof []byte, pubSignals [1]*big.Int) (bool, error) { 209 var out []interface{} 210 err := _Mockverifier.contract.Call(opts, &out, "verifyProof", proof, pubSignals) 211 212 if err != nil { 213 return *new(bool), err 214 } 215 216 out0 := *abi.ConvertType(out[0], new(bool)).(*bool) 217 218 return out0, err 219 220 } 221 222 // VerifyProof is a free data retrieval call binding the contract method 0x8d8f8a5c. 223 // 224 // Solidity: function verifyProof(bytes proof, uint256[1] pubSignals) view returns(bool) 225 func (_Mockverifier *MockverifierSession) VerifyProof(proof []byte, pubSignals [1]*big.Int) (bool, error) { 226 return _Mockverifier.Contract.VerifyProof(&_Mockverifier.CallOpts, proof, pubSignals) 227 } 228 229 // VerifyProof is a free data retrieval call binding the contract method 0x8d8f8a5c. 230 // 231 // Solidity: function verifyProof(bytes proof, uint256[1] pubSignals) view returns(bool) 232 func (_Mockverifier *MockverifierCallerSession) VerifyProof(proof []byte, pubSignals [1]*big.Int) (bool, error) { 233 return _Mockverifier.Contract.VerifyProof(&_Mockverifier.CallOpts, proof, pubSignals) 234 }