github.com/0xPolygon/supernets2-node@v0.0.0-20230711153321-2fe574524eaa/test/contracts/bin/Called/Called.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 Called 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 // CalledMetaData contains all meta data concerning the Called contract. 33 var CalledMetaData = &bind.MetaData{ 34 ABI: "[{\"inputs\":[],\"name\":\"getVars\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_num\",\"type\":\"uint256\"}],\"name\":\"getVarsAndVariable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_num\",\"type\":\"uint256\"}],\"name\":\"setVars\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_num\",\"type\":\"uint256\"}],\"name\":\"setVarsViaCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", 35 Bin: "0x608060405234801561001057600080fd5b5061027f806100206000396000f3fe60806040526004361061003f5760003560e01c8063175df23c146100445780636466414b146100a6578063813d8a37146100d1578063f4bdc7341461010a575b600080fd5b34801561005057600080fd5b5061007961005f3660046101f5565b60005460015460025491936001600160a01b039091169290565b604080519485526001600160a01b0390931660208501529183015260608201526080015b60405180910390f35b6100cf6100b43660046101f5565b600055600180546001600160a01b0319163317905534600255565b005b3480156100dd57600080fd5b50600054600154600254604080519384526001600160a01b0390921660208401529082015260600161009d565b6100cf6101183660046101f5565b60405160248101829052600090309060440160408051601f198184030181529181526020820180516001600160e01b0316636466414b60e01b1790525161015f919061020e565b6000604051808303816000865af19150503d806000811461019c576040519150601f19603f3d011682016040523d82523d6000602084013e6101a1565b606091505b505080915050806101f15760405162461bcd60e51b815260206004820152601660248201527519985a5b1959081d1bc81c195c999bdc9b4818d85b1b60521b604482015260640160405180910390fd5b5050565b60006020828403121561020757600080fd5b5035919050565b6000825160005b8181101561022f5760208186018101518583015201610215565b8181111561023e576000828501525b50919091019291505056fea26469706673582212209d0d58578c55d453a185e4abef4bae0e18e22fd1b4c4e3d2072d42cbf3ccd4d864736f6c634300080c0033", 36 } 37 38 // CalledABI is the input ABI used to generate the binding from. 39 // Deprecated: Use CalledMetaData.ABI instead. 40 var CalledABI = CalledMetaData.ABI 41 42 // CalledBin is the compiled bytecode used for deploying new contracts. 43 // Deprecated: Use CalledMetaData.Bin instead. 44 var CalledBin = CalledMetaData.Bin 45 46 // DeployCalled deploys a new Ethereum contract, binding an instance of Called to it. 47 func DeployCalled(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Called, error) { 48 parsed, err := CalledMetaData.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(CalledBin), backend) 57 if err != nil { 58 return common.Address{}, nil, nil, err 59 } 60 return address, tx, &Called{CalledCaller: CalledCaller{contract: contract}, CalledTransactor: CalledTransactor{contract: contract}, CalledFilterer: CalledFilterer{contract: contract}}, nil 61 } 62 63 // Called is an auto generated Go binding around an Ethereum contract. 64 type Called struct { 65 CalledCaller // Read-only binding to the contract 66 CalledTransactor // Write-only binding to the contract 67 CalledFilterer // Log filterer for contract events 68 } 69 70 // CalledCaller is an auto generated read-only Go binding around an Ethereum contract. 71 type CalledCaller struct { 72 contract *bind.BoundContract // Generic contract wrapper for the low level calls 73 } 74 75 // CalledTransactor is an auto generated write-only Go binding around an Ethereum contract. 76 type CalledTransactor struct { 77 contract *bind.BoundContract // Generic contract wrapper for the low level calls 78 } 79 80 // CalledFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 81 type CalledFilterer struct { 82 contract *bind.BoundContract // Generic contract wrapper for the low level calls 83 } 84 85 // CalledSession is an auto generated Go binding around an Ethereum contract, 86 // with pre-set call and transact options. 87 type CalledSession struct { 88 Contract *Called // 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 // CalledCallerSession is an auto generated read-only Go binding around an Ethereum contract, 94 // with pre-set call options. 95 type CalledCallerSession struct { 96 Contract *CalledCaller // Generic contract caller binding to set the session for 97 CallOpts bind.CallOpts // Call options to use throughout this session 98 } 99 100 // CalledTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 101 // with pre-set transact options. 102 type CalledTransactorSession struct { 103 Contract *CalledTransactor // Generic contract transactor binding to set the session for 104 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 105 } 106 107 // CalledRaw is an auto generated low-level Go binding around an Ethereum contract. 108 type CalledRaw struct { 109 Contract *Called // Generic contract binding to access the raw methods on 110 } 111 112 // CalledCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 113 type CalledCallerRaw struct { 114 Contract *CalledCaller // Generic read-only contract binding to access the raw methods on 115 } 116 117 // CalledTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 118 type CalledTransactorRaw struct { 119 Contract *CalledTransactor // Generic write-only contract binding to access the raw methods on 120 } 121 122 // NewCalled creates a new instance of Called, bound to a specific deployed contract. 123 func NewCalled(address common.Address, backend bind.ContractBackend) (*Called, error) { 124 contract, err := bindCalled(address, backend, backend, backend) 125 if err != nil { 126 return nil, err 127 } 128 return &Called{CalledCaller: CalledCaller{contract: contract}, CalledTransactor: CalledTransactor{contract: contract}, CalledFilterer: CalledFilterer{contract: contract}}, nil 129 } 130 131 // NewCalledCaller creates a new read-only instance of Called, bound to a specific deployed contract. 132 func NewCalledCaller(address common.Address, caller bind.ContractCaller) (*CalledCaller, error) { 133 contract, err := bindCalled(address, caller, nil, nil) 134 if err != nil { 135 return nil, err 136 } 137 return &CalledCaller{contract: contract}, nil 138 } 139 140 // NewCalledTransactor creates a new write-only instance of Called, bound to a specific deployed contract. 141 func NewCalledTransactor(address common.Address, transactor bind.ContractTransactor) (*CalledTransactor, error) { 142 contract, err := bindCalled(address, nil, transactor, nil) 143 if err != nil { 144 return nil, err 145 } 146 return &CalledTransactor{contract: contract}, nil 147 } 148 149 // NewCalledFilterer creates a new log filterer instance of Called, bound to a specific deployed contract. 150 func NewCalledFilterer(address common.Address, filterer bind.ContractFilterer) (*CalledFilterer, error) { 151 contract, err := bindCalled(address, nil, nil, filterer) 152 if err != nil { 153 return nil, err 154 } 155 return &CalledFilterer{contract: contract}, nil 156 } 157 158 // bindCalled binds a generic wrapper to an already deployed contract. 159 func bindCalled(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 160 parsed, err := CalledMetaData.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 (_Called *CalledRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 172 return _Called.Contract.CalledCaller.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 (_Called *CalledRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 178 return _Called.Contract.CalledTransactor.contract.Transfer(opts) 179 } 180 181 // Transact invokes the (paid) contract method with params as input values. 182 func (_Called *CalledRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 183 return _Called.Contract.CalledTransactor.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 (_Called *CalledCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 191 return _Called.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 (_Called *CalledTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 197 return _Called.Contract.contract.Transfer(opts) 198 } 199 200 // Transact invokes the (paid) contract method with params as input values. 201 func (_Called *CalledTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 202 return _Called.Contract.contract.Transact(opts, method, params...) 203 } 204 205 // GetVars is a free data retrieval call binding the contract method 0x813d8a37. 206 // 207 // Solidity: function getVars() view returns(uint256, address, uint256) 208 func (_Called *CalledCaller) GetVars(opts *bind.CallOpts) (*big.Int, common.Address, *big.Int, error) { 209 var out []interface{} 210 err := _Called.contract.Call(opts, &out, "getVars") 211 212 if err != nil { 213 return *new(*big.Int), *new(common.Address), *new(*big.Int), err 214 } 215 216 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 217 out1 := *abi.ConvertType(out[1], new(common.Address)).(*common.Address) 218 out2 := *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) 219 220 return out0, out1, out2, err 221 222 } 223 224 // GetVars is a free data retrieval call binding the contract method 0x813d8a37. 225 // 226 // Solidity: function getVars() view returns(uint256, address, uint256) 227 func (_Called *CalledSession) GetVars() (*big.Int, common.Address, *big.Int, error) { 228 return _Called.Contract.GetVars(&_Called.CallOpts) 229 } 230 231 // GetVars is a free data retrieval call binding the contract method 0x813d8a37. 232 // 233 // Solidity: function getVars() view returns(uint256, address, uint256) 234 func (_Called *CalledCallerSession) GetVars() (*big.Int, common.Address, *big.Int, error) { 235 return _Called.Contract.GetVars(&_Called.CallOpts) 236 } 237 238 // GetVarsAndVariable is a free data retrieval call binding the contract method 0x175df23c. 239 // 240 // Solidity: function getVarsAndVariable(uint256 _num) view returns(uint256, address, uint256, uint256) 241 func (_Called *CalledCaller) GetVarsAndVariable(opts *bind.CallOpts, _num *big.Int) (*big.Int, common.Address, *big.Int, *big.Int, error) { 242 var out []interface{} 243 err := _Called.contract.Call(opts, &out, "getVarsAndVariable", _num) 244 245 if err != nil { 246 return *new(*big.Int), *new(common.Address), *new(*big.Int), *new(*big.Int), err 247 } 248 249 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 250 out1 := *abi.ConvertType(out[1], new(common.Address)).(*common.Address) 251 out2 := *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) 252 out3 := *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) 253 254 return out0, out1, out2, out3, err 255 256 } 257 258 // GetVarsAndVariable is a free data retrieval call binding the contract method 0x175df23c. 259 // 260 // Solidity: function getVarsAndVariable(uint256 _num) view returns(uint256, address, uint256, uint256) 261 func (_Called *CalledSession) GetVarsAndVariable(_num *big.Int) (*big.Int, common.Address, *big.Int, *big.Int, error) { 262 return _Called.Contract.GetVarsAndVariable(&_Called.CallOpts, _num) 263 } 264 265 // GetVarsAndVariable is a free data retrieval call binding the contract method 0x175df23c. 266 // 267 // Solidity: function getVarsAndVariable(uint256 _num) view returns(uint256, address, uint256, uint256) 268 func (_Called *CalledCallerSession) GetVarsAndVariable(_num *big.Int) (*big.Int, common.Address, *big.Int, *big.Int, error) { 269 return _Called.Contract.GetVarsAndVariable(&_Called.CallOpts, _num) 270 } 271 272 // SetVars is a paid mutator transaction binding the contract method 0x6466414b. 273 // 274 // Solidity: function setVars(uint256 _num) payable returns() 275 func (_Called *CalledTransactor) SetVars(opts *bind.TransactOpts, _num *big.Int) (*types.Transaction, error) { 276 return _Called.contract.Transact(opts, "setVars", _num) 277 } 278 279 // SetVars is a paid mutator transaction binding the contract method 0x6466414b. 280 // 281 // Solidity: function setVars(uint256 _num) payable returns() 282 func (_Called *CalledSession) SetVars(_num *big.Int) (*types.Transaction, error) { 283 return _Called.Contract.SetVars(&_Called.TransactOpts, _num) 284 } 285 286 // SetVars is a paid mutator transaction binding the contract method 0x6466414b. 287 // 288 // Solidity: function setVars(uint256 _num) payable returns() 289 func (_Called *CalledTransactorSession) SetVars(_num *big.Int) (*types.Transaction, error) { 290 return _Called.Contract.SetVars(&_Called.TransactOpts, _num) 291 } 292 293 // SetVarsViaCall is a paid mutator transaction binding the contract method 0xf4bdc734. 294 // 295 // Solidity: function setVarsViaCall(uint256 _num) payable returns() 296 func (_Called *CalledTransactor) SetVarsViaCall(opts *bind.TransactOpts, _num *big.Int) (*types.Transaction, error) { 297 return _Called.contract.Transact(opts, "setVarsViaCall", _num) 298 } 299 300 // SetVarsViaCall is a paid mutator transaction binding the contract method 0xf4bdc734. 301 // 302 // Solidity: function setVarsViaCall(uint256 _num) payable returns() 303 func (_Called *CalledSession) SetVarsViaCall(_num *big.Int) (*types.Transaction, error) { 304 return _Called.Contract.SetVarsViaCall(&_Called.TransactOpts, _num) 305 } 306 307 // SetVarsViaCall is a paid mutator transaction binding the contract method 0xf4bdc734. 308 // 309 // Solidity: function setVarsViaCall(uint256 _num) payable returns() 310 func (_Called *CalledTransactorSession) SetVarsViaCall(_num *big.Int) (*types.Transaction, error) { 311 return _Called.Contract.SetVarsViaCall(&_Called.TransactOpts, _num) 312 }