github.com/0xPolygon/supernets2-node@v0.0.0-20230711153321-2fe574524eaa/test/contracts/bin/Storage/Storage.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 Storage 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 // StorageMetaData contains all meta data concerning the Storage contract. 33 var StorageMetaData = &bind.MetaData{ 34 ABI: "[{\"inputs\":[],\"name\":\"release\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"retrieve\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"num\",\"type\":\"uint256\"}],\"name\":\"store\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", 35 Bin: "0x608060405234801561001057600080fd5b5060be8061001f6000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c80632e64cec11460415780636057361d14605657806386d1a69f146068575b600080fd5b60005460405190815260200160405180910390f35b606660613660046070565b600055565b005b606660008055565b600060208284031215608157600080fd5b503591905056fea26469706673582212202eca043b3baf32e10a795c1c4d247d829f1d205588205904dd65617589810c2c64736f6c634300080c0033", 36 } 37 38 // StorageABI is the input ABI used to generate the binding from. 39 // Deprecated: Use StorageMetaData.ABI instead. 40 var StorageABI = StorageMetaData.ABI 41 42 // StorageBin is the compiled bytecode used for deploying new contracts. 43 // Deprecated: Use StorageMetaData.Bin instead. 44 var StorageBin = StorageMetaData.Bin 45 46 // DeployStorage deploys a new Ethereum contract, binding an instance of Storage to it. 47 func DeployStorage(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Storage, error) { 48 parsed, err := StorageMetaData.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(StorageBin), backend) 57 if err != nil { 58 return common.Address{}, nil, nil, err 59 } 60 return address, tx, &Storage{StorageCaller: StorageCaller{contract: contract}, StorageTransactor: StorageTransactor{contract: contract}, StorageFilterer: StorageFilterer{contract: contract}}, nil 61 } 62 63 // Storage is an auto generated Go binding around an Ethereum contract. 64 type Storage struct { 65 StorageCaller // Read-only binding to the contract 66 StorageTransactor // Write-only binding to the contract 67 StorageFilterer // Log filterer for contract events 68 } 69 70 // StorageCaller is an auto generated read-only Go binding around an Ethereum contract. 71 type StorageCaller struct { 72 contract *bind.BoundContract // Generic contract wrapper for the low level calls 73 } 74 75 // StorageTransactor is an auto generated write-only Go binding around an Ethereum contract. 76 type StorageTransactor struct { 77 contract *bind.BoundContract // Generic contract wrapper for the low level calls 78 } 79 80 // StorageFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 81 type StorageFilterer struct { 82 contract *bind.BoundContract // Generic contract wrapper for the low level calls 83 } 84 85 // StorageSession is an auto generated Go binding around an Ethereum contract, 86 // with pre-set call and transact options. 87 type StorageSession struct { 88 Contract *Storage // 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 // StorageCallerSession is an auto generated read-only Go binding around an Ethereum contract, 94 // with pre-set call options. 95 type StorageCallerSession struct { 96 Contract *StorageCaller // Generic contract caller binding to set the session for 97 CallOpts bind.CallOpts // Call options to use throughout this session 98 } 99 100 // StorageTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 101 // with pre-set transact options. 102 type StorageTransactorSession struct { 103 Contract *StorageTransactor // Generic contract transactor binding to set the session for 104 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 105 } 106 107 // StorageRaw is an auto generated low-level Go binding around an Ethereum contract. 108 type StorageRaw struct { 109 Contract *Storage // Generic contract binding to access the raw methods on 110 } 111 112 // StorageCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 113 type StorageCallerRaw struct { 114 Contract *StorageCaller // Generic read-only contract binding to access the raw methods on 115 } 116 117 // StorageTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 118 type StorageTransactorRaw struct { 119 Contract *StorageTransactor // Generic write-only contract binding to access the raw methods on 120 } 121 122 // NewStorage creates a new instance of Storage, bound to a specific deployed contract. 123 func NewStorage(address common.Address, backend bind.ContractBackend) (*Storage, error) { 124 contract, err := bindStorage(address, backend, backend, backend) 125 if err != nil { 126 return nil, err 127 } 128 return &Storage{StorageCaller: StorageCaller{contract: contract}, StorageTransactor: StorageTransactor{contract: contract}, StorageFilterer: StorageFilterer{contract: contract}}, nil 129 } 130 131 // NewStorageCaller creates a new read-only instance of Storage, bound to a specific deployed contract. 132 func NewStorageCaller(address common.Address, caller bind.ContractCaller) (*StorageCaller, error) { 133 contract, err := bindStorage(address, caller, nil, nil) 134 if err != nil { 135 return nil, err 136 } 137 return &StorageCaller{contract: contract}, nil 138 } 139 140 // NewStorageTransactor creates a new write-only instance of Storage, bound to a specific deployed contract. 141 func NewStorageTransactor(address common.Address, transactor bind.ContractTransactor) (*StorageTransactor, error) { 142 contract, err := bindStorage(address, nil, transactor, nil) 143 if err != nil { 144 return nil, err 145 } 146 return &StorageTransactor{contract: contract}, nil 147 } 148 149 // NewStorageFilterer creates a new log filterer instance of Storage, bound to a specific deployed contract. 150 func NewStorageFilterer(address common.Address, filterer bind.ContractFilterer) (*StorageFilterer, error) { 151 contract, err := bindStorage(address, nil, nil, filterer) 152 if err != nil { 153 return nil, err 154 } 155 return &StorageFilterer{contract: contract}, nil 156 } 157 158 // bindStorage binds a generic wrapper to an already deployed contract. 159 func bindStorage(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 160 parsed, err := StorageMetaData.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 (_Storage *StorageRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 172 return _Storage.Contract.StorageCaller.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 (_Storage *StorageRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 178 return _Storage.Contract.StorageTransactor.contract.Transfer(opts) 179 } 180 181 // Transact invokes the (paid) contract method with params as input values. 182 func (_Storage *StorageRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 183 return _Storage.Contract.StorageTransactor.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 (_Storage *StorageCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 191 return _Storage.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 (_Storage *StorageTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 197 return _Storage.Contract.contract.Transfer(opts) 198 } 199 200 // Transact invokes the (paid) contract method with params as input values. 201 func (_Storage *StorageTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 202 return _Storage.Contract.contract.Transact(opts, method, params...) 203 } 204 205 // Retrieve is a free data retrieval call binding the contract method 0x2e64cec1. 206 // 207 // Solidity: function retrieve() view returns(uint256) 208 func (_Storage *StorageCaller) Retrieve(opts *bind.CallOpts) (*big.Int, error) { 209 var out []interface{} 210 err := _Storage.contract.Call(opts, &out, "retrieve") 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 // Retrieve is a free data retrieval call binding the contract method 0x2e64cec1. 223 // 224 // Solidity: function retrieve() view returns(uint256) 225 func (_Storage *StorageSession) Retrieve() (*big.Int, error) { 226 return _Storage.Contract.Retrieve(&_Storage.CallOpts) 227 } 228 229 // Retrieve is a free data retrieval call binding the contract method 0x2e64cec1. 230 // 231 // Solidity: function retrieve() view returns(uint256) 232 func (_Storage *StorageCallerSession) Retrieve() (*big.Int, error) { 233 return _Storage.Contract.Retrieve(&_Storage.CallOpts) 234 } 235 236 // Release is a paid mutator transaction binding the contract method 0x86d1a69f. 237 // 238 // Solidity: function release() returns() 239 func (_Storage *StorageTransactor) Release(opts *bind.TransactOpts) (*types.Transaction, error) { 240 return _Storage.contract.Transact(opts, "release") 241 } 242 243 // Release is a paid mutator transaction binding the contract method 0x86d1a69f. 244 // 245 // Solidity: function release() returns() 246 func (_Storage *StorageSession) Release() (*types.Transaction, error) { 247 return _Storage.Contract.Release(&_Storage.TransactOpts) 248 } 249 250 // Release is a paid mutator transaction binding the contract method 0x86d1a69f. 251 // 252 // Solidity: function release() returns() 253 func (_Storage *StorageTransactorSession) Release() (*types.Transaction, error) { 254 return _Storage.Contract.Release(&_Storage.TransactOpts) 255 } 256 257 // Store is a paid mutator transaction binding the contract method 0x6057361d. 258 // 259 // Solidity: function store(uint256 num) returns() 260 func (_Storage *StorageTransactor) Store(opts *bind.TransactOpts, num *big.Int) (*types.Transaction, error) { 261 return _Storage.contract.Transact(opts, "store", num) 262 } 263 264 // Store is a paid mutator transaction binding the contract method 0x6057361d. 265 // 266 // Solidity: function store(uint256 num) returns() 267 func (_Storage *StorageSession) Store(num *big.Int) (*types.Transaction, error) { 268 return _Storage.Contract.Store(&_Storage.TransactOpts, num) 269 } 270 271 // Store is a paid mutator transaction binding the contract method 0x6057361d. 272 // 273 // Solidity: function store(uint256 num) returns() 274 func (_Storage *StorageTransactorSession) Store(num *big.Int) (*types.Transaction, error) { 275 return _Storage.Contract.Store(&_Storage.TransactOpts, num) 276 }