github.com/status-im/status-go@v1.1.0/contracts/hop/l1Contracts/l1CctpImplementation/l1CctpImplementation.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 hopL1CctpImplementation 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 // HopL1CctpImplementationMetaData contains all meta data concerning the HopL1CctpImplementation contract. 33 var HopL1CctpImplementationMetaData = &bind.MetaData{ 34 ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nativeTokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"cctpAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeCollectorAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minBonderFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"chainIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"domains\",\"type\":\"uint32[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"cctpNonce\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"}],\"name\":\"CCTPTransferSent\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"activeChainIds\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cctp\",\"outputs\":[{\"internalType\":\"contractICCTP\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"destinationDomains\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeCollectorAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minBonderFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nativeToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bonderFee\",\"type\":\"uint256\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", 35 } 36 37 // HopL1CctpImplementationABI is the input ABI used to generate the binding from. 38 // Deprecated: Use HopL1CctpImplementationMetaData.ABI instead. 39 var HopL1CctpImplementationABI = HopL1CctpImplementationMetaData.ABI 40 41 // HopL1CctpImplementation is an auto generated Go binding around an Ethereum contract. 42 type HopL1CctpImplementation struct { 43 HopL1CctpImplementationCaller // Read-only binding to the contract 44 HopL1CctpImplementationTransactor // Write-only binding to the contract 45 HopL1CctpImplementationFilterer // Log filterer for contract events 46 } 47 48 // HopL1CctpImplementationCaller is an auto generated read-only Go binding around an Ethereum contract. 49 type HopL1CctpImplementationCaller struct { 50 contract *bind.BoundContract // Generic contract wrapper for the low level calls 51 } 52 53 // HopL1CctpImplementationTransactor is an auto generated write-only Go binding around an Ethereum contract. 54 type HopL1CctpImplementationTransactor struct { 55 contract *bind.BoundContract // Generic contract wrapper for the low level calls 56 } 57 58 // HopL1CctpImplementationFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 59 type HopL1CctpImplementationFilterer struct { 60 contract *bind.BoundContract // Generic contract wrapper for the low level calls 61 } 62 63 // HopL1CctpImplementationSession is an auto generated Go binding around an Ethereum contract, 64 // with pre-set call and transact options. 65 type HopL1CctpImplementationSession struct { 66 Contract *HopL1CctpImplementation // 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 // HopL1CctpImplementationCallerSession is an auto generated read-only Go binding around an Ethereum contract, 72 // with pre-set call options. 73 type HopL1CctpImplementationCallerSession struct { 74 Contract *HopL1CctpImplementationCaller // Generic contract caller binding to set the session for 75 CallOpts bind.CallOpts // Call options to use throughout this session 76 } 77 78 // HopL1CctpImplementationTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 79 // with pre-set transact options. 80 type HopL1CctpImplementationTransactorSession struct { 81 Contract *HopL1CctpImplementationTransactor // Generic contract transactor binding to set the session for 82 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 83 } 84 85 // HopL1CctpImplementationRaw is an auto generated low-level Go binding around an Ethereum contract. 86 type HopL1CctpImplementationRaw struct { 87 Contract *HopL1CctpImplementation // Generic contract binding to access the raw methods on 88 } 89 90 // HopL1CctpImplementationCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 91 type HopL1CctpImplementationCallerRaw struct { 92 Contract *HopL1CctpImplementationCaller // Generic read-only contract binding to access the raw methods on 93 } 94 95 // HopL1CctpImplementationTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 96 type HopL1CctpImplementationTransactorRaw struct { 97 Contract *HopL1CctpImplementationTransactor // Generic write-only contract binding to access the raw methods on 98 } 99 100 // NewHopL1CctpImplementation creates a new instance of HopL1CctpImplementation, bound to a specific deployed contract. 101 func NewHopL1CctpImplementation(address common.Address, backend bind.ContractBackend) (*HopL1CctpImplementation, error) { 102 contract, err := bindHopL1CctpImplementation(address, backend, backend, backend) 103 if err != nil { 104 return nil, err 105 } 106 return &HopL1CctpImplementation{HopL1CctpImplementationCaller: HopL1CctpImplementationCaller{contract: contract}, HopL1CctpImplementationTransactor: HopL1CctpImplementationTransactor{contract: contract}, HopL1CctpImplementationFilterer: HopL1CctpImplementationFilterer{contract: contract}}, nil 107 } 108 109 // NewHopL1CctpImplementationCaller creates a new read-only instance of HopL1CctpImplementation, bound to a specific deployed contract. 110 func NewHopL1CctpImplementationCaller(address common.Address, caller bind.ContractCaller) (*HopL1CctpImplementationCaller, error) { 111 contract, err := bindHopL1CctpImplementation(address, caller, nil, nil) 112 if err != nil { 113 return nil, err 114 } 115 return &HopL1CctpImplementationCaller{contract: contract}, nil 116 } 117 118 // NewHopL1CctpImplementationTransactor creates a new write-only instance of HopL1CctpImplementation, bound to a specific deployed contract. 119 func NewHopL1CctpImplementationTransactor(address common.Address, transactor bind.ContractTransactor) (*HopL1CctpImplementationTransactor, error) { 120 contract, err := bindHopL1CctpImplementation(address, nil, transactor, nil) 121 if err != nil { 122 return nil, err 123 } 124 return &HopL1CctpImplementationTransactor{contract: contract}, nil 125 } 126 127 // NewHopL1CctpImplementationFilterer creates a new log filterer instance of HopL1CctpImplementation, bound to a specific deployed contract. 128 func NewHopL1CctpImplementationFilterer(address common.Address, filterer bind.ContractFilterer) (*HopL1CctpImplementationFilterer, error) { 129 contract, err := bindHopL1CctpImplementation(address, nil, nil, filterer) 130 if err != nil { 131 return nil, err 132 } 133 return &HopL1CctpImplementationFilterer{contract: contract}, nil 134 } 135 136 // bindHopL1CctpImplementation binds a generic wrapper to an already deployed contract. 137 func bindHopL1CctpImplementation(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 138 parsed, err := HopL1CctpImplementationMetaData.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 (_HopL1CctpImplementation *HopL1CctpImplementationRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 150 return _HopL1CctpImplementation.Contract.HopL1CctpImplementationCaller.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 (_HopL1CctpImplementation *HopL1CctpImplementationRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 156 return _HopL1CctpImplementation.Contract.HopL1CctpImplementationTransactor.contract.Transfer(opts) 157 } 158 159 // Transact invokes the (paid) contract method with params as input values. 160 func (_HopL1CctpImplementation *HopL1CctpImplementationRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 161 return _HopL1CctpImplementation.Contract.HopL1CctpImplementationTransactor.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 (_HopL1CctpImplementation *HopL1CctpImplementationCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 169 return _HopL1CctpImplementation.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 (_HopL1CctpImplementation *HopL1CctpImplementationTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 175 return _HopL1CctpImplementation.Contract.contract.Transfer(opts) 176 } 177 178 // Transact invokes the (paid) contract method with params as input values. 179 func (_HopL1CctpImplementation *HopL1CctpImplementationTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 180 return _HopL1CctpImplementation.Contract.contract.Transact(opts, method, params...) 181 } 182 183 // ActiveChainIds is a free data retrieval call binding the contract method 0xc97d172e. 184 // 185 // Solidity: function activeChainIds(uint256 ) view returns(bool) 186 func (_HopL1CctpImplementation *HopL1CctpImplementationCaller) ActiveChainIds(opts *bind.CallOpts, arg0 *big.Int) (bool, error) { 187 var out []interface{} 188 err := _HopL1CctpImplementation.contract.Call(opts, &out, "activeChainIds", arg0) 189 190 if err != nil { 191 return *new(bool), err 192 } 193 194 out0 := *abi.ConvertType(out[0], new(bool)).(*bool) 195 196 return out0, err 197 198 } 199 200 // ActiveChainIds is a free data retrieval call binding the contract method 0xc97d172e. 201 // 202 // Solidity: function activeChainIds(uint256 ) view returns(bool) 203 func (_HopL1CctpImplementation *HopL1CctpImplementationSession) ActiveChainIds(arg0 *big.Int) (bool, error) { 204 return _HopL1CctpImplementation.Contract.ActiveChainIds(&_HopL1CctpImplementation.CallOpts, arg0) 205 } 206 207 // ActiveChainIds is a free data retrieval call binding the contract method 0xc97d172e. 208 // 209 // Solidity: function activeChainIds(uint256 ) view returns(bool) 210 func (_HopL1CctpImplementation *HopL1CctpImplementationCallerSession) ActiveChainIds(arg0 *big.Int) (bool, error) { 211 return _HopL1CctpImplementation.Contract.ActiveChainIds(&_HopL1CctpImplementation.CallOpts, arg0) 212 } 213 214 // Cctp is a free data retrieval call binding the contract method 0xe3329e32. 215 // 216 // Solidity: function cctp() view returns(address) 217 func (_HopL1CctpImplementation *HopL1CctpImplementationCaller) Cctp(opts *bind.CallOpts) (common.Address, error) { 218 var out []interface{} 219 err := _HopL1CctpImplementation.contract.Call(opts, &out, "cctp") 220 221 if err != nil { 222 return *new(common.Address), err 223 } 224 225 out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) 226 227 return out0, err 228 229 } 230 231 // Cctp is a free data retrieval call binding the contract method 0xe3329e32. 232 // 233 // Solidity: function cctp() view returns(address) 234 func (_HopL1CctpImplementation *HopL1CctpImplementationSession) Cctp() (common.Address, error) { 235 return _HopL1CctpImplementation.Contract.Cctp(&_HopL1CctpImplementation.CallOpts) 236 } 237 238 // Cctp is a free data retrieval call binding the contract method 0xe3329e32. 239 // 240 // Solidity: function cctp() view returns(address) 241 func (_HopL1CctpImplementation *HopL1CctpImplementationCallerSession) Cctp() (common.Address, error) { 242 return _HopL1CctpImplementation.Contract.Cctp(&_HopL1CctpImplementation.CallOpts) 243 } 244 245 // DestinationDomains is a free data retrieval call binding the contract method 0x89aad5dc. 246 // 247 // Solidity: function destinationDomains(uint256 ) view returns(uint32) 248 func (_HopL1CctpImplementation *HopL1CctpImplementationCaller) DestinationDomains(opts *bind.CallOpts, arg0 *big.Int) (uint32, error) { 249 var out []interface{} 250 err := _HopL1CctpImplementation.contract.Call(opts, &out, "destinationDomains", arg0) 251 252 if err != nil { 253 return *new(uint32), err 254 } 255 256 out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) 257 258 return out0, err 259 260 } 261 262 // DestinationDomains is a free data retrieval call binding the contract method 0x89aad5dc. 263 // 264 // Solidity: function destinationDomains(uint256 ) view returns(uint32) 265 func (_HopL1CctpImplementation *HopL1CctpImplementationSession) DestinationDomains(arg0 *big.Int) (uint32, error) { 266 return _HopL1CctpImplementation.Contract.DestinationDomains(&_HopL1CctpImplementation.CallOpts, arg0) 267 } 268 269 // DestinationDomains is a free data retrieval call binding the contract method 0x89aad5dc. 270 // 271 // Solidity: function destinationDomains(uint256 ) view returns(uint32) 272 func (_HopL1CctpImplementation *HopL1CctpImplementationCallerSession) DestinationDomains(arg0 *big.Int) (uint32, error) { 273 return _HopL1CctpImplementation.Contract.DestinationDomains(&_HopL1CctpImplementation.CallOpts, arg0) 274 } 275 276 // FeeCollectorAddress is a free data retrieval call binding the contract method 0xf108e225. 277 // 278 // Solidity: function feeCollectorAddress() view returns(address) 279 func (_HopL1CctpImplementation *HopL1CctpImplementationCaller) FeeCollectorAddress(opts *bind.CallOpts) (common.Address, error) { 280 var out []interface{} 281 err := _HopL1CctpImplementation.contract.Call(opts, &out, "feeCollectorAddress") 282 283 if err != nil { 284 return *new(common.Address), err 285 } 286 287 out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) 288 289 return out0, err 290 291 } 292 293 // FeeCollectorAddress is a free data retrieval call binding the contract method 0xf108e225. 294 // 295 // Solidity: function feeCollectorAddress() view returns(address) 296 func (_HopL1CctpImplementation *HopL1CctpImplementationSession) FeeCollectorAddress() (common.Address, error) { 297 return _HopL1CctpImplementation.Contract.FeeCollectorAddress(&_HopL1CctpImplementation.CallOpts) 298 } 299 300 // FeeCollectorAddress is a free data retrieval call binding the contract method 0xf108e225. 301 // 302 // Solidity: function feeCollectorAddress() view returns(address) 303 func (_HopL1CctpImplementation *HopL1CctpImplementationCallerSession) FeeCollectorAddress() (common.Address, error) { 304 return _HopL1CctpImplementation.Contract.FeeCollectorAddress(&_HopL1CctpImplementation.CallOpts) 305 } 306 307 // MinBonderFee is a free data retrieval call binding the contract method 0x50fc2401. 308 // 309 // Solidity: function minBonderFee() view returns(uint256) 310 func (_HopL1CctpImplementation *HopL1CctpImplementationCaller) MinBonderFee(opts *bind.CallOpts) (*big.Int, error) { 311 var out []interface{} 312 err := _HopL1CctpImplementation.contract.Call(opts, &out, "minBonderFee") 313 314 if err != nil { 315 return *new(*big.Int), err 316 } 317 318 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 319 320 return out0, err 321 322 } 323 324 // MinBonderFee is a free data retrieval call binding the contract method 0x50fc2401. 325 // 326 // Solidity: function minBonderFee() view returns(uint256) 327 func (_HopL1CctpImplementation *HopL1CctpImplementationSession) MinBonderFee() (*big.Int, error) { 328 return _HopL1CctpImplementation.Contract.MinBonderFee(&_HopL1CctpImplementation.CallOpts) 329 } 330 331 // MinBonderFee is a free data retrieval call binding the contract method 0x50fc2401. 332 // 333 // Solidity: function minBonderFee() view returns(uint256) 334 func (_HopL1CctpImplementation *HopL1CctpImplementationCallerSession) MinBonderFee() (*big.Int, error) { 335 return _HopL1CctpImplementation.Contract.MinBonderFee(&_HopL1CctpImplementation.CallOpts) 336 } 337 338 // NativeToken is a free data retrieval call binding the contract method 0xe1758bd8. 339 // 340 // Solidity: function nativeToken() view returns(address) 341 func (_HopL1CctpImplementation *HopL1CctpImplementationCaller) NativeToken(opts *bind.CallOpts) (common.Address, error) { 342 var out []interface{} 343 err := _HopL1CctpImplementation.contract.Call(opts, &out, "nativeToken") 344 345 if err != nil { 346 return *new(common.Address), err 347 } 348 349 out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) 350 351 return out0, err 352 353 } 354 355 // NativeToken is a free data retrieval call binding the contract method 0xe1758bd8. 356 // 357 // Solidity: function nativeToken() view returns(address) 358 func (_HopL1CctpImplementation *HopL1CctpImplementationSession) NativeToken() (common.Address, error) { 359 return _HopL1CctpImplementation.Contract.NativeToken(&_HopL1CctpImplementation.CallOpts) 360 } 361 362 // NativeToken is a free data retrieval call binding the contract method 0xe1758bd8. 363 // 364 // Solidity: function nativeToken() view returns(address) 365 func (_HopL1CctpImplementation *HopL1CctpImplementationCallerSession) NativeToken() (common.Address, error) { 366 return _HopL1CctpImplementation.Contract.NativeToken(&_HopL1CctpImplementation.CallOpts) 367 } 368 369 // Send is a paid mutator transaction binding the contract method 0xa134ce5b. 370 // 371 // Solidity: function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee) returns() 372 func (_HopL1CctpImplementation *HopL1CctpImplementationTransactor) Send(opts *bind.TransactOpts, chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int) (*types.Transaction, error) { 373 return _HopL1CctpImplementation.contract.Transact(opts, "send", chainId, recipient, amount, bonderFee) 374 } 375 376 // Send is a paid mutator transaction binding the contract method 0xa134ce5b. 377 // 378 // Solidity: function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee) returns() 379 func (_HopL1CctpImplementation *HopL1CctpImplementationSession) Send(chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int) (*types.Transaction, error) { 380 return _HopL1CctpImplementation.Contract.Send(&_HopL1CctpImplementation.TransactOpts, chainId, recipient, amount, bonderFee) 381 } 382 383 // Send is a paid mutator transaction binding the contract method 0xa134ce5b. 384 // 385 // Solidity: function send(uint256 chainId, address recipient, uint256 amount, uint256 bonderFee) returns() 386 func (_HopL1CctpImplementation *HopL1CctpImplementationTransactorSession) Send(chainId *big.Int, recipient common.Address, amount *big.Int, bonderFee *big.Int) (*types.Transaction, error) { 387 return _HopL1CctpImplementation.Contract.Send(&_HopL1CctpImplementation.TransactOpts, chainId, recipient, amount, bonderFee) 388 } 389 390 // HopL1CctpImplementationCCTPTransferSentIterator is returned from FilterCCTPTransferSent and is used to iterate over the raw logs and unpacked data for CCTPTransferSent events raised by the HopL1CctpImplementation contract. 391 type HopL1CctpImplementationCCTPTransferSentIterator struct { 392 Event *HopL1CctpImplementationCCTPTransferSent // Event containing the contract specifics and raw log 393 394 contract *bind.BoundContract // Generic contract to use for unpacking event data 395 event string // Event name to use for unpacking event data 396 397 logs chan types.Log // Log channel receiving the found contract events 398 sub ethereum.Subscription // Subscription for errors, completion and termination 399 done bool // Whether the subscription completed delivering logs 400 fail error // Occurred error to stop iteration 401 } 402 403 // Next advances the iterator to the subsequent event, returning whether there 404 // are any more events found. In case of a retrieval or parsing error, false is 405 // returned and Error() can be queried for the exact failure. 406 func (it *HopL1CctpImplementationCCTPTransferSentIterator) Next() bool { 407 // If the iterator failed, stop iterating 408 if it.fail != nil { 409 return false 410 } 411 // If the iterator completed, deliver directly whatever's available 412 if it.done { 413 select { 414 case log := <-it.logs: 415 it.Event = new(HopL1CctpImplementationCCTPTransferSent) 416 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 417 it.fail = err 418 return false 419 } 420 it.Event.Raw = log 421 return true 422 423 default: 424 return false 425 } 426 } 427 // Iterator still in progress, wait for either a data or an error event 428 select { 429 case log := <-it.logs: 430 it.Event = new(HopL1CctpImplementationCCTPTransferSent) 431 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 432 it.fail = err 433 return false 434 } 435 it.Event.Raw = log 436 return true 437 438 case err := <-it.sub.Err(): 439 it.done = true 440 it.fail = err 441 return it.Next() 442 } 443 } 444 445 // Error returns any retrieval or parsing error occurred during filtering. 446 func (it *HopL1CctpImplementationCCTPTransferSentIterator) Error() error { 447 return it.fail 448 } 449 450 // Close terminates the iteration process, releasing any pending underlying 451 // resources. 452 func (it *HopL1CctpImplementationCCTPTransferSentIterator) Close() error { 453 it.sub.Unsubscribe() 454 return nil 455 } 456 457 // HopL1CctpImplementationCCTPTransferSent represents a CCTPTransferSent event raised by the HopL1CctpImplementation contract. 458 type HopL1CctpImplementationCCTPTransferSent struct { 459 CctpNonce uint64 460 ChainId *big.Int 461 Recipient common.Address 462 Amount *big.Int 463 BonderFee *big.Int 464 Raw types.Log // Blockchain specific contextual infos 465 } 466 467 // FilterCCTPTransferSent is a free log retrieval operation binding the contract event 0x10bf4019e09db5876a05d237bfcc676cd84eee2c23f820284906dd7cfa70d2c4. 468 // 469 // Solidity: event CCTPTransferSent(uint64 indexed cctpNonce, uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 bonderFee) 470 func (_HopL1CctpImplementation *HopL1CctpImplementationFilterer) FilterCCTPTransferSent(opts *bind.FilterOpts, cctpNonce []uint64, chainId []*big.Int, recipient []common.Address) (*HopL1CctpImplementationCCTPTransferSentIterator, error) { 471 472 var cctpNonceRule []interface{} 473 for _, cctpNonceItem := range cctpNonce { 474 cctpNonceRule = append(cctpNonceRule, cctpNonceItem) 475 } 476 var chainIdRule []interface{} 477 for _, chainIdItem := range chainId { 478 chainIdRule = append(chainIdRule, chainIdItem) 479 } 480 var recipientRule []interface{} 481 for _, recipientItem := range recipient { 482 recipientRule = append(recipientRule, recipientItem) 483 } 484 485 logs, sub, err := _HopL1CctpImplementation.contract.FilterLogs(opts, "CCTPTransferSent", cctpNonceRule, chainIdRule, recipientRule) 486 if err != nil { 487 return nil, err 488 } 489 return &HopL1CctpImplementationCCTPTransferSentIterator{contract: _HopL1CctpImplementation.contract, event: "CCTPTransferSent", logs: logs, sub: sub}, nil 490 } 491 492 // WatchCCTPTransferSent is a free log subscription operation binding the contract event 0x10bf4019e09db5876a05d237bfcc676cd84eee2c23f820284906dd7cfa70d2c4. 493 // 494 // Solidity: event CCTPTransferSent(uint64 indexed cctpNonce, uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 bonderFee) 495 func (_HopL1CctpImplementation *HopL1CctpImplementationFilterer) WatchCCTPTransferSent(opts *bind.WatchOpts, sink chan<- *HopL1CctpImplementationCCTPTransferSent, cctpNonce []uint64, chainId []*big.Int, recipient []common.Address) (event.Subscription, error) { 496 497 var cctpNonceRule []interface{} 498 for _, cctpNonceItem := range cctpNonce { 499 cctpNonceRule = append(cctpNonceRule, cctpNonceItem) 500 } 501 var chainIdRule []interface{} 502 for _, chainIdItem := range chainId { 503 chainIdRule = append(chainIdRule, chainIdItem) 504 } 505 var recipientRule []interface{} 506 for _, recipientItem := range recipient { 507 recipientRule = append(recipientRule, recipientItem) 508 } 509 510 logs, sub, err := _HopL1CctpImplementation.contract.WatchLogs(opts, "CCTPTransferSent", cctpNonceRule, chainIdRule, recipientRule) 511 if err != nil { 512 return nil, err 513 } 514 return event.NewSubscription(func(quit <-chan struct{}) error { 515 defer sub.Unsubscribe() 516 for { 517 select { 518 case log := <-logs: 519 // New log arrived, parse the event and forward to the user 520 event := new(HopL1CctpImplementationCCTPTransferSent) 521 if err := _HopL1CctpImplementation.contract.UnpackLog(event, "CCTPTransferSent", log); err != nil { 522 return err 523 } 524 event.Raw = log 525 526 select { 527 case sink <- event: 528 case err := <-sub.Err(): 529 return err 530 case <-quit: 531 return nil 532 } 533 case err := <-sub.Err(): 534 return err 535 case <-quit: 536 return nil 537 } 538 } 539 }), nil 540 } 541 542 // ParseCCTPTransferSent is a log parse operation binding the contract event 0x10bf4019e09db5876a05d237bfcc676cd84eee2c23f820284906dd7cfa70d2c4. 543 // 544 // Solidity: event CCTPTransferSent(uint64 indexed cctpNonce, uint256 indexed chainId, address indexed recipient, uint256 amount, uint256 bonderFee) 545 func (_HopL1CctpImplementation *HopL1CctpImplementationFilterer) ParseCCTPTransferSent(log types.Log) (*HopL1CctpImplementationCCTPTransferSent, error) { 546 event := new(HopL1CctpImplementationCCTPTransferSent) 547 if err := _HopL1CctpImplementation.contract.UnpackLog(event, "CCTPTransferSent", log); err != nil { 548 return nil, err 549 } 550 event.Raw = log 551 return event, nil 552 }