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.

1164 lines
59 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. // HEZBin is the compiled bytecode used for deploying new contracts.
  28. var HEZBin = "0x608060405234801561001057600080fd5b506040516111153803806111158339818101604052602081101561003357600080fd5b505161004a816a52b7d2dcc80cd2e4000000610050565b506101b1565b610069816000546100f260201b6109531790919060201c565b60009081556001600160a01b03831681526001602090815260409091205461009a9183906109536100f2821b17901c565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6040805180820190915260118152704d4154483a4144445f4f564552464c4f5760781b602082015281830190838210156101aa5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561016f578181015183820152602001610157565b50505050905090810190601f16801561019c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5092915050565b610f55806101c06000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c806370a08231116100b8578063a9059cbb1161007c578063a9059cbb14610308578063c473af3314610334578063d505accf1461033c578063dd62ed3e1461038f578063e3ee160e146103bd578063e94a01021461041c57610137565b806370a08231146102a45780637ecebe00146102ca57806395d89b41146102f05780639e4e7318146102f8578063a0cc6a681461030057610137565b806323b872dd116100ff57806323b872dd1461022357806330adf81f14610259578063313ce567146102615780633408e4701461027f57806342966c681461028757610137565b806304622c2e1461013c57806306fdde0314610156578063095ea7b3146101d357806318160ddd1461021357806318369a2a1461021b575b600080fd5b610144610448565b60408051918252519081900360200190f35b61015e61046c565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610198578181015183820152602001610180565b50505050905090810190601f1680156101c55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101ff600480360360408110156101e957600080fd5b506001600160a01b03813516906020013561049c565b604080519115158252519081900360200190f35b6101446104b2565b6101446104b8565b6101ff6004803603606081101561023957600080fd5b506001600160a01b038135811691602081013590911690604001356104c7565b610144610539565b61026961055d565b6040805160ff9092168252519081900360200190f35b610144610562565b6101ff6004803603602081101561029d57600080fd5b5035610566565b610144600480360360208110156102ba57600080fd5b50356001600160a01b031661057a565b610144600480360360208110156102e057600080fd5b50356001600160a01b031661058c565b61015e61059e565b6101446105bd565b6101446105e1565b6101ff6004803603604081101561031e57600080fd5b506001600160a01b038135169060200135610605565b610144610612565b61038d600480360360e081101561035257600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135610636565b005b610144600480360360408110156103a557600080fd5b506001600160a01b0381358116916020013516610736565b61038d60048036036101208110156103d457600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e0810135906101000135610753565b6101ff6004803603604081101561043257600080fd5b506001600160a01b038135169060200135610933565b7f64c0a41a0260272b78f2a5bd50d5ff7c1779bc3bba16dcff4550c7c642b0e4b481565b604051806040016040528060148152602001732432b936b2bd102732ba3bb7b935902a37b5b2b760611b81525081565b60006104a9338484610a12565b50600192915050565b60005481565b6a52b7d2dcc80cd2e400000081565b6001600160a01b03831660009081526002602090815260408083203384529091528120546000198114610523576104fe8184610a74565b6001600160a01b03861660009081526002602090815260408083203384529091529020555b61052e858585610af0565b506001949350505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b4690565b60006105723383610bfa565b506001919050565b60016020526000908152604090205481565b60036020526000908152604090205481565b604051806040016040528060038152602001622422ad60e91b81525081565b7fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc681565b7f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226781565b60006104a9338484610af0565b7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b4284101561068b576040805162461bcd60e51b815260206004820152601960248201527f48455a3a3a7065726d69743a20415554485f4558504952454400000000000000604482015290519081900360640190fd5b6001600160a01b0380881660008181526003602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938a1660608401526080830189905260a083019390935260c08083018890528151808403909101815260e0909201905280519101206107218882868686610c8c565b61072c888888610a12565b5050505050505050565b600260209081526000928352604080842090915290825290205481565b8542116107915760405162461bcd60e51b8152600401808060200182810382526032815260200180610e926032913960400191505060405180910390fd5b8442106107cf5760405162461bcd60e51b815260040180806020018281038252602c815260200180610e44602c913960400191505060405180910390fd5b6001600160a01b038916600090815260046020908152604080832087845290915290205460ff16156108325760405162461bcd60e51b8152600401808060200182810382526031815260200180610eef6031913960400191505060405180910390fd5b604080517f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a22676020808301919091526001600160a01b03808d16838501528b166060830152608082018a905260a0820189905260c0820188905260e08083018890528351808403909101815261010090920190925280519101206108b88a82868686610c8c565b6001600160a01b038a1660009081526004602090815260408083208884529091529020805460ff191660011790556108f18a8a8a610af0565b60405185906001600160a01b038c16907f98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a590600090a350505050505050505050565b600460209081526000928352604080842090915290825290205460ff1681565b6040805180820190915260118152704d4154483a4144445f4f564552464c4f5760781b60208201528183019083821015610a0b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109d05781810151838201526020016109b8565b50505050905090810190601f1680156109fd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5092915050565b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6040805180820190915260128152714d4154483a5355425f554e444552464c4f5760701b60208201528183039083821115610a0b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156109d05781810151838201526020016109b8565b6001600160a01b0382163014801590610b1157506001600160a01b03821615155b610b4c5760405162461bcd60e51b8152600401808060200182810382526022815260200180610e706022913960400191505060405180910390fd5b6001600160a01b038316600090815260016020526040902054610b6f9082610a74565b6001600160a01b038085166000908152600160205260408082209390935590841681522054610b9e9082610953565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6001600160a01b038216600090815260016020526040902054610c1d9082610a74565b6001600160a01b03831660009081526001602052604081209190915554610c449082610a74565b60009081556040805183815290516001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f64c0a41a0260272b78f2a5bd50d5ff7c1779bc3bba16dcff4550c7c642b0e4b47fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6610cf9610562565b6040805160208082019690965280820194909452606084019290925260808301523060a0808401919091528151808403909101815260c08301825280519084012061190160f01b60e084015260e283018190526101028084018a9052825180850390910181526101228401808452815191860191909120600091829052610142850180855281905260ff8a1661016286015261018285018990526101a285018890529251919550919391926001926101c2808301939192601f198301929081900390910190855afa158015610dd2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590610e085750876001600160a01b0316816001600160a01b0316145b61072c5760405162461bcd60e51b815260040180806020018281038252602b815260200180610ec4602b913960400191505060405180910390fdfe48455a3a3a7472616e7366657257697468417574686f72697a6174696f6e3a20415554485f4558504952454448455a3a3a5f7472616e736665723a204e4f545f56414c49445f5452414e5346455248455a3a3a7472616e7366657257697468417574686f72697a6174696f6e3a20415554485f4e4f545f5945545f56414c494448455a3a3a5f76616c69646174655369676e6564446174613a20494e56414c49445f5349474e415455524548455a3a3a7472616e7366657257697468417574686f72697a6174696f6e3a20415554485f414c52454144595f55534544a26469706673582212205aeb9e56ca4697b469366e6fc34ffebcc82c53ce1a5ae2775970617ccc42be4a64736f6c634300060c0033"
  29. // DeployHEZ deploys a new Ethereum contract, binding an instance of HEZ to it.
  30. func DeployHEZ(auth *bind.TransactOpts, backend bind.ContractBackend, initialHolder common.Address) (common.Address, *types.Transaction, *HEZ, error) {
  31. parsed, err := abi.JSON(strings.NewReader(HEZABI))
  32. if err != nil {
  33. return common.Address{}, nil, nil, tracerr.Wrap(err)
  34. }
  35. address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(HEZBin), backend, initialHolder)
  36. if err != nil {
  37. return common.Address{}, nil, nil, tracerr.Wrap(err)
  38. }
  39. return address, tx, &HEZ{HEZCaller: HEZCaller{contract: contract}, HEZTransactor: HEZTransactor{contract: contract}, HEZFilterer: HEZFilterer{contract: contract}}, nil
  40. }
  41. // HEZ is an auto generated Go binding around an Ethereum contract.
  42. type HEZ struct {
  43. HEZCaller // Read-only binding to the contract
  44. HEZTransactor // Write-only binding to the contract
  45. HEZFilterer // Log filterer for contract events
  46. }
  47. // HEZCaller is an auto generated read-only Go binding around an Ethereum contract.
  48. type HEZCaller struct {
  49. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  50. }
  51. // HEZTransactor is an auto generated write-only Go binding around an Ethereum contract.
  52. type HEZTransactor struct {
  53. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  54. }
  55. // HEZFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  56. type HEZFilterer struct {
  57. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  58. }
  59. // HEZSession is an auto generated Go binding around an Ethereum contract,
  60. // with pre-set call and transact options.
  61. type HEZSession struct {
  62. Contract *HEZ // Generic contract binding to set the session for
  63. CallOpts bind.CallOpts // Call options to use throughout this session
  64. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  65. }
  66. // HEZCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  67. // with pre-set call options.
  68. type HEZCallerSession struct {
  69. Contract *HEZCaller // Generic contract caller binding to set the session for
  70. CallOpts bind.CallOpts // Call options to use throughout this session
  71. }
  72. // HEZTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  73. // with pre-set transact options.
  74. type HEZTransactorSession struct {
  75. Contract *HEZTransactor // Generic contract transactor binding to set the session for
  76. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  77. }
  78. // HEZRaw is an auto generated low-level Go binding around an Ethereum contract.
  79. type HEZRaw struct {
  80. Contract *HEZ // Generic contract binding to access the raw methods on
  81. }
  82. // HEZCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  83. type HEZCallerRaw struct {
  84. Contract *HEZCaller // Generic read-only contract binding to access the raw methods on
  85. }
  86. // HEZTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  87. type HEZTransactorRaw struct {
  88. Contract *HEZTransactor // Generic write-only contract binding to access the raw methods on
  89. }
  90. // NewHEZ creates a new instance of HEZ, bound to a specific deployed contract.
  91. func NewHEZ(address common.Address, backend bind.ContractBackend) (*HEZ, error) {
  92. contract, err := bindHEZ(address, backend, backend, backend)
  93. if err != nil {
  94. return nil, tracerr.Wrap(err)
  95. }
  96. return &HEZ{HEZCaller: HEZCaller{contract: contract}, HEZTransactor: HEZTransactor{contract: contract}, HEZFilterer: HEZFilterer{contract: contract}}, nil
  97. }
  98. // NewHEZCaller creates a new read-only instance of HEZ, bound to a specific deployed contract.
  99. func NewHEZCaller(address common.Address, caller bind.ContractCaller) (*HEZCaller, error) {
  100. contract, err := bindHEZ(address, caller, nil, nil)
  101. if err != nil {
  102. return nil, tracerr.Wrap(err)
  103. }
  104. return &HEZCaller{contract: contract}, nil
  105. }
  106. // NewHEZTransactor creates a new write-only instance of HEZ, bound to a specific deployed contract.
  107. func NewHEZTransactor(address common.Address, transactor bind.ContractTransactor) (*HEZTransactor, error) {
  108. contract, err := bindHEZ(address, nil, transactor, nil)
  109. if err != nil {
  110. return nil, tracerr.Wrap(err)
  111. }
  112. return &HEZTransactor{contract: contract}, nil
  113. }
  114. // NewHEZFilterer creates a new log filterer instance of HEZ, bound to a specific deployed contract.
  115. func NewHEZFilterer(address common.Address, filterer bind.ContractFilterer) (*HEZFilterer, error) {
  116. contract, err := bindHEZ(address, nil, nil, filterer)
  117. if err != nil {
  118. return nil, tracerr.Wrap(err)
  119. }
  120. return &HEZFilterer{contract: contract}, nil
  121. }
  122. // bindHEZ binds a generic wrapper to an already deployed contract.
  123. func bindHEZ(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  124. parsed, err := abi.JSON(strings.NewReader(HEZABI))
  125. if err != nil {
  126. return nil, tracerr.Wrap(err)
  127. }
  128. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  129. }
  130. // Call invokes the (constant) contract method with params as input values and
  131. // sets the output to result. The result type might be a single field for simple
  132. // returns, a slice of interfaces for anonymous returns and a struct for named
  133. // returns.
  134. func (_HEZ *HEZRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  135. return _HEZ.Contract.HEZCaller.contract.Call(opts, result, method, params...)
  136. }
  137. // Transfer initiates a plain transaction to move funds to the contract, calling
  138. // its default method if one is available.
  139. func (_HEZ *HEZRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  140. return _HEZ.Contract.HEZTransactor.contract.Transfer(opts)
  141. }
  142. // Transact invokes the (paid) contract method with params as input values.
  143. func (_HEZ *HEZRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  144. return _HEZ.Contract.HEZTransactor.contract.Transact(opts, method, params...)
  145. }
  146. // Call invokes the (constant) contract method with params as input values and
  147. // sets the output to result. The result type might be a single field for simple
  148. // returns, a slice of interfaces for anonymous returns and a struct for named
  149. // returns.
  150. func (_HEZ *HEZCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  151. return _HEZ.Contract.contract.Call(opts, result, method, params...)
  152. }
  153. // Transfer initiates a plain transaction to move funds to the contract, calling
  154. // its default method if one is available.
  155. func (_HEZ *HEZTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  156. return _HEZ.Contract.contract.Transfer(opts)
  157. }
  158. // Transact invokes the (paid) contract method with params as input values.
  159. func (_HEZ *HEZTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  160. return _HEZ.Contract.contract.Transact(opts, method, params...)
  161. }
  162. // EIP712DOMAINHASH is a free data retrieval call binding the contract method 0xc473af33.
  163. //
  164. // Solidity: function EIP712DOMAIN_HASH() view returns(bytes32)
  165. func (_HEZ *HEZCaller) EIP712DOMAINHASH(opts *bind.CallOpts) ([32]byte, error) {
  166. var (
  167. ret0 = new([32]byte)
  168. )
  169. out := ret0
  170. err := _HEZ.contract.Call(opts, out, "EIP712DOMAIN_HASH")
  171. return *ret0, tracerr.Wrap(err)
  172. }
  173. // EIP712DOMAINHASH is a free data retrieval call binding the contract method 0xc473af33.
  174. //
  175. // Solidity: function EIP712DOMAIN_HASH() view returns(bytes32)
  176. func (_HEZ *HEZSession) EIP712DOMAINHASH() ([32]byte, error) {
  177. return _HEZ.Contract.EIP712DOMAINHASH(&_HEZ.CallOpts)
  178. }
  179. // EIP712DOMAINHASH is a free data retrieval call binding the contract method 0xc473af33.
  180. //
  181. // Solidity: function EIP712DOMAIN_HASH() view returns(bytes32)
  182. func (_HEZ *HEZCallerSession) EIP712DOMAINHASH() ([32]byte, error) {
  183. return _HEZ.Contract.EIP712DOMAINHASH(&_HEZ.CallOpts)
  184. }
  185. // NAMEHASH is a free data retrieval call binding the contract method 0x04622c2e.
  186. //
  187. // Solidity: function NAME_HASH() view returns(bytes32)
  188. func (_HEZ *HEZCaller) NAMEHASH(opts *bind.CallOpts) ([32]byte, error) {
  189. var (
  190. ret0 = new([32]byte)
  191. )
  192. out := ret0
  193. err := _HEZ.contract.Call(opts, out, "NAME_HASH")
  194. return *ret0, tracerr.Wrap(err)
  195. }
  196. // NAMEHASH is a free data retrieval call binding the contract method 0x04622c2e.
  197. //
  198. // Solidity: function NAME_HASH() view returns(bytes32)
  199. func (_HEZ *HEZSession) NAMEHASH() ([32]byte, error) {
  200. return _HEZ.Contract.NAMEHASH(&_HEZ.CallOpts)
  201. }
  202. // NAMEHASH is a free data retrieval call binding the contract method 0x04622c2e.
  203. //
  204. // Solidity: function NAME_HASH() view returns(bytes32)
  205. func (_HEZ *HEZCallerSession) NAMEHASH() ([32]byte, error) {
  206. return _HEZ.Contract.NAMEHASH(&_HEZ.CallOpts)
  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 *HEZCaller) PERMITTYPEHASH(opts *bind.CallOpts) ([32]byte, error) {
  212. var (
  213. ret0 = new([32]byte)
  214. )
  215. out := ret0
  216. err := _HEZ.contract.Call(opts, out, "PERMIT_TYPEHASH")
  217. return *ret0, tracerr.Wrap(err)
  218. }
  219. // PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f.
  220. //
  221. // Solidity: function PERMIT_TYPEHASH() view returns(bytes32)
  222. func (_HEZ *HEZSession) PERMITTYPEHASH() ([32]byte, error) {
  223. return _HEZ.Contract.PERMITTYPEHASH(&_HEZ.CallOpts)
  224. }
  225. // PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f.
  226. //
  227. // Solidity: function PERMIT_TYPEHASH() view returns(bytes32)
  228. func (_HEZ *HEZCallerSession) PERMITTYPEHASH() ([32]byte, error) {
  229. return _HEZ.Contract.PERMITTYPEHASH(&_HEZ.CallOpts)
  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 *HEZCaller) TRANSFERWITHAUTHORIZATIONTYPEHASH(opts *bind.CallOpts) ([32]byte, error) {
  235. var (
  236. ret0 = new([32]byte)
  237. )
  238. out := ret0
  239. err := _HEZ.contract.Call(opts, out, "TRANSFER_WITH_AUTHORIZATION_TYPEHASH")
  240. return *ret0, tracerr.Wrap(err)
  241. }
  242. // TRANSFERWITHAUTHORIZATIONTYPEHASH is a free data retrieval call binding the contract method 0xa0cc6a68.
  243. //
  244. // Solidity: function TRANSFER_WITH_AUTHORIZATION_TYPEHASH() view returns(bytes32)
  245. func (_HEZ *HEZSession) TRANSFERWITHAUTHORIZATIONTYPEHASH() ([32]byte, error) {
  246. return _HEZ.Contract.TRANSFERWITHAUTHORIZATIONTYPEHASH(&_HEZ.CallOpts)
  247. }
  248. // TRANSFERWITHAUTHORIZATIONTYPEHASH is a free data retrieval call binding the contract method 0xa0cc6a68.
  249. //
  250. // Solidity: function TRANSFER_WITH_AUTHORIZATION_TYPEHASH() view returns(bytes32)
  251. func (_HEZ *HEZCallerSession) TRANSFERWITHAUTHORIZATIONTYPEHASH() ([32]byte, error) {
  252. return _HEZ.Contract.TRANSFERWITHAUTHORIZATIONTYPEHASH(&_HEZ.CallOpts)
  253. }
  254. // VERSIONHASH is a free data retrieval call binding the contract method 0x9e4e7318.
  255. //
  256. // Solidity: function VERSION_HASH() view returns(bytes32)
  257. func (_HEZ *HEZCaller) VERSIONHASH(opts *bind.CallOpts) ([32]byte, error) {
  258. var (
  259. ret0 = new([32]byte)
  260. )
  261. out := ret0
  262. err := _HEZ.contract.Call(opts, out, "VERSION_HASH")
  263. return *ret0, tracerr.Wrap(err)
  264. }
  265. // VERSIONHASH is a free data retrieval call binding the contract method 0x9e4e7318.
  266. //
  267. // Solidity: function VERSION_HASH() view returns(bytes32)
  268. func (_HEZ *HEZSession) VERSIONHASH() ([32]byte, error) {
  269. return _HEZ.Contract.VERSIONHASH(&_HEZ.CallOpts)
  270. }
  271. // VERSIONHASH is a free data retrieval call binding the contract method 0x9e4e7318.
  272. //
  273. // Solidity: function VERSION_HASH() view returns(bytes32)
  274. func (_HEZ *HEZCallerSession) VERSIONHASH() ([32]byte, error) {
  275. return _HEZ.Contract.VERSIONHASH(&_HEZ.CallOpts)
  276. }
  277. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  278. //
  279. // Solidity: function allowance(address , address ) view returns(uint256)
  280. func (_HEZ *HEZCaller) Allowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error) {
  281. var (
  282. ret0 = new(*big.Int)
  283. )
  284. out := ret0
  285. err := _HEZ.contract.Call(opts, out, "allowance", arg0, arg1)
  286. return *ret0, tracerr.Wrap(err)
  287. }
  288. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  289. //
  290. // Solidity: function allowance(address , address ) view returns(uint256)
  291. func (_HEZ *HEZSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) {
  292. return _HEZ.Contract.Allowance(&_HEZ.CallOpts, arg0, arg1)
  293. }
  294. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  295. //
  296. // Solidity: function allowance(address , address ) view returns(uint256)
  297. func (_HEZ *HEZCallerSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) {
  298. return _HEZ.Contract.Allowance(&_HEZ.CallOpts, arg0, arg1)
  299. }
  300. // AuthorizationState is a free data retrieval call binding the contract method 0xe94a0102.
  301. //
  302. // Solidity: function authorizationState(address , bytes32 ) view returns(bool)
  303. func (_HEZ *HEZCaller) AuthorizationState(opts *bind.CallOpts, arg0 common.Address, arg1 [32]byte) (bool, error) {
  304. var (
  305. ret0 = new(bool)
  306. )
  307. out := ret0
  308. err := _HEZ.contract.Call(opts, out, "authorizationState", arg0, arg1)
  309. return *ret0, tracerr.Wrap(err)
  310. }
  311. // AuthorizationState is a free data retrieval call binding the contract method 0xe94a0102.
  312. //
  313. // Solidity: function authorizationState(address , bytes32 ) view returns(bool)
  314. func (_HEZ *HEZSession) AuthorizationState(arg0 common.Address, arg1 [32]byte) (bool, error) {
  315. return _HEZ.Contract.AuthorizationState(&_HEZ.CallOpts, arg0, arg1)
  316. }
  317. // AuthorizationState is a free data retrieval call binding the contract method 0xe94a0102.
  318. //
  319. // Solidity: function authorizationState(address , bytes32 ) view returns(bool)
  320. func (_HEZ *HEZCallerSession) AuthorizationState(arg0 common.Address, arg1 [32]byte) (bool, error) {
  321. return _HEZ.Contract.AuthorizationState(&_HEZ.CallOpts, arg0, arg1)
  322. }
  323. // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  324. //
  325. // Solidity: function balanceOf(address ) view returns(uint256)
  326. func (_HEZ *HEZCaller) BalanceOf(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) {
  327. var (
  328. ret0 = new(*big.Int)
  329. )
  330. out := ret0
  331. err := _HEZ.contract.Call(opts, out, "balanceOf", arg0)
  332. return *ret0, tracerr.Wrap(err)
  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 *HEZSession) BalanceOf(arg0 common.Address) (*big.Int, error) {
  338. return _HEZ.Contract.BalanceOf(&_HEZ.CallOpts, arg0)
  339. }
  340. // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  341. //
  342. // Solidity: function balanceOf(address ) view returns(uint256)
  343. func (_HEZ *HEZCallerSession) BalanceOf(arg0 common.Address) (*big.Int, error) {
  344. return _HEZ.Contract.BalanceOf(&_HEZ.CallOpts, arg0)
  345. }
  346. // Decimals is a free data retrieval call binding the contract method 0x313ce567.
  347. //
  348. // Solidity: function decimals() view returns(uint8)
  349. func (_HEZ *HEZCaller) Decimals(opts *bind.CallOpts) (uint8, error) {
  350. var (
  351. ret0 = new(uint8)
  352. )
  353. out := ret0
  354. err := _HEZ.contract.Call(opts, out, "decimals")
  355. return *ret0, tracerr.Wrap(err)
  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 *HEZSession) Decimals() (uint8, error) {
  361. return _HEZ.Contract.Decimals(&_HEZ.CallOpts)
  362. }
  363. // Decimals is a free data retrieval call binding the contract method 0x313ce567.
  364. //
  365. // Solidity: function decimals() view returns(uint8)
  366. func (_HEZ *HEZCallerSession) Decimals() (uint8, error) {
  367. return _HEZ.Contract.Decimals(&_HEZ.CallOpts)
  368. }
  369. // GetChainId is a free data retrieval call binding the contract method 0x3408e470.
  370. //
  371. // Solidity: function getChainId() pure returns(uint256 chainId)
  372. func (_HEZ *HEZCaller) GetChainId(opts *bind.CallOpts) (*big.Int, error) {
  373. var (
  374. ret0 = new(*big.Int)
  375. )
  376. out := ret0
  377. err := _HEZ.contract.Call(opts, out, "getChainId")
  378. return *ret0, tracerr.Wrap(err)
  379. }
  380. // GetChainId is a free data retrieval call binding the contract method 0x3408e470.
  381. //
  382. // Solidity: function getChainId() pure returns(uint256 chainId)
  383. func (_HEZ *HEZSession) GetChainId() (*big.Int, error) {
  384. return _HEZ.Contract.GetChainId(&_HEZ.CallOpts)
  385. }
  386. // GetChainId is a free data retrieval call binding the contract method 0x3408e470.
  387. //
  388. // Solidity: function getChainId() pure returns(uint256 chainId)
  389. func (_HEZ *HEZCallerSession) GetChainId() (*big.Int, error) {
  390. return _HEZ.Contract.GetChainId(&_HEZ.CallOpts)
  391. }
  392. // InitialBalance is a free data retrieval call binding the contract method 0x18369a2a.
  393. //
  394. // Solidity: function initialBalance() view returns(uint256)
  395. func (_HEZ *HEZCaller) InitialBalance(opts *bind.CallOpts) (*big.Int, error) {
  396. var (
  397. ret0 = new(*big.Int)
  398. )
  399. out := ret0
  400. err := _HEZ.contract.Call(opts, out, "initialBalance")
  401. return *ret0, tracerr.Wrap(err)
  402. }
  403. // InitialBalance is a free data retrieval call binding the contract method 0x18369a2a.
  404. //
  405. // Solidity: function initialBalance() view returns(uint256)
  406. func (_HEZ *HEZSession) InitialBalance() (*big.Int, error) {
  407. return _HEZ.Contract.InitialBalance(&_HEZ.CallOpts)
  408. }
  409. // InitialBalance is a free data retrieval call binding the contract method 0x18369a2a.
  410. //
  411. // Solidity: function initialBalance() view returns(uint256)
  412. func (_HEZ *HEZCallerSession) InitialBalance() (*big.Int, error) {
  413. return _HEZ.Contract.InitialBalance(&_HEZ.CallOpts)
  414. }
  415. // Name is a free data retrieval call binding the contract method 0x06fdde03.
  416. //
  417. // Solidity: function name() view returns(string)
  418. func (_HEZ *HEZCaller) Name(opts *bind.CallOpts) (string, error) {
  419. var (
  420. ret0 = new(string)
  421. )
  422. out := ret0
  423. err := _HEZ.contract.Call(opts, out, "name")
  424. return *ret0, tracerr.Wrap(err)
  425. }
  426. // Name is a free data retrieval call binding the contract method 0x06fdde03.
  427. //
  428. // Solidity: function name() view returns(string)
  429. func (_HEZ *HEZSession) Name() (string, error) {
  430. return _HEZ.Contract.Name(&_HEZ.CallOpts)
  431. }
  432. // Name is a free data retrieval call binding the contract method 0x06fdde03.
  433. //
  434. // Solidity: function name() view returns(string)
  435. func (_HEZ *HEZCallerSession) Name() (string, error) {
  436. return _HEZ.Contract.Name(&_HEZ.CallOpts)
  437. }
  438. // Nonces is a free data retrieval call binding the contract method 0x7ecebe00.
  439. //
  440. // Solidity: function nonces(address ) view returns(uint256)
  441. func (_HEZ *HEZCaller) Nonces(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) {
  442. var (
  443. ret0 = new(*big.Int)
  444. )
  445. out := ret0
  446. err := _HEZ.contract.Call(opts, out, "nonces", arg0)
  447. return *ret0, tracerr.Wrap(err)
  448. }
  449. // Nonces is a free data retrieval call binding the contract method 0x7ecebe00.
  450. //
  451. // Solidity: function nonces(address ) view returns(uint256)
  452. func (_HEZ *HEZSession) Nonces(arg0 common.Address) (*big.Int, error) {
  453. return _HEZ.Contract.Nonces(&_HEZ.CallOpts, arg0)
  454. }
  455. // Nonces is a free data retrieval call binding the contract method 0x7ecebe00.
  456. //
  457. // Solidity: function nonces(address ) view returns(uint256)
  458. func (_HEZ *HEZCallerSession) Nonces(arg0 common.Address) (*big.Int, error) {
  459. return _HEZ.Contract.Nonces(&_HEZ.CallOpts, arg0)
  460. }
  461. // Symbol is a free data retrieval call binding the contract method 0x95d89b41.
  462. //
  463. // Solidity: function symbol() view returns(string)
  464. func (_HEZ *HEZCaller) Symbol(opts *bind.CallOpts) (string, error) {
  465. var (
  466. ret0 = new(string)
  467. )
  468. out := ret0
  469. err := _HEZ.contract.Call(opts, out, "symbol")
  470. return *ret0, 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 (
  489. ret0 = new(*big.Int)
  490. )
  491. out := ret0
  492. err := _HEZ.contract.Call(opts, out, "totalSupply")
  493. return *ret0, tracerr.Wrap(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, tracerr.Wrap(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, tracerr.Wrap(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 tracerr.Wrap(err)
  724. }
  725. event.Raw = log
  726. select {
  727. case sink <- event:
  728. case err := <-sub.Err():
  729. return tracerr.Wrap(err)
  730. case <-quit:
  731. return nil
  732. }
  733. case err := <-sub.Err():
  734. return tracerr.Wrap(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, tracerr.Wrap(err)
  748. }
  749. return event, nil
  750. }
  751. // 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.
  752. type HEZAuthorizationUsedIterator struct {
  753. Event *HEZAuthorizationUsed // Event containing the contract specifics and raw log
  754. contract *bind.BoundContract // Generic contract to use for unpacking event data
  755. event string // Event name to use for unpacking event data
  756. logs chan types.Log // Log channel receiving the found contract events
  757. sub ethereum.Subscription // Subscription for errors, completion and termination
  758. done bool // Whether the subscription completed delivering logs
  759. fail error // Occurred error to stop iteration
  760. }
  761. // Next advances the iterator to the subsequent event, returning whether there
  762. // are any more events found. In case of a retrieval or parsing error, false is
  763. // returned and Error() can be queried for the exact failure.
  764. func (it *HEZAuthorizationUsedIterator) Next() bool {
  765. // If the iterator failed, stop iterating
  766. if it.fail != nil {
  767. return false
  768. }
  769. // If the iterator completed, deliver directly whatever's available
  770. if it.done {
  771. select {
  772. case log := <-it.logs:
  773. it.Event = new(HEZAuthorizationUsed)
  774. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  775. it.fail = err
  776. return false
  777. }
  778. it.Event.Raw = log
  779. return true
  780. default:
  781. return false
  782. }
  783. }
  784. // Iterator still in progress, wait for either a data or an error event
  785. select {
  786. case log := <-it.logs:
  787. it.Event = new(HEZAuthorizationUsed)
  788. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  789. it.fail = err
  790. return false
  791. }
  792. it.Event.Raw = log
  793. return true
  794. case err := <-it.sub.Err():
  795. it.done = true
  796. it.fail = err
  797. return it.Next()
  798. }
  799. }
  800. // Error returns any retrieval or parsing error occurred during filtering.
  801. func (it *HEZAuthorizationUsedIterator) Error() error {
  802. return it.fail
  803. }
  804. // Close terminates the iteration process, releasing any pending underlying
  805. // resources.
  806. func (it *HEZAuthorizationUsedIterator) Close() error {
  807. it.sub.Unsubscribe()
  808. return nil
  809. }
  810. // HEZAuthorizationUsed represents a AuthorizationUsed event raised by the HEZ contract.
  811. type HEZAuthorizationUsed struct {
  812. Authorizer common.Address
  813. Nonce [32]byte
  814. Raw types.Log // Blockchain specific contextual infos
  815. }
  816. // FilterAuthorizationUsed is a free log retrieval operation binding the contract event 0x98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a5.
  817. //
  818. // Solidity: event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce)
  819. func (_HEZ *HEZFilterer) FilterAuthorizationUsed(opts *bind.FilterOpts, authorizer []common.Address, nonce [][32]byte) (*HEZAuthorizationUsedIterator, error) {
  820. var authorizerRule []interface{}
  821. for _, authorizerItem := range authorizer {
  822. authorizerRule = append(authorizerRule, authorizerItem)
  823. }
  824. var nonceRule []interface{}
  825. for _, nonceItem := range nonce {
  826. nonceRule = append(nonceRule, nonceItem)
  827. }
  828. logs, sub, err := _HEZ.contract.FilterLogs(opts, "AuthorizationUsed", authorizerRule, nonceRule)
  829. if err != nil {
  830. return nil, tracerr.Wrap(err)
  831. }
  832. return &HEZAuthorizationUsedIterator{contract: _HEZ.contract, event: "AuthorizationUsed", logs: logs, sub: sub}, nil
  833. }
  834. // WatchAuthorizationUsed is a free log subscription operation binding the contract event 0x98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a5.
  835. //
  836. // Solidity: event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce)
  837. func (_HEZ *HEZFilterer) WatchAuthorizationUsed(opts *bind.WatchOpts, sink chan<- *HEZAuthorizationUsed, authorizer []common.Address, nonce [][32]byte) (event.Subscription, error) {
  838. var authorizerRule []interface{}
  839. for _, authorizerItem := range authorizer {
  840. authorizerRule = append(authorizerRule, authorizerItem)
  841. }
  842. var nonceRule []interface{}
  843. for _, nonceItem := range nonce {
  844. nonceRule = append(nonceRule, nonceItem)
  845. }
  846. logs, sub, err := _HEZ.contract.WatchLogs(opts, "AuthorizationUsed", authorizerRule, nonceRule)
  847. if err != nil {
  848. return nil, tracerr.Wrap(err)
  849. }
  850. return event.NewSubscription(func(quit <-chan struct{}) error {
  851. defer sub.Unsubscribe()
  852. for {
  853. select {
  854. case log := <-logs:
  855. // New log arrived, parse the event and forward to the user
  856. event := new(HEZAuthorizationUsed)
  857. if err := _HEZ.contract.UnpackLog(event, "AuthorizationUsed", log); err != nil {
  858. return tracerr.Wrap(err)
  859. }
  860. event.Raw = log
  861. select {
  862. case sink <- event:
  863. case err := <-sub.Err():
  864. return tracerr.Wrap(err)
  865. case <-quit:
  866. return nil
  867. }
  868. case err := <-sub.Err():
  869. return tracerr.Wrap(err)
  870. case <-quit:
  871. return nil
  872. }
  873. }
  874. }), nil
  875. }
  876. // ParseAuthorizationUsed is a log parse operation binding the contract event 0x98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a5.
  877. //
  878. // Solidity: event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce)
  879. func (_HEZ *HEZFilterer) ParseAuthorizationUsed(log types.Log) (*HEZAuthorizationUsed, error) {
  880. event := new(HEZAuthorizationUsed)
  881. if err := _HEZ.contract.UnpackLog(event, "AuthorizationUsed", log); err != nil {
  882. return nil, tracerr.Wrap(err)
  883. }
  884. return event, nil
  885. }
  886. // 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.
  887. type HEZTransferIterator struct {
  888. Event *HEZTransfer // Event containing the contract specifics and raw log
  889. contract *bind.BoundContract // Generic contract to use for unpacking event data
  890. event string // Event name to use for unpacking event data
  891. logs chan types.Log // Log channel receiving the found contract events
  892. sub ethereum.Subscription // Subscription for errors, completion and termination
  893. done bool // Whether the subscription completed delivering logs
  894. fail error // Occurred error to stop iteration
  895. }
  896. // Next advances the iterator to the subsequent event, returning whether there
  897. // are any more events found. In case of a retrieval or parsing error, false is
  898. // returned and Error() can be queried for the exact failure.
  899. func (it *HEZTransferIterator) Next() bool {
  900. // If the iterator failed, stop iterating
  901. if it.fail != nil {
  902. return false
  903. }
  904. // If the iterator completed, deliver directly whatever's available
  905. if it.done {
  906. select {
  907. case log := <-it.logs:
  908. it.Event = new(HEZTransfer)
  909. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  910. it.fail = err
  911. return false
  912. }
  913. it.Event.Raw = log
  914. return true
  915. default:
  916. return false
  917. }
  918. }
  919. // Iterator still in progress, wait for either a data or an error event
  920. select {
  921. case log := <-it.logs:
  922. it.Event = new(HEZTransfer)
  923. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  924. it.fail = err
  925. return false
  926. }
  927. it.Event.Raw = log
  928. return true
  929. case err := <-it.sub.Err():
  930. it.done = true
  931. it.fail = err
  932. return it.Next()
  933. }
  934. }
  935. // Error returns any retrieval or parsing error occurred during filtering.
  936. func (it *HEZTransferIterator) Error() error {
  937. return it.fail
  938. }
  939. // Close terminates the iteration process, releasing any pending underlying
  940. // resources.
  941. func (it *HEZTransferIterator) Close() error {
  942. it.sub.Unsubscribe()
  943. return nil
  944. }
  945. // HEZTransfer represents a Transfer event raised by the HEZ contract.
  946. type HEZTransfer struct {
  947. From common.Address
  948. To common.Address
  949. Value *big.Int
  950. Raw types.Log // Blockchain specific contextual infos
  951. }
  952. // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  953. //
  954. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  955. func (_HEZ *HEZFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*HEZTransferIterator, error) {
  956. var fromRule []interface{}
  957. for _, fromItem := range from {
  958. fromRule = append(fromRule, fromItem)
  959. }
  960. var toRule []interface{}
  961. for _, toItem := range to {
  962. toRule = append(toRule, toItem)
  963. }
  964. logs, sub, err := _HEZ.contract.FilterLogs(opts, "Transfer", fromRule, toRule)
  965. if err != nil {
  966. return nil, tracerr.Wrap(err)
  967. }
  968. return &HEZTransferIterator{contract: _HEZ.contract, event: "Transfer", logs: logs, sub: sub}, nil
  969. }
  970. // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  971. //
  972. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  973. func (_HEZ *HEZFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *HEZTransfer, from []common.Address, to []common.Address) (event.Subscription, error) {
  974. var fromRule []interface{}
  975. for _, fromItem := range from {
  976. fromRule = append(fromRule, fromItem)
  977. }
  978. var toRule []interface{}
  979. for _, toItem := range to {
  980. toRule = append(toRule, toItem)
  981. }
  982. logs, sub, err := _HEZ.contract.WatchLogs(opts, "Transfer", fromRule, toRule)
  983. if err != nil {
  984. return nil, tracerr.Wrap(err)
  985. }
  986. return event.NewSubscription(func(quit <-chan struct{}) error {
  987. defer sub.Unsubscribe()
  988. for {
  989. select {
  990. case log := <-logs:
  991. // New log arrived, parse the event and forward to the user
  992. event := new(HEZTransfer)
  993. if err := _HEZ.contract.UnpackLog(event, "Transfer", log); err != nil {
  994. return tracerr.Wrap(err)
  995. }
  996. event.Raw = log
  997. select {
  998. case sink <- event:
  999. case err := <-sub.Err():
  1000. return tracerr.Wrap(err)
  1001. case <-quit:
  1002. return nil
  1003. }
  1004. case err := <-sub.Err():
  1005. return tracerr.Wrap(err)
  1006. case <-quit:
  1007. return nil
  1008. }
  1009. }
  1010. }), nil
  1011. }
  1012. // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  1013. //
  1014. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  1015. func (_HEZ *HEZFilterer) ParseTransfer(log types.Log) (*HEZTransfer, error) {
  1016. event := new(HEZTransfer)
  1017. if err := _HEZ.contract.UnpackLog(event, "Transfer", log); err != nil {
  1018. return nil, tracerr.Wrap(err)
  1019. }
  1020. return event, nil
  1021. }