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.

1224 lines
50 KiB

  1. // Code generated - DO NOT EDIT.
  2. // This file is a generated binding and any manual changes will be lost.
  3. package HEZ
  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. // HEZABI is the input ABI used to generate the binding from.
  25. const HEZABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initialHolder\",\"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\":\"authorizer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"nonce\",\"type\":\"bytes32\"}],\"name\":\"AuthorizationUsed\",\"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\":[],\"name\":\"EIP712DOMAIN_HASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NAME_HASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMIT_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TRANSFER_WITH_AUTHORIZATION_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VERSION_HASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"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\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"authorizationState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"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\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"validAfter\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"validBefore\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"nonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"transferWithAuthorization\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
  26. // HEZ is an auto generated Go binding around an Ethereum contract.
  27. type HEZ struct {
  28. HEZCaller // Read-only binding to the contract
  29. HEZTransactor // Write-only binding to the contract
  30. HEZFilterer // Log filterer for contract events
  31. }
  32. // HEZCaller is an auto generated read-only Go binding around an Ethereum contract.
  33. type HEZCaller struct {
  34. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  35. }
  36. // HEZTransactor is an auto generated write-only Go binding around an Ethereum contract.
  37. type HEZTransactor struct {
  38. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  39. }
  40. // HEZFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  41. type HEZFilterer struct {
  42. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  43. }
  44. // HEZSession is an auto generated Go binding around an Ethereum contract,
  45. // with pre-set call and transact options.
  46. type HEZSession struct {
  47. Contract *HEZ // Generic contract binding to set the session for
  48. CallOpts bind.CallOpts // Call options to use throughout this session
  49. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  50. }
  51. // HEZCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  52. // with pre-set call options.
  53. type HEZCallerSession struct {
  54. Contract *HEZCaller // Generic contract caller binding to set the session for
  55. CallOpts bind.CallOpts // Call options to use throughout this session
  56. }
  57. // HEZTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  58. // with pre-set transact options.
  59. type HEZTransactorSession struct {
  60. Contract *HEZTransactor // Generic contract transactor binding to set the session for
  61. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  62. }
  63. // HEZRaw is an auto generated low-level Go binding around an Ethereum contract.
  64. type HEZRaw struct {
  65. Contract *HEZ // Generic contract binding to access the raw methods on
  66. }
  67. // HEZCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  68. type HEZCallerRaw struct {
  69. Contract *HEZCaller // Generic read-only contract binding to access the raw methods on
  70. }
  71. // HEZTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  72. type HEZTransactorRaw struct {
  73. Contract *HEZTransactor // Generic write-only contract binding to access the raw methods on
  74. }
  75. // NewHEZ creates a new instance of HEZ, bound to a specific deployed contract.
  76. func NewHEZ(address common.Address, backend bind.ContractBackend) (*HEZ, error) {
  77. contract, err := bindHEZ(address, backend, backend, backend)
  78. if err != nil {
  79. return nil, err
  80. }
  81. return &HEZ{HEZCaller: HEZCaller{contract: contract}, HEZTransactor: HEZTransactor{contract: contract}, HEZFilterer: HEZFilterer{contract: contract}}, nil
  82. }
  83. // NewHEZCaller creates a new read-only instance of HEZ, bound to a specific deployed contract.
  84. func NewHEZCaller(address common.Address, caller bind.ContractCaller) (*HEZCaller, error) {
  85. contract, err := bindHEZ(address, caller, nil, nil)
  86. if err != nil {
  87. return nil, err
  88. }
  89. return &HEZCaller{contract: contract}, nil
  90. }
  91. // NewHEZTransactor creates a new write-only instance of HEZ, bound to a specific deployed contract.
  92. func NewHEZTransactor(address common.Address, transactor bind.ContractTransactor) (*HEZTransactor, error) {
  93. contract, err := bindHEZ(address, nil, transactor, nil)
  94. if err != nil {
  95. return nil, err
  96. }
  97. return &HEZTransactor{contract: contract}, nil
  98. }
  99. // NewHEZFilterer creates a new log filterer instance of HEZ, bound to a specific deployed contract.
  100. func NewHEZFilterer(address common.Address, filterer bind.ContractFilterer) (*HEZFilterer, error) {
  101. contract, err := bindHEZ(address, nil, nil, filterer)
  102. if err != nil {
  103. return nil, err
  104. }
  105. return &HEZFilterer{contract: contract}, nil
  106. }
  107. // bindHEZ binds a generic wrapper to an already deployed contract.
  108. func bindHEZ(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  109. parsed, err := abi.JSON(strings.NewReader(HEZABI))
  110. if err != nil {
  111. return nil, err
  112. }
  113. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  114. }
  115. // Call invokes the (constant) contract method with params as input values and
  116. // sets the output to result. The result type might be a single field for simple
  117. // returns, a slice of interfaces for anonymous returns and a struct for named
  118. // returns.
  119. func (_HEZ *HEZRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  120. return _HEZ.Contract.HEZCaller.contract.Call(opts, result, method, params...)
  121. }
  122. // Transfer initiates a plain transaction to move funds to the contract, calling
  123. // its default method if one is available.
  124. func (_HEZ *HEZRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  125. return _HEZ.Contract.HEZTransactor.contract.Transfer(opts)
  126. }
  127. // Transact invokes the (paid) contract method with params as input values.
  128. func (_HEZ *HEZRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  129. return _HEZ.Contract.HEZTransactor.contract.Transact(opts, method, params...)
  130. }
  131. // Call invokes the (constant) contract method with params as input values and
  132. // sets the output to result. The result type might be a single field for simple
  133. // returns, a slice of interfaces for anonymous returns and a struct for named
  134. // returns.
  135. func (_HEZ *HEZCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  136. return _HEZ.Contract.contract.Call(opts, result, method, params...)
  137. }
  138. // Transfer initiates a plain transaction to move funds to the contract, calling
  139. // its default method if one is available.
  140. func (_HEZ *HEZTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  141. return _HEZ.Contract.contract.Transfer(opts)
  142. }
  143. // Transact invokes the (paid) contract method with params as input values.
  144. func (_HEZ *HEZTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  145. return _HEZ.Contract.contract.Transact(opts, method, params...)
  146. }
  147. // EIP712DOMAINHASH is a free data retrieval call binding the contract method 0xc473af33.
  148. //
  149. // Solidity: function EIP712DOMAIN_HASH() view returns(bytes32)
  150. func (_HEZ *HEZCaller) EIP712DOMAINHASH(opts *bind.CallOpts) ([32]byte, error) {
  151. var out []interface{}
  152. err := _HEZ.contract.Call(opts, &out, "EIP712DOMAIN_HASH")
  153. if err != nil {
  154. return *new([32]byte), err
  155. }
  156. out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
  157. return out0, err
  158. }
  159. // EIP712DOMAINHASH is a free data retrieval call binding the contract method 0xc473af33.
  160. //
  161. // Solidity: function EIP712DOMAIN_HASH() view returns(bytes32)
  162. func (_HEZ *HEZSession) EIP712DOMAINHASH() ([32]byte, error) {
  163. return _HEZ.Contract.EIP712DOMAINHASH(&_HEZ.CallOpts)
  164. }
  165. // EIP712DOMAINHASH is a free data retrieval call binding the contract method 0xc473af33.
  166. //
  167. // Solidity: function EIP712DOMAIN_HASH() view returns(bytes32)
  168. func (_HEZ *HEZCallerSession) EIP712DOMAINHASH() ([32]byte, error) {
  169. return _HEZ.Contract.EIP712DOMAINHASH(&_HEZ.CallOpts)
  170. }
  171. // NAMEHASH is a free data retrieval call binding the contract method 0x04622c2e.
  172. //
  173. // Solidity: function NAME_HASH() view returns(bytes32)
  174. func (_HEZ *HEZCaller) NAMEHASH(opts *bind.CallOpts) ([32]byte, error) {
  175. var out []interface{}
  176. err := _HEZ.contract.Call(opts, &out, "NAME_HASH")
  177. if err != nil {
  178. return *new([32]byte), err
  179. }
  180. out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
  181. return out0, err
  182. }
  183. // NAMEHASH is a free data retrieval call binding the contract method 0x04622c2e.
  184. //
  185. // Solidity: function NAME_HASH() view returns(bytes32)
  186. func (_HEZ *HEZSession) NAMEHASH() ([32]byte, error) {
  187. return _HEZ.Contract.NAMEHASH(&_HEZ.CallOpts)
  188. }
  189. // NAMEHASH is a free data retrieval call binding the contract method 0x04622c2e.
  190. //
  191. // Solidity: function NAME_HASH() view returns(bytes32)
  192. func (_HEZ *HEZCallerSession) NAMEHASH() ([32]byte, error) {
  193. return _HEZ.Contract.NAMEHASH(&_HEZ.CallOpts)
  194. }
  195. // PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f.
  196. //
  197. // Solidity: function PERMIT_TYPEHASH() view returns(bytes32)
  198. func (_HEZ *HEZCaller) PERMITTYPEHASH(opts *bind.CallOpts) ([32]byte, error) {
  199. var out []interface{}
  200. err := _HEZ.contract.Call(opts, &out, "PERMIT_TYPEHASH")
  201. if err != nil {
  202. return *new([32]byte), err
  203. }
  204. out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
  205. return out0, err
  206. }
  207. // PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f.
  208. //
  209. // Solidity: function PERMIT_TYPEHASH() view returns(bytes32)
  210. func (_HEZ *HEZSession) PERMITTYPEHASH() ([32]byte, error) {
  211. return _HEZ.Contract.PERMITTYPEHASH(&_HEZ.CallOpts)
  212. }
  213. // PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f.
  214. //
  215. // Solidity: function PERMIT_TYPEHASH() view returns(bytes32)
  216. func (_HEZ *HEZCallerSession) PERMITTYPEHASH() ([32]byte, error) {
  217. return _HEZ.Contract.PERMITTYPEHASH(&_HEZ.CallOpts)
  218. }
  219. // TRANSFERWITHAUTHORIZATIONTYPEHASH is a free data retrieval call binding the contract method 0xa0cc6a68.
  220. //
  221. // Solidity: function TRANSFER_WITH_AUTHORIZATION_TYPEHASH() view returns(bytes32)
  222. func (_HEZ *HEZCaller) TRANSFERWITHAUTHORIZATIONTYPEHASH(opts *bind.CallOpts) ([32]byte, error) {
  223. var out []interface{}
  224. err := _HEZ.contract.Call(opts, &out, "TRANSFER_WITH_AUTHORIZATION_TYPEHASH")
  225. if err != nil {
  226. return *new([32]byte), err
  227. }
  228. out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
  229. return out0, err
  230. }
  231. // TRANSFERWITHAUTHORIZATIONTYPEHASH is a free data retrieval call binding the contract method 0xa0cc6a68.
  232. //
  233. // Solidity: function TRANSFER_WITH_AUTHORIZATION_TYPEHASH() view returns(bytes32)
  234. func (_HEZ *HEZSession) TRANSFERWITHAUTHORIZATIONTYPEHASH() ([32]byte, error) {
  235. return _HEZ.Contract.TRANSFERWITHAUTHORIZATIONTYPEHASH(&_HEZ.CallOpts)
  236. }
  237. // TRANSFERWITHAUTHORIZATIONTYPEHASH is a free data retrieval call binding the contract method 0xa0cc6a68.
  238. //
  239. // Solidity: function TRANSFER_WITH_AUTHORIZATION_TYPEHASH() view returns(bytes32)
  240. func (_HEZ *HEZCallerSession) TRANSFERWITHAUTHORIZATIONTYPEHASH() ([32]byte, error) {
  241. return _HEZ.Contract.TRANSFERWITHAUTHORIZATIONTYPEHASH(&_HEZ.CallOpts)
  242. }
  243. // VERSIONHASH is a free data retrieval call binding the contract method 0x9e4e7318.
  244. //
  245. // Solidity: function VERSION_HASH() view returns(bytes32)
  246. func (_HEZ *HEZCaller) VERSIONHASH(opts *bind.CallOpts) ([32]byte, error) {
  247. var out []interface{}
  248. err := _HEZ.contract.Call(opts, &out, "VERSION_HASH")
  249. if err != nil {
  250. return *new([32]byte), err
  251. }
  252. out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
  253. return out0, err
  254. }
  255. // VERSIONHASH is a free data retrieval call binding the contract method 0x9e4e7318.
  256. //
  257. // Solidity: function VERSION_HASH() view returns(bytes32)
  258. func (_HEZ *HEZSession) VERSIONHASH() ([32]byte, error) {
  259. return _HEZ.Contract.VERSIONHASH(&_HEZ.CallOpts)
  260. }
  261. // VERSIONHASH is a free data retrieval call binding the contract method 0x9e4e7318.
  262. //
  263. // Solidity: function VERSION_HASH() view returns(bytes32)
  264. func (_HEZ *HEZCallerSession) VERSIONHASH() ([32]byte, error) {
  265. return _HEZ.Contract.VERSIONHASH(&_HEZ.CallOpts)
  266. }
  267. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  268. //
  269. // Solidity: function allowance(address , address ) view returns(uint256)
  270. func (_HEZ *HEZCaller) Allowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error) {
  271. var out []interface{}
  272. err := _HEZ.contract.Call(opts, &out, "allowance", arg0, arg1)
  273. if err != nil {
  274. return *new(*big.Int), err
  275. }
  276. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  277. return out0, err
  278. }
  279. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  280. //
  281. // Solidity: function allowance(address , address ) view returns(uint256)
  282. func (_HEZ *HEZSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) {
  283. return _HEZ.Contract.Allowance(&_HEZ.CallOpts, arg0, arg1)
  284. }
  285. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  286. //
  287. // Solidity: function allowance(address , address ) view returns(uint256)
  288. func (_HEZ *HEZCallerSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) {
  289. return _HEZ.Contract.Allowance(&_HEZ.CallOpts, arg0, arg1)
  290. }
  291. // AuthorizationState is a free data retrieval call binding the contract method 0xe94a0102.
  292. //
  293. // Solidity: function authorizationState(address , bytes32 ) view returns(bool)
  294. func (_HEZ *HEZCaller) AuthorizationState(opts *bind.CallOpts, arg0 common.Address, arg1 [32]byte) (bool, error) {
  295. var out []interface{}
  296. err := _HEZ.contract.Call(opts, &out, "authorizationState", arg0, arg1)
  297. if err != nil {
  298. return *new(bool), err
  299. }
  300. out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
  301. return out0, err
  302. }
  303. // AuthorizationState is a free data retrieval call binding the contract method 0xe94a0102.
  304. //
  305. // Solidity: function authorizationState(address , bytes32 ) view returns(bool)
  306. func (_HEZ *HEZSession) AuthorizationState(arg0 common.Address, arg1 [32]byte) (bool, error) {
  307. return _HEZ.Contract.AuthorizationState(&_HEZ.CallOpts, arg0, arg1)
  308. }
  309. // AuthorizationState is a free data retrieval call binding the contract method 0xe94a0102.
  310. //
  311. // Solidity: function authorizationState(address , bytes32 ) view returns(bool)
  312. func (_HEZ *HEZCallerSession) AuthorizationState(arg0 common.Address, arg1 [32]byte) (bool, error) {
  313. return _HEZ.Contract.AuthorizationState(&_HEZ.CallOpts, arg0, arg1)
  314. }
  315. // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  316. //
  317. // Solidity: function balanceOf(address ) view returns(uint256)
  318. func (_HEZ *HEZCaller) BalanceOf(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) {
  319. var out []interface{}
  320. err := _HEZ.contract.Call(opts, &out, "balanceOf", arg0)
  321. if err != nil {
  322. return *new(*big.Int), err
  323. }
  324. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  325. return out0, err
  326. }
  327. // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  328. //
  329. // Solidity: function balanceOf(address ) view returns(uint256)
  330. func (_HEZ *HEZSession) BalanceOf(arg0 common.Address) (*big.Int, error) {
  331. return _HEZ.Contract.BalanceOf(&_HEZ.CallOpts, arg0)
  332. }
  333. // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  334. //
  335. // Solidity: function balanceOf(address ) view returns(uint256)
  336. func (_HEZ *HEZCallerSession) BalanceOf(arg0 common.Address) (*big.Int, error) {
  337. return _HEZ.Contract.BalanceOf(&_HEZ.CallOpts, arg0)
  338. }
  339. // Decimals is a free data retrieval call binding the contract method 0x313ce567.
  340. //
  341. // Solidity: function decimals() view returns(uint8)
  342. func (_HEZ *HEZCaller) Decimals(opts *bind.CallOpts) (uint8, error) {
  343. var out []interface{}
  344. err := _HEZ.contract.Call(opts, &out, "decimals")
  345. if err != nil {
  346. return *new(uint8), err
  347. }
  348. out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8)
  349. return out0, err
  350. }
  351. // Decimals is a free data retrieval call binding the contract method 0x313ce567.
  352. //
  353. // Solidity: function decimals() view returns(uint8)
  354. func (_HEZ *HEZSession) Decimals() (uint8, error) {
  355. return _HEZ.Contract.Decimals(&_HEZ.CallOpts)
  356. }
  357. // Decimals is a free data retrieval call binding the contract method 0x313ce567.
  358. //
  359. // Solidity: function decimals() view returns(uint8)
  360. func (_HEZ *HEZCallerSession) Decimals() (uint8, error) {
  361. return _HEZ.Contract.Decimals(&_HEZ.CallOpts)
  362. }
  363. // GetChainId is a free data retrieval call binding the contract method 0x3408e470.
  364. //
  365. // Solidity: function getChainId() pure returns(uint256 chainId)
  366. func (_HEZ *HEZCaller) GetChainId(opts *bind.CallOpts) (*big.Int, error) {
  367. var out []interface{}
  368. err := _HEZ.contract.Call(opts, &out, "getChainId")
  369. if err != nil {
  370. return *new(*big.Int), err
  371. }
  372. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  373. return out0, err
  374. }
  375. // GetChainId is a free data retrieval call binding the contract method 0x3408e470.
  376. //
  377. // Solidity: function getChainId() pure returns(uint256 chainId)
  378. func (_HEZ *HEZSession) GetChainId() (*big.Int, error) {
  379. return _HEZ.Contract.GetChainId(&_HEZ.CallOpts)
  380. }
  381. // GetChainId is a free data retrieval call binding the contract method 0x3408e470.
  382. //
  383. // Solidity: function getChainId() pure returns(uint256 chainId)
  384. func (_HEZ *HEZCallerSession) GetChainId() (*big.Int, error) {
  385. return _HEZ.Contract.GetChainId(&_HEZ.CallOpts)
  386. }
  387. // InitialBalance is a free data retrieval call binding the contract method 0x18369a2a.
  388. //
  389. // Solidity: function initialBalance() view returns(uint256)
  390. func (_HEZ *HEZCaller) InitialBalance(opts *bind.CallOpts) (*big.Int, error) {
  391. var out []interface{}
  392. err := _HEZ.contract.Call(opts, &out, "initialBalance")
  393. if err != nil {
  394. return *new(*big.Int), err
  395. }
  396. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  397. return out0, err
  398. }
  399. // InitialBalance is a free data retrieval call binding the contract method 0x18369a2a.
  400. //
  401. // Solidity: function initialBalance() view returns(uint256)
  402. func (_HEZ *HEZSession) InitialBalance() (*big.Int, error) {
  403. return _HEZ.Contract.InitialBalance(&_HEZ.CallOpts)
  404. }
  405. // InitialBalance is a free data retrieval call binding the contract method 0x18369a2a.
  406. //
  407. // Solidity: function initialBalance() view returns(uint256)
  408. func (_HEZ *HEZCallerSession) InitialBalance() (*big.Int, error) {
  409. return _HEZ.Contract.InitialBalance(&_HEZ.CallOpts)
  410. }
  411. // Name is a free data retrieval call binding the contract method 0x06fdde03.
  412. //
  413. // Solidity: function name() view returns(string)
  414. func (_HEZ *HEZCaller) Name(opts *bind.CallOpts) (string, error) {
  415. var out []interface{}
  416. err := _HEZ.contract.Call(opts, &out, "name")
  417. if err != nil {
  418. return *new(string), err
  419. }
  420. out0 := *abi.ConvertType(out[0], new(string)).(*string)
  421. return out0, err
  422. }
  423. // Name is a free data retrieval call binding the contract method 0x06fdde03.
  424. //
  425. // Solidity: function name() view returns(string)
  426. func (_HEZ *HEZSession) Name() (string, error) {
  427. return _HEZ.Contract.Name(&_HEZ.CallOpts)
  428. }
  429. // Name is a free data retrieval call binding the contract method 0x06fdde03.
  430. //
  431. // Solidity: function name() view returns(string)
  432. func (_HEZ *HEZCallerSession) Name() (string, error) {
  433. return _HEZ.Contract.Name(&_HEZ.CallOpts)
  434. }
  435. // Nonces is a free data retrieval call binding the contract method 0x7ecebe00.
  436. //
  437. // Solidity: function nonces(address ) view returns(uint256)
  438. func (_HEZ *HEZCaller) Nonces(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) {
  439. var out []interface{}
  440. err := _HEZ.contract.Call(opts, &out, "nonces", arg0)
  441. if err != nil {
  442. return *new(*big.Int), err
  443. }
  444. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  445. return out0, err
  446. }
  447. // Nonces is a free data retrieval call binding the contract method 0x7ecebe00.
  448. //
  449. // Solidity: function nonces(address ) view returns(uint256)
  450. func (_HEZ *HEZSession) Nonces(arg0 common.Address) (*big.Int, error) {
  451. return _HEZ.Contract.Nonces(&_HEZ.CallOpts, arg0)
  452. }
  453. // Nonces is a free data retrieval call binding the contract method 0x7ecebe00.
  454. //
  455. // Solidity: function nonces(address ) view returns(uint256)
  456. func (_HEZ *HEZCallerSession) Nonces(arg0 common.Address) (*big.Int, error) {
  457. return _HEZ.Contract.Nonces(&_HEZ.CallOpts, arg0)
  458. }
  459. // Symbol is a free data retrieval call binding the contract method 0x95d89b41.
  460. //
  461. // Solidity: function symbol() view returns(string)
  462. func (_HEZ *HEZCaller) Symbol(opts *bind.CallOpts) (string, error) {
  463. var out []interface{}
  464. err := _HEZ.contract.Call(opts, &out, "symbol")
  465. if err != nil {
  466. return *new(string), err
  467. }
  468. out0 := *abi.ConvertType(out[0], new(string)).(*string)
  469. return out0, err
  470. }
  471. // Symbol is a free data retrieval call binding the contract method 0x95d89b41.
  472. //
  473. // Solidity: function symbol() view returns(string)
  474. func (_HEZ *HEZSession) Symbol() (string, error) {
  475. return _HEZ.Contract.Symbol(&_HEZ.CallOpts)
  476. }
  477. // Symbol is a free data retrieval call binding the contract method 0x95d89b41.
  478. //
  479. // Solidity: function symbol() view returns(string)
  480. func (_HEZ *HEZCallerSession) Symbol() (string, error) {
  481. return _HEZ.Contract.Symbol(&_HEZ.CallOpts)
  482. }
  483. // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  484. //
  485. // Solidity: function totalSupply() view returns(uint256)
  486. func (_HEZ *HEZCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
  487. var out []interface{}
  488. err := _HEZ.contract.Call(opts, &out, "totalSupply")
  489. if err != nil {
  490. return *new(*big.Int), err
  491. }
  492. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  493. return out0, err
  494. }
  495. // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  496. //
  497. // Solidity: function totalSupply() view returns(uint256)
  498. func (_HEZ *HEZSession) TotalSupply() (*big.Int, error) {
  499. return _HEZ.Contract.TotalSupply(&_HEZ.CallOpts)
  500. }
  501. // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  502. //
  503. // Solidity: function totalSupply() view returns(uint256)
  504. func (_HEZ *HEZCallerSession) TotalSupply() (*big.Int, error) {
  505. return _HEZ.Contract.TotalSupply(&_HEZ.CallOpts)
  506. }
  507. // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  508. //
  509. // Solidity: function approve(address spender, uint256 value) returns(bool)
  510. func (_HEZ *HEZTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) {
  511. return _HEZ.contract.Transact(opts, "approve", spender, value)
  512. }
  513. // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  514. //
  515. // Solidity: function approve(address spender, uint256 value) returns(bool)
  516. func (_HEZ *HEZSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) {
  517. return _HEZ.Contract.Approve(&_HEZ.TransactOpts, spender, value)
  518. }
  519. // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  520. //
  521. // Solidity: function approve(address spender, uint256 value) returns(bool)
  522. func (_HEZ *HEZTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) {
  523. return _HEZ.Contract.Approve(&_HEZ.TransactOpts, spender, value)
  524. }
  525. // Burn is a paid mutator transaction binding the contract method 0x42966c68.
  526. //
  527. // Solidity: function burn(uint256 value) returns(bool)
  528. func (_HEZ *HEZTransactor) Burn(opts *bind.TransactOpts, value *big.Int) (*types.Transaction, error) {
  529. return _HEZ.contract.Transact(opts, "burn", value)
  530. }
  531. // Burn is a paid mutator transaction binding the contract method 0x42966c68.
  532. //
  533. // Solidity: function burn(uint256 value) returns(bool)
  534. func (_HEZ *HEZSession) Burn(value *big.Int) (*types.Transaction, error) {
  535. return _HEZ.Contract.Burn(&_HEZ.TransactOpts, value)
  536. }
  537. // Burn is a paid mutator transaction binding the contract method 0x42966c68.
  538. //
  539. // Solidity: function burn(uint256 value) returns(bool)
  540. func (_HEZ *HEZTransactorSession) Burn(value *big.Int) (*types.Transaction, error) {
  541. return _HEZ.Contract.Burn(&_HEZ.TransactOpts, value)
  542. }
  543. // Permit is a paid mutator transaction binding the contract method 0xd505accf.
  544. //
  545. // Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns()
  546. func (_HEZ *HEZTransactor) Permit(opts *bind.TransactOpts, owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) {
  547. return _HEZ.contract.Transact(opts, "permit", owner, spender, value, deadline, v, r, s)
  548. }
  549. // Permit is a paid mutator transaction binding the contract method 0xd505accf.
  550. //
  551. // Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns()
  552. func (_HEZ *HEZSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) {
  553. return _HEZ.Contract.Permit(&_HEZ.TransactOpts, owner, spender, value, deadline, v, r, s)
  554. }
  555. // Permit is a paid mutator transaction binding the contract method 0xd505accf.
  556. //
  557. // Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns()
  558. func (_HEZ *HEZTransactorSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) {
  559. return _HEZ.Contract.Permit(&_HEZ.TransactOpts, owner, spender, value, deadline, v, r, s)
  560. }
  561. // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  562. //
  563. // Solidity: function transfer(address to, uint256 value) returns(bool)
  564. func (_HEZ *HEZTransactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) {
  565. return _HEZ.contract.Transact(opts, "transfer", to, value)
  566. }
  567. // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  568. //
  569. // Solidity: function transfer(address to, uint256 value) returns(bool)
  570. func (_HEZ *HEZSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) {
  571. return _HEZ.Contract.Transfer(&_HEZ.TransactOpts, to, value)
  572. }
  573. // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  574. //
  575. // Solidity: function transfer(address to, uint256 value) returns(bool)
  576. func (_HEZ *HEZTransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) {
  577. return _HEZ.Contract.Transfer(&_HEZ.TransactOpts, to, value)
  578. }
  579. // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  580. //
  581. // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool)
  582. func (_HEZ *HEZTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) {
  583. return _HEZ.contract.Transact(opts, "transferFrom", from, to, value)
  584. }
  585. // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  586. //
  587. // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool)
  588. func (_HEZ *HEZSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) {
  589. return _HEZ.Contract.TransferFrom(&_HEZ.TransactOpts, from, to, value)
  590. }
  591. // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  592. //
  593. // Solidity: function transferFrom(address from, address to, uint256 value) returns(bool)
  594. func (_HEZ *HEZTransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) {
  595. return _HEZ.Contract.TransferFrom(&_HEZ.TransactOpts, from, to, value)
  596. }
  597. // TransferWithAuthorization is a paid mutator transaction binding the contract method 0xe3ee160e.
  598. //
  599. // Solidity: function transferWithAuthorization(address from, address to, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s) returns()
  600. func (_HEZ *HEZTransactor) TransferWithAuthorization(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int, validAfter *big.Int, validBefore *big.Int, nonce [32]byte, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) {
  601. return _HEZ.contract.Transact(opts, "transferWithAuthorization", from, to, value, validAfter, validBefore, nonce, v, r, s)
  602. }
  603. // TransferWithAuthorization is a paid mutator transaction binding the contract method 0xe3ee160e.
  604. //
  605. // Solidity: function transferWithAuthorization(address from, address to, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s) returns()
  606. func (_HEZ *HEZSession) TransferWithAuthorization(from common.Address, to common.Address, value *big.Int, validAfter *big.Int, validBefore *big.Int, nonce [32]byte, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) {
  607. return _HEZ.Contract.TransferWithAuthorization(&_HEZ.TransactOpts, from, to, value, validAfter, validBefore, nonce, v, r, s)
  608. }
  609. // TransferWithAuthorization is a paid mutator transaction binding the contract method 0xe3ee160e.
  610. //
  611. // Solidity: function transferWithAuthorization(address from, address to, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s) returns()
  612. func (_HEZ *HEZTransactorSession) TransferWithAuthorization(from common.Address, to common.Address, value *big.Int, validAfter *big.Int, validBefore *big.Int, nonce [32]byte, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) {
  613. return _HEZ.Contract.TransferWithAuthorization(&_HEZ.TransactOpts, from, to, value, validAfter, validBefore, nonce, v, r, s)
  614. }
  615. // HEZApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the HEZ contract.
  616. type HEZApprovalIterator struct {
  617. Event *HEZApproval // Event containing the contract specifics and raw log
  618. contract *bind.BoundContract // Generic contract to use for unpacking event data
  619. event string // Event name to use for unpacking event data
  620. logs chan types.Log // Log channel receiving the found contract events
  621. sub ethereum.Subscription // Subscription for errors, completion and termination
  622. done bool // Whether the subscription completed delivering logs
  623. fail error // Occurred error to stop iteration
  624. }
  625. // Next advances the iterator to the subsequent event, returning whether there
  626. // are any more events found. In case of a retrieval or parsing error, false is
  627. // returned and Error() can be queried for the exact failure.
  628. func (it *HEZApprovalIterator) Next() bool {
  629. // If the iterator failed, stop iterating
  630. if it.fail != nil {
  631. return false
  632. }
  633. // If the iterator completed, deliver directly whatever's available
  634. if it.done {
  635. select {
  636. case log := <-it.logs:
  637. it.Event = new(HEZApproval)
  638. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  639. it.fail = err
  640. return false
  641. }
  642. it.Event.Raw = log
  643. return true
  644. default:
  645. return false
  646. }
  647. }
  648. // Iterator still in progress, wait for either a data or an error event
  649. select {
  650. case log := <-it.logs:
  651. it.Event = new(HEZApproval)
  652. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  653. it.fail = err
  654. return false
  655. }
  656. it.Event.Raw = log
  657. return true
  658. case err := <-it.sub.Err():
  659. it.done = true
  660. it.fail = err
  661. return it.Next()
  662. }
  663. }
  664. // Error returns any retrieval or parsing error occurred during filtering.
  665. func (it *HEZApprovalIterator) Error() error {
  666. return it.fail
  667. }
  668. // Close terminates the iteration process, releasing any pending underlying
  669. // resources.
  670. func (it *HEZApprovalIterator) Close() error {
  671. it.sub.Unsubscribe()
  672. return nil
  673. }
  674. // HEZApproval represents a Approval event raised by the HEZ contract.
  675. type HEZApproval struct {
  676. Owner common.Address
  677. Spender common.Address
  678. Value *big.Int
  679. Raw types.Log // Blockchain specific contextual infos
  680. }
  681. // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  682. //
  683. // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  684. func (_HEZ *HEZFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*HEZApprovalIterator, error) {
  685. var ownerRule []interface{}
  686. for _, ownerItem := range owner {
  687. ownerRule = append(ownerRule, ownerItem)
  688. }
  689. var spenderRule []interface{}
  690. for _, spenderItem := range spender {
  691. spenderRule = append(spenderRule, spenderItem)
  692. }
  693. logs, sub, err := _HEZ.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule)
  694. if err != nil {
  695. return nil, err
  696. }
  697. return &HEZApprovalIterator{contract: _HEZ.contract, event: "Approval", logs: logs, sub: sub}, nil
  698. }
  699. // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  700. //
  701. // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  702. func (_HEZ *HEZFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *HEZApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) {
  703. var ownerRule []interface{}
  704. for _, ownerItem := range owner {
  705. ownerRule = append(ownerRule, ownerItem)
  706. }
  707. var spenderRule []interface{}
  708. for _, spenderItem := range spender {
  709. spenderRule = append(spenderRule, spenderItem)
  710. }
  711. logs, sub, err := _HEZ.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule)
  712. if err != nil {
  713. return nil, err
  714. }
  715. return event.NewSubscription(func(quit <-chan struct{}) error {
  716. defer sub.Unsubscribe()
  717. for {
  718. select {
  719. case log := <-logs:
  720. // New log arrived, parse the event and forward to the user
  721. event := new(HEZApproval)
  722. if err := _HEZ.contract.UnpackLog(event, "Approval", log); err != nil {
  723. return err
  724. }
  725. event.Raw = log
  726. select {
  727. case sink <- event:
  728. case err := <-sub.Err():
  729. return err
  730. case <-quit:
  731. return nil
  732. }
  733. case err := <-sub.Err():
  734. return err
  735. case <-quit:
  736. return nil
  737. }
  738. }
  739. }), nil
  740. }
  741. // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  742. //
  743. // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  744. func (_HEZ *HEZFilterer) ParseApproval(log types.Log) (*HEZApproval, error) {
  745. event := new(HEZApproval)
  746. if err := _HEZ.contract.UnpackLog(event, "Approval", log); err != nil {
  747. return nil, err
  748. }
  749. event.Raw = log
  750. return event, nil
  751. }
  752. // HEZAuthorizationUsedIterator is returned from FilterAuthorizationUsed and is used to iterate over the raw logs and unpacked data for AuthorizationUsed events raised by the HEZ contract.
  753. type HEZAuthorizationUsedIterator struct {
  754. Event *HEZAuthorizationUsed // Event containing the contract specifics and raw log
  755. contract *bind.BoundContract // Generic contract to use for unpacking event data
  756. event string // Event name to use for unpacking event data
  757. logs chan types.Log // Log channel receiving the found contract events
  758. sub ethereum.Subscription // Subscription for errors, completion and termination
  759. done bool // Whether the subscription completed delivering logs
  760. fail error // Occurred error to stop iteration
  761. }
  762. // Next advances the iterator to the subsequent event, returning whether there
  763. // are any more events found. In case of a retrieval or parsing error, false is
  764. // returned and Error() can be queried for the exact failure.
  765. func (it *HEZAuthorizationUsedIterator) Next() bool {
  766. // If the iterator failed, stop iterating
  767. if it.fail != nil {
  768. return false
  769. }
  770. // If the iterator completed, deliver directly whatever's available
  771. if it.done {
  772. select {
  773. case log := <-it.logs:
  774. it.Event = new(HEZAuthorizationUsed)
  775. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  776. it.fail = err
  777. return false
  778. }
  779. it.Event.Raw = log
  780. return true
  781. default:
  782. return false
  783. }
  784. }
  785. // Iterator still in progress, wait for either a data or an error event
  786. select {
  787. case log := <-it.logs:
  788. it.Event = new(HEZAuthorizationUsed)
  789. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  790. it.fail = err
  791. return false
  792. }
  793. it.Event.Raw = log
  794. return true
  795. case err := <-it.sub.Err():
  796. it.done = true
  797. it.fail = err
  798. return it.Next()
  799. }
  800. }
  801. // Error returns any retrieval or parsing error occurred during filtering.
  802. func (it *HEZAuthorizationUsedIterator) Error() error {
  803. return it.fail
  804. }
  805. // Close terminates the iteration process, releasing any pending underlying
  806. // resources.
  807. func (it *HEZAuthorizationUsedIterator) Close() error {
  808. it.sub.Unsubscribe()
  809. return nil
  810. }
  811. // HEZAuthorizationUsed represents a AuthorizationUsed event raised by the HEZ contract.
  812. type HEZAuthorizationUsed struct {
  813. Authorizer common.Address
  814. Nonce [32]byte
  815. Raw types.Log // Blockchain specific contextual infos
  816. }
  817. // FilterAuthorizationUsed is a free log retrieval operation binding the contract event 0x98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a5.
  818. //
  819. // Solidity: event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce)
  820. func (_HEZ *HEZFilterer) FilterAuthorizationUsed(opts *bind.FilterOpts, authorizer []common.Address, nonce [][32]byte) (*HEZAuthorizationUsedIterator, error) {
  821. var authorizerRule []interface{}
  822. for _, authorizerItem := range authorizer {
  823. authorizerRule = append(authorizerRule, authorizerItem)
  824. }
  825. var nonceRule []interface{}
  826. for _, nonceItem := range nonce {
  827. nonceRule = append(nonceRule, nonceItem)
  828. }
  829. logs, sub, err := _HEZ.contract.FilterLogs(opts, "AuthorizationUsed", authorizerRule, nonceRule)
  830. if err != nil {
  831. return nil, err
  832. }
  833. return &HEZAuthorizationUsedIterator{contract: _HEZ.contract, event: "AuthorizationUsed", logs: logs, sub: sub}, nil
  834. }
  835. // WatchAuthorizationUsed is a free log subscription operation binding the contract event 0x98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a5.
  836. //
  837. // Solidity: event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce)
  838. func (_HEZ *HEZFilterer) WatchAuthorizationUsed(opts *bind.WatchOpts, sink chan<- *HEZAuthorizationUsed, authorizer []common.Address, nonce [][32]byte) (event.Subscription, error) {
  839. var authorizerRule []interface{}
  840. for _, authorizerItem := range authorizer {
  841. authorizerRule = append(authorizerRule, authorizerItem)
  842. }
  843. var nonceRule []interface{}
  844. for _, nonceItem := range nonce {
  845. nonceRule = append(nonceRule, nonceItem)
  846. }
  847. logs, sub, err := _HEZ.contract.WatchLogs(opts, "AuthorizationUsed", authorizerRule, nonceRule)
  848. if err != nil {
  849. return nil, err
  850. }
  851. return event.NewSubscription(func(quit <-chan struct{}) error {
  852. defer sub.Unsubscribe()
  853. for {
  854. select {
  855. case log := <-logs:
  856. // New log arrived, parse the event and forward to the user
  857. event := new(HEZAuthorizationUsed)
  858. if err := _HEZ.contract.UnpackLog(event, "AuthorizationUsed", log); err != nil {
  859. return err
  860. }
  861. event.Raw = log
  862. select {
  863. case sink <- event:
  864. case err := <-sub.Err():
  865. return err
  866. case <-quit:
  867. return nil
  868. }
  869. case err := <-sub.Err():
  870. return err
  871. case <-quit:
  872. return nil
  873. }
  874. }
  875. }), nil
  876. }
  877. // ParseAuthorizationUsed is a log parse operation binding the contract event 0x98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a5.
  878. //
  879. // Solidity: event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce)
  880. func (_HEZ *HEZFilterer) ParseAuthorizationUsed(log types.Log) (*HEZAuthorizationUsed, error) {
  881. event := new(HEZAuthorizationUsed)
  882. if err := _HEZ.contract.UnpackLog(event, "AuthorizationUsed", log); err != nil {
  883. return nil, err
  884. }
  885. event.Raw = log
  886. return event, nil
  887. }
  888. // HEZTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the HEZ contract.
  889. type HEZTransferIterator struct {
  890. Event *HEZTransfer // Event containing the contract specifics and raw log
  891. contract *bind.BoundContract // Generic contract to use for unpacking event data
  892. event string // Event name to use for unpacking event data
  893. logs chan types.Log // Log channel receiving the found contract events
  894. sub ethereum.Subscription // Subscription for errors, completion and termination
  895. done bool // Whether the subscription completed delivering logs
  896. fail error // Occurred error to stop iteration
  897. }
  898. // Next advances the iterator to the subsequent event, returning whether there
  899. // are any more events found. In case of a retrieval or parsing error, false is
  900. // returned and Error() can be queried for the exact failure.
  901. func (it *HEZTransferIterator) Next() bool {
  902. // If the iterator failed, stop iterating
  903. if it.fail != nil {
  904. return false
  905. }
  906. // If the iterator completed, deliver directly whatever's available
  907. if it.done {
  908. select {
  909. case log := <-it.logs:
  910. it.Event = new(HEZTransfer)
  911. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  912. it.fail = err
  913. return false
  914. }
  915. it.Event.Raw = log
  916. return true
  917. default:
  918. return false
  919. }
  920. }
  921. // Iterator still in progress, wait for either a data or an error event
  922. select {
  923. case log := <-it.logs:
  924. it.Event = new(HEZTransfer)
  925. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  926. it.fail = err
  927. return false
  928. }
  929. it.Event.Raw = log
  930. return true
  931. case err := <-it.sub.Err():
  932. it.done = true
  933. it.fail = err
  934. return it.Next()
  935. }
  936. }
  937. // Error returns any retrieval or parsing error occurred during filtering.
  938. func (it *HEZTransferIterator) Error() error {
  939. return it.fail
  940. }
  941. // Close terminates the iteration process, releasing any pending underlying
  942. // resources.
  943. func (it *HEZTransferIterator) Close() error {
  944. it.sub.Unsubscribe()
  945. return nil
  946. }
  947. // HEZTransfer represents a Transfer event raised by the HEZ contract.
  948. type HEZTransfer struct {
  949. From common.Address
  950. To common.Address
  951. Value *big.Int
  952. Raw types.Log // Blockchain specific contextual infos
  953. }
  954. // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  955. //
  956. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  957. func (_HEZ *HEZFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*HEZTransferIterator, error) {
  958. var fromRule []interface{}
  959. for _, fromItem := range from {
  960. fromRule = append(fromRule, fromItem)
  961. }
  962. var toRule []interface{}
  963. for _, toItem := range to {
  964. toRule = append(toRule, toItem)
  965. }
  966. logs, sub, err := _HEZ.contract.FilterLogs(opts, "Transfer", fromRule, toRule)
  967. if err != nil {
  968. return nil, err
  969. }
  970. return &HEZTransferIterator{contract: _HEZ.contract, event: "Transfer", logs: logs, sub: sub}, nil
  971. }
  972. // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  973. //
  974. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  975. func (_HEZ *HEZFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *HEZTransfer, from []common.Address, to []common.Address) (event.Subscription, error) {
  976. var fromRule []interface{}
  977. for _, fromItem := range from {
  978. fromRule = append(fromRule, fromItem)
  979. }
  980. var toRule []interface{}
  981. for _, toItem := range to {
  982. toRule = append(toRule, toItem)
  983. }
  984. logs, sub, err := _HEZ.contract.WatchLogs(opts, "Transfer", fromRule, toRule)
  985. if err != nil {
  986. return nil, err
  987. }
  988. return event.NewSubscription(func(quit <-chan struct{}) error {
  989. defer sub.Unsubscribe()
  990. for {
  991. select {
  992. case log := <-logs:
  993. // New log arrived, parse the event and forward to the user
  994. event := new(HEZTransfer)
  995. if err := _HEZ.contract.UnpackLog(event, "Transfer", log); err != nil {
  996. return err
  997. }
  998. event.Raw = log
  999. select {
  1000. case sink <- event:
  1001. case err := <-sub.Err():
  1002. return err
  1003. case <-quit:
  1004. return nil
  1005. }
  1006. case err := <-sub.Err():
  1007. return err
  1008. case <-quit:
  1009. return nil
  1010. }
  1011. }
  1012. }), nil
  1013. }
  1014. // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  1015. //
  1016. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  1017. func (_HEZ *HEZFilterer) ParseTransfer(log types.Log) (*HEZTransfer, error) {
  1018. event := new(HEZTransfer)
  1019. if err := _HEZ.contract.UnpackLog(event, "Transfer", log); err != nil {
  1020. return nil, err
  1021. }
  1022. event.Raw = log
  1023. return event, nil
  1024. }