github.com/0xPolygon/supernets2-node@v0.0.0-20230711153321-2fe574524eaa/test/contracts/bin/Creates/Creates.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 Creates 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 // CreatesMetaData contains all meta data concerning the Creates contract. 33 var CreatesMetaData = &bind.MetaData{ 34 ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"a\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"b\",\"type\":\"uint256\"}],\"name\":\"add\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"bytecode\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"opCreate\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"bytecode\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"opCreate2\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"bytecode\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"opCreate2Complex\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"bytecode\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"opCreate2Value\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"bytecode\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"opCreateValue\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sendValue\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", 35 Bin: "0x608060405234801561001057600080fd5b50610369806100206000396000f3fe6080604052600436106100705760003560e01c8063771602f71161004e578063771602f7146100d0578063b88c4aa9146100fe578063c935aee414610111578063e3306a251461015057600080fd5b806327c845dc146100755780633c77eba3146100805780635b8e9959146100b0575b600080fd5b61007e34600155565b005b61009361008e366004610236565b610170565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100bc57600080fd5b506100936100cb366004610236565b610187565b3480156100dc57600080fd5b506100f06100eb3660046102eb565b61019d565b6040519081526020016100a7565b61009361010c366004610236565b6101b0565b34801561011d57600080fd5b5061013161012c366004610236565b6101cb565b604080516001600160a01b0390931683526020830191909152016100a7565b34801561015c57600080fd5b5061009361016b366004610236565b610208565b6000808260a06101f4f06000819055949350505050565b6000808260a06000f06000819055949350505050565b60006101a9828461030d565b9392505050565b600080620555558360a061012cf56000819055949350505050565b60008060006101dc6001600261019d565b90506000600285602088016000f59050806000556101fc6002600461019d565b90969095509350505050565b60008060028360a06000f56000819055949350505050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561024957600080fd5b823567ffffffffffffffff8082111561026157600080fd5b818501915085601f83011261027557600080fd5b81358181111561028757610287610220565b604051601f8201601f19908116603f011681019083821181831017156102af576102af610220565b816040528281528860208487010111156102c857600080fd5b826020860160208301376000602093820184015298969091013596505050505050565b600080604083850312156102fe57600080fd5b50508035926020909101359150565b6000821982111561032e57634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220cdc0e0bdc2487139b3aa0666f32d3f0ed1e40a81659b28e6dea427224cc6104f64736f6c634300080c0033", 36 } 37 38 // CreatesABI is the input ABI used to generate the binding from. 39 // Deprecated: Use CreatesMetaData.ABI instead. 40 var CreatesABI = CreatesMetaData.ABI 41 42 // CreatesBin is the compiled bytecode used for deploying new contracts. 43 // Deprecated: Use CreatesMetaData.Bin instead. 44 var CreatesBin = CreatesMetaData.Bin 45 46 // DeployCreates deploys a new Ethereum contract, binding an instance of Creates to it. 47 func DeployCreates(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Creates, error) { 48 parsed, err := CreatesMetaData.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(CreatesBin), backend) 57 if err != nil { 58 return common.Address{}, nil, nil, err 59 } 60 return address, tx, &Creates{CreatesCaller: CreatesCaller{contract: contract}, CreatesTransactor: CreatesTransactor{contract: contract}, CreatesFilterer: CreatesFilterer{contract: contract}}, nil 61 } 62 63 // Creates is an auto generated Go binding around an Ethereum contract. 64 type Creates struct { 65 CreatesCaller // Read-only binding to the contract 66 CreatesTransactor // Write-only binding to the contract 67 CreatesFilterer // Log filterer for contract events 68 } 69 70 // CreatesCaller is an auto generated read-only Go binding around an Ethereum contract. 71 type CreatesCaller struct { 72 contract *bind.BoundContract // Generic contract wrapper for the low level calls 73 } 74 75 // CreatesTransactor is an auto generated write-only Go binding around an Ethereum contract. 76 type CreatesTransactor struct { 77 contract *bind.BoundContract // Generic contract wrapper for the low level calls 78 } 79 80 // CreatesFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 81 type CreatesFilterer struct { 82 contract *bind.BoundContract // Generic contract wrapper for the low level calls 83 } 84 85 // CreatesSession is an auto generated Go binding around an Ethereum contract, 86 // with pre-set call and transact options. 87 type CreatesSession struct { 88 Contract *Creates // 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 // CreatesCallerSession is an auto generated read-only Go binding around an Ethereum contract, 94 // with pre-set call options. 95 type CreatesCallerSession struct { 96 Contract *CreatesCaller // Generic contract caller binding to set the session for 97 CallOpts bind.CallOpts // Call options to use throughout this session 98 } 99 100 // CreatesTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 101 // with pre-set transact options. 102 type CreatesTransactorSession struct { 103 Contract *CreatesTransactor // Generic contract transactor binding to set the session for 104 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 105 } 106 107 // CreatesRaw is an auto generated low-level Go binding around an Ethereum contract. 108 type CreatesRaw struct { 109 Contract *Creates // Generic contract binding to access the raw methods on 110 } 111 112 // CreatesCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 113 type CreatesCallerRaw struct { 114 Contract *CreatesCaller // Generic read-only contract binding to access the raw methods on 115 } 116 117 // CreatesTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 118 type CreatesTransactorRaw struct { 119 Contract *CreatesTransactor // Generic write-only contract binding to access the raw methods on 120 } 121 122 // NewCreates creates a new instance of Creates, bound to a specific deployed contract. 123 func NewCreates(address common.Address, backend bind.ContractBackend) (*Creates, error) { 124 contract, err := bindCreates(address, backend, backend, backend) 125 if err != nil { 126 return nil, err 127 } 128 return &Creates{CreatesCaller: CreatesCaller{contract: contract}, CreatesTransactor: CreatesTransactor{contract: contract}, CreatesFilterer: CreatesFilterer{contract: contract}}, nil 129 } 130 131 // NewCreatesCaller creates a new read-only instance of Creates, bound to a specific deployed contract. 132 func NewCreatesCaller(address common.Address, caller bind.ContractCaller) (*CreatesCaller, error) { 133 contract, err := bindCreates(address, caller, nil, nil) 134 if err != nil { 135 return nil, err 136 } 137 return &CreatesCaller{contract: contract}, nil 138 } 139 140 // NewCreatesTransactor creates a new write-only instance of Creates, bound to a specific deployed contract. 141 func NewCreatesTransactor(address common.Address, transactor bind.ContractTransactor) (*CreatesTransactor, error) { 142 contract, err := bindCreates(address, nil, transactor, nil) 143 if err != nil { 144 return nil, err 145 } 146 return &CreatesTransactor{contract: contract}, nil 147 } 148 149 // NewCreatesFilterer creates a new log filterer instance of Creates, bound to a specific deployed contract. 150 func NewCreatesFilterer(address common.Address, filterer bind.ContractFilterer) (*CreatesFilterer, error) { 151 contract, err := bindCreates(address, nil, nil, filterer) 152 if err != nil { 153 return nil, err 154 } 155 return &CreatesFilterer{contract: contract}, nil 156 } 157 158 // bindCreates binds a generic wrapper to an already deployed contract. 159 func bindCreates(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 160 parsed, err := CreatesMetaData.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 (_Creates *CreatesRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 172 return _Creates.Contract.CreatesCaller.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 (_Creates *CreatesRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 178 return _Creates.Contract.CreatesTransactor.contract.Transfer(opts) 179 } 180 181 // Transact invokes the (paid) contract method with params as input values. 182 func (_Creates *CreatesRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 183 return _Creates.Contract.CreatesTransactor.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 (_Creates *CreatesCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 191 return _Creates.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 (_Creates *CreatesTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 197 return _Creates.Contract.contract.Transfer(opts) 198 } 199 200 // Transact invokes the (paid) contract method with params as input values. 201 func (_Creates *CreatesTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 202 return _Creates.Contract.contract.Transact(opts, method, params...) 203 } 204 205 // Add is a free data retrieval call binding the contract method 0x771602f7. 206 // 207 // Solidity: function add(uint256 a, uint256 b) pure returns(uint256) 208 func (_Creates *CreatesCaller) Add(opts *bind.CallOpts, a *big.Int, b *big.Int) (*big.Int, error) { 209 var out []interface{} 210 err := _Creates.contract.Call(opts, &out, "add", a, b) 211 212 if err != nil { 213 return *new(*big.Int), err 214 } 215 216 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 217 218 return out0, err 219 220 } 221 222 // Add is a free data retrieval call binding the contract method 0x771602f7. 223 // 224 // Solidity: function add(uint256 a, uint256 b) pure returns(uint256) 225 func (_Creates *CreatesSession) Add(a *big.Int, b *big.Int) (*big.Int, error) { 226 return _Creates.Contract.Add(&_Creates.CallOpts, a, b) 227 } 228 229 // Add is a free data retrieval call binding the contract method 0x771602f7. 230 // 231 // Solidity: function add(uint256 a, uint256 b) pure returns(uint256) 232 func (_Creates *CreatesCallerSession) Add(a *big.Int, b *big.Int) (*big.Int, error) { 233 return _Creates.Contract.Add(&_Creates.CallOpts, a, b) 234 } 235 236 // OpCreate is a paid mutator transaction binding the contract method 0x5b8e9959. 237 // 238 // Solidity: function opCreate(bytes bytecode, uint256 length) returns(address) 239 func (_Creates *CreatesTransactor) OpCreate(opts *bind.TransactOpts, bytecode []byte, length *big.Int) (*types.Transaction, error) { 240 return _Creates.contract.Transact(opts, "opCreate", bytecode, length) 241 } 242 243 // OpCreate is a paid mutator transaction binding the contract method 0x5b8e9959. 244 // 245 // Solidity: function opCreate(bytes bytecode, uint256 length) returns(address) 246 func (_Creates *CreatesSession) OpCreate(bytecode []byte, length *big.Int) (*types.Transaction, error) { 247 return _Creates.Contract.OpCreate(&_Creates.TransactOpts, bytecode, length) 248 } 249 250 // OpCreate is a paid mutator transaction binding the contract method 0x5b8e9959. 251 // 252 // Solidity: function opCreate(bytes bytecode, uint256 length) returns(address) 253 func (_Creates *CreatesTransactorSession) OpCreate(bytecode []byte, length *big.Int) (*types.Transaction, error) { 254 return _Creates.Contract.OpCreate(&_Creates.TransactOpts, bytecode, length) 255 } 256 257 // OpCreate2 is a paid mutator transaction binding the contract method 0xe3306a25. 258 // 259 // Solidity: function opCreate2(bytes bytecode, uint256 length) returns(address) 260 func (_Creates *CreatesTransactor) OpCreate2(opts *bind.TransactOpts, bytecode []byte, length *big.Int) (*types.Transaction, error) { 261 return _Creates.contract.Transact(opts, "opCreate2", bytecode, length) 262 } 263 264 // OpCreate2 is a paid mutator transaction binding the contract method 0xe3306a25. 265 // 266 // Solidity: function opCreate2(bytes bytecode, uint256 length) returns(address) 267 func (_Creates *CreatesSession) OpCreate2(bytecode []byte, length *big.Int) (*types.Transaction, error) { 268 return _Creates.Contract.OpCreate2(&_Creates.TransactOpts, bytecode, length) 269 } 270 271 // OpCreate2 is a paid mutator transaction binding the contract method 0xe3306a25. 272 // 273 // Solidity: function opCreate2(bytes bytecode, uint256 length) returns(address) 274 func (_Creates *CreatesTransactorSession) OpCreate2(bytecode []byte, length *big.Int) (*types.Transaction, error) { 275 return _Creates.Contract.OpCreate2(&_Creates.TransactOpts, bytecode, length) 276 } 277 278 // OpCreate2Complex is a paid mutator transaction binding the contract method 0xc935aee4. 279 // 280 // Solidity: function opCreate2Complex(bytes bytecode, uint256 length) returns(address, uint256) 281 func (_Creates *CreatesTransactor) OpCreate2Complex(opts *bind.TransactOpts, bytecode []byte, length *big.Int) (*types.Transaction, error) { 282 return _Creates.contract.Transact(opts, "opCreate2Complex", bytecode, length) 283 } 284 285 // OpCreate2Complex is a paid mutator transaction binding the contract method 0xc935aee4. 286 // 287 // Solidity: function opCreate2Complex(bytes bytecode, uint256 length) returns(address, uint256) 288 func (_Creates *CreatesSession) OpCreate2Complex(bytecode []byte, length *big.Int) (*types.Transaction, error) { 289 return _Creates.Contract.OpCreate2Complex(&_Creates.TransactOpts, bytecode, length) 290 } 291 292 // OpCreate2Complex is a paid mutator transaction binding the contract method 0xc935aee4. 293 // 294 // Solidity: function opCreate2Complex(bytes bytecode, uint256 length) returns(address, uint256) 295 func (_Creates *CreatesTransactorSession) OpCreate2Complex(bytecode []byte, length *big.Int) (*types.Transaction, error) { 296 return _Creates.Contract.OpCreate2Complex(&_Creates.TransactOpts, bytecode, length) 297 } 298 299 // OpCreate2Value is a paid mutator transaction binding the contract method 0xb88c4aa9. 300 // 301 // Solidity: function opCreate2Value(bytes bytecode, uint256 length) payable returns(address) 302 func (_Creates *CreatesTransactor) OpCreate2Value(opts *bind.TransactOpts, bytecode []byte, length *big.Int) (*types.Transaction, error) { 303 return _Creates.contract.Transact(opts, "opCreate2Value", bytecode, length) 304 } 305 306 // OpCreate2Value is a paid mutator transaction binding the contract method 0xb88c4aa9. 307 // 308 // Solidity: function opCreate2Value(bytes bytecode, uint256 length) payable returns(address) 309 func (_Creates *CreatesSession) OpCreate2Value(bytecode []byte, length *big.Int) (*types.Transaction, error) { 310 return _Creates.Contract.OpCreate2Value(&_Creates.TransactOpts, bytecode, length) 311 } 312 313 // OpCreate2Value is a paid mutator transaction binding the contract method 0xb88c4aa9. 314 // 315 // Solidity: function opCreate2Value(bytes bytecode, uint256 length) payable returns(address) 316 func (_Creates *CreatesTransactorSession) OpCreate2Value(bytecode []byte, length *big.Int) (*types.Transaction, error) { 317 return _Creates.Contract.OpCreate2Value(&_Creates.TransactOpts, bytecode, length) 318 } 319 320 // OpCreateValue is a paid mutator transaction binding the contract method 0x3c77eba3. 321 // 322 // Solidity: function opCreateValue(bytes bytecode, uint256 length) payable returns(address) 323 func (_Creates *CreatesTransactor) OpCreateValue(opts *bind.TransactOpts, bytecode []byte, length *big.Int) (*types.Transaction, error) { 324 return _Creates.contract.Transact(opts, "opCreateValue", bytecode, length) 325 } 326 327 // OpCreateValue is a paid mutator transaction binding the contract method 0x3c77eba3. 328 // 329 // Solidity: function opCreateValue(bytes bytecode, uint256 length) payable returns(address) 330 func (_Creates *CreatesSession) OpCreateValue(bytecode []byte, length *big.Int) (*types.Transaction, error) { 331 return _Creates.Contract.OpCreateValue(&_Creates.TransactOpts, bytecode, length) 332 } 333 334 // OpCreateValue is a paid mutator transaction binding the contract method 0x3c77eba3. 335 // 336 // Solidity: function opCreateValue(bytes bytecode, uint256 length) payable returns(address) 337 func (_Creates *CreatesTransactorSession) OpCreateValue(bytecode []byte, length *big.Int) (*types.Transaction, error) { 338 return _Creates.Contract.OpCreateValue(&_Creates.TransactOpts, bytecode, length) 339 } 340 341 // SendValue is a paid mutator transaction binding the contract method 0x27c845dc. 342 // 343 // Solidity: function sendValue() payable returns() 344 func (_Creates *CreatesTransactor) SendValue(opts *bind.TransactOpts) (*types.Transaction, error) { 345 return _Creates.contract.Transact(opts, "sendValue") 346 } 347 348 // SendValue is a paid mutator transaction binding the contract method 0x27c845dc. 349 // 350 // Solidity: function sendValue() payable returns() 351 func (_Creates *CreatesSession) SendValue() (*types.Transaction, error) { 352 return _Creates.Contract.SendValue(&_Creates.TransactOpts) 353 } 354 355 // SendValue is a paid mutator transaction binding the contract method 0x27c845dc. 356 // 357 // Solidity: function sendValue() payable returns() 358 func (_Creates *CreatesTransactorSession) SendValue() (*types.Transaction, error) { 359 return _Creates.Contract.SendValue(&_Creates.TransactOpts) 360 }