github.com/diadata-org/diadata@v1.4.593/pkg/dia/scraper/exchange-scrapers/maverick/position/position.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 position 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 // PositionMetaData contains all meta data concerning the Position contract. 33 var PositionMetaData = &bind.MetaData{ 34 ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contractIPositionMetadata\",\"name\":\"metadata\",\"type\":\"address\"}],\"name\":\"SetMetadata\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndexExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", 35 } 36 37 // PositionABI is the input ABI used to generate the binding from. 38 // Deprecated: Use PositionMetaData.ABI instead. 39 var PositionABI = PositionMetaData.ABI 40 41 // Position is an auto generated Go binding around an Ethereum contract. 42 type Position struct { 43 PositionCaller // Read-only binding to the contract 44 PositionTransactor // Write-only binding to the contract 45 PositionFilterer // Log filterer for contract events 46 } 47 48 // PositionCaller is an auto generated read-only Go binding around an Ethereum contract. 49 type PositionCaller struct { 50 contract *bind.BoundContract // Generic contract wrapper for the low level calls 51 } 52 53 // PositionTransactor is an auto generated write-only Go binding around an Ethereum contract. 54 type PositionTransactor struct { 55 contract *bind.BoundContract // Generic contract wrapper for the low level calls 56 } 57 58 // PositionFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 59 type PositionFilterer struct { 60 contract *bind.BoundContract // Generic contract wrapper for the low level calls 61 } 62 63 // PositionSession is an auto generated Go binding around an Ethereum contract, 64 // with pre-set call and transact options. 65 type PositionSession struct { 66 Contract *Position // 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 // PositionCallerSession is an auto generated read-only Go binding around an Ethereum contract, 72 // with pre-set call options. 73 type PositionCallerSession struct { 74 Contract *PositionCaller // Generic contract caller binding to set the session for 75 CallOpts bind.CallOpts // Call options to use throughout this session 76 } 77 78 // PositionTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 79 // with pre-set transact options. 80 type PositionTransactorSession struct { 81 Contract *PositionTransactor // Generic contract transactor binding to set the session for 82 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 83 } 84 85 // PositionRaw is an auto generated low-level Go binding around an Ethereum contract. 86 type PositionRaw struct { 87 Contract *Position // Generic contract binding to access the raw methods on 88 } 89 90 // PositionCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 91 type PositionCallerRaw struct { 92 Contract *PositionCaller // Generic read-only contract binding to access the raw methods on 93 } 94 95 // PositionTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 96 type PositionTransactorRaw struct { 97 Contract *PositionTransactor // Generic write-only contract binding to access the raw methods on 98 } 99 100 // NewPosition creates a new instance of Position, bound to a specific deployed contract. 101 func NewPosition(address common.Address, backend bind.ContractBackend) (*Position, error) { 102 contract, err := bindPosition(address, backend, backend, backend) 103 if err != nil { 104 return nil, err 105 } 106 return &Position{PositionCaller: PositionCaller{contract: contract}, PositionTransactor: PositionTransactor{contract: contract}, PositionFilterer: PositionFilterer{contract: contract}}, nil 107 } 108 109 // NewPositionCaller creates a new read-only instance of Position, bound to a specific deployed contract. 110 func NewPositionCaller(address common.Address, caller bind.ContractCaller) (*PositionCaller, error) { 111 contract, err := bindPosition(address, caller, nil, nil) 112 if err != nil { 113 return nil, err 114 } 115 return &PositionCaller{contract: contract}, nil 116 } 117 118 // NewPositionTransactor creates a new write-only instance of Position, bound to a specific deployed contract. 119 func NewPositionTransactor(address common.Address, transactor bind.ContractTransactor) (*PositionTransactor, error) { 120 contract, err := bindPosition(address, nil, transactor, nil) 121 if err != nil { 122 return nil, err 123 } 124 return &PositionTransactor{contract: contract}, nil 125 } 126 127 // NewPositionFilterer creates a new log filterer instance of Position, bound to a specific deployed contract. 128 func NewPositionFilterer(address common.Address, filterer bind.ContractFilterer) (*PositionFilterer, error) { 129 contract, err := bindPosition(address, nil, nil, filterer) 130 if err != nil { 131 return nil, err 132 } 133 return &PositionFilterer{contract: contract}, nil 134 } 135 136 // bindPosition binds a generic wrapper to an already deployed contract. 137 func bindPosition(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 138 parsed, err := PositionMetaData.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 (_Position *PositionRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 150 return _Position.Contract.PositionCaller.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 (_Position *PositionRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 156 return _Position.Contract.PositionTransactor.contract.Transfer(opts) 157 } 158 159 // Transact invokes the (paid) contract method with params as input values. 160 func (_Position *PositionRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 161 return _Position.Contract.PositionTransactor.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 (_Position *PositionCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 169 return _Position.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 (_Position *PositionTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 175 return _Position.Contract.contract.Transfer(opts) 176 } 177 178 // Transact invokes the (paid) contract method with params as input values. 179 func (_Position *PositionTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 180 return _Position.Contract.contract.Transact(opts, method, params...) 181 } 182 183 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 184 // 185 // Solidity: function balanceOf(address owner) view returns(uint256 balance) 186 func (_Position *PositionCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { 187 var out []interface{} 188 err := _Position.contract.Call(opts, &out, "balanceOf", owner) 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 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 201 // 202 // Solidity: function balanceOf(address owner) view returns(uint256 balance) 203 func (_Position *PositionSession) BalanceOf(owner common.Address) (*big.Int, error) { 204 return _Position.Contract.BalanceOf(&_Position.CallOpts, owner) 205 } 206 207 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 208 // 209 // Solidity: function balanceOf(address owner) view returns(uint256 balance) 210 func (_Position *PositionCallerSession) BalanceOf(owner common.Address) (*big.Int, error) { 211 return _Position.Contract.BalanceOf(&_Position.CallOpts, owner) 212 } 213 214 // GetApproved is a free data retrieval call binding the contract method 0x081812fc. 215 // 216 // Solidity: function getApproved(uint256 tokenId) view returns(address operator) 217 func (_Position *PositionCaller) GetApproved(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { 218 var out []interface{} 219 err := _Position.contract.Call(opts, &out, "getApproved", tokenId) 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 // GetApproved is a free data retrieval call binding the contract method 0x081812fc. 232 // 233 // Solidity: function getApproved(uint256 tokenId) view returns(address operator) 234 func (_Position *PositionSession) GetApproved(tokenId *big.Int) (common.Address, error) { 235 return _Position.Contract.GetApproved(&_Position.CallOpts, tokenId) 236 } 237 238 // GetApproved is a free data retrieval call binding the contract method 0x081812fc. 239 // 240 // Solidity: function getApproved(uint256 tokenId) view returns(address operator) 241 func (_Position *PositionCallerSession) GetApproved(tokenId *big.Int) (common.Address, error) { 242 return _Position.Contract.GetApproved(&_Position.CallOpts, tokenId) 243 } 244 245 // IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. 246 // 247 // Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) 248 func (_Position *PositionCaller) IsApprovedForAll(opts *bind.CallOpts, owner common.Address, operator common.Address) (bool, error) { 249 var out []interface{} 250 err := _Position.contract.Call(opts, &out, "isApprovedForAll", owner, operator) 251 252 if err != nil { 253 return *new(bool), err 254 } 255 256 out0 := *abi.ConvertType(out[0], new(bool)).(*bool) 257 258 return out0, err 259 260 } 261 262 // IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. 263 // 264 // Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) 265 func (_Position *PositionSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { 266 return _Position.Contract.IsApprovedForAll(&_Position.CallOpts, owner, operator) 267 } 268 269 // IsApprovedForAll is a free data retrieval call binding the contract method 0xe985e9c5. 270 // 271 // Solidity: function isApprovedForAll(address owner, address operator) view returns(bool) 272 func (_Position *PositionCallerSession) IsApprovedForAll(owner common.Address, operator common.Address) (bool, error) { 273 return _Position.Contract.IsApprovedForAll(&_Position.CallOpts, owner, operator) 274 } 275 276 // OwnerOf is a free data retrieval call binding the contract method 0x6352211e. 277 // 278 // Solidity: function ownerOf(uint256 tokenId) view returns(address owner) 279 func (_Position *PositionCaller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { 280 var out []interface{} 281 err := _Position.contract.Call(opts, &out, "ownerOf", tokenId) 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 // OwnerOf is a free data retrieval call binding the contract method 0x6352211e. 294 // 295 // Solidity: function ownerOf(uint256 tokenId) view returns(address owner) 296 func (_Position *PositionSession) OwnerOf(tokenId *big.Int) (common.Address, error) { 297 return _Position.Contract.OwnerOf(&_Position.CallOpts, tokenId) 298 } 299 300 // OwnerOf is a free data retrieval call binding the contract method 0x6352211e. 301 // 302 // Solidity: function ownerOf(uint256 tokenId) view returns(address owner) 303 func (_Position *PositionCallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) { 304 return _Position.Contract.OwnerOf(&_Position.CallOpts, tokenId) 305 } 306 307 // SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. 308 // 309 // Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) 310 func (_Position *PositionCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { 311 var out []interface{} 312 err := _Position.contract.Call(opts, &out, "supportsInterface", interfaceId) 313 314 if err != nil { 315 return *new(bool), err 316 } 317 318 out0 := *abi.ConvertType(out[0], new(bool)).(*bool) 319 320 return out0, err 321 322 } 323 324 // SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. 325 // 326 // Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) 327 func (_Position *PositionSession) SupportsInterface(interfaceId [4]byte) (bool, error) { 328 return _Position.Contract.SupportsInterface(&_Position.CallOpts, interfaceId) 329 } 330 331 // SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. 332 // 333 // Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) 334 func (_Position *PositionCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { 335 return _Position.Contract.SupportsInterface(&_Position.CallOpts, interfaceId) 336 } 337 338 // TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7. 339 // 340 // Solidity: function tokenByIndex(uint256 index) view returns(uint256) 341 func (_Position *PositionCaller) TokenByIndex(opts *bind.CallOpts, index *big.Int) (*big.Int, error) { 342 var out []interface{} 343 err := _Position.contract.Call(opts, &out, "tokenByIndex", index) 344 345 if err != nil { 346 return *new(*big.Int), err 347 } 348 349 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 350 351 return out0, err 352 353 } 354 355 // TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7. 356 // 357 // Solidity: function tokenByIndex(uint256 index) view returns(uint256) 358 func (_Position *PositionSession) TokenByIndex(index *big.Int) (*big.Int, error) { 359 return _Position.Contract.TokenByIndex(&_Position.CallOpts, index) 360 } 361 362 // TokenByIndex is a free data retrieval call binding the contract method 0x4f6ccce7. 363 // 364 // Solidity: function tokenByIndex(uint256 index) view returns(uint256) 365 func (_Position *PositionCallerSession) TokenByIndex(index *big.Int) (*big.Int, error) { 366 return _Position.Contract.TokenByIndex(&_Position.CallOpts, index) 367 } 368 369 // TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59. 370 // 371 // Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256) 372 func (_Position *PositionCaller) TokenOfOwnerByIndex(opts *bind.CallOpts, owner common.Address, index *big.Int) (*big.Int, error) { 373 var out []interface{} 374 err := _Position.contract.Call(opts, &out, "tokenOfOwnerByIndex", owner, index) 375 376 if err != nil { 377 return *new(*big.Int), err 378 } 379 380 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 381 382 return out0, err 383 384 } 385 386 // TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59. 387 // 388 // Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256) 389 func (_Position *PositionSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) { 390 return _Position.Contract.TokenOfOwnerByIndex(&_Position.CallOpts, owner, index) 391 } 392 393 // TokenOfOwnerByIndex is a free data retrieval call binding the contract method 0x2f745c59. 394 // 395 // Solidity: function tokenOfOwnerByIndex(address owner, uint256 index) view returns(uint256) 396 func (_Position *PositionCallerSession) TokenOfOwnerByIndex(owner common.Address, index *big.Int) (*big.Int, error) { 397 return _Position.Contract.TokenOfOwnerByIndex(&_Position.CallOpts, owner, index) 398 } 399 400 // TokenOfOwnerByIndexExists is a free data retrieval call binding the contract method 0x48fd65fe. 401 // 402 // Solidity: function tokenOfOwnerByIndexExists(address owner, uint256 index) view returns(bool) 403 func (_Position *PositionCaller) TokenOfOwnerByIndexExists(opts *bind.CallOpts, owner common.Address, index *big.Int) (bool, error) { 404 var out []interface{} 405 err := _Position.contract.Call(opts, &out, "tokenOfOwnerByIndexExists", owner, index) 406 407 if err != nil { 408 return *new(bool), err 409 } 410 411 out0 := *abi.ConvertType(out[0], new(bool)).(*bool) 412 413 return out0, err 414 415 } 416 417 // TokenOfOwnerByIndexExists is a free data retrieval call binding the contract method 0x48fd65fe. 418 // 419 // Solidity: function tokenOfOwnerByIndexExists(address owner, uint256 index) view returns(bool) 420 func (_Position *PositionSession) TokenOfOwnerByIndexExists(owner common.Address, index *big.Int) (bool, error) { 421 return _Position.Contract.TokenOfOwnerByIndexExists(&_Position.CallOpts, owner, index) 422 } 423 424 // TokenOfOwnerByIndexExists is a free data retrieval call binding the contract method 0x48fd65fe. 425 // 426 // Solidity: function tokenOfOwnerByIndexExists(address owner, uint256 index) view returns(bool) 427 func (_Position *PositionCallerSession) TokenOfOwnerByIndexExists(owner common.Address, index *big.Int) (bool, error) { 428 return _Position.Contract.TokenOfOwnerByIndexExists(&_Position.CallOpts, owner, index) 429 } 430 431 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 432 // 433 // Solidity: function totalSupply() view returns(uint256) 434 func (_Position *PositionCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { 435 var out []interface{} 436 err := _Position.contract.Call(opts, &out, "totalSupply") 437 438 if err != nil { 439 return *new(*big.Int), err 440 } 441 442 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 443 444 return out0, err 445 446 } 447 448 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 449 // 450 // Solidity: function totalSupply() view returns(uint256) 451 func (_Position *PositionSession) TotalSupply() (*big.Int, error) { 452 return _Position.Contract.TotalSupply(&_Position.CallOpts) 453 } 454 455 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 456 // 457 // Solidity: function totalSupply() view returns(uint256) 458 func (_Position *PositionCallerSession) TotalSupply() (*big.Int, error) { 459 return _Position.Contract.TotalSupply(&_Position.CallOpts) 460 } 461 462 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 463 // 464 // Solidity: function approve(address to, uint256 tokenId) returns() 465 func (_Position *PositionTransactor) Approve(opts *bind.TransactOpts, to common.Address, tokenId *big.Int) (*types.Transaction, error) { 466 return _Position.contract.Transact(opts, "approve", to, tokenId) 467 } 468 469 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 470 // 471 // Solidity: function approve(address to, uint256 tokenId) returns() 472 func (_Position *PositionSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { 473 return _Position.Contract.Approve(&_Position.TransactOpts, to, tokenId) 474 } 475 476 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 477 // 478 // Solidity: function approve(address to, uint256 tokenId) returns() 479 func (_Position *PositionTransactorSession) Approve(to common.Address, tokenId *big.Int) (*types.Transaction, error) { 480 return _Position.Contract.Approve(&_Position.TransactOpts, to, tokenId) 481 } 482 483 // Mint is a paid mutator transaction binding the contract method 0x6a627842. 484 // 485 // Solidity: function mint(address to) returns(uint256 tokenId) 486 func (_Position *PositionTransactor) Mint(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { 487 return _Position.contract.Transact(opts, "mint", to) 488 } 489 490 // Mint is a paid mutator transaction binding the contract method 0x6a627842. 491 // 492 // Solidity: function mint(address to) returns(uint256 tokenId) 493 func (_Position *PositionSession) Mint(to common.Address) (*types.Transaction, error) { 494 return _Position.Contract.Mint(&_Position.TransactOpts, to) 495 } 496 497 // Mint is a paid mutator transaction binding the contract method 0x6a627842. 498 // 499 // Solidity: function mint(address to) returns(uint256 tokenId) 500 func (_Position *PositionTransactorSession) Mint(to common.Address) (*types.Transaction, error) { 501 return _Position.Contract.Mint(&_Position.TransactOpts, to) 502 } 503 504 // SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. 505 // 506 // Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() 507 func (_Position *PositionTransactor) SafeTransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { 508 return _Position.contract.Transact(opts, "safeTransferFrom", from, to, tokenId) 509 } 510 511 // SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. 512 // 513 // Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() 514 func (_Position *PositionSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { 515 return _Position.Contract.SafeTransferFrom(&_Position.TransactOpts, from, to, tokenId) 516 } 517 518 // SafeTransferFrom is a paid mutator transaction binding the contract method 0x42842e0e. 519 // 520 // Solidity: function safeTransferFrom(address from, address to, uint256 tokenId) returns() 521 func (_Position *PositionTransactorSession) SafeTransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { 522 return _Position.Contract.SafeTransferFrom(&_Position.TransactOpts, from, to, tokenId) 523 } 524 525 // SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. 526 // 527 // Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() 528 func (_Position *PositionTransactor) SafeTransferFrom0(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { 529 return _Position.contract.Transact(opts, "safeTransferFrom0", from, to, tokenId, data) 530 } 531 532 // SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. 533 // 534 // Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() 535 func (_Position *PositionSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { 536 return _Position.Contract.SafeTransferFrom0(&_Position.TransactOpts, from, to, tokenId, data) 537 } 538 539 // SafeTransferFrom0 is a paid mutator transaction binding the contract method 0xb88d4fde. 540 // 541 // Solidity: function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns() 542 func (_Position *PositionTransactorSession) SafeTransferFrom0(from common.Address, to common.Address, tokenId *big.Int, data []byte) (*types.Transaction, error) { 543 return _Position.Contract.SafeTransferFrom0(&_Position.TransactOpts, from, to, tokenId, data) 544 } 545 546 // SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. 547 // 548 // Solidity: function setApprovalForAll(address operator, bool _approved) returns() 549 func (_Position *PositionTransactor) SetApprovalForAll(opts *bind.TransactOpts, operator common.Address, _approved bool) (*types.Transaction, error) { 550 return _Position.contract.Transact(opts, "setApprovalForAll", operator, _approved) 551 } 552 553 // SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. 554 // 555 // Solidity: function setApprovalForAll(address operator, bool _approved) returns() 556 func (_Position *PositionSession) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) { 557 return _Position.Contract.SetApprovalForAll(&_Position.TransactOpts, operator, _approved) 558 } 559 560 // SetApprovalForAll is a paid mutator transaction binding the contract method 0xa22cb465. 561 // 562 // Solidity: function setApprovalForAll(address operator, bool _approved) returns() 563 func (_Position *PositionTransactorSession) SetApprovalForAll(operator common.Address, _approved bool) (*types.Transaction, error) { 564 return _Position.Contract.SetApprovalForAll(&_Position.TransactOpts, operator, _approved) 565 } 566 567 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 568 // 569 // Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() 570 func (_Position *PositionTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { 571 return _Position.contract.Transact(opts, "transferFrom", from, to, tokenId) 572 } 573 574 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 575 // 576 // Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() 577 func (_Position *PositionSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { 578 return _Position.Contract.TransferFrom(&_Position.TransactOpts, from, to, tokenId) 579 } 580 581 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 582 // 583 // Solidity: function transferFrom(address from, address to, uint256 tokenId) returns() 584 func (_Position *PositionTransactorSession) TransferFrom(from common.Address, to common.Address, tokenId *big.Int) (*types.Transaction, error) { 585 return _Position.Contract.TransferFrom(&_Position.TransactOpts, from, to, tokenId) 586 } 587 588 // PositionApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the Position contract. 589 type PositionApprovalIterator struct { 590 Event *PositionApproval // Event containing the contract specifics and raw log 591 592 contract *bind.BoundContract // Generic contract to use for unpacking event data 593 event string // Event name to use for unpacking event data 594 595 logs chan types.Log // Log channel receiving the found contract events 596 sub ethereum.Subscription // Subscription for errors, completion and termination 597 done bool // Whether the subscription completed delivering logs 598 fail error // Occurred error to stop iteration 599 } 600 601 // Next advances the iterator to the subsequent event, returning whether there 602 // are any more events found. In case of a retrieval or parsing error, false is 603 // returned and Error() can be queried for the exact failure. 604 func (it *PositionApprovalIterator) Next() bool { 605 // If the iterator failed, stop iterating 606 if it.fail != nil { 607 return false 608 } 609 // If the iterator completed, deliver directly whatever's available 610 if it.done { 611 select { 612 case log := <-it.logs: 613 it.Event = new(PositionApproval) 614 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 615 it.fail = err 616 return false 617 } 618 it.Event.Raw = log 619 return true 620 621 default: 622 return false 623 } 624 } 625 // Iterator still in progress, wait for either a data or an error event 626 select { 627 case log := <-it.logs: 628 it.Event = new(PositionApproval) 629 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 630 it.fail = err 631 return false 632 } 633 it.Event.Raw = log 634 return true 635 636 case err := <-it.sub.Err(): 637 it.done = true 638 it.fail = err 639 return it.Next() 640 } 641 } 642 643 // Error returns any retrieval or parsing error occurred during filtering. 644 func (it *PositionApprovalIterator) Error() error { 645 return it.fail 646 } 647 648 // Close terminates the iteration process, releasing any pending underlying 649 // resources. 650 func (it *PositionApprovalIterator) Close() error { 651 it.sub.Unsubscribe() 652 return nil 653 } 654 655 // PositionApproval represents a Approval event raised by the Position contract. 656 type PositionApproval struct { 657 Owner common.Address 658 Approved common.Address 659 TokenId *big.Int 660 Raw types.Log // Blockchain specific contextual infos 661 } 662 663 // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 664 // 665 // Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) 666 func (_Position *PositionFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, approved []common.Address, tokenId []*big.Int) (*PositionApprovalIterator, error) { 667 668 var ownerRule []interface{} 669 for _, ownerItem := range owner { 670 ownerRule = append(ownerRule, ownerItem) 671 } 672 var approvedRule []interface{} 673 for _, approvedItem := range approved { 674 approvedRule = append(approvedRule, approvedItem) 675 } 676 var tokenIdRule []interface{} 677 for _, tokenIdItem := range tokenId { 678 tokenIdRule = append(tokenIdRule, tokenIdItem) 679 } 680 681 logs, sub, err := _Position.contract.FilterLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) 682 if err != nil { 683 return nil, err 684 } 685 return &PositionApprovalIterator{contract: _Position.contract, event: "Approval", logs: logs, sub: sub}, nil 686 } 687 688 // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 689 // 690 // Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) 691 func (_Position *PositionFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *PositionApproval, owner []common.Address, approved []common.Address, tokenId []*big.Int) (event.Subscription, error) { 692 693 var ownerRule []interface{} 694 for _, ownerItem := range owner { 695 ownerRule = append(ownerRule, ownerItem) 696 } 697 var approvedRule []interface{} 698 for _, approvedItem := range approved { 699 approvedRule = append(approvedRule, approvedItem) 700 } 701 var tokenIdRule []interface{} 702 for _, tokenIdItem := range tokenId { 703 tokenIdRule = append(tokenIdRule, tokenIdItem) 704 } 705 706 logs, sub, err := _Position.contract.WatchLogs(opts, "Approval", ownerRule, approvedRule, tokenIdRule) 707 if err != nil { 708 return nil, err 709 } 710 return event.NewSubscription(func(quit <-chan struct{}) error { 711 defer sub.Unsubscribe() 712 for { 713 select { 714 case log := <-logs: 715 // New log arrived, parse the event and forward to the user 716 event := new(PositionApproval) 717 if err := _Position.contract.UnpackLog(event, "Approval", log); err != nil { 718 return err 719 } 720 event.Raw = log 721 722 select { 723 case sink <- event: 724 case err := <-sub.Err(): 725 return err 726 case <-quit: 727 return nil 728 } 729 case err := <-sub.Err(): 730 return err 731 case <-quit: 732 return nil 733 } 734 } 735 }), nil 736 } 737 738 // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 739 // 740 // Solidity: event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId) 741 func (_Position *PositionFilterer) ParseApproval(log types.Log) (*PositionApproval, error) { 742 event := new(PositionApproval) 743 if err := _Position.contract.UnpackLog(event, "Approval", log); err != nil { 744 return nil, err 745 } 746 event.Raw = log 747 return event, nil 748 } 749 750 // PositionApprovalForAllIterator is returned from FilterApprovalForAll and is used to iterate over the raw logs and unpacked data for ApprovalForAll events raised by the Position contract. 751 type PositionApprovalForAllIterator struct { 752 Event *PositionApprovalForAll // Event containing the contract specifics and raw log 753 754 contract *bind.BoundContract // Generic contract to use for unpacking event data 755 event string // Event name to use for unpacking event data 756 757 logs chan types.Log // Log channel receiving the found contract events 758 sub ethereum.Subscription // Subscription for errors, completion and termination 759 done bool // Whether the subscription completed delivering logs 760 fail error // Occurred error to stop iteration 761 } 762 763 // Next advances the iterator to the subsequent event, returning whether there 764 // are any more events found. In case of a retrieval or parsing error, false is 765 // returned and Error() can be queried for the exact failure. 766 func (it *PositionApprovalForAllIterator) Next() bool { 767 // If the iterator failed, stop iterating 768 if it.fail != nil { 769 return false 770 } 771 // If the iterator completed, deliver directly whatever's available 772 if it.done { 773 select { 774 case log := <-it.logs: 775 it.Event = new(PositionApprovalForAll) 776 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 777 it.fail = err 778 return false 779 } 780 it.Event.Raw = log 781 return true 782 783 default: 784 return false 785 } 786 } 787 // Iterator still in progress, wait for either a data or an error event 788 select { 789 case log := <-it.logs: 790 it.Event = new(PositionApprovalForAll) 791 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 792 it.fail = err 793 return false 794 } 795 it.Event.Raw = log 796 return true 797 798 case err := <-it.sub.Err(): 799 it.done = true 800 it.fail = err 801 return it.Next() 802 } 803 } 804 805 // Error returns any retrieval or parsing error occurred during filtering. 806 func (it *PositionApprovalForAllIterator) Error() error { 807 return it.fail 808 } 809 810 // Close terminates the iteration process, releasing any pending underlying 811 // resources. 812 func (it *PositionApprovalForAllIterator) Close() error { 813 it.sub.Unsubscribe() 814 return nil 815 } 816 817 // PositionApprovalForAll represents a ApprovalForAll event raised by the Position contract. 818 type PositionApprovalForAll struct { 819 Owner common.Address 820 Operator common.Address 821 Approved bool 822 Raw types.Log // Blockchain specific contextual infos 823 } 824 825 // FilterApprovalForAll is a free log retrieval operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. 826 // 827 // Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) 828 func (_Position *PositionFilterer) FilterApprovalForAll(opts *bind.FilterOpts, owner []common.Address, operator []common.Address) (*PositionApprovalForAllIterator, error) { 829 830 var ownerRule []interface{} 831 for _, ownerItem := range owner { 832 ownerRule = append(ownerRule, ownerItem) 833 } 834 var operatorRule []interface{} 835 for _, operatorItem := range operator { 836 operatorRule = append(operatorRule, operatorItem) 837 } 838 839 logs, sub, err := _Position.contract.FilterLogs(opts, "ApprovalForAll", ownerRule, operatorRule) 840 if err != nil { 841 return nil, err 842 } 843 return &PositionApprovalForAllIterator{contract: _Position.contract, event: "ApprovalForAll", logs: logs, sub: sub}, nil 844 } 845 846 // WatchApprovalForAll is a free log subscription operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. 847 // 848 // Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) 849 func (_Position *PositionFilterer) WatchApprovalForAll(opts *bind.WatchOpts, sink chan<- *PositionApprovalForAll, owner []common.Address, operator []common.Address) (event.Subscription, error) { 850 851 var ownerRule []interface{} 852 for _, ownerItem := range owner { 853 ownerRule = append(ownerRule, ownerItem) 854 } 855 var operatorRule []interface{} 856 for _, operatorItem := range operator { 857 operatorRule = append(operatorRule, operatorItem) 858 } 859 860 logs, sub, err := _Position.contract.WatchLogs(opts, "ApprovalForAll", ownerRule, operatorRule) 861 if err != nil { 862 return nil, err 863 } 864 return event.NewSubscription(func(quit <-chan struct{}) error { 865 defer sub.Unsubscribe() 866 for { 867 select { 868 case log := <-logs: 869 // New log arrived, parse the event and forward to the user 870 event := new(PositionApprovalForAll) 871 if err := _Position.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { 872 return err 873 } 874 event.Raw = log 875 876 select { 877 case sink <- event: 878 case err := <-sub.Err(): 879 return err 880 case <-quit: 881 return nil 882 } 883 case err := <-sub.Err(): 884 return err 885 case <-quit: 886 return nil 887 } 888 } 889 }), nil 890 } 891 892 // ParseApprovalForAll is a log parse operation binding the contract event 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31. 893 // 894 // Solidity: event ApprovalForAll(address indexed owner, address indexed operator, bool approved) 895 func (_Position *PositionFilterer) ParseApprovalForAll(log types.Log) (*PositionApprovalForAll, error) { 896 event := new(PositionApprovalForAll) 897 if err := _Position.contract.UnpackLog(event, "ApprovalForAll", log); err != nil { 898 return nil, err 899 } 900 event.Raw = log 901 return event, nil 902 } 903 904 // PositionSetMetadataIterator is returned from FilterSetMetadata and is used to iterate over the raw logs and unpacked data for SetMetadata events raised by the Position contract. 905 type PositionSetMetadataIterator struct { 906 Event *PositionSetMetadata // Event containing the contract specifics and raw log 907 908 contract *bind.BoundContract // Generic contract to use for unpacking event data 909 event string // Event name to use for unpacking event data 910 911 logs chan types.Log // Log channel receiving the found contract events 912 sub ethereum.Subscription // Subscription for errors, completion and termination 913 done bool // Whether the subscription completed delivering logs 914 fail error // Occurred error to stop iteration 915 } 916 917 // Next advances the iterator to the subsequent event, returning whether there 918 // are any more events found. In case of a retrieval or parsing error, false is 919 // returned and Error() can be queried for the exact failure. 920 func (it *PositionSetMetadataIterator) Next() bool { 921 // If the iterator failed, stop iterating 922 if it.fail != nil { 923 return false 924 } 925 // If the iterator completed, deliver directly whatever's available 926 if it.done { 927 select { 928 case log := <-it.logs: 929 it.Event = new(PositionSetMetadata) 930 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 931 it.fail = err 932 return false 933 } 934 it.Event.Raw = log 935 return true 936 937 default: 938 return false 939 } 940 } 941 // Iterator still in progress, wait for either a data or an error event 942 select { 943 case log := <-it.logs: 944 it.Event = new(PositionSetMetadata) 945 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 946 it.fail = err 947 return false 948 } 949 it.Event.Raw = log 950 return true 951 952 case err := <-it.sub.Err(): 953 it.done = true 954 it.fail = err 955 return it.Next() 956 } 957 } 958 959 // Error returns any retrieval or parsing error occurred during filtering. 960 func (it *PositionSetMetadataIterator) Error() error { 961 return it.fail 962 } 963 964 // Close terminates the iteration process, releasing any pending underlying 965 // resources. 966 func (it *PositionSetMetadataIterator) Close() error { 967 it.sub.Unsubscribe() 968 return nil 969 } 970 971 // PositionSetMetadata represents a SetMetadata event raised by the Position contract. 972 type PositionSetMetadata struct { 973 Metadata common.Address 974 Raw types.Log // Blockchain specific contextual infos 975 } 976 977 // FilterSetMetadata is a free log retrieval operation binding the contract event 0x1e78374720f7ac1595d75f11f10ccc953103fcfd8adc75a397585edd2cf8e7cf. 978 // 979 // Solidity: event SetMetadata(address metadata) 980 func (_Position *PositionFilterer) FilterSetMetadata(opts *bind.FilterOpts) (*PositionSetMetadataIterator, error) { 981 982 logs, sub, err := _Position.contract.FilterLogs(opts, "SetMetadata") 983 if err != nil { 984 return nil, err 985 } 986 return &PositionSetMetadataIterator{contract: _Position.contract, event: "SetMetadata", logs: logs, sub: sub}, nil 987 } 988 989 // WatchSetMetadata is a free log subscription operation binding the contract event 0x1e78374720f7ac1595d75f11f10ccc953103fcfd8adc75a397585edd2cf8e7cf. 990 // 991 // Solidity: event SetMetadata(address metadata) 992 func (_Position *PositionFilterer) WatchSetMetadata(opts *bind.WatchOpts, sink chan<- *PositionSetMetadata) (event.Subscription, error) { 993 994 logs, sub, err := _Position.contract.WatchLogs(opts, "SetMetadata") 995 if err != nil { 996 return nil, err 997 } 998 return event.NewSubscription(func(quit <-chan struct{}) error { 999 defer sub.Unsubscribe() 1000 for { 1001 select { 1002 case log := <-logs: 1003 // New log arrived, parse the event and forward to the user 1004 event := new(PositionSetMetadata) 1005 if err := _Position.contract.UnpackLog(event, "SetMetadata", log); err != nil { 1006 return err 1007 } 1008 event.Raw = log 1009 1010 select { 1011 case sink <- event: 1012 case err := <-sub.Err(): 1013 return err 1014 case <-quit: 1015 return nil 1016 } 1017 case err := <-sub.Err(): 1018 return err 1019 case <-quit: 1020 return nil 1021 } 1022 } 1023 }), nil 1024 } 1025 1026 // ParseSetMetadata is a log parse operation binding the contract event 0x1e78374720f7ac1595d75f11f10ccc953103fcfd8adc75a397585edd2cf8e7cf. 1027 // 1028 // Solidity: event SetMetadata(address metadata) 1029 func (_Position *PositionFilterer) ParseSetMetadata(log types.Log) (*PositionSetMetadata, error) { 1030 event := new(PositionSetMetadata) 1031 if err := _Position.contract.UnpackLog(event, "SetMetadata", log); err != nil { 1032 return nil, err 1033 } 1034 event.Raw = log 1035 return event, nil 1036 } 1037 1038 // PositionTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the Position contract. 1039 type PositionTransferIterator struct { 1040 Event *PositionTransfer // Event containing the contract specifics and raw log 1041 1042 contract *bind.BoundContract // Generic contract to use for unpacking event data 1043 event string // Event name to use for unpacking event data 1044 1045 logs chan types.Log // Log channel receiving the found contract events 1046 sub ethereum.Subscription // Subscription for errors, completion and termination 1047 done bool // Whether the subscription completed delivering logs 1048 fail error // Occurred error to stop iteration 1049 } 1050 1051 // Next advances the iterator to the subsequent event, returning whether there 1052 // are any more events found. In case of a retrieval or parsing error, false is 1053 // returned and Error() can be queried for the exact failure. 1054 func (it *PositionTransferIterator) Next() bool { 1055 // If the iterator failed, stop iterating 1056 if it.fail != nil { 1057 return false 1058 } 1059 // If the iterator completed, deliver directly whatever's available 1060 if it.done { 1061 select { 1062 case log := <-it.logs: 1063 it.Event = new(PositionTransfer) 1064 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1065 it.fail = err 1066 return false 1067 } 1068 it.Event.Raw = log 1069 return true 1070 1071 default: 1072 return false 1073 } 1074 } 1075 // Iterator still in progress, wait for either a data or an error event 1076 select { 1077 case log := <-it.logs: 1078 it.Event = new(PositionTransfer) 1079 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1080 it.fail = err 1081 return false 1082 } 1083 it.Event.Raw = log 1084 return true 1085 1086 case err := <-it.sub.Err(): 1087 it.done = true 1088 it.fail = err 1089 return it.Next() 1090 } 1091 } 1092 1093 // Error returns any retrieval or parsing error occurred during filtering. 1094 func (it *PositionTransferIterator) Error() error { 1095 return it.fail 1096 } 1097 1098 // Close terminates the iteration process, releasing any pending underlying 1099 // resources. 1100 func (it *PositionTransferIterator) Close() error { 1101 it.sub.Unsubscribe() 1102 return nil 1103 } 1104 1105 // PositionTransfer represents a Transfer event raised by the Position contract. 1106 type PositionTransfer struct { 1107 From common.Address 1108 To common.Address 1109 TokenId *big.Int 1110 Raw types.Log // Blockchain specific contextual infos 1111 } 1112 1113 // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 1114 // 1115 // Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) 1116 func (_Position *PositionFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address, tokenId []*big.Int) (*PositionTransferIterator, error) { 1117 1118 var fromRule []interface{} 1119 for _, fromItem := range from { 1120 fromRule = append(fromRule, fromItem) 1121 } 1122 var toRule []interface{} 1123 for _, toItem := range to { 1124 toRule = append(toRule, toItem) 1125 } 1126 var tokenIdRule []interface{} 1127 for _, tokenIdItem := range tokenId { 1128 tokenIdRule = append(tokenIdRule, tokenIdItem) 1129 } 1130 1131 logs, sub, err := _Position.contract.FilterLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) 1132 if err != nil { 1133 return nil, err 1134 } 1135 return &PositionTransferIterator{contract: _Position.contract, event: "Transfer", logs: logs, sub: sub}, nil 1136 } 1137 1138 // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 1139 // 1140 // Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) 1141 func (_Position *PositionFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *PositionTransfer, from []common.Address, to []common.Address, tokenId []*big.Int) (event.Subscription, error) { 1142 1143 var fromRule []interface{} 1144 for _, fromItem := range from { 1145 fromRule = append(fromRule, fromItem) 1146 } 1147 var toRule []interface{} 1148 for _, toItem := range to { 1149 toRule = append(toRule, toItem) 1150 } 1151 var tokenIdRule []interface{} 1152 for _, tokenIdItem := range tokenId { 1153 tokenIdRule = append(tokenIdRule, tokenIdItem) 1154 } 1155 1156 logs, sub, err := _Position.contract.WatchLogs(opts, "Transfer", fromRule, toRule, tokenIdRule) 1157 if err != nil { 1158 return nil, err 1159 } 1160 return event.NewSubscription(func(quit <-chan struct{}) error { 1161 defer sub.Unsubscribe() 1162 for { 1163 select { 1164 case log := <-logs: 1165 // New log arrived, parse the event and forward to the user 1166 event := new(PositionTransfer) 1167 if err := _Position.contract.UnpackLog(event, "Transfer", log); err != nil { 1168 return err 1169 } 1170 event.Raw = log 1171 1172 select { 1173 case sink <- event: 1174 case err := <-sub.Err(): 1175 return err 1176 case <-quit: 1177 return nil 1178 } 1179 case err := <-sub.Err(): 1180 return err 1181 case <-quit: 1182 return nil 1183 } 1184 } 1185 }), nil 1186 } 1187 1188 // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 1189 // 1190 // Solidity: event Transfer(address indexed from, address indexed to, uint256 indexed tokenId) 1191 func (_Position *PositionFilterer) ParseTransfer(log types.Log) (*PositionTransfer, error) { 1192 event := new(PositionTransfer) 1193 if err := _Position.contract.UnpackLog(event, "Transfer", log); err != nil { 1194 return nil, err 1195 } 1196 event.Raw = log 1197 return event, nil 1198 }