github.com/0xPolygon/supernets2-node@v0.0.0-20230711153321-2fe574524eaa/test/contracts/bin/Double/Double.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 Double 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 // DoubleMetaData contains all meta data concerning the Double contract. 33 var DoubleMetaData = &bind.MetaData{ 34 ABI: "[{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"a\",\"type\":\"int256\"}],\"name\":\"double\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", 35 Bin: "0x608060405234801561001057600080fd5b50610152806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80636ffa1caa14610030575b600080fd5b61004361003e366004610068565b610055565b60405190815260200160405180910390f35b6000610062826002610097565b92915050565b60006020828403121561007a57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b60006001600160ff1b03818413828413808216868404861116156100bd576100bd610081565b600160ff1b60008712828116878305891216156100dc576100dc610081565b600087129250878205871284841616156100f8576100f8610081565b8785058712818416161561010e5761010e610081565b50505092909302939250505056fea26469706673582212205c4d503eca301a04694bc37b49abe6e9f39bf64a198399f967ba70f9ca5f097764736f6c634300080c0033", 36 } 37 38 // DoubleABI is the input ABI used to generate the binding from. 39 // Deprecated: Use DoubleMetaData.ABI instead. 40 var DoubleABI = DoubleMetaData.ABI 41 42 // DoubleBin is the compiled bytecode used for deploying new contracts. 43 // Deprecated: Use DoubleMetaData.Bin instead. 44 var DoubleBin = DoubleMetaData.Bin 45 46 // DeployDouble deploys a new Ethereum contract, binding an instance of Double to it. 47 func DeployDouble(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Double, error) { 48 parsed, err := DoubleMetaData.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(DoubleBin), backend) 57 if err != nil { 58 return common.Address{}, nil, nil, err 59 } 60 return address, tx, &Double{DoubleCaller: DoubleCaller{contract: contract}, DoubleTransactor: DoubleTransactor{contract: contract}, DoubleFilterer: DoubleFilterer{contract: contract}}, nil 61 } 62 63 // Double is an auto generated Go binding around an Ethereum contract. 64 type Double struct { 65 DoubleCaller // Read-only binding to the contract 66 DoubleTransactor // Write-only binding to the contract 67 DoubleFilterer // Log filterer for contract events 68 } 69 70 // DoubleCaller is an auto generated read-only Go binding around an Ethereum contract. 71 type DoubleCaller struct { 72 contract *bind.BoundContract // Generic contract wrapper for the low level calls 73 } 74 75 // DoubleTransactor is an auto generated write-only Go binding around an Ethereum contract. 76 type DoubleTransactor struct { 77 contract *bind.BoundContract // Generic contract wrapper for the low level calls 78 } 79 80 // DoubleFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 81 type DoubleFilterer struct { 82 contract *bind.BoundContract // Generic contract wrapper for the low level calls 83 } 84 85 // DoubleSession is an auto generated Go binding around an Ethereum contract, 86 // with pre-set call and transact options. 87 type DoubleSession struct { 88 Contract *Double // 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 // DoubleCallerSession is an auto generated read-only Go binding around an Ethereum contract, 94 // with pre-set call options. 95 type DoubleCallerSession struct { 96 Contract *DoubleCaller // Generic contract caller binding to set the session for 97 CallOpts bind.CallOpts // Call options to use throughout this session 98 } 99 100 // DoubleTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 101 // with pre-set transact options. 102 type DoubleTransactorSession struct { 103 Contract *DoubleTransactor // Generic contract transactor binding to set the session for 104 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 105 } 106 107 // DoubleRaw is an auto generated low-level Go binding around an Ethereum contract. 108 type DoubleRaw struct { 109 Contract *Double // Generic contract binding to access the raw methods on 110 } 111 112 // DoubleCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 113 type DoubleCallerRaw struct { 114 Contract *DoubleCaller // Generic read-only contract binding to access the raw methods on 115 } 116 117 // DoubleTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 118 type DoubleTransactorRaw struct { 119 Contract *DoubleTransactor // Generic write-only contract binding to access the raw methods on 120 } 121 122 // NewDouble creates a new instance of Double, bound to a specific deployed contract. 123 func NewDouble(address common.Address, backend bind.ContractBackend) (*Double, error) { 124 contract, err := bindDouble(address, backend, backend, backend) 125 if err != nil { 126 return nil, err 127 } 128 return &Double{DoubleCaller: DoubleCaller{contract: contract}, DoubleTransactor: DoubleTransactor{contract: contract}, DoubleFilterer: DoubleFilterer{contract: contract}}, nil 129 } 130 131 // NewDoubleCaller creates a new read-only instance of Double, bound to a specific deployed contract. 132 func NewDoubleCaller(address common.Address, caller bind.ContractCaller) (*DoubleCaller, error) { 133 contract, err := bindDouble(address, caller, nil, nil) 134 if err != nil { 135 return nil, err 136 } 137 return &DoubleCaller{contract: contract}, nil 138 } 139 140 // NewDoubleTransactor creates a new write-only instance of Double, bound to a specific deployed contract. 141 func NewDoubleTransactor(address common.Address, transactor bind.ContractTransactor) (*DoubleTransactor, error) { 142 contract, err := bindDouble(address, nil, transactor, nil) 143 if err != nil { 144 return nil, err 145 } 146 return &DoubleTransactor{contract: contract}, nil 147 } 148 149 // NewDoubleFilterer creates a new log filterer instance of Double, bound to a specific deployed contract. 150 func NewDoubleFilterer(address common.Address, filterer bind.ContractFilterer) (*DoubleFilterer, error) { 151 contract, err := bindDouble(address, nil, nil, filterer) 152 if err != nil { 153 return nil, err 154 } 155 return &DoubleFilterer{contract: contract}, nil 156 } 157 158 // bindDouble binds a generic wrapper to an already deployed contract. 159 func bindDouble(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 160 parsed, err := DoubleMetaData.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 (_Double *DoubleRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 172 return _Double.Contract.DoubleCaller.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 (_Double *DoubleRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 178 return _Double.Contract.DoubleTransactor.contract.Transfer(opts) 179 } 180 181 // Transact invokes the (paid) contract method with params as input values. 182 func (_Double *DoubleRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 183 return _Double.Contract.DoubleTransactor.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 (_Double *DoubleCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 191 return _Double.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 (_Double *DoubleTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 197 return _Double.Contract.contract.Transfer(opts) 198 } 199 200 // Transact invokes the (paid) contract method with params as input values. 201 func (_Double *DoubleTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 202 return _Double.Contract.contract.Transact(opts, method, params...) 203 } 204 205 // Double is a free data retrieval call binding the contract method 0x6ffa1caa. 206 // 207 // Solidity: function double(int256 a) pure returns(int256) 208 func (_Double *DoubleCaller) Double(opts *bind.CallOpts, a *big.Int) (*big.Int, error) { 209 var out []interface{} 210 err := _Double.contract.Call(opts, &out, "double", a) 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 // Double is a free data retrieval call binding the contract method 0x6ffa1caa. 223 // 224 // Solidity: function double(int256 a) pure returns(int256) 225 func (_Double *DoubleSession) Double(a *big.Int) (*big.Int, error) { 226 return _Double.Contract.Double(&_Double.CallOpts, a) 227 } 228 229 // Double is a free data retrieval call binding the contract method 0x6ffa1caa. 230 // 231 // Solidity: function double(int256 a) pure returns(int256) 232 func (_Double *DoubleCallerSession) Double(a *big.Int) (*big.Int, error) { 233 return _Double.Contract.Double(&_Double.CallOpts, a) 234 }