github.com/0chain/gosdk@v1.17.11/zcnbridge/ethereum/uniswapnetwork/uniswapnetwork.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 uniswapnetwork 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 // UniswapMetaData contains all meta data concerning the Uniswap contract. 33 var UniswapMetaData = &bind.MetaData{ 34 ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"msg\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"v\",\"type\":\"uint256\"}],\"name\":\"DebugMsg\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"zcnAmount\",\"type\":\"uint256\"}],\"name\":\"getEstimatedETHforZCN\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"}],\"name\":\"swapETHForZCNExactAmountIn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutDesired\",\"type\":\"uint256\"}],\"name\":\"swapETHForZCNExactAmountOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"}],\"name\":\"swapUSDCForZCNExactAmountIn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutDesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"}],\"name\":\"swapUSDCForZCNExactAmountOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"}],\"name\":\"swapZCNForUSDCExactAmountIn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutDesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"}],\"name\":\"swapZCNForUSDCExactAmountOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"}],\"name\":\"swapZCNForWETHExactAmountIn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutDesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"}],\"name\":\"swapZCNForWETHExactAmountOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", 35 } 36 37 // UniswapABI is the input ABI used to generate the binding from. 38 // Deprecated: Use UniswapMetaData.ABI instead. 39 var UniswapABI = UniswapMetaData.ABI 40 41 // Uniswap is an auto generated Go binding around an Ethereum contract. 42 type Uniswap struct { 43 UniswapCaller // Read-only binding to the contract 44 UniswapTransactor // Write-only binding to the contract 45 UniswapFilterer // Log filterer for contract events 46 } 47 48 // UniswapCaller is an auto generated read-only Go binding around an Ethereum contract. 49 type UniswapCaller struct { 50 contract *bind.BoundContract // Generic contract wrapper for the low level calls 51 } 52 53 // UniswapTransactor is an auto generated write-only Go binding around an Ethereum contract. 54 type UniswapTransactor struct { 55 contract *bind.BoundContract // Generic contract wrapper for the low level calls 56 } 57 58 // UniswapFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 59 type UniswapFilterer struct { 60 contract *bind.BoundContract // Generic contract wrapper for the low level calls 61 } 62 63 // UniswapSession is an auto generated Go binding around an Ethereum contract, 64 // with pre-set call and transact options. 65 type UniswapSession struct { 66 Contract *Uniswap // Generic contract binding to set the session for 67 CallOpts bind.CallOpts // Call options to use throughout this session 68 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 69 } 70 71 // UniswapCallerSession is an auto generated read-only Go binding around an Ethereum contract, 72 // with pre-set call options. 73 type UniswapCallerSession struct { 74 Contract *UniswapCaller // Generic contract caller binding to set the session for 75 CallOpts bind.CallOpts // Call options to use throughout this session 76 } 77 78 // UniswapTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 79 // with pre-set transact options. 80 type UniswapTransactorSession struct { 81 Contract *UniswapTransactor // Generic contract transactor binding to set the session for 82 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 83 } 84 85 // UniswapRaw is an auto generated low-level Go binding around an Ethereum contract. 86 type UniswapRaw struct { 87 Contract *Uniswap // Generic contract binding to access the raw methods on 88 } 89 90 // UniswapCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 91 type UniswapCallerRaw struct { 92 Contract *UniswapCaller // Generic read-only contract binding to access the raw methods on 93 } 94 95 // UniswapTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 96 type UniswapTransactorRaw struct { 97 Contract *UniswapTransactor // Generic write-only contract binding to access the raw methods on 98 } 99 100 // NewUniswap creates a new instance of Uniswap, bound to a specific deployed contract. 101 func NewUniswap(address common.Address, backend bind.ContractBackend) (*Uniswap, error) { 102 contract, err := bindUniswap(address, backend, backend, backend) 103 if err != nil { 104 return nil, err 105 } 106 return &Uniswap{UniswapCaller: UniswapCaller{contract: contract}, UniswapTransactor: UniswapTransactor{contract: contract}, UniswapFilterer: UniswapFilterer{contract: contract}}, nil 107 } 108 109 // NewUniswapCaller creates a new read-only instance of Uniswap, bound to a specific deployed contract. 110 func NewUniswapCaller(address common.Address, caller bind.ContractCaller) (*UniswapCaller, error) { 111 contract, err := bindUniswap(address, caller, nil, nil) 112 if err != nil { 113 return nil, err 114 } 115 return &UniswapCaller{contract: contract}, nil 116 } 117 118 // NewUniswapTransactor creates a new write-only instance of Uniswap, bound to a specific deployed contract. 119 func NewUniswapTransactor(address common.Address, transactor bind.ContractTransactor) (*UniswapTransactor, error) { 120 contract, err := bindUniswap(address, nil, transactor, nil) 121 if err != nil { 122 return nil, err 123 } 124 return &UniswapTransactor{contract: contract}, nil 125 } 126 127 // NewUniswapFilterer creates a new log filterer instance of Uniswap, bound to a specific deployed contract. 128 func NewUniswapFilterer(address common.Address, filterer bind.ContractFilterer) (*UniswapFilterer, error) { 129 contract, err := bindUniswap(address, nil, nil, filterer) 130 if err != nil { 131 return nil, err 132 } 133 return &UniswapFilterer{contract: contract}, nil 134 } 135 136 // bindUniswap binds a generic wrapper to an already deployed contract. 137 func bindUniswap(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 138 parsed, err := UniswapMetaData.GetAbi() 139 if err != nil { 140 return nil, err 141 } 142 return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil 143 } 144 145 // Call invokes the (constant) contract method with params as input values and 146 // sets the output to result. The result type might be a single field for simple 147 // returns, a slice of interfaces for anonymous returns and a struct for named 148 // returns. 149 func (_Uniswap *UniswapRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 150 return _Uniswap.Contract.UniswapCaller.contract.Call(opts, result, method, params...) 151 } 152 153 // Transfer initiates a plain transaction to move funds to the contract, calling 154 // its default method if one is available. 155 func (_Uniswap *UniswapRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 156 return _Uniswap.Contract.UniswapTransactor.contract.Transfer(opts) 157 } 158 159 // Transact invokes the (paid) contract method with params as input values. 160 func (_Uniswap *UniswapRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 161 return _Uniswap.Contract.UniswapTransactor.contract.Transact(opts, method, params...) 162 } 163 164 // Call invokes the (constant) contract method with params as input values and 165 // sets the output to result. The result type might be a single field for simple 166 // returns, a slice of interfaces for anonymous returns and a struct for named 167 // returns. 168 func (_Uniswap *UniswapCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 169 return _Uniswap.Contract.contract.Call(opts, result, method, params...) 170 } 171 172 // Transfer initiates a plain transaction to move funds to the contract, calling 173 // its default method if one is available. 174 func (_Uniswap *UniswapTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 175 return _Uniswap.Contract.contract.Transfer(opts) 176 } 177 178 // Transact invokes the (paid) contract method with params as input values. 179 func (_Uniswap *UniswapTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 180 return _Uniswap.Contract.contract.Transact(opts, method, params...) 181 } 182 183 // GetEstimatedETHforZCN is a free data retrieval call binding the contract method 0x1a34ff1c. 184 // 185 // Solidity: function getEstimatedETHforZCN(uint256 zcnAmount) view returns(uint256[]) 186 func (_Uniswap *UniswapCaller) GetEstimatedETHforZCN(opts *bind.CallOpts, zcnAmount *big.Int) ([]*big.Int, error) { 187 var out []interface{} 188 err := _Uniswap.contract.Call(opts, &out, "getEstimatedETHforZCN", zcnAmount) 189 190 if err != nil { 191 return *new([]*big.Int), err 192 } 193 194 out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) 195 196 return out0, err 197 198 } 199 200 // GetEstimatedETHforZCN is a free data retrieval call binding the contract method 0x1a34ff1c. 201 // 202 // Solidity: function getEstimatedETHforZCN(uint256 zcnAmount) view returns(uint256[]) 203 func (_Uniswap *UniswapSession) GetEstimatedETHforZCN(zcnAmount *big.Int) ([]*big.Int, error) { 204 return _Uniswap.Contract.GetEstimatedETHforZCN(&_Uniswap.CallOpts, zcnAmount) 205 } 206 207 // GetEstimatedETHforZCN is a free data retrieval call binding the contract method 0x1a34ff1c. 208 // 209 // Solidity: function getEstimatedETHforZCN(uint256 zcnAmount) view returns(uint256[]) 210 func (_Uniswap *UniswapCallerSession) GetEstimatedETHforZCN(zcnAmount *big.Int) ([]*big.Int, error) { 211 return _Uniswap.Contract.GetEstimatedETHforZCN(&_Uniswap.CallOpts, zcnAmount) 212 } 213 214 // SwapETHForZCNExactAmountIn is a paid mutator transaction binding the contract method 0xb33d99b1. 215 // 216 // Solidity: function swapETHForZCNExactAmountIn(uint256 amountOutMin) payable returns(uint256 amountOut) 217 func (_Uniswap *UniswapTransactor) SwapETHForZCNExactAmountIn(opts *bind.TransactOpts, amountOutMin *big.Int) (*types.Transaction, error) { 218 return _Uniswap.contract.Transact(opts, "swapETHForZCNExactAmountIn", amountOutMin) 219 } 220 221 // SwapETHForZCNExactAmountIn is a paid mutator transaction binding the contract method 0xb33d99b1. 222 // 223 // Solidity: function swapETHForZCNExactAmountIn(uint256 amountOutMin) payable returns(uint256 amountOut) 224 func (_Uniswap *UniswapSession) SwapETHForZCNExactAmountIn(amountOutMin *big.Int) (*types.Transaction, error) { 225 return _Uniswap.Contract.SwapETHForZCNExactAmountIn(&_Uniswap.TransactOpts, amountOutMin) 226 } 227 228 // SwapETHForZCNExactAmountIn is a paid mutator transaction binding the contract method 0xb33d99b1. 229 // 230 // Solidity: function swapETHForZCNExactAmountIn(uint256 amountOutMin) payable returns(uint256 amountOut) 231 func (_Uniswap *UniswapTransactorSession) SwapETHForZCNExactAmountIn(amountOutMin *big.Int) (*types.Transaction, error) { 232 return _Uniswap.Contract.SwapETHForZCNExactAmountIn(&_Uniswap.TransactOpts, amountOutMin) 233 } 234 235 // SwapETHForZCNExactAmountOut is a paid mutator transaction binding the contract method 0x18ae74a4. 236 // 237 // Solidity: function swapETHForZCNExactAmountOut(uint256 amountOutDesired) payable returns(uint256 amountOut) 238 func (_Uniswap *UniswapTransactor) SwapETHForZCNExactAmountOut(opts *bind.TransactOpts, amountOutDesired *big.Int) (*types.Transaction, error) { 239 return _Uniswap.contract.Transact(opts, "swapETHForZCNExactAmountOut", amountOutDesired) 240 } 241 242 // SwapETHForZCNExactAmountOut is a paid mutator transaction binding the contract method 0x18ae74a4. 243 // 244 // Solidity: function swapETHForZCNExactAmountOut(uint256 amountOutDesired) payable returns(uint256 amountOut) 245 func (_Uniswap *UniswapSession) SwapETHForZCNExactAmountOut(amountOutDesired *big.Int) (*types.Transaction, error) { 246 return _Uniswap.Contract.SwapETHForZCNExactAmountOut(&_Uniswap.TransactOpts, amountOutDesired) 247 } 248 249 // SwapETHForZCNExactAmountOut is a paid mutator transaction binding the contract method 0x18ae74a4. 250 // 251 // Solidity: function swapETHForZCNExactAmountOut(uint256 amountOutDesired) payable returns(uint256 amountOut) 252 func (_Uniswap *UniswapTransactorSession) SwapETHForZCNExactAmountOut(amountOutDesired *big.Int) (*types.Transaction, error) { 253 return _Uniswap.Contract.SwapETHForZCNExactAmountOut(&_Uniswap.TransactOpts, amountOutDesired) 254 } 255 256 // SwapUSDCForZCNExactAmountIn is a paid mutator transaction binding the contract method 0x0976c3c2. 257 // 258 // Solidity: function swapUSDCForZCNExactAmountIn(uint256 amountIn, uint256 amountOutMin) returns(uint256 amountOut) 259 func (_Uniswap *UniswapTransactor) SwapUSDCForZCNExactAmountIn(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int) (*types.Transaction, error) { 260 return _Uniswap.contract.Transact(opts, "swapUSDCForZCNExactAmountIn", amountIn, amountOutMin) 261 } 262 263 // SwapUSDCForZCNExactAmountIn is a paid mutator transaction binding the contract method 0x0976c3c2. 264 // 265 // Solidity: function swapUSDCForZCNExactAmountIn(uint256 amountIn, uint256 amountOutMin) returns(uint256 amountOut) 266 func (_Uniswap *UniswapSession) SwapUSDCForZCNExactAmountIn(amountIn *big.Int, amountOutMin *big.Int) (*types.Transaction, error) { 267 return _Uniswap.Contract.SwapUSDCForZCNExactAmountIn(&_Uniswap.TransactOpts, amountIn, amountOutMin) 268 } 269 270 // SwapUSDCForZCNExactAmountIn is a paid mutator transaction binding the contract method 0x0976c3c2. 271 // 272 // Solidity: function swapUSDCForZCNExactAmountIn(uint256 amountIn, uint256 amountOutMin) returns(uint256 amountOut) 273 func (_Uniswap *UniswapTransactorSession) SwapUSDCForZCNExactAmountIn(amountIn *big.Int, amountOutMin *big.Int) (*types.Transaction, error) { 274 return _Uniswap.Contract.SwapUSDCForZCNExactAmountIn(&_Uniswap.TransactOpts, amountIn, amountOutMin) 275 } 276 277 // SwapUSDCForZCNExactAmountOut is a paid mutator transaction binding the contract method 0x97a40b34. 278 // 279 // Solidity: function swapUSDCForZCNExactAmountOut(uint256 amountOutDesired, uint256 amountInMax) returns(uint256 amountOut) 280 func (_Uniswap *UniswapTransactor) SwapUSDCForZCNExactAmountOut(opts *bind.TransactOpts, amountOutDesired *big.Int, amountInMax *big.Int) (*types.Transaction, error) { 281 return _Uniswap.contract.Transact(opts, "swapUSDCForZCNExactAmountOut", amountOutDesired, amountInMax) 282 } 283 284 // SwapUSDCForZCNExactAmountOut is a paid mutator transaction binding the contract method 0x97a40b34. 285 // 286 // Solidity: function swapUSDCForZCNExactAmountOut(uint256 amountOutDesired, uint256 amountInMax) returns(uint256 amountOut) 287 func (_Uniswap *UniswapSession) SwapUSDCForZCNExactAmountOut(amountOutDesired *big.Int, amountInMax *big.Int) (*types.Transaction, error) { 288 return _Uniswap.Contract.SwapUSDCForZCNExactAmountOut(&_Uniswap.TransactOpts, amountOutDesired, amountInMax) 289 } 290 291 // SwapUSDCForZCNExactAmountOut is a paid mutator transaction binding the contract method 0x97a40b34. 292 // 293 // Solidity: function swapUSDCForZCNExactAmountOut(uint256 amountOutDesired, uint256 amountInMax) returns(uint256 amountOut) 294 func (_Uniswap *UniswapTransactorSession) SwapUSDCForZCNExactAmountOut(amountOutDesired *big.Int, amountInMax *big.Int) (*types.Transaction, error) { 295 return _Uniswap.Contract.SwapUSDCForZCNExactAmountOut(&_Uniswap.TransactOpts, amountOutDesired, amountInMax) 296 } 297 298 // SwapZCNForUSDCExactAmountIn is a paid mutator transaction binding the contract method 0xe60b51b6. 299 // 300 // Solidity: function swapZCNForUSDCExactAmountIn(uint256 amountIn, uint256 amountOutMin) returns(uint256 amountOut) 301 func (_Uniswap *UniswapTransactor) SwapZCNForUSDCExactAmountIn(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int) (*types.Transaction, error) { 302 return _Uniswap.contract.Transact(opts, "swapZCNForUSDCExactAmountIn", amountIn, amountOutMin) 303 } 304 305 // SwapZCNForUSDCExactAmountIn is a paid mutator transaction binding the contract method 0xe60b51b6. 306 // 307 // Solidity: function swapZCNForUSDCExactAmountIn(uint256 amountIn, uint256 amountOutMin) returns(uint256 amountOut) 308 func (_Uniswap *UniswapSession) SwapZCNForUSDCExactAmountIn(amountIn *big.Int, amountOutMin *big.Int) (*types.Transaction, error) { 309 return _Uniswap.Contract.SwapZCNForUSDCExactAmountIn(&_Uniswap.TransactOpts, amountIn, amountOutMin) 310 } 311 312 // SwapZCNForUSDCExactAmountIn is a paid mutator transaction binding the contract method 0xe60b51b6. 313 // 314 // Solidity: function swapZCNForUSDCExactAmountIn(uint256 amountIn, uint256 amountOutMin) returns(uint256 amountOut) 315 func (_Uniswap *UniswapTransactorSession) SwapZCNForUSDCExactAmountIn(amountIn *big.Int, amountOutMin *big.Int) (*types.Transaction, error) { 316 return _Uniswap.Contract.SwapZCNForUSDCExactAmountIn(&_Uniswap.TransactOpts, amountIn, amountOutMin) 317 } 318 319 // SwapZCNForUSDCExactAmountOut is a paid mutator transaction binding the contract method 0x4becb631. 320 // 321 // Solidity: function swapZCNForUSDCExactAmountOut(uint256 amountOutDesired, uint256 amountInMax) returns(uint256 amountOut) 322 func (_Uniswap *UniswapTransactor) SwapZCNForUSDCExactAmountOut(opts *bind.TransactOpts, amountOutDesired *big.Int, amountInMax *big.Int) (*types.Transaction, error) { 323 return _Uniswap.contract.Transact(opts, "swapZCNForUSDCExactAmountOut", amountOutDesired, amountInMax) 324 } 325 326 // SwapZCNForUSDCExactAmountOut is a paid mutator transaction binding the contract method 0x4becb631. 327 // 328 // Solidity: function swapZCNForUSDCExactAmountOut(uint256 amountOutDesired, uint256 amountInMax) returns(uint256 amountOut) 329 func (_Uniswap *UniswapSession) SwapZCNForUSDCExactAmountOut(amountOutDesired *big.Int, amountInMax *big.Int) (*types.Transaction, error) { 330 return _Uniswap.Contract.SwapZCNForUSDCExactAmountOut(&_Uniswap.TransactOpts, amountOutDesired, amountInMax) 331 } 332 333 // SwapZCNForUSDCExactAmountOut is a paid mutator transaction binding the contract method 0x4becb631. 334 // 335 // Solidity: function swapZCNForUSDCExactAmountOut(uint256 amountOutDesired, uint256 amountInMax) returns(uint256 amountOut) 336 func (_Uniswap *UniswapTransactorSession) SwapZCNForUSDCExactAmountOut(amountOutDesired *big.Int, amountInMax *big.Int) (*types.Transaction, error) { 337 return _Uniswap.Contract.SwapZCNForUSDCExactAmountOut(&_Uniswap.TransactOpts, amountOutDesired, amountInMax) 338 } 339 340 // SwapZCNForWETHExactAmountIn is a paid mutator transaction binding the contract method 0x50a6cd6f. 341 // 342 // Solidity: function swapZCNForWETHExactAmountIn(uint256 amountIn, uint256 amountOutMin) returns(uint256 amountOut) 343 func (_Uniswap *UniswapTransactor) SwapZCNForWETHExactAmountIn(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int) (*types.Transaction, error) { 344 return _Uniswap.contract.Transact(opts, "swapZCNForWETHExactAmountIn", amountIn, amountOutMin) 345 } 346 347 // SwapZCNForWETHExactAmountIn is a paid mutator transaction binding the contract method 0x50a6cd6f. 348 // 349 // Solidity: function swapZCNForWETHExactAmountIn(uint256 amountIn, uint256 amountOutMin) returns(uint256 amountOut) 350 func (_Uniswap *UniswapSession) SwapZCNForWETHExactAmountIn(amountIn *big.Int, amountOutMin *big.Int) (*types.Transaction, error) { 351 return _Uniswap.Contract.SwapZCNForWETHExactAmountIn(&_Uniswap.TransactOpts, amountIn, amountOutMin) 352 } 353 354 // SwapZCNForWETHExactAmountIn is a paid mutator transaction binding the contract method 0x50a6cd6f. 355 // 356 // Solidity: function swapZCNForWETHExactAmountIn(uint256 amountIn, uint256 amountOutMin) returns(uint256 amountOut) 357 func (_Uniswap *UniswapTransactorSession) SwapZCNForWETHExactAmountIn(amountIn *big.Int, amountOutMin *big.Int) (*types.Transaction, error) { 358 return _Uniswap.Contract.SwapZCNForWETHExactAmountIn(&_Uniswap.TransactOpts, amountIn, amountOutMin) 359 } 360 361 // SwapZCNForWETHExactAmountOut is a paid mutator transaction binding the contract method 0xaae07c3e. 362 // 363 // Solidity: function swapZCNForWETHExactAmountOut(uint256 amountOutDesired, uint256 amountInMax) returns(uint256 amountOut) 364 func (_Uniswap *UniswapTransactor) SwapZCNForWETHExactAmountOut(opts *bind.TransactOpts, amountOutDesired *big.Int, amountInMax *big.Int) (*types.Transaction, error) { 365 return _Uniswap.contract.Transact(opts, "swapZCNForWETHExactAmountOut", amountOutDesired, amountInMax) 366 } 367 368 // SwapZCNForWETHExactAmountOut is a paid mutator transaction binding the contract method 0xaae07c3e. 369 // 370 // Solidity: function swapZCNForWETHExactAmountOut(uint256 amountOutDesired, uint256 amountInMax) returns(uint256 amountOut) 371 func (_Uniswap *UniswapSession) SwapZCNForWETHExactAmountOut(amountOutDesired *big.Int, amountInMax *big.Int) (*types.Transaction, error) { 372 return _Uniswap.Contract.SwapZCNForWETHExactAmountOut(&_Uniswap.TransactOpts, amountOutDesired, amountInMax) 373 } 374 375 // SwapZCNForWETHExactAmountOut is a paid mutator transaction binding the contract method 0xaae07c3e. 376 // 377 // Solidity: function swapZCNForWETHExactAmountOut(uint256 amountOutDesired, uint256 amountInMax) returns(uint256 amountOut) 378 func (_Uniswap *UniswapTransactorSession) SwapZCNForWETHExactAmountOut(amountOutDesired *big.Int, amountInMax *big.Int) (*types.Transaction, error) { 379 return _Uniswap.Contract.SwapZCNForWETHExactAmountOut(&_Uniswap.TransactOpts, amountOutDesired, amountInMax) 380 } 381 382 // Receive is a paid mutator transaction binding the contract receive function. 383 // 384 // Solidity: receive() payable returns() 385 func (_Uniswap *UniswapTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { 386 return _Uniswap.contract.RawTransact(opts, nil) // calldata is disallowed for receive function 387 } 388 389 // Receive is a paid mutator transaction binding the contract receive function. 390 // 391 // Solidity: receive() payable returns() 392 func (_Uniswap *UniswapSession) Receive() (*types.Transaction, error) { 393 return _Uniswap.Contract.Receive(&_Uniswap.TransactOpts) 394 } 395 396 // Receive is a paid mutator transaction binding the contract receive function. 397 // 398 // Solidity: receive() payable returns() 399 func (_Uniswap *UniswapTransactorSession) Receive() (*types.Transaction, error) { 400 return _Uniswap.Contract.Receive(&_Uniswap.TransactOpts) 401 } 402 403 // UniswapDebugMsgIterator is returned from FilterDebugMsg and is used to iterate over the raw logs and unpacked data for DebugMsg events raised by the Uniswap contract. 404 type UniswapDebugMsgIterator struct { 405 Event *UniswapDebugMsg // Event containing the contract specifics and raw log 406 407 contract *bind.BoundContract // Generic contract to use for unpacking event data 408 event string // Event name to use for unpacking event data 409 410 logs chan types.Log // Log channel receiving the found contract events 411 sub ethereum.Subscription // Subscription for errors, completion and termination 412 done bool // Whether the subscription completed delivering logs 413 fail error // Occurred error to stop iteration 414 } 415 416 // Next advances the iterator to the subsequent event, returning whether there 417 // are any more events found. In case of a retrieval or parsing error, false is 418 // returned and Error() can be queried for the exact failure. 419 func (it *UniswapDebugMsgIterator) Next() bool { 420 // If the iterator failed, stop iterating 421 if it.fail != nil { 422 return false 423 } 424 // If the iterator completed, deliver directly whatever's available 425 if it.done { 426 select { 427 case log := <-it.logs: 428 it.Event = new(UniswapDebugMsg) 429 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 430 it.fail = err 431 return false 432 } 433 it.Event.Raw = log 434 return true 435 436 default: 437 return false 438 } 439 } 440 // Iterator still in progress, wait for either a data or an error event 441 select { 442 case log := <-it.logs: 443 it.Event = new(UniswapDebugMsg) 444 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 445 it.fail = err 446 return false 447 } 448 it.Event.Raw = log 449 return true 450 451 case err := <-it.sub.Err(): 452 it.done = true 453 it.fail = err 454 return it.Next() 455 } 456 } 457 458 // Error returns any retrieval or parsing error occurred during filtering. 459 func (it *UniswapDebugMsgIterator) Error() error { 460 return it.fail 461 } 462 463 // Close terminates the iteration process, releasing any pending underlying 464 // resources. 465 func (it *UniswapDebugMsgIterator) Close() error { 466 it.sub.Unsubscribe() 467 return nil 468 } 469 470 // UniswapDebugMsg represents a DebugMsg event raised by the Uniswap contract. 471 type UniswapDebugMsg struct { 472 Msg string 473 V *big.Int 474 Raw types.Log // Blockchain specific contextual infos 475 } 476 477 // FilterDebugMsg is a free log retrieval operation binding the contract event 0xea30ed2bcbf4b7c5487f2c07ef639257ebf04932960dff4496fb914f769a6439. 478 // 479 // Solidity: event DebugMsg(string msg, uint256 v) 480 func (_Uniswap *UniswapFilterer) FilterDebugMsg(opts *bind.FilterOpts) (*UniswapDebugMsgIterator, error) { 481 482 logs, sub, err := _Uniswap.contract.FilterLogs(opts, "DebugMsg") 483 if err != nil { 484 return nil, err 485 } 486 return &UniswapDebugMsgIterator{contract: _Uniswap.contract, event: "DebugMsg", logs: logs, sub: sub}, nil 487 } 488 489 // WatchDebugMsg is a free log subscription operation binding the contract event 0xea30ed2bcbf4b7c5487f2c07ef639257ebf04932960dff4496fb914f769a6439. 490 // 491 // Solidity: event DebugMsg(string msg, uint256 v) 492 func (_Uniswap *UniswapFilterer) WatchDebugMsg(opts *bind.WatchOpts, sink chan<- *UniswapDebugMsg) (event.Subscription, error) { 493 494 logs, sub, err := _Uniswap.contract.WatchLogs(opts, "DebugMsg") 495 if err != nil { 496 return nil, err 497 } 498 return event.NewSubscription(func(quit <-chan struct{}) error { 499 defer sub.Unsubscribe() 500 for { 501 select { 502 case log := <-logs: 503 // New log arrived, parse the event and forward to the user 504 event := new(UniswapDebugMsg) 505 if err := _Uniswap.contract.UnpackLog(event, "DebugMsg", log); err != nil { 506 return err 507 } 508 event.Raw = log 509 510 select { 511 case sink <- event: 512 case err := <-sub.Err(): 513 return err 514 case <-quit: 515 return nil 516 } 517 case err := <-sub.Err(): 518 return err 519 case <-quit: 520 return nil 521 } 522 } 523 }), nil 524 } 525 526 // ParseDebugMsg is a log parse operation binding the contract event 0xea30ed2bcbf4b7c5487f2c07ef639257ebf04932960dff4496fb914f769a6439. 527 // 528 // Solidity: event DebugMsg(string msg, uint256 v) 529 func (_Uniswap *UniswapFilterer) ParseDebugMsg(log types.Log) (*UniswapDebugMsg, error) { 530 event := new(UniswapDebugMsg) 531 if err := _Uniswap.contract.UnpackLog(event, "DebugMsg", log); err != nil { 532 return nil, err 533 } 534 event.Raw = log 535 return event, nil 536 }