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.

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