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.

1163 lines
58 KiB

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