You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1696 lines
88 KiB

  1. // Code generated - DO NOT EDIT.
  2. // This file is a generated binding and any manual changes will be lost.
  3. package ERC777
  4. import (
  5. "math/big"
  6. "strings"
  7. ethereum "github.com/ethereum/go-ethereum"
  8. "github.com/ethereum/go-ethereum/accounts/abi"
  9. "github.com/ethereum/go-ethereum/accounts/abi/bind"
  10. "github.com/ethereum/go-ethereum/common"
  11. "github.com/ethereum/go-ethereum/core/types"
  12. "github.com/ethereum/go-ethereum/event"
  13. )
  14. // Reference imports to suppress errors if they are not otherwise used.
  15. var (
  16. _ = big.NewInt
  17. _ = strings.NewReader
  18. _ = ethereum.NotFound
  19. _ = bind.Bind
  20. _ = common.Big1
  21. _ = types.BloomLookup
  22. _ = event.NewSubscription
  23. )
  24. // ERC777ABI is the input ABI used to generate the binding from.
  25. const ERC777ABI = "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"address[]\",\"name\":\"defaultOperators\",\"type\":\"address[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenHolder\",\"type\":\"address\"}],\"name\":\"AuthorizedOperator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"operatorData\",\"type\":\"bytes\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"operatorData\",\"type\":\"bytes\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenHolder\",\"type\":\"address\"}],\"name\":\"RevokedOperator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"operatorData\",\"type\":\"bytes\"}],\"name\":\"Sent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"authorizeOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenHolder\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defaultOperators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"granularity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenHolder\",\"type\":\"address\"}],\"name\":\"isOperatorFor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"operatorData\",\"type\":\"bytes\"}],\"name\":\"operatorBurn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"operatorData\",\"type\":\"bytes\"}],\"name\":\"operatorSend\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"revokeOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
  26. // ERC777Bin is the compiled bytecode used for deploying new contracts.
  27. var ERC777Bin = "0x60806040523480156200001157600080fd5b50604051620023b0380380620023b0833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084640100000000821115620001bc57600080fd5b908301906020820185811115620001d257600080fd5b8251866020820283011164010000000082111715620001f057600080fd5b82525081516020918201928201910280838360005b838110156200021f57818101518382015260200162000205565b5050505091909101604052505084516200024392506002915060208601906200040b565b508151620002599060039060208501906200040b565b5080516200026f90600490602084019062000490565b5060005b600454811015620002cf57600160056000600484815481106200029257fe5b6000918252602080832091909101546001600160a01b031683528201929092526040019020805460ff191691151591909117905560010162000273565b50604080516329965a1d60e01b815230600482018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce2177054602483015260448201529051731820a4b7618bde71dce8cdc73aab6c95905fad24916329965a1d91606480830192600092919082900301818387803b1580156200035057600080fd5b505af115801562000365573d6000803e3d6000fd5b5050604080516329965a1d60e01b815230600482018190527faea199e31a596269b42cdafd93407f14436db6e4cad65417994c2eb37381e05a602483015260448201529051731820a4b7618bde71dce8cdc73aab6c95905fad2493506329965a1d9250606480830192600092919082900301818387803b158015620003e957600080fd5b505af1158015620003fe573d6000803e3d6000fd5b505050505050506200052e565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200044e57805160ff19168380011785556200047e565b828001600101855582156200047e579182015b828111156200047e57825182559160200191906001019062000461565b506200048c929150620004f6565b5090565b828054828255906000526020600020908101928215620004e8579160200282015b82811115620004e857825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620004b1565b506200048c9291506200050d565b5b808211156200048c5760008155600101620004f7565b5b808211156200048c5780546001600160a01b03191681556001016200050e565b611e72806200053e6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063959b8c3f116100a2578063d95b637111610071578063d95b63711461052a578063dd62ed3e14610558578063fad8b32a14610586578063fc673c4f146105ac578063fe9d9303146106ea57610116565b8063959b8c3f1461041757806395d89b411461043d5780639bd9bbc614610445578063a9059cbb146104fe57610116565b806323b872dd116100e957806323b872dd1461024a578063313ce56714610280578063556f0dc71461029e57806362ad1b83146102a657806370a08231146103f157610116565b806306e485381461011b57806306fdde0314610173578063095ea7b3146101f057806318160ddd14610230575b600080fd5b610123610795565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561015f578181015183820152602001610147565b505050509050019250505060405180910390f35b61017b6107f7565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101b557818101518382015260200161019d565b50505050905090810190601f1680156101e25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61021c6004803603604081101561020657600080fd5b506001600160a01b038135169060200135610881565b604080519115158252519081900360200190f35b6102386108a3565b60408051918252519081900360200190f35b61021c6004803603606081101561026057600080fd5b506001600160a01b038135811691602081013590911690604001356108a9565b610288610a26565b6040805160ff9092168252519081900360200190f35b610238610a2b565b6103ef600480360360a08110156102bc57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b8111156102f657600080fd5b82018360208201111561030857600080fd5b803590602001918460018302840111600160201b8311171561032957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561037b57600080fd5b82018360208201111561038d57600080fd5b803590602001918460018302840111600160201b831117156103ae57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610a30945050505050565b005b6102386004803603602081101561040757600080fd5b50356001600160a01b0316610a92565b6103ef6004803603602081101561042d57600080fd5b50356001600160a01b0316610aad565b61017b610bf9565b6103ef6004803603606081101561045b57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561048a57600080fd5b82018360208201111561049c57600080fd5b803590602001918460018302840111600160201b831117156104bd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610c5a945050505050565b61021c6004803603604081101561051457600080fd5b506001600160a01b038135169060200135610c84565b61021c6004803603604081101561054057600080fd5b506001600160a01b0381358116916020013516610d5d565b6102386004803603604081101561056e57600080fd5b506001600160a01b0381358116916020013516610dff565b6103ef6004803603602081101561059c57600080fd5b50356001600160a01b0316610e2a565b6103ef600480360360808110156105c257600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156105f157600080fd5b82018360208201111561060357600080fd5b803590602001918460018302840111600160201b8311171561062457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561067657600080fd5b82018360208201111561068857600080fd5b803590602001918460018302840111600160201b831117156106a957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610f76945050505050565b6103ef6004803603604081101561070057600080fd5b81359190810190604081016020820135600160201b81111561072157600080fd5b82018360208201111561073357600080fd5b803590602001918460018302840111600160201b8311171561075457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610fd4945050505050565b606060048054806020026020016040519081016040528092919081815260200182805480156107ed57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116107cf575b5050505050905090565b60028054604080516020601f60001961010060018716150201909416859004938401819004810282018101909252828152606093909290918301828280156107ed5780601f10610855576101008083540402835291602001916107ed565b820191906000526020600020905b81548152906001019060200180831161086357509395945050505050565b60008061088c610ffa565b9050610899818585610ffe565b5060019392505050565b60015490565b60006001600160a01b0383166108f05760405162461bcd60e51b8152600401808060200182810382526024815260200180611d586024913960400191505060405180910390fd5b6001600160a01b0384166109355760405162461bcd60e51b8152600401808060200182810382526026815260200180611dd16026913960400191505060405180910390fd5b600061093f610ffa565b905061096d8186868660405180602001604052806000815250604051806020016040528060008152506110ea565b610999818686866040518060200160405280600081525060405180602001604052806000815250611317565b6109ed85826109e886604051806060016040528060298152602001611da8602991396001600160a01b03808c166000908152600860209081526040808320938b16835292905220549190611530565b610ffe565b610a1b81868686604051806020016040528060008152506040518060200160405280600081525060006115c7565b506001949350505050565b601290565b600190565b610a41610a3b610ffa565b86610d5d565b610a7c5760405162461bcd60e51b815260040180806020018281038252602c815260200180611d7c602c913960400191505060405180910390fd5b610a8b8585858585600161184c565b5050505050565b6001600160a01b031660009081526020819052604090205490565b806001600160a01b0316610abf610ffa565b6001600160a01b03161415610b055760405162461bcd60e51b8152600401808060200182810382526024815260200180611cc66024913960400191505060405180910390fd5b6001600160a01b03811660009081526005602052604090205460ff1615610b685760076000610b32610ffa565b6001600160a01b03908116825260208083019390935260409182016000908120918516815292529020805460ff19169055610baf565b600160066000610b76610ffa565b6001600160a01b03908116825260208083019390935260409182016000908120918616815292529020805460ff19169115159190911790555b610bb7610ffa565b6001600160a01b0316816001600160a01b03167ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f960405160405180910390a350565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ed5780601f10610855576101008083540402835291602001916107ed565b610c7f610c65610ffa565b84848460405180602001604052806000815250600161184c565b505050565b60006001600160a01b038316610ccb5760405162461bcd60e51b8152600401808060200182810382526024815260200180611d586024913960400191505060405180910390fd5b6000610cd5610ffa565b9050610d038182868660405180602001604052806000815250604051806020016040528060008152506110ea565b610d2f818286866040518060200160405280600081525060405180602001604052806000815250611317565b61089981828686604051806020016040528060008152506040518060200160405280600081525060006115c7565b6000816001600160a01b0316836001600160a01b03161480610dc857506001600160a01b03831660009081526005602052604090205460ff168015610dc857506001600160a01b0380831660009081526007602090815260408083209387168352929052205460ff16155b80610df857506001600160a01b0380831660009081526006602090815260408083209387168352929052205460ff165b9392505050565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b610e32610ffa565b6001600160a01b0316816001600160a01b03161415610e825760405162461bcd60e51b8152600401808060200182810382526021815260200180611cea6021913960400191505060405180910390fd5b6001600160a01b03811660009081526005602052604090205460ff1615610eee57600160076000610eb1610ffa565b6001600160a01b03908116825260208083019390935260409182016000908120918616815292529020805460ff1916911515919091179055610f2c565b60066000610efa610ffa565b6001600160a01b03908116825260208083019390935260409182016000908120918516815292529020805460ff191690555b610f34610ffa565b6001600160a01b0316816001600160a01b03167f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa160405160405180910390a350565b610f87610f81610ffa565b85610d5d565b610fc25760405162461bcd60e51b815260040180806020018281038252602c815260200180611d7c602c913960400191505060405180910390fd5b610fce84848484611923565b50505050565b610ff6610fdf610ffa565b838360405180602001604052806000815250611923565b5050565b3390565b6001600160a01b0383166110435760405162461bcd60e51b8152600401808060200182810382526025815260200180611c366025913960400191505060405180910390fd5b6001600160a01b0382166110885760405162461bcd60e51b8152600401808060200182810382526023815260200180611e1a6023913960400191505060405180910390fd5b6001600160a01b03808416600081815260086020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6040805163555ddc6560e11b81526001600160a01b03871660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe89560248201529051600091731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca91604480820192602092909190829003018186803b15801561116e57600080fd5b505afa158015611182573d6000803e3d6000fd5b505050506040513d602081101561119857600080fd5b505190506001600160a01b0381161561130e57806001600160a01b03166375ab97828888888888886040518763ffffffff1660e01b815260040180876001600160a01b03168152602001866001600160a01b03168152602001856001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561124357818101518382015260200161122b565b50505050905090810190601f1680156112705780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156112a357818101518382015260200161128b565b50505050905090810190601f1680156112d05780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b1580156112f557600080fd5b505af1158015611309573d6000803e3d6000fd5b505050505b50505050505050565b61132386868686610fce565b61136083604051806060016040528060278152602001611c7d602791396001600160a01b0388166000908152602081905260409020549190611530565b6001600160a01b03808716600090815260208190526040808220939093559086168152205461138f9084611b5d565b600080866001600160a01b03166001600160a01b0316815260200190815260200160002081905550836001600160a01b0316856001600160a01b0316876001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987868686604051808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611440578181015183820152602001611428565b50505050905090810190601f16801561146d5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156114a0578181015183820152602001611488565b50505050905090810190601f1680156114cd5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a4836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050565b600081848411156115bf5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561158457818101518382015260200161156c565b50505050905090810190601f1680156115b15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6040805163555ddc6560e11b81526001600160a01b03871660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b60248201529051600091731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca91604480820192602092909190829003018186803b15801561164b57600080fd5b505afa15801561165f573d6000803e3d6000fd5b505050506040513d602081101561167557600080fd5b505190506001600160a01b038116156117ee57806001600160a01b03166223de298989898989896040518763ffffffff1660e01b815260040180876001600160a01b03168152602001866001600160a01b03168152602001856001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561171f578181015183820152602001611707565b50505050905090810190601f16801561174c5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561177f578181015183820152602001611767565b50505050905090810190601f1680156117ac5780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b1580156117d157600080fd5b505af11580156117e5573d6000803e3d6000fd5b50505050611842565b811561184257611806866001600160a01b0316611bb7565b156118425760405162461bcd60e51b815260040180806020018281038252604d815260200180611d0b604d913960600191505060405180910390fd5b5050505050505050565b6001600160a01b0386166118915760405162461bcd60e51b8152600401808060200182810382526022815260200180611c5b6022913960400191505060405180910390fd5b6001600160a01b0385166118ec576040805162461bcd60e51b815260206004820181905260248201527f4552433737373a2073656e6420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b60006118f6610ffa565b90506119068188888888886110ea565b611914818888888888611317565b61130e818888888888886115c7565b6001600160a01b0384166119685760405162461bcd60e51b8152600401808060200182810382526022815260200180611ca46022913960400191505060405180910390fd5b6000611972610ffa565b90506119818186600087610fce565b611990818660008787876110ea565b6119cd84604051806060016040528060238152602001611df7602391396001600160a01b0388166000908152602081905260409020549190611530565b6001600160a01b0386166000908152602081905260409020556001546119f39085611bf3565b600181905550846001600160a01b0316816001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098868686604051808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611a78578181015183820152602001611a60565b50505050905090810190601f168015611aa55780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015611ad8578181015183820152602001611ac0565b50505050905090810190601f168015611b055780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a36040805185815290516000916001600160a01b038816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050505050565b600082820183811015610df8576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611beb57508115155b949350505050565b6000610df883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061153056fe4552433737373a20617070726f76652066726f6d20746865207a65726f20616464726573734552433737373a2073656e642066726f6d20746865207a65726f20616464726573734552433737373a207472616e7366657220616d6f756e7420657863656564732062616c616e63654552433737373a206275726e2066726f6d20746865207a65726f20616464726573734552433737373a20617574686f72697a696e672073656c66206173206f70657261746f724552433737373a207265766f6b696e672073656c66206173206f70657261746f724552433737373a20746f6b656e20726563697069656e7420636f6e747261637420686173206e6f20696d706c656d656e74657220666f7220455243373737546f6b656e73526563697069656e744552433737373a207472616e7366657220746f20746865207a65726f20616464726573734552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f7220666f7220686f6c6465724552433737373a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654552433737373a207472616e736665722066726f6d20746865207a65726f20616464726573734552433737373a206275726e20616d6f756e7420657863656564732062616c616e63654552433737373a20617070726f766520746f20746865207a65726f2061646472657373a2646970667358221220611f48202c28bfcac7a09c23557f3f0d17116120e469330e9bdeab00ad7edf6d64736f6c634300060c0033"
  28. // DeployERC777 deploys a new Ethereum contract, binding an instance of ERC777 to it.
  29. func DeployERC777(auth *bind.TransactOpts, backend bind.ContractBackend, name string, symbol string, defaultOperators []common.Address) (common.Address, *types.Transaction, *ERC777, error) {
  30. parsed, err := abi.JSON(strings.NewReader(ERC777ABI))
  31. if err != nil {
  32. return common.Address{}, nil, nil, err
  33. }
  34. address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC777Bin), backend, name, symbol, defaultOperators)
  35. if err != nil {
  36. return common.Address{}, nil, nil, err
  37. }
  38. return address, tx, &ERC777{ERC777Caller: ERC777Caller{contract: contract}, ERC777Transactor: ERC777Transactor{contract: contract}, ERC777Filterer: ERC777Filterer{contract: contract}}, nil
  39. }
  40. // ERC777 is an auto generated Go binding around an Ethereum contract.
  41. type ERC777 struct {
  42. ERC777Caller // Read-only binding to the contract
  43. ERC777Transactor // Write-only binding to the contract
  44. ERC777Filterer // Log filterer for contract events
  45. }
  46. // ERC777Caller is an auto generated read-only Go binding around an Ethereum contract.
  47. type ERC777Caller struct {
  48. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  49. }
  50. // ERC777Transactor is an auto generated write-only Go binding around an Ethereum contract.
  51. type ERC777Transactor struct {
  52. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  53. }
  54. // ERC777Filterer is an auto generated log filtering Go binding around an Ethereum contract events.
  55. type ERC777Filterer struct {
  56. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  57. }
  58. // ERC777Session is an auto generated Go binding around an Ethereum contract,
  59. // with pre-set call and transact options.
  60. type ERC777Session struct {
  61. Contract *ERC777 // Generic contract binding to set the session for
  62. CallOpts bind.CallOpts // Call options to use throughout this session
  63. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  64. }
  65. // ERC777CallerSession is an auto generated read-only Go binding around an Ethereum contract,
  66. // with pre-set call options.
  67. type ERC777CallerSession struct {
  68. Contract *ERC777Caller // Generic contract caller binding to set the session for
  69. CallOpts bind.CallOpts // Call options to use throughout this session
  70. }
  71. // ERC777TransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  72. // with pre-set transact options.
  73. type ERC777TransactorSession struct {
  74. Contract *ERC777Transactor // Generic contract transactor binding to set the session for
  75. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  76. }
  77. // ERC777Raw is an auto generated low-level Go binding around an Ethereum contract.
  78. type ERC777Raw struct {
  79. Contract *ERC777 // Generic contract binding to access the raw methods on
  80. }
  81. // ERC777CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  82. type ERC777CallerRaw struct {
  83. Contract *ERC777Caller // Generic read-only contract binding to access the raw methods on
  84. }
  85. // ERC777TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  86. type ERC777TransactorRaw struct {
  87. Contract *ERC777Transactor // Generic write-only contract binding to access the raw methods on
  88. }
  89. // NewERC777 creates a new instance of ERC777, bound to a specific deployed contract.
  90. func NewERC777(address common.Address, backend bind.ContractBackend) (*ERC777, error) {
  91. contract, err := bindERC777(address, backend, backend, backend)
  92. if err != nil {
  93. return nil, err
  94. }
  95. return &ERC777{ERC777Caller: ERC777Caller{contract: contract}, ERC777Transactor: ERC777Transactor{contract: contract}, ERC777Filterer: ERC777Filterer{contract: contract}}, nil
  96. }
  97. // NewERC777Caller creates a new read-only instance of ERC777, bound to a specific deployed contract.
  98. func NewERC777Caller(address common.Address, caller bind.ContractCaller) (*ERC777Caller, error) {
  99. contract, err := bindERC777(address, caller, nil, nil)
  100. if err != nil {
  101. return nil, err
  102. }
  103. return &ERC777Caller{contract: contract}, nil
  104. }
  105. // NewERC777Transactor creates a new write-only instance of ERC777, bound to a specific deployed contract.
  106. func NewERC777Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC777Transactor, error) {
  107. contract, err := bindERC777(address, nil, transactor, nil)
  108. if err != nil {
  109. return nil, err
  110. }
  111. return &ERC777Transactor{contract: contract}, nil
  112. }
  113. // NewERC777Filterer creates a new log filterer instance of ERC777, bound to a specific deployed contract.
  114. func NewERC777Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC777Filterer, error) {
  115. contract, err := bindERC777(address, nil, nil, filterer)
  116. if err != nil {
  117. return nil, err
  118. }
  119. return &ERC777Filterer{contract: contract}, nil
  120. }
  121. // bindERC777 binds a generic wrapper to an already deployed contract.
  122. func bindERC777(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  123. parsed, err := abi.JSON(strings.NewReader(ERC777ABI))
  124. if err != nil {
  125. return nil, err
  126. }
  127. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  128. }
  129. // Call invokes the (constant) contract method with params as input values and
  130. // sets the output to result. The result type might be a single field for simple
  131. // returns, a slice of interfaces for anonymous returns and a struct for named
  132. // returns.
  133. func (_ERC777 *ERC777Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  134. return _ERC777.Contract.ERC777Caller.contract.Call(opts, result, method, params...)
  135. }
  136. // Transfer initiates a plain transaction to move funds to the contract, calling
  137. // its default method if one is available.
  138. func (_ERC777 *ERC777Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  139. return _ERC777.Contract.ERC777Transactor.contract.Transfer(opts)
  140. }
  141. // Transact invokes the (paid) contract method with params as input values.
  142. func (_ERC777 *ERC777Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  143. return _ERC777.Contract.ERC777Transactor.contract.Transact(opts, method, params...)
  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 (_ERC777 *ERC777CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  150. return _ERC777.Contract.contract.Call(opts, result, method, params...)
  151. }
  152. // Transfer initiates a plain transaction to move funds to the contract, calling
  153. // its default method if one is available.
  154. func (_ERC777 *ERC777TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  155. return _ERC777.Contract.contract.Transfer(opts)
  156. }
  157. // Transact invokes the (paid) contract method with params as input values.
  158. func (_ERC777 *ERC777TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  159. return _ERC777.Contract.contract.Transact(opts, method, params...)
  160. }
  161. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  162. //
  163. // Solidity: function allowance(address holder, address spender) view returns(uint256)
  164. func (_ERC777 *ERC777Caller) Allowance(opts *bind.CallOpts, holder common.Address, spender common.Address) (*big.Int, error) {
  165. var (
  166. ret0 = new(*big.Int)
  167. )
  168. out := ret0
  169. err := _ERC777.contract.Call(opts, out, "allowance", holder, spender)
  170. return *ret0, err
  171. }
  172. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  173. //
  174. // Solidity: function allowance(address holder, address spender) view returns(uint256)
  175. func (_ERC777 *ERC777Session) Allowance(holder common.Address, spender common.Address) (*big.Int, error) {
  176. return _ERC777.Contract.Allowance(&_ERC777.CallOpts, holder, spender)
  177. }
  178. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  179. //
  180. // Solidity: function allowance(address holder, address spender) view returns(uint256)
  181. func (_ERC777 *ERC777CallerSession) Allowance(holder common.Address, spender common.Address) (*big.Int, error) {
  182. return _ERC777.Contract.Allowance(&_ERC777.CallOpts, holder, spender)
  183. }
  184. // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  185. //
  186. // Solidity: function balanceOf(address tokenHolder) view returns(uint256)
  187. func (_ERC777 *ERC777Caller) BalanceOf(opts *bind.CallOpts, tokenHolder common.Address) (*big.Int, error) {
  188. var (
  189. ret0 = new(*big.Int)
  190. )
  191. out := ret0
  192. err := _ERC777.contract.Call(opts, out, "balanceOf", tokenHolder)
  193. return *ret0, err
  194. }
  195. // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  196. //
  197. // Solidity: function balanceOf(address tokenHolder) view returns(uint256)
  198. func (_ERC777 *ERC777Session) BalanceOf(tokenHolder common.Address) (*big.Int, error) {
  199. return _ERC777.Contract.BalanceOf(&_ERC777.CallOpts, tokenHolder)
  200. }
  201. // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  202. //
  203. // Solidity: function balanceOf(address tokenHolder) view returns(uint256)
  204. func (_ERC777 *ERC777CallerSession) BalanceOf(tokenHolder common.Address) (*big.Int, error) {
  205. return _ERC777.Contract.BalanceOf(&_ERC777.CallOpts, tokenHolder)
  206. }
  207. // Decimals is a free data retrieval call binding the contract method 0x313ce567.
  208. //
  209. // Solidity: function decimals() pure returns(uint8)
  210. func (_ERC777 *ERC777Caller) Decimals(opts *bind.CallOpts) (uint8, error) {
  211. var (
  212. ret0 = new(uint8)
  213. )
  214. out := ret0
  215. err := _ERC777.contract.Call(opts, out, "decimals")
  216. return *ret0, err
  217. }
  218. // Decimals is a free data retrieval call binding the contract method 0x313ce567.
  219. //
  220. // Solidity: function decimals() pure returns(uint8)
  221. func (_ERC777 *ERC777Session) Decimals() (uint8, error) {
  222. return _ERC777.Contract.Decimals(&_ERC777.CallOpts)
  223. }
  224. // Decimals is a free data retrieval call binding the contract method 0x313ce567.
  225. //
  226. // Solidity: function decimals() pure returns(uint8)
  227. func (_ERC777 *ERC777CallerSession) Decimals() (uint8, error) {
  228. return _ERC777.Contract.Decimals(&_ERC777.CallOpts)
  229. }
  230. // DefaultOperators is a free data retrieval call binding the contract method 0x06e48538.
  231. //
  232. // Solidity: function defaultOperators() view returns(address[])
  233. func (_ERC777 *ERC777Caller) DefaultOperators(opts *bind.CallOpts) ([]common.Address, error) {
  234. var (
  235. ret0 = new([]common.Address)
  236. )
  237. out := ret0
  238. err := _ERC777.contract.Call(opts, out, "defaultOperators")
  239. return *ret0, err
  240. }
  241. // DefaultOperators is a free data retrieval call binding the contract method 0x06e48538.
  242. //
  243. // Solidity: function defaultOperators() view returns(address[])
  244. func (_ERC777 *ERC777Session) DefaultOperators() ([]common.Address, error) {
  245. return _ERC777.Contract.DefaultOperators(&_ERC777.CallOpts)
  246. }
  247. // DefaultOperators is a free data retrieval call binding the contract method 0x06e48538.
  248. //
  249. // Solidity: function defaultOperators() view returns(address[])
  250. func (_ERC777 *ERC777CallerSession) DefaultOperators() ([]common.Address, error) {
  251. return _ERC777.Contract.DefaultOperators(&_ERC777.CallOpts)
  252. }
  253. // Granularity is a free data retrieval call binding the contract method 0x556f0dc7.
  254. //
  255. // Solidity: function granularity() view returns(uint256)
  256. func (_ERC777 *ERC777Caller) Granularity(opts *bind.CallOpts) (*big.Int, error) {
  257. var (
  258. ret0 = new(*big.Int)
  259. )
  260. out := ret0
  261. err := _ERC777.contract.Call(opts, out, "granularity")
  262. return *ret0, err
  263. }
  264. // Granularity is a free data retrieval call binding the contract method 0x556f0dc7.
  265. //
  266. // Solidity: function granularity() view returns(uint256)
  267. func (_ERC777 *ERC777Session) Granularity() (*big.Int, error) {
  268. return _ERC777.Contract.Granularity(&_ERC777.CallOpts)
  269. }
  270. // Granularity is a free data retrieval call binding the contract method 0x556f0dc7.
  271. //
  272. // Solidity: function granularity() view returns(uint256)
  273. func (_ERC777 *ERC777CallerSession) Granularity() (*big.Int, error) {
  274. return _ERC777.Contract.Granularity(&_ERC777.CallOpts)
  275. }
  276. // IsOperatorFor is a free data retrieval call binding the contract method 0xd95b6371.
  277. //
  278. // Solidity: function isOperatorFor(address operator, address tokenHolder) view returns(bool)
  279. func (_ERC777 *ERC777Caller) IsOperatorFor(opts *bind.CallOpts, operator common.Address, tokenHolder common.Address) (bool, error) {
  280. var (
  281. ret0 = new(bool)
  282. )
  283. out := ret0
  284. err := _ERC777.contract.Call(opts, out, "isOperatorFor", operator, tokenHolder)
  285. return *ret0, err
  286. }
  287. // IsOperatorFor is a free data retrieval call binding the contract method 0xd95b6371.
  288. //
  289. // Solidity: function isOperatorFor(address operator, address tokenHolder) view returns(bool)
  290. func (_ERC777 *ERC777Session) IsOperatorFor(operator common.Address, tokenHolder common.Address) (bool, error) {
  291. return _ERC777.Contract.IsOperatorFor(&_ERC777.CallOpts, operator, tokenHolder)
  292. }
  293. // IsOperatorFor is a free data retrieval call binding the contract method 0xd95b6371.
  294. //
  295. // Solidity: function isOperatorFor(address operator, address tokenHolder) view returns(bool)
  296. func (_ERC777 *ERC777CallerSession) IsOperatorFor(operator common.Address, tokenHolder common.Address) (bool, error) {
  297. return _ERC777.Contract.IsOperatorFor(&_ERC777.CallOpts, operator, tokenHolder)
  298. }
  299. // Name is a free data retrieval call binding the contract method 0x06fdde03.
  300. //
  301. // Solidity: function name() view returns(string)
  302. func (_ERC777 *ERC777Caller) Name(opts *bind.CallOpts) (string, error) {
  303. var (
  304. ret0 = new(string)
  305. )
  306. out := ret0
  307. err := _ERC777.contract.Call(opts, out, "name")
  308. return *ret0, err
  309. }
  310. // Name is a free data retrieval call binding the contract method 0x06fdde03.
  311. //
  312. // Solidity: function name() view returns(string)
  313. func (_ERC777 *ERC777Session) Name() (string, error) {
  314. return _ERC777.Contract.Name(&_ERC777.CallOpts)
  315. }
  316. // Name is a free data retrieval call binding the contract method 0x06fdde03.
  317. //
  318. // Solidity: function name() view returns(string)
  319. func (_ERC777 *ERC777CallerSession) Name() (string, error) {
  320. return _ERC777.Contract.Name(&_ERC777.CallOpts)
  321. }
  322. // Symbol is a free data retrieval call binding the contract method 0x95d89b41.
  323. //
  324. // Solidity: function symbol() view returns(string)
  325. func (_ERC777 *ERC777Caller) Symbol(opts *bind.CallOpts) (string, error) {
  326. var (
  327. ret0 = new(string)
  328. )
  329. out := ret0
  330. err := _ERC777.contract.Call(opts, out, "symbol")
  331. return *ret0, err
  332. }
  333. // Symbol is a free data retrieval call binding the contract method 0x95d89b41.
  334. //
  335. // Solidity: function symbol() view returns(string)
  336. func (_ERC777 *ERC777Session) Symbol() (string, error) {
  337. return _ERC777.Contract.Symbol(&_ERC777.CallOpts)
  338. }
  339. // Symbol is a free data retrieval call binding the contract method 0x95d89b41.
  340. //
  341. // Solidity: function symbol() view returns(string)
  342. func (_ERC777 *ERC777CallerSession) Symbol() (string, error) {
  343. return _ERC777.Contract.Symbol(&_ERC777.CallOpts)
  344. }
  345. // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  346. //
  347. // Solidity: function totalSupply() view returns(uint256)
  348. func (_ERC777 *ERC777Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
  349. var (
  350. ret0 = new(*big.Int)
  351. )
  352. out := ret0
  353. err := _ERC777.contract.Call(opts, out, "totalSupply")
  354. return *ret0, err
  355. }
  356. // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  357. //
  358. // Solidity: function totalSupply() view returns(uint256)
  359. func (_ERC777 *ERC777Session) TotalSupply() (*big.Int, error) {
  360. return _ERC777.Contract.TotalSupply(&_ERC777.CallOpts)
  361. }
  362. // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  363. //
  364. // Solidity: function totalSupply() view returns(uint256)
  365. func (_ERC777 *ERC777CallerSession) TotalSupply() (*big.Int, error) {
  366. return _ERC777.Contract.TotalSupply(&_ERC777.CallOpts)
  367. }
  368. // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  369. //
  370. // Solidity: function approve(address spender, uint256 value) returns(bool)
  371. func (_ERC777 *ERC777Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) {
  372. return _ERC777.contract.Transact(opts, "approve", spender, value)
  373. }
  374. // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  375. //
  376. // Solidity: function approve(address spender, uint256 value) returns(bool)
  377. func (_ERC777 *ERC777Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) {
  378. return _ERC777.Contract.Approve(&_ERC777.TransactOpts, spender, value)
  379. }
  380. // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  381. //
  382. // Solidity: function approve(address spender, uint256 value) returns(bool)
  383. func (_ERC777 *ERC777TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) {
  384. return _ERC777.Contract.Approve(&_ERC777.TransactOpts, spender, value)
  385. }
  386. // AuthorizeOperator is a paid mutator transaction binding the contract method 0x959b8c3f.
  387. //
  388. // Solidity: function authorizeOperator(address operator) returns()
  389. func (_ERC777 *ERC777Transactor) AuthorizeOperator(opts *bind.TransactOpts, operator common.Address) (*types.Transaction, error) {
  390. return _ERC777.contract.Transact(opts, "authorizeOperator", operator)
  391. }
  392. // AuthorizeOperator is a paid mutator transaction binding the contract method 0x959b8c3f.
  393. //
  394. // Solidity: function authorizeOperator(address operator) returns()
  395. func (_ERC777 *ERC777Session) AuthorizeOperator(operator common.Address) (*types.Transaction, error) {
  396. return _ERC777.Contract.AuthorizeOperator(&_ERC777.TransactOpts, operator)
  397. }
  398. // AuthorizeOperator is a paid mutator transaction binding the contract method 0x959b8c3f.
  399. //
  400. // Solidity: function authorizeOperator(address operator) returns()
  401. func (_ERC777 *ERC777TransactorSession) AuthorizeOperator(operator common.Address) (*types.Transaction, error) {
  402. return _ERC777.Contract.AuthorizeOperator(&_ERC777.TransactOpts, operator)
  403. }
  404. // Burn is a paid mutator transaction binding the contract method 0xfe9d9303.
  405. //
  406. // Solidity: function burn(uint256 amount, bytes data) returns()
  407. func (_ERC777 *ERC777Transactor) Burn(opts *bind.TransactOpts, amount *big.Int, data []byte) (*types.Transaction, error) {
  408. return _ERC777.contract.Transact(opts, "burn", amount, data)
  409. }
  410. // Burn is a paid mutator transaction binding the contract method 0xfe9d9303.
  411. //
  412. // Solidity: function burn(uint256 amount, bytes data) returns()
  413. func (_ERC777 *ERC777Session) Burn(amount *big.Int, data []byte) (*types.Transaction, error) {
  414. return _ERC777.Contract.Burn(&_ERC777.TransactOpts, amount, data)
  415. }
  416. // Burn is a paid mutator transaction binding the contract method 0xfe9d9303.
  417. //
  418. // Solidity: function burn(uint256 amount, bytes data) returns()
  419. func (_ERC777 *ERC777TransactorSession) Burn(amount *big.Int, data []byte) (*types.Transaction, error) {
  420. return _ERC777.Contract.Burn(&_ERC777.TransactOpts, amount, data)
  421. }
  422. // OperatorBurn is a paid mutator transaction binding the contract method 0xfc673c4f.
  423. //
  424. // Solidity: function operatorBurn(address account, uint256 amount, bytes data, bytes operatorData) returns()
  425. func (_ERC777 *ERC777Transactor) OperatorBurn(opts *bind.TransactOpts, account common.Address, amount *big.Int, data []byte, operatorData []byte) (*types.Transaction, error) {
  426. return _ERC777.contract.Transact(opts, "operatorBurn", account, amount, data, operatorData)
  427. }
  428. // OperatorBurn is a paid mutator transaction binding the contract method 0xfc673c4f.
  429. //
  430. // Solidity: function operatorBurn(address account, uint256 amount, bytes data, bytes operatorData) returns()
  431. func (_ERC777 *ERC777Session) OperatorBurn(account common.Address, amount *big.Int, data []byte, operatorData []byte) (*types.Transaction, error) {
  432. return _ERC777.Contract.OperatorBurn(&_ERC777.TransactOpts, account, amount, data, operatorData)
  433. }
  434. // OperatorBurn is a paid mutator transaction binding the contract method 0xfc673c4f.
  435. //
  436. // Solidity: function operatorBurn(address account, uint256 amount, bytes data, bytes operatorData) returns()
  437. func (_ERC777 *ERC777TransactorSession) OperatorBurn(account common.Address, amount *big.Int, data []byte, operatorData []byte) (*types.Transaction, error) {
  438. return _ERC777.Contract.OperatorBurn(&_ERC777.TransactOpts, account, amount, data, operatorData)
  439. }
  440. // OperatorSend is a paid mutator transaction binding the contract method 0x62ad1b83.
  441. //
  442. // Solidity: function operatorSend(address sender, address recipient, uint256 amount, bytes data, bytes operatorData) returns()
  443. func (_ERC777 *ERC777Transactor) OperatorSend(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int, data []byte, operatorData []byte) (*types.Transaction, error) {
  444. return _ERC777.contract.Transact(opts, "operatorSend", sender, recipient, amount, data, operatorData)
  445. }
  446. // OperatorSend is a paid mutator transaction binding the contract method 0x62ad1b83.
  447. //
  448. // Solidity: function operatorSend(address sender, address recipient, uint256 amount, bytes data, bytes operatorData) returns()
  449. func (_ERC777 *ERC777Session) OperatorSend(sender common.Address, recipient common.Address, amount *big.Int, data []byte, operatorData []byte) (*types.Transaction, error) {
  450. return _ERC777.Contract.OperatorSend(&_ERC777.TransactOpts, sender, recipient, amount, data, operatorData)
  451. }
  452. // OperatorSend is a paid mutator transaction binding the contract method 0x62ad1b83.
  453. //
  454. // Solidity: function operatorSend(address sender, address recipient, uint256 amount, bytes data, bytes operatorData) returns()
  455. func (_ERC777 *ERC777TransactorSession) OperatorSend(sender common.Address, recipient common.Address, amount *big.Int, data []byte, operatorData []byte) (*types.Transaction, error) {
  456. return _ERC777.Contract.OperatorSend(&_ERC777.TransactOpts, sender, recipient, amount, data, operatorData)
  457. }
  458. // RevokeOperator is a paid mutator transaction binding the contract method 0xfad8b32a.
  459. //
  460. // Solidity: function revokeOperator(address operator) returns()
  461. func (_ERC777 *ERC777Transactor) RevokeOperator(opts *bind.TransactOpts, operator common.Address) (*types.Transaction, error) {
  462. return _ERC777.contract.Transact(opts, "revokeOperator", operator)
  463. }
  464. // RevokeOperator is a paid mutator transaction binding the contract method 0xfad8b32a.
  465. //
  466. // Solidity: function revokeOperator(address operator) returns()
  467. func (_ERC777 *ERC777Session) RevokeOperator(operator common.Address) (*types.Transaction, error) {
  468. return _ERC777.Contract.RevokeOperator(&_ERC777.TransactOpts, operator)
  469. }
  470. // RevokeOperator is a paid mutator transaction binding the contract method 0xfad8b32a.
  471. //
  472. // Solidity: function revokeOperator(address operator) returns()
  473. func (_ERC777 *ERC777TransactorSession) RevokeOperator(operator common.Address) (*types.Transaction, error) {
  474. return _ERC777.Contract.RevokeOperator(&_ERC777.TransactOpts, operator)
  475. }
  476. // Send is a paid mutator transaction binding the contract method 0x9bd9bbc6.
  477. //
  478. // Solidity: function send(address recipient, uint256 amount, bytes data) returns()
  479. func (_ERC777 *ERC777Transactor) Send(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, data []byte) (*types.Transaction, error) {
  480. return _ERC777.contract.Transact(opts, "send", recipient, amount, data)
  481. }
  482. // Send is a paid mutator transaction binding the contract method 0x9bd9bbc6.
  483. //
  484. // Solidity: function send(address recipient, uint256 amount, bytes data) returns()
  485. func (_ERC777 *ERC777Session) Send(recipient common.Address, amount *big.Int, data []byte) (*types.Transaction, error) {
  486. return _ERC777.Contract.Send(&_ERC777.TransactOpts, recipient, amount, data)
  487. }
  488. // Send is a paid mutator transaction binding the contract method 0x9bd9bbc6.
  489. //
  490. // Solidity: function send(address recipient, uint256 amount, bytes data) returns()
  491. func (_ERC777 *ERC777TransactorSession) Send(recipient common.Address, amount *big.Int, data []byte) (*types.Transaction, error) {
  492. return _ERC777.Contract.Send(&_ERC777.TransactOpts, recipient, amount, data)
  493. }
  494. // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  495. //
  496. // Solidity: function transfer(address recipient, uint256 amount) returns(bool)
  497. func (_ERC777 *ERC777Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  498. return _ERC777.contract.Transact(opts, "transfer", recipient, amount)
  499. }
  500. // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  501. //
  502. // Solidity: function transfer(address recipient, uint256 amount) returns(bool)
  503. func (_ERC777 *ERC777Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  504. return _ERC777.Contract.Transfer(&_ERC777.TransactOpts, recipient, amount)
  505. }
  506. // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  507. //
  508. // Solidity: function transfer(address recipient, uint256 amount) returns(bool)
  509. func (_ERC777 *ERC777TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  510. return _ERC777.Contract.Transfer(&_ERC777.TransactOpts, recipient, amount)
  511. }
  512. // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  513. //
  514. // Solidity: function transferFrom(address holder, address recipient, uint256 amount) returns(bool)
  515. func (_ERC777 *ERC777Transactor) TransferFrom(opts *bind.TransactOpts, holder common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  516. return _ERC777.contract.Transact(opts, "transferFrom", holder, recipient, amount)
  517. }
  518. // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  519. //
  520. // Solidity: function transferFrom(address holder, address recipient, uint256 amount) returns(bool)
  521. func (_ERC777 *ERC777Session) TransferFrom(holder common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  522. return _ERC777.Contract.TransferFrom(&_ERC777.TransactOpts, holder, recipient, amount)
  523. }
  524. // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  525. //
  526. // Solidity: function transferFrom(address holder, address recipient, uint256 amount) returns(bool)
  527. func (_ERC777 *ERC777TransactorSession) TransferFrom(holder common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  528. return _ERC777.Contract.TransferFrom(&_ERC777.TransactOpts, holder, recipient, amount)
  529. }
  530. // ERC777ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC777 contract.
  531. type ERC777ApprovalIterator struct {
  532. Event *ERC777Approval // Event containing the contract specifics and raw log
  533. contract *bind.BoundContract // Generic contract to use for unpacking event data
  534. event string // Event name to use for unpacking event data
  535. logs chan types.Log // Log channel receiving the found contract events
  536. sub ethereum.Subscription // Subscription for errors, completion and termination
  537. done bool // Whether the subscription completed delivering logs
  538. fail error // Occurred error to stop iteration
  539. }
  540. // Next advances the iterator to the subsequent event, returning whether there
  541. // are any more events found. In case of a retrieval or parsing error, false is
  542. // returned and Error() can be queried for the exact failure.
  543. func (it *ERC777ApprovalIterator) Next() bool {
  544. // If the iterator failed, stop iterating
  545. if it.fail != nil {
  546. return false
  547. }
  548. // If the iterator completed, deliver directly whatever's available
  549. if it.done {
  550. select {
  551. case log := <-it.logs:
  552. it.Event = new(ERC777Approval)
  553. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  554. it.fail = err
  555. return false
  556. }
  557. it.Event.Raw = log
  558. return true
  559. default:
  560. return false
  561. }
  562. }
  563. // Iterator still in progress, wait for either a data or an error event
  564. select {
  565. case log := <-it.logs:
  566. it.Event = new(ERC777Approval)
  567. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  568. it.fail = err
  569. return false
  570. }
  571. it.Event.Raw = log
  572. return true
  573. case err := <-it.sub.Err():
  574. it.done = true
  575. it.fail = err
  576. return it.Next()
  577. }
  578. }
  579. // Error returns any retrieval or parsing error occurred during filtering.
  580. func (it *ERC777ApprovalIterator) Error() error {
  581. return it.fail
  582. }
  583. // Close terminates the iteration process, releasing any pending underlying
  584. // resources.
  585. func (it *ERC777ApprovalIterator) Close() error {
  586. it.sub.Unsubscribe()
  587. return nil
  588. }
  589. // ERC777Approval represents a Approval event raised by the ERC777 contract.
  590. type ERC777Approval struct {
  591. Owner common.Address
  592. Spender common.Address
  593. Value *big.Int
  594. Raw types.Log // Blockchain specific contextual infos
  595. }
  596. // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  597. //
  598. // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  599. func (_ERC777 *ERC777Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC777ApprovalIterator, error) {
  600. var ownerRule []interface{}
  601. for _, ownerItem := range owner {
  602. ownerRule = append(ownerRule, ownerItem)
  603. }
  604. var spenderRule []interface{}
  605. for _, spenderItem := range spender {
  606. spenderRule = append(spenderRule, spenderItem)
  607. }
  608. logs, sub, err := _ERC777.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule)
  609. if err != nil {
  610. return nil, err
  611. }
  612. return &ERC777ApprovalIterator{contract: _ERC777.contract, event: "Approval", logs: logs, sub: sub}, nil
  613. }
  614. // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  615. //
  616. // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  617. func (_ERC777 *ERC777Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC777Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) {
  618. var ownerRule []interface{}
  619. for _, ownerItem := range owner {
  620. ownerRule = append(ownerRule, ownerItem)
  621. }
  622. var spenderRule []interface{}
  623. for _, spenderItem := range spender {
  624. spenderRule = append(spenderRule, spenderItem)
  625. }
  626. logs, sub, err := _ERC777.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule)
  627. if err != nil {
  628. return nil, err
  629. }
  630. return event.NewSubscription(func(quit <-chan struct{}) error {
  631. defer sub.Unsubscribe()
  632. for {
  633. select {
  634. case log := <-logs:
  635. // New log arrived, parse the event and forward to the user
  636. event := new(ERC777Approval)
  637. if err := _ERC777.contract.UnpackLog(event, "Approval", log); err != nil {
  638. return err
  639. }
  640. event.Raw = log
  641. select {
  642. case sink <- event:
  643. case err := <-sub.Err():
  644. return err
  645. case <-quit:
  646. return nil
  647. }
  648. case err := <-sub.Err():
  649. return err
  650. case <-quit:
  651. return nil
  652. }
  653. }
  654. }), nil
  655. }
  656. // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  657. //
  658. // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  659. func (_ERC777 *ERC777Filterer) ParseApproval(log types.Log) (*ERC777Approval, error) {
  660. event := new(ERC777Approval)
  661. if err := _ERC777.contract.UnpackLog(event, "Approval", log); err != nil {
  662. return nil, err
  663. }
  664. return event, nil
  665. }
  666. // ERC777AuthorizedOperatorIterator is returned from FilterAuthorizedOperator and is used to iterate over the raw logs and unpacked data for AuthorizedOperator events raised by the ERC777 contract.
  667. type ERC777AuthorizedOperatorIterator struct {
  668. Event *ERC777AuthorizedOperator // Event containing the contract specifics and raw log
  669. contract *bind.BoundContract // Generic contract to use for unpacking event data
  670. event string // Event name to use for unpacking event data
  671. logs chan types.Log // Log channel receiving the found contract events
  672. sub ethereum.Subscription // Subscription for errors, completion and termination
  673. done bool // Whether the subscription completed delivering logs
  674. fail error // Occurred error to stop iteration
  675. }
  676. // Next advances the iterator to the subsequent event, returning whether there
  677. // are any more events found. In case of a retrieval or parsing error, false is
  678. // returned and Error() can be queried for the exact failure.
  679. func (it *ERC777AuthorizedOperatorIterator) Next() bool {
  680. // If the iterator failed, stop iterating
  681. if it.fail != nil {
  682. return false
  683. }
  684. // If the iterator completed, deliver directly whatever's available
  685. if it.done {
  686. select {
  687. case log := <-it.logs:
  688. it.Event = new(ERC777AuthorizedOperator)
  689. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  690. it.fail = err
  691. return false
  692. }
  693. it.Event.Raw = log
  694. return true
  695. default:
  696. return false
  697. }
  698. }
  699. // Iterator still in progress, wait for either a data or an error event
  700. select {
  701. case log := <-it.logs:
  702. it.Event = new(ERC777AuthorizedOperator)
  703. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  704. it.fail = err
  705. return false
  706. }
  707. it.Event.Raw = log
  708. return true
  709. case err := <-it.sub.Err():
  710. it.done = true
  711. it.fail = err
  712. return it.Next()
  713. }
  714. }
  715. // Error returns any retrieval or parsing error occurred during filtering.
  716. func (it *ERC777AuthorizedOperatorIterator) Error() error {
  717. return it.fail
  718. }
  719. // Close terminates the iteration process, releasing any pending underlying
  720. // resources.
  721. func (it *ERC777AuthorizedOperatorIterator) Close() error {
  722. it.sub.Unsubscribe()
  723. return nil
  724. }
  725. // ERC777AuthorizedOperator represents a AuthorizedOperator event raised by the ERC777 contract.
  726. type ERC777AuthorizedOperator struct {
  727. Operator common.Address
  728. TokenHolder common.Address
  729. Raw types.Log // Blockchain specific contextual infos
  730. }
  731. // FilterAuthorizedOperator is a free log retrieval operation binding the contract event 0xf4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f9.
  732. //
  733. // Solidity: event AuthorizedOperator(address indexed operator, address indexed tokenHolder)
  734. func (_ERC777 *ERC777Filterer) FilterAuthorizedOperator(opts *bind.FilterOpts, operator []common.Address, tokenHolder []common.Address) (*ERC777AuthorizedOperatorIterator, error) {
  735. var operatorRule []interface{}
  736. for _, operatorItem := range operator {
  737. operatorRule = append(operatorRule, operatorItem)
  738. }
  739. var tokenHolderRule []interface{}
  740. for _, tokenHolderItem := range tokenHolder {
  741. tokenHolderRule = append(tokenHolderRule, tokenHolderItem)
  742. }
  743. logs, sub, err := _ERC777.contract.FilterLogs(opts, "AuthorizedOperator", operatorRule, tokenHolderRule)
  744. if err != nil {
  745. return nil, err
  746. }
  747. return &ERC777AuthorizedOperatorIterator{contract: _ERC777.contract, event: "AuthorizedOperator", logs: logs, sub: sub}, nil
  748. }
  749. // WatchAuthorizedOperator is a free log subscription operation binding the contract event 0xf4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f9.
  750. //
  751. // Solidity: event AuthorizedOperator(address indexed operator, address indexed tokenHolder)
  752. func (_ERC777 *ERC777Filterer) WatchAuthorizedOperator(opts *bind.WatchOpts, sink chan<- *ERC777AuthorizedOperator, operator []common.Address, tokenHolder []common.Address) (event.Subscription, error) {
  753. var operatorRule []interface{}
  754. for _, operatorItem := range operator {
  755. operatorRule = append(operatorRule, operatorItem)
  756. }
  757. var tokenHolderRule []interface{}
  758. for _, tokenHolderItem := range tokenHolder {
  759. tokenHolderRule = append(tokenHolderRule, tokenHolderItem)
  760. }
  761. logs, sub, err := _ERC777.contract.WatchLogs(opts, "AuthorizedOperator", operatorRule, tokenHolderRule)
  762. if err != nil {
  763. return nil, err
  764. }
  765. return event.NewSubscription(func(quit <-chan struct{}) error {
  766. defer sub.Unsubscribe()
  767. for {
  768. select {
  769. case log := <-logs:
  770. // New log arrived, parse the event and forward to the user
  771. event := new(ERC777AuthorizedOperator)
  772. if err := _ERC777.contract.UnpackLog(event, "AuthorizedOperator", log); err != nil {
  773. return err
  774. }
  775. event.Raw = log
  776. select {
  777. case sink <- event:
  778. case err := <-sub.Err():
  779. return err
  780. case <-quit:
  781. return nil
  782. }
  783. case err := <-sub.Err():
  784. return err
  785. case <-quit:
  786. return nil
  787. }
  788. }
  789. }), nil
  790. }
  791. // ParseAuthorizedOperator is a log parse operation binding the contract event 0xf4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f9.
  792. //
  793. // Solidity: event AuthorizedOperator(address indexed operator, address indexed tokenHolder)
  794. func (_ERC777 *ERC777Filterer) ParseAuthorizedOperator(log types.Log) (*ERC777AuthorizedOperator, error) {
  795. event := new(ERC777AuthorizedOperator)
  796. if err := _ERC777.contract.UnpackLog(event, "AuthorizedOperator", log); err != nil {
  797. return nil, err
  798. }
  799. return event, nil
  800. }
  801. // ERC777BurnedIterator is returned from FilterBurned and is used to iterate over the raw logs and unpacked data for Burned events raised by the ERC777 contract.
  802. type ERC777BurnedIterator struct {
  803. Event *ERC777Burned // Event containing the contract specifics and raw log
  804. contract *bind.BoundContract // Generic contract to use for unpacking event data
  805. event string // Event name to use for unpacking event data
  806. logs chan types.Log // Log channel receiving the found contract events
  807. sub ethereum.Subscription // Subscription for errors, completion and termination
  808. done bool // Whether the subscription completed delivering logs
  809. fail error // Occurred error to stop iteration
  810. }
  811. // Next advances the iterator to the subsequent event, returning whether there
  812. // are any more events found. In case of a retrieval or parsing error, false is
  813. // returned and Error() can be queried for the exact failure.
  814. func (it *ERC777BurnedIterator) Next() bool {
  815. // If the iterator failed, stop iterating
  816. if it.fail != nil {
  817. return false
  818. }
  819. // If the iterator completed, deliver directly whatever's available
  820. if it.done {
  821. select {
  822. case log := <-it.logs:
  823. it.Event = new(ERC777Burned)
  824. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  825. it.fail = err
  826. return false
  827. }
  828. it.Event.Raw = log
  829. return true
  830. default:
  831. return false
  832. }
  833. }
  834. // Iterator still in progress, wait for either a data or an error event
  835. select {
  836. case log := <-it.logs:
  837. it.Event = new(ERC777Burned)
  838. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  839. it.fail = err
  840. return false
  841. }
  842. it.Event.Raw = log
  843. return true
  844. case err := <-it.sub.Err():
  845. it.done = true
  846. it.fail = err
  847. return it.Next()
  848. }
  849. }
  850. // Error returns any retrieval or parsing error occurred during filtering.
  851. func (it *ERC777BurnedIterator) Error() error {
  852. return it.fail
  853. }
  854. // Close terminates the iteration process, releasing any pending underlying
  855. // resources.
  856. func (it *ERC777BurnedIterator) Close() error {
  857. it.sub.Unsubscribe()
  858. return nil
  859. }
  860. // ERC777Burned represents a Burned event raised by the ERC777 contract.
  861. type ERC777Burned struct {
  862. Operator common.Address
  863. From common.Address
  864. Amount *big.Int
  865. Data []byte
  866. OperatorData []byte
  867. Raw types.Log // Blockchain specific contextual infos
  868. }
  869. // FilterBurned is a free log retrieval operation binding the contract event 0xa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098.
  870. //
  871. // Solidity: event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData)
  872. func (_ERC777 *ERC777Filterer) FilterBurned(opts *bind.FilterOpts, operator []common.Address, from []common.Address) (*ERC777BurnedIterator, error) {
  873. var operatorRule []interface{}
  874. for _, operatorItem := range operator {
  875. operatorRule = append(operatorRule, operatorItem)
  876. }
  877. var fromRule []interface{}
  878. for _, fromItem := range from {
  879. fromRule = append(fromRule, fromItem)
  880. }
  881. logs, sub, err := _ERC777.contract.FilterLogs(opts, "Burned", operatorRule, fromRule)
  882. if err != nil {
  883. return nil, err
  884. }
  885. return &ERC777BurnedIterator{contract: _ERC777.contract, event: "Burned", logs: logs, sub: sub}, nil
  886. }
  887. // WatchBurned is a free log subscription operation binding the contract event 0xa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098.
  888. //
  889. // Solidity: event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData)
  890. func (_ERC777 *ERC777Filterer) WatchBurned(opts *bind.WatchOpts, sink chan<- *ERC777Burned, operator []common.Address, from []common.Address) (event.Subscription, error) {
  891. var operatorRule []interface{}
  892. for _, operatorItem := range operator {
  893. operatorRule = append(operatorRule, operatorItem)
  894. }
  895. var fromRule []interface{}
  896. for _, fromItem := range from {
  897. fromRule = append(fromRule, fromItem)
  898. }
  899. logs, sub, err := _ERC777.contract.WatchLogs(opts, "Burned", operatorRule, fromRule)
  900. if err != nil {
  901. return nil, err
  902. }
  903. return event.NewSubscription(func(quit <-chan struct{}) error {
  904. defer sub.Unsubscribe()
  905. for {
  906. select {
  907. case log := <-logs:
  908. // New log arrived, parse the event and forward to the user
  909. event := new(ERC777Burned)
  910. if err := _ERC777.contract.UnpackLog(event, "Burned", log); err != nil {
  911. return err
  912. }
  913. event.Raw = log
  914. select {
  915. case sink <- event:
  916. case err := <-sub.Err():
  917. return err
  918. case <-quit:
  919. return nil
  920. }
  921. case err := <-sub.Err():
  922. return err
  923. case <-quit:
  924. return nil
  925. }
  926. }
  927. }), nil
  928. }
  929. // ParseBurned is a log parse operation binding the contract event 0xa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098.
  930. //
  931. // Solidity: event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData)
  932. func (_ERC777 *ERC777Filterer) ParseBurned(log types.Log) (*ERC777Burned, error) {
  933. event := new(ERC777Burned)
  934. if err := _ERC777.contract.UnpackLog(event, "Burned", log); err != nil {
  935. return nil, err
  936. }
  937. return event, nil
  938. }
  939. // ERC777MintedIterator is returned from FilterMinted and is used to iterate over the raw logs and unpacked data for Minted events raised by the ERC777 contract.
  940. type ERC777MintedIterator struct {
  941. Event *ERC777Minted // Event containing the contract specifics and raw log
  942. contract *bind.BoundContract // Generic contract to use for unpacking event data
  943. event string // Event name to use for unpacking event data
  944. logs chan types.Log // Log channel receiving the found contract events
  945. sub ethereum.Subscription // Subscription for errors, completion and termination
  946. done bool // Whether the subscription completed delivering logs
  947. fail error // Occurred error to stop iteration
  948. }
  949. // Next advances the iterator to the subsequent event, returning whether there
  950. // are any more events found. In case of a retrieval or parsing error, false is
  951. // returned and Error() can be queried for the exact failure.
  952. func (it *ERC777MintedIterator) Next() bool {
  953. // If the iterator failed, stop iterating
  954. if it.fail != nil {
  955. return false
  956. }
  957. // If the iterator completed, deliver directly whatever's available
  958. if it.done {
  959. select {
  960. case log := <-it.logs:
  961. it.Event = new(ERC777Minted)
  962. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  963. it.fail = err
  964. return false
  965. }
  966. it.Event.Raw = log
  967. return true
  968. default:
  969. return false
  970. }
  971. }
  972. // Iterator still in progress, wait for either a data or an error event
  973. select {
  974. case log := <-it.logs:
  975. it.Event = new(ERC777Minted)
  976. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  977. it.fail = err
  978. return false
  979. }
  980. it.Event.Raw = log
  981. return true
  982. case err := <-it.sub.Err():
  983. it.done = true
  984. it.fail = err
  985. return it.Next()
  986. }
  987. }
  988. // Error returns any retrieval or parsing error occurred during filtering.
  989. func (it *ERC777MintedIterator) Error() error {
  990. return it.fail
  991. }
  992. // Close terminates the iteration process, releasing any pending underlying
  993. // resources.
  994. func (it *ERC777MintedIterator) Close() error {
  995. it.sub.Unsubscribe()
  996. return nil
  997. }
  998. // ERC777Minted represents a Minted event raised by the ERC777 contract.
  999. type ERC777Minted struct {
  1000. Operator common.Address
  1001. To common.Address
  1002. Amount *big.Int
  1003. Data []byte
  1004. OperatorData []byte
  1005. Raw types.Log // Blockchain specific contextual infos
  1006. }
  1007. // FilterMinted is a free log retrieval operation binding the contract event 0x2fe5be0146f74c5bce36c0b80911af6c7d86ff27e89d5cfa61fc681327954e5d.
  1008. //
  1009. // Solidity: event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData)
  1010. func (_ERC777 *ERC777Filterer) FilterMinted(opts *bind.FilterOpts, operator []common.Address, to []common.Address) (*ERC777MintedIterator, error) {
  1011. var operatorRule []interface{}
  1012. for _, operatorItem := range operator {
  1013. operatorRule = append(operatorRule, operatorItem)
  1014. }
  1015. var toRule []interface{}
  1016. for _, toItem := range to {
  1017. toRule = append(toRule, toItem)
  1018. }
  1019. logs, sub, err := _ERC777.contract.FilterLogs(opts, "Minted", operatorRule, toRule)
  1020. if err != nil {
  1021. return nil, err
  1022. }
  1023. return &ERC777MintedIterator{contract: _ERC777.contract, event: "Minted", logs: logs, sub: sub}, nil
  1024. }
  1025. // WatchMinted is a free log subscription operation binding the contract event 0x2fe5be0146f74c5bce36c0b80911af6c7d86ff27e89d5cfa61fc681327954e5d.
  1026. //
  1027. // Solidity: event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData)
  1028. func (_ERC777 *ERC777Filterer) WatchMinted(opts *bind.WatchOpts, sink chan<- *ERC777Minted, operator []common.Address, to []common.Address) (event.Subscription, error) {
  1029. var operatorRule []interface{}
  1030. for _, operatorItem := range operator {
  1031. operatorRule = append(operatorRule, operatorItem)
  1032. }
  1033. var toRule []interface{}
  1034. for _, toItem := range to {
  1035. toRule = append(toRule, toItem)
  1036. }
  1037. logs, sub, err := _ERC777.contract.WatchLogs(opts, "Minted", operatorRule, toRule)
  1038. if err != nil {
  1039. return nil, err
  1040. }
  1041. return event.NewSubscription(func(quit <-chan struct{}) error {
  1042. defer sub.Unsubscribe()
  1043. for {
  1044. select {
  1045. case log := <-logs:
  1046. // New log arrived, parse the event and forward to the user
  1047. event := new(ERC777Minted)
  1048. if err := _ERC777.contract.UnpackLog(event, "Minted", log); err != nil {
  1049. return err
  1050. }
  1051. event.Raw = log
  1052. select {
  1053. case sink <- event:
  1054. case err := <-sub.Err():
  1055. return err
  1056. case <-quit:
  1057. return nil
  1058. }
  1059. case err := <-sub.Err():
  1060. return err
  1061. case <-quit:
  1062. return nil
  1063. }
  1064. }
  1065. }), nil
  1066. }
  1067. // ParseMinted is a log parse operation binding the contract event 0x2fe5be0146f74c5bce36c0b80911af6c7d86ff27e89d5cfa61fc681327954e5d.
  1068. //
  1069. // Solidity: event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData)
  1070. func (_ERC777 *ERC777Filterer) ParseMinted(log types.Log) (*ERC777Minted, error) {
  1071. event := new(ERC777Minted)
  1072. if err := _ERC777.contract.UnpackLog(event, "Minted", log); err != nil {
  1073. return nil, err
  1074. }
  1075. return event, nil
  1076. }
  1077. // ERC777RevokedOperatorIterator is returned from FilterRevokedOperator and is used to iterate over the raw logs and unpacked data for RevokedOperator events raised by the ERC777 contract.
  1078. type ERC777RevokedOperatorIterator struct {
  1079. Event *ERC777RevokedOperator // Event containing the contract specifics and raw log
  1080. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1081. event string // Event name to use for unpacking event data
  1082. logs chan types.Log // Log channel receiving the found contract events
  1083. sub ethereum.Subscription // Subscription for errors, completion and termination
  1084. done bool // Whether the subscription completed delivering logs
  1085. fail error // Occurred error to stop iteration
  1086. }
  1087. // Next advances the iterator to the subsequent event, returning whether there
  1088. // are any more events found. In case of a retrieval or parsing error, false is
  1089. // returned and Error() can be queried for the exact failure.
  1090. func (it *ERC777RevokedOperatorIterator) Next() bool {
  1091. // If the iterator failed, stop iterating
  1092. if it.fail != nil {
  1093. return false
  1094. }
  1095. // If the iterator completed, deliver directly whatever's available
  1096. if it.done {
  1097. select {
  1098. case log := <-it.logs:
  1099. it.Event = new(ERC777RevokedOperator)
  1100. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1101. it.fail = err
  1102. return false
  1103. }
  1104. it.Event.Raw = log
  1105. return true
  1106. default:
  1107. return false
  1108. }
  1109. }
  1110. // Iterator still in progress, wait for either a data or an error event
  1111. select {
  1112. case log := <-it.logs:
  1113. it.Event = new(ERC777RevokedOperator)
  1114. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1115. it.fail = err
  1116. return false
  1117. }
  1118. it.Event.Raw = log
  1119. return true
  1120. case err := <-it.sub.Err():
  1121. it.done = true
  1122. it.fail = err
  1123. return it.Next()
  1124. }
  1125. }
  1126. // Error returns any retrieval or parsing error occurred during filtering.
  1127. func (it *ERC777RevokedOperatorIterator) Error() error {
  1128. return it.fail
  1129. }
  1130. // Close terminates the iteration process, releasing any pending underlying
  1131. // resources.
  1132. func (it *ERC777RevokedOperatorIterator) Close() error {
  1133. it.sub.Unsubscribe()
  1134. return nil
  1135. }
  1136. // ERC777RevokedOperator represents a RevokedOperator event raised by the ERC777 contract.
  1137. type ERC777RevokedOperator struct {
  1138. Operator common.Address
  1139. TokenHolder common.Address
  1140. Raw types.Log // Blockchain specific contextual infos
  1141. }
  1142. // FilterRevokedOperator is a free log retrieval operation binding the contract event 0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1.
  1143. //
  1144. // Solidity: event RevokedOperator(address indexed operator, address indexed tokenHolder)
  1145. func (_ERC777 *ERC777Filterer) FilterRevokedOperator(opts *bind.FilterOpts, operator []common.Address, tokenHolder []common.Address) (*ERC777RevokedOperatorIterator, error) {
  1146. var operatorRule []interface{}
  1147. for _, operatorItem := range operator {
  1148. operatorRule = append(operatorRule, operatorItem)
  1149. }
  1150. var tokenHolderRule []interface{}
  1151. for _, tokenHolderItem := range tokenHolder {
  1152. tokenHolderRule = append(tokenHolderRule, tokenHolderItem)
  1153. }
  1154. logs, sub, err := _ERC777.contract.FilterLogs(opts, "RevokedOperator", operatorRule, tokenHolderRule)
  1155. if err != nil {
  1156. return nil, err
  1157. }
  1158. return &ERC777RevokedOperatorIterator{contract: _ERC777.contract, event: "RevokedOperator", logs: logs, sub: sub}, nil
  1159. }
  1160. // WatchRevokedOperator is a free log subscription operation binding the contract event 0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1.
  1161. //
  1162. // Solidity: event RevokedOperator(address indexed operator, address indexed tokenHolder)
  1163. func (_ERC777 *ERC777Filterer) WatchRevokedOperator(opts *bind.WatchOpts, sink chan<- *ERC777RevokedOperator, operator []common.Address, tokenHolder []common.Address) (event.Subscription, error) {
  1164. var operatorRule []interface{}
  1165. for _, operatorItem := range operator {
  1166. operatorRule = append(operatorRule, operatorItem)
  1167. }
  1168. var tokenHolderRule []interface{}
  1169. for _, tokenHolderItem := range tokenHolder {
  1170. tokenHolderRule = append(tokenHolderRule, tokenHolderItem)
  1171. }
  1172. logs, sub, err := _ERC777.contract.WatchLogs(opts, "RevokedOperator", operatorRule, tokenHolderRule)
  1173. if err != nil {
  1174. return nil, err
  1175. }
  1176. return event.NewSubscription(func(quit <-chan struct{}) error {
  1177. defer sub.Unsubscribe()
  1178. for {
  1179. select {
  1180. case log := <-logs:
  1181. // New log arrived, parse the event and forward to the user
  1182. event := new(ERC777RevokedOperator)
  1183. if err := _ERC777.contract.UnpackLog(event, "RevokedOperator", log); err != nil {
  1184. return err
  1185. }
  1186. event.Raw = log
  1187. select {
  1188. case sink <- event:
  1189. case err := <-sub.Err():
  1190. return err
  1191. case <-quit:
  1192. return nil
  1193. }
  1194. case err := <-sub.Err():
  1195. return err
  1196. case <-quit:
  1197. return nil
  1198. }
  1199. }
  1200. }), nil
  1201. }
  1202. // ParseRevokedOperator is a log parse operation binding the contract event 0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1.
  1203. //
  1204. // Solidity: event RevokedOperator(address indexed operator, address indexed tokenHolder)
  1205. func (_ERC777 *ERC777Filterer) ParseRevokedOperator(log types.Log) (*ERC777RevokedOperator, error) {
  1206. event := new(ERC777RevokedOperator)
  1207. if err := _ERC777.contract.UnpackLog(event, "RevokedOperator", log); err != nil {
  1208. return nil, err
  1209. }
  1210. return event, nil
  1211. }
  1212. // ERC777SentIterator is returned from FilterSent and is used to iterate over the raw logs and unpacked data for Sent events raised by the ERC777 contract.
  1213. type ERC777SentIterator struct {
  1214. Event *ERC777Sent // Event containing the contract specifics and raw log
  1215. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1216. event string // Event name to use for unpacking event data
  1217. logs chan types.Log // Log channel receiving the found contract events
  1218. sub ethereum.Subscription // Subscription for errors, completion and termination
  1219. done bool // Whether the subscription completed delivering logs
  1220. fail error // Occurred error to stop iteration
  1221. }
  1222. // Next advances the iterator to the subsequent event, returning whether there
  1223. // are any more events found. In case of a retrieval or parsing error, false is
  1224. // returned and Error() can be queried for the exact failure.
  1225. func (it *ERC777SentIterator) Next() bool {
  1226. // If the iterator failed, stop iterating
  1227. if it.fail != nil {
  1228. return false
  1229. }
  1230. // If the iterator completed, deliver directly whatever's available
  1231. if it.done {
  1232. select {
  1233. case log := <-it.logs:
  1234. it.Event = new(ERC777Sent)
  1235. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1236. it.fail = err
  1237. return false
  1238. }
  1239. it.Event.Raw = log
  1240. return true
  1241. default:
  1242. return false
  1243. }
  1244. }
  1245. // Iterator still in progress, wait for either a data or an error event
  1246. select {
  1247. case log := <-it.logs:
  1248. it.Event = new(ERC777Sent)
  1249. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1250. it.fail = err
  1251. return false
  1252. }
  1253. it.Event.Raw = log
  1254. return true
  1255. case err := <-it.sub.Err():
  1256. it.done = true
  1257. it.fail = err
  1258. return it.Next()
  1259. }
  1260. }
  1261. // Error returns any retrieval or parsing error occurred during filtering.
  1262. func (it *ERC777SentIterator) Error() error {
  1263. return it.fail
  1264. }
  1265. // Close terminates the iteration process, releasing any pending underlying
  1266. // resources.
  1267. func (it *ERC777SentIterator) Close() error {
  1268. it.sub.Unsubscribe()
  1269. return nil
  1270. }
  1271. // ERC777Sent represents a Sent event raised by the ERC777 contract.
  1272. type ERC777Sent struct {
  1273. Operator common.Address
  1274. From common.Address
  1275. To common.Address
  1276. Amount *big.Int
  1277. Data []byte
  1278. OperatorData []byte
  1279. Raw types.Log // Blockchain specific contextual infos
  1280. }
  1281. // FilterSent is a free log retrieval operation binding the contract event 0x06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987.
  1282. //
  1283. // Solidity: event Sent(address indexed operator, address indexed from, address indexed to, uint256 amount, bytes data, bytes operatorData)
  1284. func (_ERC777 *ERC777Filterer) FilterSent(opts *bind.FilterOpts, operator []common.Address, from []common.Address, to []common.Address) (*ERC777SentIterator, error) {
  1285. var operatorRule []interface{}
  1286. for _, operatorItem := range operator {
  1287. operatorRule = append(operatorRule, operatorItem)
  1288. }
  1289. var fromRule []interface{}
  1290. for _, fromItem := range from {
  1291. fromRule = append(fromRule, fromItem)
  1292. }
  1293. var toRule []interface{}
  1294. for _, toItem := range to {
  1295. toRule = append(toRule, toItem)
  1296. }
  1297. logs, sub, err := _ERC777.contract.FilterLogs(opts, "Sent", operatorRule, fromRule, toRule)
  1298. if err != nil {
  1299. return nil, err
  1300. }
  1301. return &ERC777SentIterator{contract: _ERC777.contract, event: "Sent", logs: logs, sub: sub}, nil
  1302. }
  1303. // WatchSent is a free log subscription operation binding the contract event 0x06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987.
  1304. //
  1305. // Solidity: event Sent(address indexed operator, address indexed from, address indexed to, uint256 amount, bytes data, bytes operatorData)
  1306. func (_ERC777 *ERC777Filterer) WatchSent(opts *bind.WatchOpts, sink chan<- *ERC777Sent, operator []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) {
  1307. var operatorRule []interface{}
  1308. for _, operatorItem := range operator {
  1309. operatorRule = append(operatorRule, operatorItem)
  1310. }
  1311. var fromRule []interface{}
  1312. for _, fromItem := range from {
  1313. fromRule = append(fromRule, fromItem)
  1314. }
  1315. var toRule []interface{}
  1316. for _, toItem := range to {
  1317. toRule = append(toRule, toItem)
  1318. }
  1319. logs, sub, err := _ERC777.contract.WatchLogs(opts, "Sent", operatorRule, fromRule, toRule)
  1320. if err != nil {
  1321. return nil, err
  1322. }
  1323. return event.NewSubscription(func(quit <-chan struct{}) error {
  1324. defer sub.Unsubscribe()
  1325. for {
  1326. select {
  1327. case log := <-logs:
  1328. // New log arrived, parse the event and forward to the user
  1329. event := new(ERC777Sent)
  1330. if err := _ERC777.contract.UnpackLog(event, "Sent", log); err != nil {
  1331. return err
  1332. }
  1333. event.Raw = log
  1334. select {
  1335. case sink <- event:
  1336. case err := <-sub.Err():
  1337. return err
  1338. case <-quit:
  1339. return nil
  1340. }
  1341. case err := <-sub.Err():
  1342. return err
  1343. case <-quit:
  1344. return nil
  1345. }
  1346. }
  1347. }), nil
  1348. }
  1349. // ParseSent is a log parse operation binding the contract event 0x06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987.
  1350. //
  1351. // Solidity: event Sent(address indexed operator, address indexed from, address indexed to, uint256 amount, bytes data, bytes operatorData)
  1352. func (_ERC777 *ERC777Filterer) ParseSent(log types.Log) (*ERC777Sent, error) {
  1353. event := new(ERC777Sent)
  1354. if err := _ERC777.contract.UnpackLog(event, "Sent", log); err != nil {
  1355. return nil, err
  1356. }
  1357. return event, nil
  1358. }
  1359. // ERC777TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC777 contract.
  1360. type ERC777TransferIterator struct {
  1361. Event *ERC777Transfer // Event containing the contract specifics and raw log
  1362. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1363. event string // Event name to use for unpacking event data
  1364. logs chan types.Log // Log channel receiving the found contract events
  1365. sub ethereum.Subscription // Subscription for errors, completion and termination
  1366. done bool // Whether the subscription completed delivering logs
  1367. fail error // Occurred error to stop iteration
  1368. }
  1369. // Next advances the iterator to the subsequent event, returning whether there
  1370. // are any more events found. In case of a retrieval or parsing error, false is
  1371. // returned and Error() can be queried for the exact failure.
  1372. func (it *ERC777TransferIterator) Next() bool {
  1373. // If the iterator failed, stop iterating
  1374. if it.fail != nil {
  1375. return false
  1376. }
  1377. // If the iterator completed, deliver directly whatever's available
  1378. if it.done {
  1379. select {
  1380. case log := <-it.logs:
  1381. it.Event = new(ERC777Transfer)
  1382. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1383. it.fail = err
  1384. return false
  1385. }
  1386. it.Event.Raw = log
  1387. return true
  1388. default:
  1389. return false
  1390. }
  1391. }
  1392. // Iterator still in progress, wait for either a data or an error event
  1393. select {
  1394. case log := <-it.logs:
  1395. it.Event = new(ERC777Transfer)
  1396. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1397. it.fail = err
  1398. return false
  1399. }
  1400. it.Event.Raw = log
  1401. return true
  1402. case err := <-it.sub.Err():
  1403. it.done = true
  1404. it.fail = err
  1405. return it.Next()
  1406. }
  1407. }
  1408. // Error returns any retrieval or parsing error occurred during filtering.
  1409. func (it *ERC777TransferIterator) Error() error {
  1410. return it.fail
  1411. }
  1412. // Close terminates the iteration process, releasing any pending underlying
  1413. // resources.
  1414. func (it *ERC777TransferIterator) Close() error {
  1415. it.sub.Unsubscribe()
  1416. return nil
  1417. }
  1418. // ERC777Transfer represents a Transfer event raised by the ERC777 contract.
  1419. type ERC777Transfer struct {
  1420. From common.Address
  1421. To common.Address
  1422. Value *big.Int
  1423. Raw types.Log // Blockchain specific contextual infos
  1424. }
  1425. // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  1426. //
  1427. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  1428. func (_ERC777 *ERC777Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC777TransferIterator, error) {
  1429. var fromRule []interface{}
  1430. for _, fromItem := range from {
  1431. fromRule = append(fromRule, fromItem)
  1432. }
  1433. var toRule []interface{}
  1434. for _, toItem := range to {
  1435. toRule = append(toRule, toItem)
  1436. }
  1437. logs, sub, err := _ERC777.contract.FilterLogs(opts, "Transfer", fromRule, toRule)
  1438. if err != nil {
  1439. return nil, err
  1440. }
  1441. return &ERC777TransferIterator{contract: _ERC777.contract, event: "Transfer", logs: logs, sub: sub}, nil
  1442. }
  1443. // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  1444. //
  1445. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  1446. func (_ERC777 *ERC777Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC777Transfer, from []common.Address, to []common.Address) (event.Subscription, error) {
  1447. var fromRule []interface{}
  1448. for _, fromItem := range from {
  1449. fromRule = append(fromRule, fromItem)
  1450. }
  1451. var toRule []interface{}
  1452. for _, toItem := range to {
  1453. toRule = append(toRule, toItem)
  1454. }
  1455. logs, sub, err := _ERC777.contract.WatchLogs(opts, "Transfer", fromRule, toRule)
  1456. if err != nil {
  1457. return nil, err
  1458. }
  1459. return event.NewSubscription(func(quit <-chan struct{}) error {
  1460. defer sub.Unsubscribe()
  1461. for {
  1462. select {
  1463. case log := <-logs:
  1464. // New log arrived, parse the event and forward to the user
  1465. event := new(ERC777Transfer)
  1466. if err := _ERC777.contract.UnpackLog(event, "Transfer", log); err != nil {
  1467. return err
  1468. }
  1469. event.Raw = log
  1470. select {
  1471. case sink <- event:
  1472. case err := <-sub.Err():
  1473. return err
  1474. case <-quit:
  1475. return nil
  1476. }
  1477. case err := <-sub.Err():
  1478. return err
  1479. case <-quit:
  1480. return nil
  1481. }
  1482. }
  1483. }), nil
  1484. }
  1485. // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  1486. //
  1487. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  1488. func (_ERC777 *ERC777Filterer) ParseTransfer(log types.Log) (*ERC777Transfer, error) {
  1489. event := new(ERC777Transfer)
  1490. if err := _ERC777.contract.UnpackLog(event, "Transfer", log); err != nil {
  1491. return nil, err
  1492. }
  1493. return event, nil
  1494. }