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.

3003 lines
130 KiB

  1. // Code generated - DO NOT EDIT.
  2. // This file is a generated binding and any manual changes will be lost.
  3. package Hermez
  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. // HermezABI is the input ABI used to generate the binding from.
  25. const HermezABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"tokenID\",\"type\":\"uint32\"}],\"name\":\"AddToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"batchNum\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"l1UserTxsLen\",\"type\":\"uint16\"}],\"name\":\"ForgeBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"forgeL1L2BatchTimeout\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeAddToken\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"withdrawalDelay\",\"type\":\"uint64\"}],\"name\":\"InitializeHermezEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"queueIndex\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"uint8\",\"name\":\"position\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"l1UserTx\",\"type\":\"bytes\"}],\"name\":\"L1UserTxEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"SafeMode\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint8\",\"name\":\"numBucket\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockStamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawals\",\"type\":\"uint256\"}],\"name\":\"UpdateBucketWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256[4][5]\",\"name\":\"arrayBuckets\",\"type\":\"uint256[4][5]\"}],\"name\":\"UpdateBucketsParameters\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newFeeAddToken\",\"type\":\"uint256\"}],\"name\":\"UpdateFeeAddToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"newForgeL1L2BatchTimeout\",\"type\":\"uint8\"}],\"name\":\"UpdateForgeL1L2BatchTimeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"addressArray\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint64[]\",\"name\":\"valueArray\",\"type\":\"uint64[]\"}],\"name\":\"UpdateTokenExchange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newWithdrawalDelay\",\"type\":\"uint64\"}],\"name\":\"UpdateWithdrawalDelay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint48\",\"name\":\"idx\",\"type\":\"uint48\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"numExitRoot\",\"type\":\"uint32\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"instantWithdraw\",\"type\":\"bool\"}],\"name\":\"WithdrawEvent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ABSOLUTE_MAX_L1L2BATCHTIMEOUT\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"babyPubKey\",\"type\":\"uint256\"},{\"internalType\":\"uint48\",\"name\":\"fromIdx\",\"type\":\"uint48\"},{\"internalType\":\"uint16\",\"name\":\"loadAmountF\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"amountF\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"tokenID\",\"type\":\"uint32\"},{\"internalType\":\"uint48\",\"name\":\"toIdx\",\"type\":\"uint48\"},{\"internalType\":\"bytes\",\"name\":\"permit\",\"type\":\"bytes\"}],\"name\":\"addL1Transaction\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"permit\",\"type\":\"bytes\"}],\"name\":\"addToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"buckets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ceilUSD\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockStamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawals\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockWithdrawalRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxWithdrawals\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"uint48\",\"name\":\"\",\"type\":\"uint48\"}],\"name\":\"exitNullifierMap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"exitRootsMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeAddToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint48\",\"name\":\"newLastIdx\",\"type\":\"uint48\"},{\"internalType\":\"uint256\",\"name\":\"newStRoot\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newExitRoot\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"encodedL1CoordinatorTx\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"l1L2TxsData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"feeIdxCoordinator\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"verifierIdx\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"l1Batch\",\"type\":\"bool\"},{\"internalType\":\"uint256[2]\",\"name\":\"proofA\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2][2]\",\"name\":\"proofB\",\"type\":\"uint256[2][2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"proofC\",\"type\":\"uint256[2]\"}],\"name\":\"forgeBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"forgeL1L2BatchTimeout\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hermezAuctionContract\",\"outputs\":[{\"internalType\":\"contractIHermezAuctionProtocol\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hermezGovernanceAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_verifiers\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_verifiersParams\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"_withdrawVerifier\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_hermezAuctionContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tokenHEZ\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_forgeL1L2BatchTimeout\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_feeAddToken\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_poseidon2Elements\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poseidon3Elements\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poseidon4Elements\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_hermezGovernanceAddress\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_withdrawalDelay\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_withdrawDelayerContract\",\"type\":\"address\"}],\"name\":\"initializeHermez\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint192\",\"name\":\"amount\",\"type\":\"uint192\"}],\"name\":\"instantWithdrawalViewer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"l1L2TxsDataHashMap\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastForgedBatch\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastIdx\",\"outputs\":[{\"internalType\":\"uint48\",\"name\":\"\",\"type\":\"uint48\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastL1L2Batch\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"mapL1TxQueue\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextL1FillingQueue\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextL1ToForgeQueue\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registerTokensCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"rollupVerifiers\",\"outputs\":[{\"internalType\":\"contractVerifierRollupInterface\",\"name\":\"verifierInterface\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxTx\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nLevels\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollupVerifiersLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"safeMode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"stateRootMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenExchange\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenHEZ\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenList\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[4][5]\",\"name\":\"arrayBuckets\",\"type\":\"uint256[4][5]\"}],\"name\":\"updateBucketsParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newFeeAddToken\",\"type\":\"uint256\"}],\"name\":\"updateFeeAddToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"newForgeL1L2BatchTimeout\",\"type\":\"uint8\"}],\"name\":\"updateForgeL1L2BatchTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"addressArray\",\"type\":\"address[]\"},{\"internalType\":\"uint64[]\",\"name\":\"valueArray\",\"type\":\"uint64[]\"}],\"name\":\"updateTokenExchange\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newWithdrawalDelay\",\"type\":\"uint64\"}],\"name\":\"updateWithdrawalDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"proofA\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2][2]\",\"name\":\"proofB\",\"type\":\"uint256[2][2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"proofC\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint32\",\"name\":\"tokenID\",\"type\":\"uint32\"},{\"internalType\":\"uint192\",\"name\":\"amount\",\"type\":\"uint192\"},{\"internalType\":\"uint32\",\"name\":\"numExitRoot\",\"type\":\"uint32\"},{\"internalType\":\"uint48\",\"name\":\"idx\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"instantWithdraw\",\"type\":\"bool\"}],\"name\":\"withdrawCircuit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawDelayerContract\",\"outputs\":[{\"internalType\":\"contractIWithdrawalDelayer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"tokenID\",\"type\":\"uint32\"},{\"internalType\":\"uint192\",\"name\":\"amount\",\"type\":\"uint192\"},{\"internalType\":\"uint256\",\"name\":\"babyPubKey\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"numExitRoot\",\"type\":\"uint32\"},{\"internalType\":\"uint256[]\",\"name\":\"siblings\",\"type\":\"uint256[]\"},{\"internalType\":\"uint48\",\"name\":\"idx\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"instantWithdraw\",\"type\":\"bool\"}],\"name\":\"withdrawMerkleProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawVerifier\",\"outputs\":[{\"internalType\":\"contractVerifierWithdrawInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawalDelay\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"
  26. // Hermez is an auto generated Go binding around an Ethereum contract.
  27. type Hermez struct {
  28. HermezCaller // Read-only binding to the contract
  29. HermezTransactor // Write-only binding to the contract
  30. HermezFilterer // Log filterer for contract events
  31. }
  32. // HermezCaller is an auto generated read-only Go binding around an Ethereum contract.
  33. type HermezCaller struct {
  34. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  35. }
  36. // HermezTransactor is an auto generated write-only Go binding around an Ethereum contract.
  37. type HermezTransactor struct {
  38. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  39. }
  40. // HermezFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  41. type HermezFilterer struct {
  42. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  43. }
  44. // HermezSession is an auto generated Go binding around an Ethereum contract,
  45. // with pre-set call and transact options.
  46. type HermezSession struct {
  47. Contract *Hermez // Generic contract binding to set the session for
  48. CallOpts bind.CallOpts // Call options to use throughout this session
  49. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  50. }
  51. // HermezCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  52. // with pre-set call options.
  53. type HermezCallerSession struct {
  54. Contract *HermezCaller // Generic contract caller binding to set the session for
  55. CallOpts bind.CallOpts // Call options to use throughout this session
  56. }
  57. // HermezTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  58. // with pre-set transact options.
  59. type HermezTransactorSession struct {
  60. Contract *HermezTransactor // Generic contract transactor binding to set the session for
  61. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  62. }
  63. // HermezRaw is an auto generated low-level Go binding around an Ethereum contract.
  64. type HermezRaw struct {
  65. Contract *Hermez // Generic contract binding to access the raw methods on
  66. }
  67. // HermezCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  68. type HermezCallerRaw struct {
  69. Contract *HermezCaller // Generic read-only contract binding to access the raw methods on
  70. }
  71. // HermezTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  72. type HermezTransactorRaw struct {
  73. Contract *HermezTransactor // Generic write-only contract binding to access the raw methods on
  74. }
  75. // NewHermez creates a new instance of Hermez, bound to a specific deployed contract.
  76. func NewHermez(address common.Address, backend bind.ContractBackend) (*Hermez, error) {
  77. contract, err := bindHermez(address, backend, backend, backend)
  78. if err != nil {
  79. return nil, err
  80. }
  81. return &Hermez{HermezCaller: HermezCaller{contract: contract}, HermezTransactor: HermezTransactor{contract: contract}, HermezFilterer: HermezFilterer{contract: contract}}, nil
  82. }
  83. // NewHermezCaller creates a new read-only instance of Hermez, bound to a specific deployed contract.
  84. func NewHermezCaller(address common.Address, caller bind.ContractCaller) (*HermezCaller, error) {
  85. contract, err := bindHermez(address, caller, nil, nil)
  86. if err != nil {
  87. return nil, err
  88. }
  89. return &HermezCaller{contract: contract}, nil
  90. }
  91. // NewHermezTransactor creates a new write-only instance of Hermez, bound to a specific deployed contract.
  92. func NewHermezTransactor(address common.Address, transactor bind.ContractTransactor) (*HermezTransactor, error) {
  93. contract, err := bindHermez(address, nil, transactor, nil)
  94. if err != nil {
  95. return nil, err
  96. }
  97. return &HermezTransactor{contract: contract}, nil
  98. }
  99. // NewHermezFilterer creates a new log filterer instance of Hermez, bound to a specific deployed contract.
  100. func NewHermezFilterer(address common.Address, filterer bind.ContractFilterer) (*HermezFilterer, error) {
  101. contract, err := bindHermez(address, nil, nil, filterer)
  102. if err != nil {
  103. return nil, err
  104. }
  105. return &HermezFilterer{contract: contract}, nil
  106. }
  107. // bindHermez binds a generic wrapper to an already deployed contract.
  108. func bindHermez(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  109. parsed, err := abi.JSON(strings.NewReader(HermezABI))
  110. if err != nil {
  111. return nil, err
  112. }
  113. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  114. }
  115. // Call invokes the (constant) contract method with params as input values and
  116. // sets the output to result. The result type might be a single field for simple
  117. // returns, a slice of interfaces for anonymous returns and a struct for named
  118. // returns.
  119. func (_Hermez *HermezRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  120. return _Hermez.Contract.HermezCaller.contract.Call(opts, result, method, params...)
  121. }
  122. // Transfer initiates a plain transaction to move funds to the contract, calling
  123. // its default method if one is available.
  124. func (_Hermez *HermezRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  125. return _Hermez.Contract.HermezTransactor.contract.Transfer(opts)
  126. }
  127. // Transact invokes the (paid) contract method with params as input values.
  128. func (_Hermez *HermezRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  129. return _Hermez.Contract.HermezTransactor.contract.Transact(opts, method, params...)
  130. }
  131. // Call invokes the (constant) contract method with params as input values and
  132. // sets the output to result. The result type might be a single field for simple
  133. // returns, a slice of interfaces for anonymous returns and a struct for named
  134. // returns.
  135. func (_Hermez *HermezCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  136. return _Hermez.Contract.contract.Call(opts, result, method, params...)
  137. }
  138. // Transfer initiates a plain transaction to move funds to the contract, calling
  139. // its default method if one is available.
  140. func (_Hermez *HermezTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  141. return _Hermez.Contract.contract.Transfer(opts)
  142. }
  143. // Transact invokes the (paid) contract method with params as input values.
  144. func (_Hermez *HermezTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  145. return _Hermez.Contract.contract.Transact(opts, method, params...)
  146. }
  147. // ABSOLUTEMAXL1L2BATCHTIMEOUT is a free data retrieval call binding the contract method 0x95a09f2a.
  148. //
  149. // Solidity: function ABSOLUTE_MAX_L1L2BATCHTIMEOUT() view returns(uint8)
  150. func (_Hermez *HermezCaller) ABSOLUTEMAXL1L2BATCHTIMEOUT(opts *bind.CallOpts) (uint8, error) {
  151. var out []interface{}
  152. err := _Hermez.contract.Call(opts, &out, "ABSOLUTE_MAX_L1L2BATCHTIMEOUT")
  153. if err != nil {
  154. return *new(uint8), err
  155. }
  156. out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8)
  157. return out0, err
  158. }
  159. // ABSOLUTEMAXL1L2BATCHTIMEOUT is a free data retrieval call binding the contract method 0x95a09f2a.
  160. //
  161. // Solidity: function ABSOLUTE_MAX_L1L2BATCHTIMEOUT() view returns(uint8)
  162. func (_Hermez *HermezSession) ABSOLUTEMAXL1L2BATCHTIMEOUT() (uint8, error) {
  163. return _Hermez.Contract.ABSOLUTEMAXL1L2BATCHTIMEOUT(&_Hermez.CallOpts)
  164. }
  165. // ABSOLUTEMAXL1L2BATCHTIMEOUT is a free data retrieval call binding the contract method 0x95a09f2a.
  166. //
  167. // Solidity: function ABSOLUTE_MAX_L1L2BATCHTIMEOUT() view returns(uint8)
  168. func (_Hermez *HermezCallerSession) ABSOLUTEMAXL1L2BATCHTIMEOUT() (uint8, error) {
  169. return _Hermez.Contract.ABSOLUTEMAXL1L2BATCHTIMEOUT(&_Hermez.CallOpts)
  170. }
  171. // Buckets is a free data retrieval call binding the contract method 0x9b51fb0d.
  172. //
  173. // Solidity: function buckets(uint256 ) view returns(uint256 ceilUSD, uint256 blockStamp, uint256 withdrawals, uint256 blockWithdrawalRate, uint256 maxWithdrawals)
  174. func (_Hermez *HermezCaller) Buckets(opts *bind.CallOpts, arg0 *big.Int) (struct {
  175. CeilUSD *big.Int
  176. BlockStamp *big.Int
  177. Withdrawals *big.Int
  178. BlockWithdrawalRate *big.Int
  179. MaxWithdrawals *big.Int
  180. }, error) {
  181. var out []interface{}
  182. err := _Hermez.contract.Call(opts, &out, "buckets", arg0)
  183. outstruct := new(struct {
  184. CeilUSD *big.Int
  185. BlockStamp *big.Int
  186. Withdrawals *big.Int
  187. BlockWithdrawalRate *big.Int
  188. MaxWithdrawals *big.Int
  189. })
  190. outstruct.CeilUSD = out[0].(*big.Int)
  191. outstruct.BlockStamp = out[1].(*big.Int)
  192. outstruct.Withdrawals = out[2].(*big.Int)
  193. outstruct.BlockWithdrawalRate = out[3].(*big.Int)
  194. outstruct.MaxWithdrawals = out[4].(*big.Int)
  195. return *outstruct, err
  196. }
  197. // Buckets is a free data retrieval call binding the contract method 0x9b51fb0d.
  198. //
  199. // Solidity: function buckets(uint256 ) view returns(uint256 ceilUSD, uint256 blockStamp, uint256 withdrawals, uint256 blockWithdrawalRate, uint256 maxWithdrawals)
  200. func (_Hermez *HermezSession) Buckets(arg0 *big.Int) (struct {
  201. CeilUSD *big.Int
  202. BlockStamp *big.Int
  203. Withdrawals *big.Int
  204. BlockWithdrawalRate *big.Int
  205. MaxWithdrawals *big.Int
  206. }, error) {
  207. return _Hermez.Contract.Buckets(&_Hermez.CallOpts, arg0)
  208. }
  209. // Buckets is a free data retrieval call binding the contract method 0x9b51fb0d.
  210. //
  211. // Solidity: function buckets(uint256 ) view returns(uint256 ceilUSD, uint256 blockStamp, uint256 withdrawals, uint256 blockWithdrawalRate, uint256 maxWithdrawals)
  212. func (_Hermez *HermezCallerSession) Buckets(arg0 *big.Int) (struct {
  213. CeilUSD *big.Int
  214. BlockStamp *big.Int
  215. Withdrawals *big.Int
  216. BlockWithdrawalRate *big.Int
  217. MaxWithdrawals *big.Int
  218. }, error) {
  219. return _Hermez.Contract.Buckets(&_Hermez.CallOpts, arg0)
  220. }
  221. // ExitNullifierMap is a free data retrieval call binding the contract method 0xf84f92ee.
  222. //
  223. // Solidity: function exitNullifierMap(uint32 , uint48 ) view returns(bool)
  224. func (_Hermez *HermezCaller) ExitNullifierMap(opts *bind.CallOpts, arg0 uint32, arg1 *big.Int) (bool, error) {
  225. var out []interface{}
  226. err := _Hermez.contract.Call(opts, &out, "exitNullifierMap", arg0, arg1)
  227. if err != nil {
  228. return *new(bool), err
  229. }
  230. out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
  231. return out0, err
  232. }
  233. // ExitNullifierMap is a free data retrieval call binding the contract method 0xf84f92ee.
  234. //
  235. // Solidity: function exitNullifierMap(uint32 , uint48 ) view returns(bool)
  236. func (_Hermez *HermezSession) ExitNullifierMap(arg0 uint32, arg1 *big.Int) (bool, error) {
  237. return _Hermez.Contract.ExitNullifierMap(&_Hermez.CallOpts, arg0, arg1)
  238. }
  239. // ExitNullifierMap is a free data retrieval call binding the contract method 0xf84f92ee.
  240. //
  241. // Solidity: function exitNullifierMap(uint32 , uint48 ) view returns(bool)
  242. func (_Hermez *HermezCallerSession) ExitNullifierMap(arg0 uint32, arg1 *big.Int) (bool, error) {
  243. return _Hermez.Contract.ExitNullifierMap(&_Hermez.CallOpts, arg0, arg1)
  244. }
  245. // ExitRootsMap is a free data retrieval call binding the contract method 0x3ee641ea.
  246. //
  247. // Solidity: function exitRootsMap(uint32 ) view returns(uint256)
  248. func (_Hermez *HermezCaller) ExitRootsMap(opts *bind.CallOpts, arg0 uint32) (*big.Int, error) {
  249. var out []interface{}
  250. err := _Hermez.contract.Call(opts, &out, "exitRootsMap", arg0)
  251. if err != nil {
  252. return *new(*big.Int), err
  253. }
  254. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  255. return out0, err
  256. }
  257. // ExitRootsMap is a free data retrieval call binding the contract method 0x3ee641ea.
  258. //
  259. // Solidity: function exitRootsMap(uint32 ) view returns(uint256)
  260. func (_Hermez *HermezSession) ExitRootsMap(arg0 uint32) (*big.Int, error) {
  261. return _Hermez.Contract.ExitRootsMap(&_Hermez.CallOpts, arg0)
  262. }
  263. // ExitRootsMap is a free data retrieval call binding the contract method 0x3ee641ea.
  264. //
  265. // Solidity: function exitRootsMap(uint32 ) view returns(uint256)
  266. func (_Hermez *HermezCallerSession) ExitRootsMap(arg0 uint32) (*big.Int, error) {
  267. return _Hermez.Contract.ExitRootsMap(&_Hermez.CallOpts, arg0)
  268. }
  269. // FeeAddToken is a free data retrieval call binding the contract method 0xbded9bb8.
  270. //
  271. // Solidity: function feeAddToken() view returns(uint256)
  272. func (_Hermez *HermezCaller) FeeAddToken(opts *bind.CallOpts) (*big.Int, error) {
  273. var out []interface{}
  274. err := _Hermez.contract.Call(opts, &out, "feeAddToken")
  275. if err != nil {
  276. return *new(*big.Int), err
  277. }
  278. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  279. return out0, err
  280. }
  281. // FeeAddToken is a free data retrieval call binding the contract method 0xbded9bb8.
  282. //
  283. // Solidity: function feeAddToken() view returns(uint256)
  284. func (_Hermez *HermezSession) FeeAddToken() (*big.Int, error) {
  285. return _Hermez.Contract.FeeAddToken(&_Hermez.CallOpts)
  286. }
  287. // FeeAddToken is a free data retrieval call binding the contract method 0xbded9bb8.
  288. //
  289. // Solidity: function feeAddToken() view returns(uint256)
  290. func (_Hermez *HermezCallerSession) FeeAddToken() (*big.Int, error) {
  291. return _Hermez.Contract.FeeAddToken(&_Hermez.CallOpts)
  292. }
  293. // ForgeL1L2BatchTimeout is a free data retrieval call binding the contract method 0xa3275838.
  294. //
  295. // Solidity: function forgeL1L2BatchTimeout() view returns(uint8)
  296. func (_Hermez *HermezCaller) ForgeL1L2BatchTimeout(opts *bind.CallOpts) (uint8, error) {
  297. var out []interface{}
  298. err := _Hermez.contract.Call(opts, &out, "forgeL1L2BatchTimeout")
  299. if err != nil {
  300. return *new(uint8), err
  301. }
  302. out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8)
  303. return out0, err
  304. }
  305. // ForgeL1L2BatchTimeout is a free data retrieval call binding the contract method 0xa3275838.
  306. //
  307. // Solidity: function forgeL1L2BatchTimeout() view returns(uint8)
  308. func (_Hermez *HermezSession) ForgeL1L2BatchTimeout() (uint8, error) {
  309. return _Hermez.Contract.ForgeL1L2BatchTimeout(&_Hermez.CallOpts)
  310. }
  311. // ForgeL1L2BatchTimeout is a free data retrieval call binding the contract method 0xa3275838.
  312. //
  313. // Solidity: function forgeL1L2BatchTimeout() view returns(uint8)
  314. func (_Hermez *HermezCallerSession) ForgeL1L2BatchTimeout() (uint8, error) {
  315. return _Hermez.Contract.ForgeL1L2BatchTimeout(&_Hermez.CallOpts)
  316. }
  317. // HermezAuctionContract is a free data retrieval call binding the contract method 0x2bd83626.
  318. //
  319. // Solidity: function hermezAuctionContract() view returns(address)
  320. func (_Hermez *HermezCaller) HermezAuctionContract(opts *bind.CallOpts) (common.Address, error) {
  321. var out []interface{}
  322. err := _Hermez.contract.Call(opts, &out, "hermezAuctionContract")
  323. if err != nil {
  324. return *new(common.Address), err
  325. }
  326. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  327. return out0, err
  328. }
  329. // HermezAuctionContract is a free data retrieval call binding the contract method 0x2bd83626.
  330. //
  331. // Solidity: function hermezAuctionContract() view returns(address)
  332. func (_Hermez *HermezSession) HermezAuctionContract() (common.Address, error) {
  333. return _Hermez.Contract.HermezAuctionContract(&_Hermez.CallOpts)
  334. }
  335. // HermezAuctionContract is a free data retrieval call binding the contract method 0x2bd83626.
  336. //
  337. // Solidity: function hermezAuctionContract() view returns(address)
  338. func (_Hermez *HermezCallerSession) HermezAuctionContract() (common.Address, error) {
  339. return _Hermez.Contract.HermezAuctionContract(&_Hermez.CallOpts)
  340. }
  341. // HermezGovernanceAddress is a free data retrieval call binding the contract method 0x013f7852.
  342. //
  343. // Solidity: function hermezGovernanceAddress() view returns(address)
  344. func (_Hermez *HermezCaller) HermezGovernanceAddress(opts *bind.CallOpts) (common.Address, error) {
  345. var out []interface{}
  346. err := _Hermez.contract.Call(opts, &out, "hermezGovernanceAddress")
  347. if err != nil {
  348. return *new(common.Address), err
  349. }
  350. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  351. return out0, err
  352. }
  353. // HermezGovernanceAddress is a free data retrieval call binding the contract method 0x013f7852.
  354. //
  355. // Solidity: function hermezGovernanceAddress() view returns(address)
  356. func (_Hermez *HermezSession) HermezGovernanceAddress() (common.Address, error) {
  357. return _Hermez.Contract.HermezGovernanceAddress(&_Hermez.CallOpts)
  358. }
  359. // HermezGovernanceAddress is a free data retrieval call binding the contract method 0x013f7852.
  360. //
  361. // Solidity: function hermezGovernanceAddress() view returns(address)
  362. func (_Hermez *HermezCallerSession) HermezGovernanceAddress() (common.Address, error) {
  363. return _Hermez.Contract.HermezGovernanceAddress(&_Hermez.CallOpts)
  364. }
  365. // InstantWithdrawalViewer is a free data retrieval call binding the contract method 0x375110aa.
  366. //
  367. // Solidity: function instantWithdrawalViewer(address tokenAddress, uint192 amount) view returns(bool)
  368. func (_Hermez *HermezCaller) InstantWithdrawalViewer(opts *bind.CallOpts, tokenAddress common.Address, amount *big.Int) (bool, error) {
  369. var out []interface{}
  370. err := _Hermez.contract.Call(opts, &out, "instantWithdrawalViewer", tokenAddress, amount)
  371. if err != nil {
  372. return *new(bool), err
  373. }
  374. out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
  375. return out0, err
  376. }
  377. // InstantWithdrawalViewer is a free data retrieval call binding the contract method 0x375110aa.
  378. //
  379. // Solidity: function instantWithdrawalViewer(address tokenAddress, uint192 amount) view returns(bool)
  380. func (_Hermez *HermezSession) InstantWithdrawalViewer(tokenAddress common.Address, amount *big.Int) (bool, error) {
  381. return _Hermez.Contract.InstantWithdrawalViewer(&_Hermez.CallOpts, tokenAddress, amount)
  382. }
  383. // InstantWithdrawalViewer is a free data retrieval call binding the contract method 0x375110aa.
  384. //
  385. // Solidity: function instantWithdrawalViewer(address tokenAddress, uint192 amount) view returns(bool)
  386. func (_Hermez *HermezCallerSession) InstantWithdrawalViewer(tokenAddress common.Address, amount *big.Int) (bool, error) {
  387. return _Hermez.Contract.InstantWithdrawalViewer(&_Hermez.CallOpts, tokenAddress, amount)
  388. }
  389. // L1L2TxsDataHashMap is a free data retrieval call binding the contract method 0xce5ec65a.
  390. //
  391. // Solidity: function l1L2TxsDataHashMap(uint32 ) view returns(bytes32)
  392. func (_Hermez *HermezCaller) L1L2TxsDataHashMap(opts *bind.CallOpts, arg0 uint32) ([32]byte, error) {
  393. var out []interface{}
  394. err := _Hermez.contract.Call(opts, &out, "l1L2TxsDataHashMap", arg0)
  395. if err != nil {
  396. return *new([32]byte), err
  397. }
  398. out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
  399. return out0, err
  400. }
  401. // L1L2TxsDataHashMap is a free data retrieval call binding the contract method 0xce5ec65a.
  402. //
  403. // Solidity: function l1L2TxsDataHashMap(uint32 ) view returns(bytes32)
  404. func (_Hermez *HermezSession) L1L2TxsDataHashMap(arg0 uint32) ([32]byte, error) {
  405. return _Hermez.Contract.L1L2TxsDataHashMap(&_Hermez.CallOpts, arg0)
  406. }
  407. // L1L2TxsDataHashMap is a free data retrieval call binding the contract method 0xce5ec65a.
  408. //
  409. // Solidity: function l1L2TxsDataHashMap(uint32 ) view returns(bytes32)
  410. func (_Hermez *HermezCallerSession) L1L2TxsDataHashMap(arg0 uint32) ([32]byte, error) {
  411. return _Hermez.Contract.L1L2TxsDataHashMap(&_Hermez.CallOpts, arg0)
  412. }
  413. // LastForgedBatch is a free data retrieval call binding the contract method 0x44e0b2ce.
  414. //
  415. // Solidity: function lastForgedBatch() view returns(uint32)
  416. func (_Hermez *HermezCaller) LastForgedBatch(opts *bind.CallOpts) (uint32, error) {
  417. var out []interface{}
  418. err := _Hermez.contract.Call(opts, &out, "lastForgedBatch")
  419. if err != nil {
  420. return *new(uint32), err
  421. }
  422. out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32)
  423. return out0, err
  424. }
  425. // LastForgedBatch is a free data retrieval call binding the contract method 0x44e0b2ce.
  426. //
  427. // Solidity: function lastForgedBatch() view returns(uint32)
  428. func (_Hermez *HermezSession) LastForgedBatch() (uint32, error) {
  429. return _Hermez.Contract.LastForgedBatch(&_Hermez.CallOpts)
  430. }
  431. // LastForgedBatch is a free data retrieval call binding the contract method 0x44e0b2ce.
  432. //
  433. // Solidity: function lastForgedBatch() view returns(uint32)
  434. func (_Hermez *HermezCallerSession) LastForgedBatch() (uint32, error) {
  435. return _Hermez.Contract.LastForgedBatch(&_Hermez.CallOpts)
  436. }
  437. // LastIdx is a free data retrieval call binding the contract method 0xd486645c.
  438. //
  439. // Solidity: function lastIdx() view returns(uint48)
  440. func (_Hermez *HermezCaller) LastIdx(opts *bind.CallOpts) (*big.Int, error) {
  441. var out []interface{}
  442. err := _Hermez.contract.Call(opts, &out, "lastIdx")
  443. if err != nil {
  444. return *new(*big.Int), err
  445. }
  446. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  447. return out0, err
  448. }
  449. // LastIdx is a free data retrieval call binding the contract method 0xd486645c.
  450. //
  451. // Solidity: function lastIdx() view returns(uint48)
  452. func (_Hermez *HermezSession) LastIdx() (*big.Int, error) {
  453. return _Hermez.Contract.LastIdx(&_Hermez.CallOpts)
  454. }
  455. // LastIdx is a free data retrieval call binding the contract method 0xd486645c.
  456. //
  457. // Solidity: function lastIdx() view returns(uint48)
  458. func (_Hermez *HermezCallerSession) LastIdx() (*big.Int, error) {
  459. return _Hermez.Contract.LastIdx(&_Hermez.CallOpts)
  460. }
  461. // LastL1L2Batch is a free data retrieval call binding the contract method 0x84ef9ed4.
  462. //
  463. // Solidity: function lastL1L2Batch() view returns(uint64)
  464. func (_Hermez *HermezCaller) LastL1L2Batch(opts *bind.CallOpts) (uint64, error) {
  465. var out []interface{}
  466. err := _Hermez.contract.Call(opts, &out, "lastL1L2Batch")
  467. if err != nil {
  468. return *new(uint64), err
  469. }
  470. out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
  471. return out0, err
  472. }
  473. // LastL1L2Batch is a free data retrieval call binding the contract method 0x84ef9ed4.
  474. //
  475. // Solidity: function lastL1L2Batch() view returns(uint64)
  476. func (_Hermez *HermezSession) LastL1L2Batch() (uint64, error) {
  477. return _Hermez.Contract.LastL1L2Batch(&_Hermez.CallOpts)
  478. }
  479. // LastL1L2Batch is a free data retrieval call binding the contract method 0x84ef9ed4.
  480. //
  481. // Solidity: function lastL1L2Batch() view returns(uint64)
  482. func (_Hermez *HermezCallerSession) LastL1L2Batch() (uint64, error) {
  483. return _Hermez.Contract.LastL1L2Batch(&_Hermez.CallOpts)
  484. }
  485. // MapL1TxQueue is a free data retrieval call binding the contract method 0xdc3e718e.
  486. //
  487. // Solidity: function mapL1TxQueue(uint32 ) view returns(bytes)
  488. func (_Hermez *HermezCaller) MapL1TxQueue(opts *bind.CallOpts, arg0 uint32) ([]byte, error) {
  489. var out []interface{}
  490. err := _Hermez.contract.Call(opts, &out, "mapL1TxQueue", arg0)
  491. if err != nil {
  492. return *new([]byte), err
  493. }
  494. out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte)
  495. return out0, err
  496. }
  497. // MapL1TxQueue is a free data retrieval call binding the contract method 0xdc3e718e.
  498. //
  499. // Solidity: function mapL1TxQueue(uint32 ) view returns(bytes)
  500. func (_Hermez *HermezSession) MapL1TxQueue(arg0 uint32) ([]byte, error) {
  501. return _Hermez.Contract.MapL1TxQueue(&_Hermez.CallOpts, arg0)
  502. }
  503. // MapL1TxQueue is a free data retrieval call binding the contract method 0xdc3e718e.
  504. //
  505. // Solidity: function mapL1TxQueue(uint32 ) view returns(bytes)
  506. func (_Hermez *HermezCallerSession) MapL1TxQueue(arg0 uint32) ([]byte, error) {
  507. return _Hermez.Contract.MapL1TxQueue(&_Hermez.CallOpts, arg0)
  508. }
  509. // NextL1FillingQueue is a free data retrieval call binding the contract method 0x0ee8e52b.
  510. //
  511. // Solidity: function nextL1FillingQueue() view returns(uint32)
  512. func (_Hermez *HermezCaller) NextL1FillingQueue(opts *bind.CallOpts) (uint32, error) {
  513. var out []interface{}
  514. err := _Hermez.contract.Call(opts, &out, "nextL1FillingQueue")
  515. if err != nil {
  516. return *new(uint32), err
  517. }
  518. out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32)
  519. return out0, err
  520. }
  521. // NextL1FillingQueue is a free data retrieval call binding the contract method 0x0ee8e52b.
  522. //
  523. // Solidity: function nextL1FillingQueue() view returns(uint32)
  524. func (_Hermez *HermezSession) NextL1FillingQueue() (uint32, error) {
  525. return _Hermez.Contract.NextL1FillingQueue(&_Hermez.CallOpts)
  526. }
  527. // NextL1FillingQueue is a free data retrieval call binding the contract method 0x0ee8e52b.
  528. //
  529. // Solidity: function nextL1FillingQueue() view returns(uint32)
  530. func (_Hermez *HermezCallerSession) NextL1FillingQueue() (uint32, error) {
  531. return _Hermez.Contract.NextL1FillingQueue(&_Hermez.CallOpts)
  532. }
  533. // NextL1ToForgeQueue is a free data retrieval call binding the contract method 0xd0f32e67.
  534. //
  535. // Solidity: function nextL1ToForgeQueue() view returns(uint32)
  536. func (_Hermez *HermezCaller) NextL1ToForgeQueue(opts *bind.CallOpts) (uint32, error) {
  537. var out []interface{}
  538. err := _Hermez.contract.Call(opts, &out, "nextL1ToForgeQueue")
  539. if err != nil {
  540. return *new(uint32), err
  541. }
  542. out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32)
  543. return out0, err
  544. }
  545. // NextL1ToForgeQueue is a free data retrieval call binding the contract method 0xd0f32e67.
  546. //
  547. // Solidity: function nextL1ToForgeQueue() view returns(uint32)
  548. func (_Hermez *HermezSession) NextL1ToForgeQueue() (uint32, error) {
  549. return _Hermez.Contract.NextL1ToForgeQueue(&_Hermez.CallOpts)
  550. }
  551. // NextL1ToForgeQueue is a free data retrieval call binding the contract method 0xd0f32e67.
  552. //
  553. // Solidity: function nextL1ToForgeQueue() view returns(uint32)
  554. func (_Hermez *HermezCallerSession) NextL1ToForgeQueue() (uint32, error) {
  555. return _Hermez.Contract.NextL1ToForgeQueue(&_Hermez.CallOpts)
  556. }
  557. // RegisterTokensCount is a free data retrieval call binding the contract method 0x9f34e9a3.
  558. //
  559. // Solidity: function registerTokensCount() view returns(uint256)
  560. func (_Hermez *HermezCaller) RegisterTokensCount(opts *bind.CallOpts) (*big.Int, error) {
  561. var out []interface{}
  562. err := _Hermez.contract.Call(opts, &out, "registerTokensCount")
  563. if err != nil {
  564. return *new(*big.Int), err
  565. }
  566. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  567. return out0, err
  568. }
  569. // RegisterTokensCount is a free data retrieval call binding the contract method 0x9f34e9a3.
  570. //
  571. // Solidity: function registerTokensCount() view returns(uint256)
  572. func (_Hermez *HermezSession) RegisterTokensCount() (*big.Int, error) {
  573. return _Hermez.Contract.RegisterTokensCount(&_Hermez.CallOpts)
  574. }
  575. // RegisterTokensCount is a free data retrieval call binding the contract method 0x9f34e9a3.
  576. //
  577. // Solidity: function registerTokensCount() view returns(uint256)
  578. func (_Hermez *HermezCallerSession) RegisterTokensCount() (*big.Int, error) {
  579. return _Hermez.Contract.RegisterTokensCount(&_Hermez.CallOpts)
  580. }
  581. // RollupVerifiers is a free data retrieval call binding the contract method 0x38330200.
  582. //
  583. // Solidity: function rollupVerifiers(uint256 ) view returns(address verifierInterface, uint256 maxTx, uint256 nLevels)
  584. func (_Hermez *HermezCaller) RollupVerifiers(opts *bind.CallOpts, arg0 *big.Int) (struct {
  585. VerifierInterface common.Address
  586. MaxTx *big.Int
  587. NLevels *big.Int
  588. }, error) {
  589. var out []interface{}
  590. err := _Hermez.contract.Call(opts, &out, "rollupVerifiers", arg0)
  591. outstruct := new(struct {
  592. VerifierInterface common.Address
  593. MaxTx *big.Int
  594. NLevels *big.Int
  595. })
  596. outstruct.VerifierInterface = out[0].(common.Address)
  597. outstruct.MaxTx = out[1].(*big.Int)
  598. outstruct.NLevels = out[2].(*big.Int)
  599. return *outstruct, err
  600. }
  601. // RollupVerifiers is a free data retrieval call binding the contract method 0x38330200.
  602. //
  603. // Solidity: function rollupVerifiers(uint256 ) view returns(address verifierInterface, uint256 maxTx, uint256 nLevels)
  604. func (_Hermez *HermezSession) RollupVerifiers(arg0 *big.Int) (struct {
  605. VerifierInterface common.Address
  606. MaxTx *big.Int
  607. NLevels *big.Int
  608. }, error) {
  609. return _Hermez.Contract.RollupVerifiers(&_Hermez.CallOpts, arg0)
  610. }
  611. // RollupVerifiers is a free data retrieval call binding the contract method 0x38330200.
  612. //
  613. // Solidity: function rollupVerifiers(uint256 ) view returns(address verifierInterface, uint256 maxTx, uint256 nLevels)
  614. func (_Hermez *HermezCallerSession) RollupVerifiers(arg0 *big.Int) (struct {
  615. VerifierInterface common.Address
  616. MaxTx *big.Int
  617. NLevels *big.Int
  618. }, error) {
  619. return _Hermez.Contract.RollupVerifiers(&_Hermez.CallOpts, arg0)
  620. }
  621. // RollupVerifiersLength is a free data retrieval call binding the contract method 0x7ba3a5e0.
  622. //
  623. // Solidity: function rollupVerifiersLength() view returns(uint256)
  624. func (_Hermez *HermezCaller) RollupVerifiersLength(opts *bind.CallOpts) (*big.Int, error) {
  625. var out []interface{}
  626. err := _Hermez.contract.Call(opts, &out, "rollupVerifiersLength")
  627. if err != nil {
  628. return *new(*big.Int), err
  629. }
  630. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  631. return out0, err
  632. }
  633. // RollupVerifiersLength is a free data retrieval call binding the contract method 0x7ba3a5e0.
  634. //
  635. // Solidity: function rollupVerifiersLength() view returns(uint256)
  636. func (_Hermez *HermezSession) RollupVerifiersLength() (*big.Int, error) {
  637. return _Hermez.Contract.RollupVerifiersLength(&_Hermez.CallOpts)
  638. }
  639. // RollupVerifiersLength is a free data retrieval call binding the contract method 0x7ba3a5e0.
  640. //
  641. // Solidity: function rollupVerifiersLength() view returns(uint256)
  642. func (_Hermez *HermezCallerSession) RollupVerifiersLength() (*big.Int, error) {
  643. return _Hermez.Contract.RollupVerifiersLength(&_Hermez.CallOpts)
  644. }
  645. // StateRootMap is a free data retrieval call binding the contract method 0x9e00d7ea.
  646. //
  647. // Solidity: function stateRootMap(uint32 ) view returns(uint256)
  648. func (_Hermez *HermezCaller) StateRootMap(opts *bind.CallOpts, arg0 uint32) (*big.Int, error) {
  649. var out []interface{}
  650. err := _Hermez.contract.Call(opts, &out, "stateRootMap", arg0)
  651. if err != nil {
  652. return *new(*big.Int), err
  653. }
  654. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  655. return out0, err
  656. }
  657. // StateRootMap is a free data retrieval call binding the contract method 0x9e00d7ea.
  658. //
  659. // Solidity: function stateRootMap(uint32 ) view returns(uint256)
  660. func (_Hermez *HermezSession) StateRootMap(arg0 uint32) (*big.Int, error) {
  661. return _Hermez.Contract.StateRootMap(&_Hermez.CallOpts, arg0)
  662. }
  663. // StateRootMap is a free data retrieval call binding the contract method 0x9e00d7ea.
  664. //
  665. // Solidity: function stateRootMap(uint32 ) view returns(uint256)
  666. func (_Hermez *HermezCallerSession) StateRootMap(arg0 uint32) (*big.Int, error) {
  667. return _Hermez.Contract.StateRootMap(&_Hermez.CallOpts, arg0)
  668. }
  669. // TokenExchange is a free data retrieval call binding the contract method 0x0dd94b96.
  670. //
  671. // Solidity: function tokenExchange(address ) view returns(uint64)
  672. func (_Hermez *HermezCaller) TokenExchange(opts *bind.CallOpts, arg0 common.Address) (uint64, error) {
  673. var out []interface{}
  674. err := _Hermez.contract.Call(opts, &out, "tokenExchange", arg0)
  675. if err != nil {
  676. return *new(uint64), err
  677. }
  678. out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
  679. return out0, err
  680. }
  681. // TokenExchange is a free data retrieval call binding the contract method 0x0dd94b96.
  682. //
  683. // Solidity: function tokenExchange(address ) view returns(uint64)
  684. func (_Hermez *HermezSession) TokenExchange(arg0 common.Address) (uint64, error) {
  685. return _Hermez.Contract.TokenExchange(&_Hermez.CallOpts, arg0)
  686. }
  687. // TokenExchange is a free data retrieval call binding the contract method 0x0dd94b96.
  688. //
  689. // Solidity: function tokenExchange(address ) view returns(uint64)
  690. func (_Hermez *HermezCallerSession) TokenExchange(arg0 common.Address) (uint64, error) {
  691. return _Hermez.Contract.TokenExchange(&_Hermez.CallOpts, arg0)
  692. }
  693. // TokenHEZ is a free data retrieval call binding the contract method 0x79a135e3.
  694. //
  695. // Solidity: function tokenHEZ() view returns(address)
  696. func (_Hermez *HermezCaller) TokenHEZ(opts *bind.CallOpts) (common.Address, error) {
  697. var out []interface{}
  698. err := _Hermez.contract.Call(opts, &out, "tokenHEZ")
  699. if err != nil {
  700. return *new(common.Address), err
  701. }
  702. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  703. return out0, err
  704. }
  705. // TokenHEZ is a free data retrieval call binding the contract method 0x79a135e3.
  706. //
  707. // Solidity: function tokenHEZ() view returns(address)
  708. func (_Hermez *HermezSession) TokenHEZ() (common.Address, error) {
  709. return _Hermez.Contract.TokenHEZ(&_Hermez.CallOpts)
  710. }
  711. // TokenHEZ is a free data retrieval call binding the contract method 0x79a135e3.
  712. //
  713. // Solidity: function tokenHEZ() view returns(address)
  714. func (_Hermez *HermezCallerSession) TokenHEZ() (common.Address, error) {
  715. return _Hermez.Contract.TokenHEZ(&_Hermez.CallOpts)
  716. }
  717. // TokenList is a free data retrieval call binding the contract method 0x9ead7222.
  718. //
  719. // Solidity: function tokenList(uint256 ) view returns(address)
  720. func (_Hermez *HermezCaller) TokenList(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) {
  721. var out []interface{}
  722. err := _Hermez.contract.Call(opts, &out, "tokenList", arg0)
  723. if err != nil {
  724. return *new(common.Address), err
  725. }
  726. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  727. return out0, err
  728. }
  729. // TokenList is a free data retrieval call binding the contract method 0x9ead7222.
  730. //
  731. // Solidity: function tokenList(uint256 ) view returns(address)
  732. func (_Hermez *HermezSession) TokenList(arg0 *big.Int) (common.Address, error) {
  733. return _Hermez.Contract.TokenList(&_Hermez.CallOpts, arg0)
  734. }
  735. // TokenList is a free data retrieval call binding the contract method 0x9ead7222.
  736. //
  737. // Solidity: function tokenList(uint256 ) view returns(address)
  738. func (_Hermez *HermezCallerSession) TokenList(arg0 *big.Int) (common.Address, error) {
  739. return _Hermez.Contract.TokenList(&_Hermez.CallOpts, arg0)
  740. }
  741. // TokenMap is a free data retrieval call binding the contract method 0x004aca6e.
  742. //
  743. // Solidity: function tokenMap(address ) view returns(uint256)
  744. func (_Hermez *HermezCaller) TokenMap(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) {
  745. var out []interface{}
  746. err := _Hermez.contract.Call(opts, &out, "tokenMap", arg0)
  747. if err != nil {
  748. return *new(*big.Int), err
  749. }
  750. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  751. return out0, err
  752. }
  753. // TokenMap is a free data retrieval call binding the contract method 0x004aca6e.
  754. //
  755. // Solidity: function tokenMap(address ) view returns(uint256)
  756. func (_Hermez *HermezSession) TokenMap(arg0 common.Address) (*big.Int, error) {
  757. return _Hermez.Contract.TokenMap(&_Hermez.CallOpts, arg0)
  758. }
  759. // TokenMap is a free data retrieval call binding the contract method 0x004aca6e.
  760. //
  761. // Solidity: function tokenMap(address ) view returns(uint256)
  762. func (_Hermez *HermezCallerSession) TokenMap(arg0 common.Address) (*big.Int, error) {
  763. return _Hermez.Contract.TokenMap(&_Hermez.CallOpts, arg0)
  764. }
  765. // WithdrawDelayerContract is a free data retrieval call binding the contract method 0x1b0a8223.
  766. //
  767. // Solidity: function withdrawDelayerContract() view returns(address)
  768. func (_Hermez *HermezCaller) WithdrawDelayerContract(opts *bind.CallOpts) (common.Address, error) {
  769. var out []interface{}
  770. err := _Hermez.contract.Call(opts, &out, "withdrawDelayerContract")
  771. if err != nil {
  772. return *new(common.Address), err
  773. }
  774. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  775. return out0, err
  776. }
  777. // WithdrawDelayerContract is a free data retrieval call binding the contract method 0x1b0a8223.
  778. //
  779. // Solidity: function withdrawDelayerContract() view returns(address)
  780. func (_Hermez *HermezSession) WithdrawDelayerContract() (common.Address, error) {
  781. return _Hermez.Contract.WithdrawDelayerContract(&_Hermez.CallOpts)
  782. }
  783. // WithdrawDelayerContract is a free data retrieval call binding the contract method 0x1b0a8223.
  784. //
  785. // Solidity: function withdrawDelayerContract() view returns(address)
  786. func (_Hermez *HermezCallerSession) WithdrawDelayerContract() (common.Address, error) {
  787. return _Hermez.Contract.WithdrawDelayerContract(&_Hermez.CallOpts)
  788. }
  789. // WithdrawVerifier is a free data retrieval call binding the contract method 0x864eb164.
  790. //
  791. // Solidity: function withdrawVerifier() view returns(address)
  792. func (_Hermez *HermezCaller) WithdrawVerifier(opts *bind.CallOpts) (common.Address, error) {
  793. var out []interface{}
  794. err := _Hermez.contract.Call(opts, &out, "withdrawVerifier")
  795. if err != nil {
  796. return *new(common.Address), err
  797. }
  798. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  799. return out0, err
  800. }
  801. // WithdrawVerifier is a free data retrieval call binding the contract method 0x864eb164.
  802. //
  803. // Solidity: function withdrawVerifier() view returns(address)
  804. func (_Hermez *HermezSession) WithdrawVerifier() (common.Address, error) {
  805. return _Hermez.Contract.WithdrawVerifier(&_Hermez.CallOpts)
  806. }
  807. // WithdrawVerifier is a free data retrieval call binding the contract method 0x864eb164.
  808. //
  809. // Solidity: function withdrawVerifier() view returns(address)
  810. func (_Hermez *HermezCallerSession) WithdrawVerifier() (common.Address, error) {
  811. return _Hermez.Contract.WithdrawVerifier(&_Hermez.CallOpts)
  812. }
  813. // WithdrawalDelay is a free data retrieval call binding the contract method 0xa7ab6961.
  814. //
  815. // Solidity: function withdrawalDelay() view returns(uint64)
  816. func (_Hermez *HermezCaller) WithdrawalDelay(opts *bind.CallOpts) (uint64, error) {
  817. var out []interface{}
  818. err := _Hermez.contract.Call(opts, &out, "withdrawalDelay")
  819. if err != nil {
  820. return *new(uint64), err
  821. }
  822. out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
  823. return out0, err
  824. }
  825. // WithdrawalDelay is a free data retrieval call binding the contract method 0xa7ab6961.
  826. //
  827. // Solidity: function withdrawalDelay() view returns(uint64)
  828. func (_Hermez *HermezSession) WithdrawalDelay() (uint64, error) {
  829. return _Hermez.Contract.WithdrawalDelay(&_Hermez.CallOpts)
  830. }
  831. // WithdrawalDelay is a free data retrieval call binding the contract method 0xa7ab6961.
  832. //
  833. // Solidity: function withdrawalDelay() view returns(uint64)
  834. func (_Hermez *HermezCallerSession) WithdrawalDelay() (uint64, error) {
  835. return _Hermez.Contract.WithdrawalDelay(&_Hermez.CallOpts)
  836. }
  837. // AddL1Transaction is a paid mutator transaction binding the contract method 0x886df587.
  838. //
  839. // Solidity: function addL1Transaction(uint256 babyPubKey, uint48 fromIdx, uint16 loadAmountF, uint16 amountF, uint32 tokenID, uint48 toIdx, bytes permit) payable returns()
  840. func (_Hermez *HermezTransactor) AddL1Transaction(opts *bind.TransactOpts, babyPubKey *big.Int, fromIdx *big.Int, loadAmountF uint16, amountF uint16, tokenID uint32, toIdx *big.Int, permit []byte) (*types.Transaction, error) {
  841. return _Hermez.contract.Transact(opts, "addL1Transaction", babyPubKey, fromIdx, loadAmountF, amountF, tokenID, toIdx, permit)
  842. }
  843. // AddL1Transaction is a paid mutator transaction binding the contract method 0x886df587.
  844. //
  845. // Solidity: function addL1Transaction(uint256 babyPubKey, uint48 fromIdx, uint16 loadAmountF, uint16 amountF, uint32 tokenID, uint48 toIdx, bytes permit) payable returns()
  846. func (_Hermez *HermezSession) AddL1Transaction(babyPubKey *big.Int, fromIdx *big.Int, loadAmountF uint16, amountF uint16, tokenID uint32, toIdx *big.Int, permit []byte) (*types.Transaction, error) {
  847. return _Hermez.Contract.AddL1Transaction(&_Hermez.TransactOpts, babyPubKey, fromIdx, loadAmountF, amountF, tokenID, toIdx, permit)
  848. }
  849. // AddL1Transaction is a paid mutator transaction binding the contract method 0x886df587.
  850. //
  851. // Solidity: function addL1Transaction(uint256 babyPubKey, uint48 fromIdx, uint16 loadAmountF, uint16 amountF, uint32 tokenID, uint48 toIdx, bytes permit) payable returns()
  852. func (_Hermez *HermezTransactorSession) AddL1Transaction(babyPubKey *big.Int, fromIdx *big.Int, loadAmountF uint16, amountF uint16, tokenID uint32, toIdx *big.Int, permit []byte) (*types.Transaction, error) {
  853. return _Hermez.Contract.AddL1Transaction(&_Hermez.TransactOpts, babyPubKey, fromIdx, loadAmountF, amountF, tokenID, toIdx, permit)
  854. }
  855. // AddToken is a paid mutator transaction binding the contract method 0x70c2f1c0.
  856. //
  857. // Solidity: function addToken(address tokenAddress, bytes permit) returns()
  858. func (_Hermez *HermezTransactor) AddToken(opts *bind.TransactOpts, tokenAddress common.Address, permit []byte) (*types.Transaction, error) {
  859. return _Hermez.contract.Transact(opts, "addToken", tokenAddress, permit)
  860. }
  861. // AddToken is a paid mutator transaction binding the contract method 0x70c2f1c0.
  862. //
  863. // Solidity: function addToken(address tokenAddress, bytes permit) returns()
  864. func (_Hermez *HermezSession) AddToken(tokenAddress common.Address, permit []byte) (*types.Transaction, error) {
  865. return _Hermez.Contract.AddToken(&_Hermez.TransactOpts, tokenAddress, permit)
  866. }
  867. // AddToken is a paid mutator transaction binding the contract method 0x70c2f1c0.
  868. //
  869. // Solidity: function addToken(address tokenAddress, bytes permit) returns()
  870. func (_Hermez *HermezTransactorSession) AddToken(tokenAddress common.Address, permit []byte) (*types.Transaction, error) {
  871. return _Hermez.Contract.AddToken(&_Hermez.TransactOpts, tokenAddress, permit)
  872. }
  873. // ForgeBatch is a paid mutator transaction binding the contract method 0x6e7e1365.
  874. //
  875. // Solidity: function forgeBatch(uint48 newLastIdx, uint256 newStRoot, uint256 newExitRoot, bytes encodedL1CoordinatorTx, bytes l1L2TxsData, bytes feeIdxCoordinator, uint8 verifierIdx, bool l1Batch, uint256[2] proofA, uint256[2][2] proofB, uint256[2] proofC) returns()
  876. func (_Hermez *HermezTransactor) ForgeBatch(opts *bind.TransactOpts, newLastIdx *big.Int, newStRoot *big.Int, newExitRoot *big.Int, encodedL1CoordinatorTx []byte, l1L2TxsData []byte, feeIdxCoordinator []byte, verifierIdx uint8, l1Batch bool, proofA [2]*big.Int, proofB [2][2]*big.Int, proofC [2]*big.Int) (*types.Transaction, error) {
  877. return _Hermez.contract.Transact(opts, "forgeBatch", newLastIdx, newStRoot, newExitRoot, encodedL1CoordinatorTx, l1L2TxsData, feeIdxCoordinator, verifierIdx, l1Batch, proofA, proofB, proofC)
  878. }
  879. // ForgeBatch is a paid mutator transaction binding the contract method 0x6e7e1365.
  880. //
  881. // Solidity: function forgeBatch(uint48 newLastIdx, uint256 newStRoot, uint256 newExitRoot, bytes encodedL1CoordinatorTx, bytes l1L2TxsData, bytes feeIdxCoordinator, uint8 verifierIdx, bool l1Batch, uint256[2] proofA, uint256[2][2] proofB, uint256[2] proofC) returns()
  882. func (_Hermez *HermezSession) ForgeBatch(newLastIdx *big.Int, newStRoot *big.Int, newExitRoot *big.Int, encodedL1CoordinatorTx []byte, l1L2TxsData []byte, feeIdxCoordinator []byte, verifierIdx uint8, l1Batch bool, proofA [2]*big.Int, proofB [2][2]*big.Int, proofC [2]*big.Int) (*types.Transaction, error) {
  883. return _Hermez.Contract.ForgeBatch(&_Hermez.TransactOpts, newLastIdx, newStRoot, newExitRoot, encodedL1CoordinatorTx, l1L2TxsData, feeIdxCoordinator, verifierIdx, l1Batch, proofA, proofB, proofC)
  884. }
  885. // ForgeBatch is a paid mutator transaction binding the contract method 0x6e7e1365.
  886. //
  887. // Solidity: function forgeBatch(uint48 newLastIdx, uint256 newStRoot, uint256 newExitRoot, bytes encodedL1CoordinatorTx, bytes l1L2TxsData, bytes feeIdxCoordinator, uint8 verifierIdx, bool l1Batch, uint256[2] proofA, uint256[2][2] proofB, uint256[2] proofC) returns()
  888. func (_Hermez *HermezTransactorSession) ForgeBatch(newLastIdx *big.Int, newStRoot *big.Int, newExitRoot *big.Int, encodedL1CoordinatorTx []byte, l1L2TxsData []byte, feeIdxCoordinator []byte, verifierIdx uint8, l1Batch bool, proofA [2]*big.Int, proofB [2][2]*big.Int, proofC [2]*big.Int) (*types.Transaction, error) {
  889. return _Hermez.Contract.ForgeBatch(&_Hermez.TransactOpts, newLastIdx, newStRoot, newExitRoot, encodedL1CoordinatorTx, l1L2TxsData, feeIdxCoordinator, verifierIdx, l1Batch, proofA, proofB, proofC)
  890. }
  891. // InitializeHermez is a paid mutator transaction binding the contract method 0x599897e3.
  892. //
  893. // Solidity: function initializeHermez(address[] _verifiers, uint256[] _verifiersParams, address _withdrawVerifier, address _hermezAuctionContract, address _tokenHEZ, uint8 _forgeL1L2BatchTimeout, uint256 _feeAddToken, address _poseidon2Elements, address _poseidon3Elements, address _poseidon4Elements, address _hermezGovernanceAddress, uint64 _withdrawalDelay, address _withdrawDelayerContract) returns()
  894. func (_Hermez *HermezTransactor) InitializeHermez(opts *bind.TransactOpts, _verifiers []common.Address, _verifiersParams []*big.Int, _withdrawVerifier common.Address, _hermezAuctionContract common.Address, _tokenHEZ common.Address, _forgeL1L2BatchTimeout uint8, _feeAddToken *big.Int, _poseidon2Elements common.Address, _poseidon3Elements common.Address, _poseidon4Elements common.Address, _hermezGovernanceAddress common.Address, _withdrawalDelay uint64, _withdrawDelayerContract common.Address) (*types.Transaction, error) {
  895. return _Hermez.contract.Transact(opts, "initializeHermez", _verifiers, _verifiersParams, _withdrawVerifier, _hermezAuctionContract, _tokenHEZ, _forgeL1L2BatchTimeout, _feeAddToken, _poseidon2Elements, _poseidon3Elements, _poseidon4Elements, _hermezGovernanceAddress, _withdrawalDelay, _withdrawDelayerContract)
  896. }
  897. // InitializeHermez is a paid mutator transaction binding the contract method 0x599897e3.
  898. //
  899. // Solidity: function initializeHermez(address[] _verifiers, uint256[] _verifiersParams, address _withdrawVerifier, address _hermezAuctionContract, address _tokenHEZ, uint8 _forgeL1L2BatchTimeout, uint256 _feeAddToken, address _poseidon2Elements, address _poseidon3Elements, address _poseidon4Elements, address _hermezGovernanceAddress, uint64 _withdrawalDelay, address _withdrawDelayerContract) returns()
  900. func (_Hermez *HermezSession) InitializeHermez(_verifiers []common.Address, _verifiersParams []*big.Int, _withdrawVerifier common.Address, _hermezAuctionContract common.Address, _tokenHEZ common.Address, _forgeL1L2BatchTimeout uint8, _feeAddToken *big.Int, _poseidon2Elements common.Address, _poseidon3Elements common.Address, _poseidon4Elements common.Address, _hermezGovernanceAddress common.Address, _withdrawalDelay uint64, _withdrawDelayerContract common.Address) (*types.Transaction, error) {
  901. return _Hermez.Contract.InitializeHermez(&_Hermez.TransactOpts, _verifiers, _verifiersParams, _withdrawVerifier, _hermezAuctionContract, _tokenHEZ, _forgeL1L2BatchTimeout, _feeAddToken, _poseidon2Elements, _poseidon3Elements, _poseidon4Elements, _hermezGovernanceAddress, _withdrawalDelay, _withdrawDelayerContract)
  902. }
  903. // InitializeHermez is a paid mutator transaction binding the contract method 0x599897e3.
  904. //
  905. // Solidity: function initializeHermez(address[] _verifiers, uint256[] _verifiersParams, address _withdrawVerifier, address _hermezAuctionContract, address _tokenHEZ, uint8 _forgeL1L2BatchTimeout, uint256 _feeAddToken, address _poseidon2Elements, address _poseidon3Elements, address _poseidon4Elements, address _hermezGovernanceAddress, uint64 _withdrawalDelay, address _withdrawDelayerContract) returns()
  906. func (_Hermez *HermezTransactorSession) InitializeHermez(_verifiers []common.Address, _verifiersParams []*big.Int, _withdrawVerifier common.Address, _hermezAuctionContract common.Address, _tokenHEZ common.Address, _forgeL1L2BatchTimeout uint8, _feeAddToken *big.Int, _poseidon2Elements common.Address, _poseidon3Elements common.Address, _poseidon4Elements common.Address, _hermezGovernanceAddress common.Address, _withdrawalDelay uint64, _withdrawDelayerContract common.Address) (*types.Transaction, error) {
  907. return _Hermez.Contract.InitializeHermez(&_Hermez.TransactOpts, _verifiers, _verifiersParams, _withdrawVerifier, _hermezAuctionContract, _tokenHEZ, _forgeL1L2BatchTimeout, _feeAddToken, _poseidon2Elements, _poseidon3Elements, _poseidon4Elements, _hermezGovernanceAddress, _withdrawalDelay, _withdrawDelayerContract)
  908. }
  909. // SafeMode is a paid mutator transaction binding the contract method 0xabe3219c.
  910. //
  911. // Solidity: function safeMode() returns()
  912. func (_Hermez *HermezTransactor) SafeMode(opts *bind.TransactOpts) (*types.Transaction, error) {
  913. return _Hermez.contract.Transact(opts, "safeMode")
  914. }
  915. // SafeMode is a paid mutator transaction binding the contract method 0xabe3219c.
  916. //
  917. // Solidity: function safeMode() returns()
  918. func (_Hermez *HermezSession) SafeMode() (*types.Transaction, error) {
  919. return _Hermez.Contract.SafeMode(&_Hermez.TransactOpts)
  920. }
  921. // SafeMode is a paid mutator transaction binding the contract method 0xabe3219c.
  922. //
  923. // Solidity: function safeMode() returns()
  924. func (_Hermez *HermezTransactorSession) SafeMode() (*types.Transaction, error) {
  925. return _Hermez.Contract.SafeMode(&_Hermez.TransactOpts)
  926. }
  927. // UpdateBucketsParameters is a paid mutator transaction binding the contract method 0x68e95e53.
  928. //
  929. // Solidity: function updateBucketsParameters(uint256[4][5] arrayBuckets) returns()
  930. func (_Hermez *HermezTransactor) UpdateBucketsParameters(opts *bind.TransactOpts, arrayBuckets [5][4]*big.Int) (*types.Transaction, error) {
  931. return _Hermez.contract.Transact(opts, "updateBucketsParameters", arrayBuckets)
  932. }
  933. // UpdateBucketsParameters is a paid mutator transaction binding the contract method 0x68e95e53.
  934. //
  935. // Solidity: function updateBucketsParameters(uint256[4][5] arrayBuckets) returns()
  936. func (_Hermez *HermezSession) UpdateBucketsParameters(arrayBuckets [5][4]*big.Int) (*types.Transaction, error) {
  937. return _Hermez.Contract.UpdateBucketsParameters(&_Hermez.TransactOpts, arrayBuckets)
  938. }
  939. // UpdateBucketsParameters is a paid mutator transaction binding the contract method 0x68e95e53.
  940. //
  941. // Solidity: function updateBucketsParameters(uint256[4][5] arrayBuckets) returns()
  942. func (_Hermez *HermezTransactorSession) UpdateBucketsParameters(arrayBuckets [5][4]*big.Int) (*types.Transaction, error) {
  943. return _Hermez.Contract.UpdateBucketsParameters(&_Hermez.TransactOpts, arrayBuckets)
  944. }
  945. // UpdateFeeAddToken is a paid mutator transaction binding the contract method 0x314e5eda.
  946. //
  947. // Solidity: function updateFeeAddToken(uint256 newFeeAddToken) returns()
  948. func (_Hermez *HermezTransactor) UpdateFeeAddToken(opts *bind.TransactOpts, newFeeAddToken *big.Int) (*types.Transaction, error) {
  949. return _Hermez.contract.Transact(opts, "updateFeeAddToken", newFeeAddToken)
  950. }
  951. // UpdateFeeAddToken is a paid mutator transaction binding the contract method 0x314e5eda.
  952. //
  953. // Solidity: function updateFeeAddToken(uint256 newFeeAddToken) returns()
  954. func (_Hermez *HermezSession) UpdateFeeAddToken(newFeeAddToken *big.Int) (*types.Transaction, error) {
  955. return _Hermez.Contract.UpdateFeeAddToken(&_Hermez.TransactOpts, newFeeAddToken)
  956. }
  957. // UpdateFeeAddToken is a paid mutator transaction binding the contract method 0x314e5eda.
  958. //
  959. // Solidity: function updateFeeAddToken(uint256 newFeeAddToken) returns()
  960. func (_Hermez *HermezTransactorSession) UpdateFeeAddToken(newFeeAddToken *big.Int) (*types.Transaction, error) {
  961. return _Hermez.Contract.UpdateFeeAddToken(&_Hermez.TransactOpts, newFeeAddToken)
  962. }
  963. // UpdateForgeL1L2BatchTimeout is a paid mutator transaction binding the contract method 0xcbd7b5fb.
  964. //
  965. // Solidity: function updateForgeL1L2BatchTimeout(uint8 newForgeL1L2BatchTimeout) returns()
  966. func (_Hermez *HermezTransactor) UpdateForgeL1L2BatchTimeout(opts *bind.TransactOpts, newForgeL1L2BatchTimeout uint8) (*types.Transaction, error) {
  967. return _Hermez.contract.Transact(opts, "updateForgeL1L2BatchTimeout", newForgeL1L2BatchTimeout)
  968. }
  969. // UpdateForgeL1L2BatchTimeout is a paid mutator transaction binding the contract method 0xcbd7b5fb.
  970. //
  971. // Solidity: function updateForgeL1L2BatchTimeout(uint8 newForgeL1L2BatchTimeout) returns()
  972. func (_Hermez *HermezSession) UpdateForgeL1L2BatchTimeout(newForgeL1L2BatchTimeout uint8) (*types.Transaction, error) {
  973. return _Hermez.Contract.UpdateForgeL1L2BatchTimeout(&_Hermez.TransactOpts, newForgeL1L2BatchTimeout)
  974. }
  975. // UpdateForgeL1L2BatchTimeout is a paid mutator transaction binding the contract method 0xcbd7b5fb.
  976. //
  977. // Solidity: function updateForgeL1L2BatchTimeout(uint8 newForgeL1L2BatchTimeout) returns()
  978. func (_Hermez *HermezTransactorSession) UpdateForgeL1L2BatchTimeout(newForgeL1L2BatchTimeout uint8) (*types.Transaction, error) {
  979. return _Hermez.Contract.UpdateForgeL1L2BatchTimeout(&_Hermez.TransactOpts, newForgeL1L2BatchTimeout)
  980. }
  981. // UpdateTokenExchange is a paid mutator transaction binding the contract method 0x1a748c2d.
  982. //
  983. // Solidity: function updateTokenExchange(address[] addressArray, uint64[] valueArray) returns()
  984. func (_Hermez *HermezTransactor) UpdateTokenExchange(opts *bind.TransactOpts, addressArray []common.Address, valueArray []uint64) (*types.Transaction, error) {
  985. return _Hermez.contract.Transact(opts, "updateTokenExchange", addressArray, valueArray)
  986. }
  987. // UpdateTokenExchange is a paid mutator transaction binding the contract method 0x1a748c2d.
  988. //
  989. // Solidity: function updateTokenExchange(address[] addressArray, uint64[] valueArray) returns()
  990. func (_Hermez *HermezSession) UpdateTokenExchange(addressArray []common.Address, valueArray []uint64) (*types.Transaction, error) {
  991. return _Hermez.Contract.UpdateTokenExchange(&_Hermez.TransactOpts, addressArray, valueArray)
  992. }
  993. // UpdateTokenExchange is a paid mutator transaction binding the contract method 0x1a748c2d.
  994. //
  995. // Solidity: function updateTokenExchange(address[] addressArray, uint64[] valueArray) returns()
  996. func (_Hermez *HermezTransactorSession) UpdateTokenExchange(addressArray []common.Address, valueArray []uint64) (*types.Transaction, error) {
  997. return _Hermez.Contract.UpdateTokenExchange(&_Hermez.TransactOpts, addressArray, valueArray)
  998. }
  999. // UpdateWithdrawalDelay is a paid mutator transaction binding the contract method 0xef4a5c4a.
  1000. //
  1001. // Solidity: function updateWithdrawalDelay(uint64 newWithdrawalDelay) returns()
  1002. func (_Hermez *HermezTransactor) UpdateWithdrawalDelay(opts *bind.TransactOpts, newWithdrawalDelay uint64) (*types.Transaction, error) {
  1003. return _Hermez.contract.Transact(opts, "updateWithdrawalDelay", newWithdrawalDelay)
  1004. }
  1005. // UpdateWithdrawalDelay is a paid mutator transaction binding the contract method 0xef4a5c4a.
  1006. //
  1007. // Solidity: function updateWithdrawalDelay(uint64 newWithdrawalDelay) returns()
  1008. func (_Hermez *HermezSession) UpdateWithdrawalDelay(newWithdrawalDelay uint64) (*types.Transaction, error) {
  1009. return _Hermez.Contract.UpdateWithdrawalDelay(&_Hermez.TransactOpts, newWithdrawalDelay)
  1010. }
  1011. // UpdateWithdrawalDelay is a paid mutator transaction binding the contract method 0xef4a5c4a.
  1012. //
  1013. // Solidity: function updateWithdrawalDelay(uint64 newWithdrawalDelay) returns()
  1014. func (_Hermez *HermezTransactorSession) UpdateWithdrawalDelay(newWithdrawalDelay uint64) (*types.Transaction, error) {
  1015. return _Hermez.Contract.UpdateWithdrawalDelay(&_Hermez.TransactOpts, newWithdrawalDelay)
  1016. }
  1017. // WithdrawCircuit is a paid mutator transaction binding the contract method 0x9ce2ad42.
  1018. //
  1019. // Solidity: function withdrawCircuit(uint256[2] proofA, uint256[2][2] proofB, uint256[2] proofC, uint32 tokenID, uint192 amount, uint32 numExitRoot, uint48 idx, bool instantWithdraw) returns()
  1020. func (_Hermez *HermezTransactor) WithdrawCircuit(opts *bind.TransactOpts, proofA [2]*big.Int, proofB [2][2]*big.Int, proofC [2]*big.Int, tokenID uint32, amount *big.Int, numExitRoot uint32, idx *big.Int, instantWithdraw bool) (*types.Transaction, error) {
  1021. return _Hermez.contract.Transact(opts, "withdrawCircuit", proofA, proofB, proofC, tokenID, amount, numExitRoot, idx, instantWithdraw)
  1022. }
  1023. // WithdrawCircuit is a paid mutator transaction binding the contract method 0x9ce2ad42.
  1024. //
  1025. // Solidity: function withdrawCircuit(uint256[2] proofA, uint256[2][2] proofB, uint256[2] proofC, uint32 tokenID, uint192 amount, uint32 numExitRoot, uint48 idx, bool instantWithdraw) returns()
  1026. func (_Hermez *HermezSession) WithdrawCircuit(proofA [2]*big.Int, proofB [2][2]*big.Int, proofC [2]*big.Int, tokenID uint32, amount *big.Int, numExitRoot uint32, idx *big.Int, instantWithdraw bool) (*types.Transaction, error) {
  1027. return _Hermez.Contract.WithdrawCircuit(&_Hermez.TransactOpts, proofA, proofB, proofC, tokenID, amount, numExitRoot, idx, instantWithdraw)
  1028. }
  1029. // WithdrawCircuit is a paid mutator transaction binding the contract method 0x9ce2ad42.
  1030. //
  1031. // Solidity: function withdrawCircuit(uint256[2] proofA, uint256[2][2] proofB, uint256[2] proofC, uint32 tokenID, uint192 amount, uint32 numExitRoot, uint48 idx, bool instantWithdraw) returns()
  1032. func (_Hermez *HermezTransactorSession) WithdrawCircuit(proofA [2]*big.Int, proofB [2][2]*big.Int, proofC [2]*big.Int, tokenID uint32, amount *big.Int, numExitRoot uint32, idx *big.Int, instantWithdraw bool) (*types.Transaction, error) {
  1033. return _Hermez.Contract.WithdrawCircuit(&_Hermez.TransactOpts, proofA, proofB, proofC, tokenID, amount, numExitRoot, idx, instantWithdraw)
  1034. }
  1035. // WithdrawMerkleProof is a paid mutator transaction binding the contract method 0xd9d4ca44.
  1036. //
  1037. // Solidity: function withdrawMerkleProof(uint32 tokenID, uint192 amount, uint256 babyPubKey, uint32 numExitRoot, uint256[] siblings, uint48 idx, bool instantWithdraw) returns()
  1038. func (_Hermez *HermezTransactor) WithdrawMerkleProof(opts *bind.TransactOpts, tokenID uint32, amount *big.Int, babyPubKey *big.Int, numExitRoot uint32, siblings []*big.Int, idx *big.Int, instantWithdraw bool) (*types.Transaction, error) {
  1039. return _Hermez.contract.Transact(opts, "withdrawMerkleProof", tokenID, amount, babyPubKey, numExitRoot, siblings, idx, instantWithdraw)
  1040. }
  1041. // WithdrawMerkleProof is a paid mutator transaction binding the contract method 0xd9d4ca44.
  1042. //
  1043. // Solidity: function withdrawMerkleProof(uint32 tokenID, uint192 amount, uint256 babyPubKey, uint32 numExitRoot, uint256[] siblings, uint48 idx, bool instantWithdraw) returns()
  1044. func (_Hermez *HermezSession) WithdrawMerkleProof(tokenID uint32, amount *big.Int, babyPubKey *big.Int, numExitRoot uint32, siblings []*big.Int, idx *big.Int, instantWithdraw bool) (*types.Transaction, error) {
  1045. return _Hermez.Contract.WithdrawMerkleProof(&_Hermez.TransactOpts, tokenID, amount, babyPubKey, numExitRoot, siblings, idx, instantWithdraw)
  1046. }
  1047. // WithdrawMerkleProof is a paid mutator transaction binding the contract method 0xd9d4ca44.
  1048. //
  1049. // Solidity: function withdrawMerkleProof(uint32 tokenID, uint192 amount, uint256 babyPubKey, uint32 numExitRoot, uint256[] siblings, uint48 idx, bool instantWithdraw) returns()
  1050. func (_Hermez *HermezTransactorSession) WithdrawMerkleProof(tokenID uint32, amount *big.Int, babyPubKey *big.Int, numExitRoot uint32, siblings []*big.Int, idx *big.Int, instantWithdraw bool) (*types.Transaction, error) {
  1051. return _Hermez.Contract.WithdrawMerkleProof(&_Hermez.TransactOpts, tokenID, amount, babyPubKey, numExitRoot, siblings, idx, instantWithdraw)
  1052. }
  1053. // HermezAddTokenIterator is returned from FilterAddToken and is used to iterate over the raw logs and unpacked data for AddToken events raised by the Hermez contract.
  1054. type HermezAddTokenIterator struct {
  1055. Event *HermezAddToken // Event containing the contract specifics and raw log
  1056. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1057. event string // Event name to use for unpacking event data
  1058. logs chan types.Log // Log channel receiving the found contract events
  1059. sub ethereum.Subscription // Subscription for errors, completion and termination
  1060. done bool // Whether the subscription completed delivering logs
  1061. fail error // Occurred error to stop iteration
  1062. }
  1063. // Next advances the iterator to the subsequent event, returning whether there
  1064. // are any more events found. In case of a retrieval or parsing error, false is
  1065. // returned and Error() can be queried for the exact failure.
  1066. func (it *HermezAddTokenIterator) Next() bool {
  1067. // If the iterator failed, stop iterating
  1068. if it.fail != nil {
  1069. return false
  1070. }
  1071. // If the iterator completed, deliver directly whatever's available
  1072. if it.done {
  1073. select {
  1074. case log := <-it.logs:
  1075. it.Event = new(HermezAddToken)
  1076. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1077. it.fail = err
  1078. return false
  1079. }
  1080. it.Event.Raw = log
  1081. return true
  1082. default:
  1083. return false
  1084. }
  1085. }
  1086. // Iterator still in progress, wait for either a data or an error event
  1087. select {
  1088. case log := <-it.logs:
  1089. it.Event = new(HermezAddToken)
  1090. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1091. it.fail = err
  1092. return false
  1093. }
  1094. it.Event.Raw = log
  1095. return true
  1096. case err := <-it.sub.Err():
  1097. it.done = true
  1098. it.fail = err
  1099. return it.Next()
  1100. }
  1101. }
  1102. // Error returns any retrieval or parsing error occurred during filtering.
  1103. func (it *HermezAddTokenIterator) Error() error {
  1104. return it.fail
  1105. }
  1106. // Close terminates the iteration process, releasing any pending underlying
  1107. // resources.
  1108. func (it *HermezAddTokenIterator) Close() error {
  1109. it.sub.Unsubscribe()
  1110. return nil
  1111. }
  1112. // HermezAddToken represents a AddToken event raised by the Hermez contract.
  1113. type HermezAddToken struct {
  1114. TokenAddress common.Address
  1115. TokenID uint32
  1116. Raw types.Log // Blockchain specific contextual infos
  1117. }
  1118. // FilterAddToken is a free log retrieval operation binding the contract event 0xcb73d161edb7cd4fb1d92fedfd2555384fd997fd44ab507656f8c81e15747dde.
  1119. //
  1120. // Solidity: event AddToken(address indexed tokenAddress, uint32 tokenID)
  1121. func (_Hermez *HermezFilterer) FilterAddToken(opts *bind.FilterOpts, tokenAddress []common.Address) (*HermezAddTokenIterator, error) {
  1122. var tokenAddressRule []interface{}
  1123. for _, tokenAddressItem := range tokenAddress {
  1124. tokenAddressRule = append(tokenAddressRule, tokenAddressItem)
  1125. }
  1126. logs, sub, err := _Hermez.contract.FilterLogs(opts, "AddToken", tokenAddressRule)
  1127. if err != nil {
  1128. return nil, err
  1129. }
  1130. return &HermezAddTokenIterator{contract: _Hermez.contract, event: "AddToken", logs: logs, sub: sub}, nil
  1131. }
  1132. // WatchAddToken is a free log subscription operation binding the contract event 0xcb73d161edb7cd4fb1d92fedfd2555384fd997fd44ab507656f8c81e15747dde.
  1133. //
  1134. // Solidity: event AddToken(address indexed tokenAddress, uint32 tokenID)
  1135. func (_Hermez *HermezFilterer) WatchAddToken(opts *bind.WatchOpts, sink chan<- *HermezAddToken, tokenAddress []common.Address) (event.Subscription, error) {
  1136. var tokenAddressRule []interface{}
  1137. for _, tokenAddressItem := range tokenAddress {
  1138. tokenAddressRule = append(tokenAddressRule, tokenAddressItem)
  1139. }
  1140. logs, sub, err := _Hermez.contract.WatchLogs(opts, "AddToken", tokenAddressRule)
  1141. if err != nil {
  1142. return nil, err
  1143. }
  1144. return event.NewSubscription(func(quit <-chan struct{}) error {
  1145. defer sub.Unsubscribe()
  1146. for {
  1147. select {
  1148. case log := <-logs:
  1149. // New log arrived, parse the event and forward to the user
  1150. event := new(HermezAddToken)
  1151. if err := _Hermez.contract.UnpackLog(event, "AddToken", log); err != nil {
  1152. return err
  1153. }
  1154. event.Raw = log
  1155. select {
  1156. case sink <- event:
  1157. case err := <-sub.Err():
  1158. return err
  1159. case <-quit:
  1160. return nil
  1161. }
  1162. case err := <-sub.Err():
  1163. return err
  1164. case <-quit:
  1165. return nil
  1166. }
  1167. }
  1168. }), nil
  1169. }
  1170. // ParseAddToken is a log parse operation binding the contract event 0xcb73d161edb7cd4fb1d92fedfd2555384fd997fd44ab507656f8c81e15747dde.
  1171. //
  1172. // Solidity: event AddToken(address indexed tokenAddress, uint32 tokenID)
  1173. func (_Hermez *HermezFilterer) ParseAddToken(log types.Log) (*HermezAddToken, error) {
  1174. event := new(HermezAddToken)
  1175. if err := _Hermez.contract.UnpackLog(event, "AddToken", log); err != nil {
  1176. return nil, err
  1177. }
  1178. event.Raw = log
  1179. return event, nil
  1180. }
  1181. // HermezForgeBatchIterator is returned from FilterForgeBatch and is used to iterate over the raw logs and unpacked data for ForgeBatch events raised by the Hermez contract.
  1182. type HermezForgeBatchIterator struct {
  1183. Event *HermezForgeBatch // Event containing the contract specifics and raw log
  1184. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1185. event string // Event name to use for unpacking event data
  1186. logs chan types.Log // Log channel receiving the found contract events
  1187. sub ethereum.Subscription // Subscription for errors, completion and termination
  1188. done bool // Whether the subscription completed delivering logs
  1189. fail error // Occurred error to stop iteration
  1190. }
  1191. // Next advances the iterator to the subsequent event, returning whether there
  1192. // are any more events found. In case of a retrieval or parsing error, false is
  1193. // returned and Error() can be queried for the exact failure.
  1194. func (it *HermezForgeBatchIterator) Next() bool {
  1195. // If the iterator failed, stop iterating
  1196. if it.fail != nil {
  1197. return false
  1198. }
  1199. // If the iterator completed, deliver directly whatever's available
  1200. if it.done {
  1201. select {
  1202. case log := <-it.logs:
  1203. it.Event = new(HermezForgeBatch)
  1204. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1205. it.fail = err
  1206. return false
  1207. }
  1208. it.Event.Raw = log
  1209. return true
  1210. default:
  1211. return false
  1212. }
  1213. }
  1214. // Iterator still in progress, wait for either a data or an error event
  1215. select {
  1216. case log := <-it.logs:
  1217. it.Event = new(HermezForgeBatch)
  1218. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1219. it.fail = err
  1220. return false
  1221. }
  1222. it.Event.Raw = log
  1223. return true
  1224. case err := <-it.sub.Err():
  1225. it.done = true
  1226. it.fail = err
  1227. return it.Next()
  1228. }
  1229. }
  1230. // Error returns any retrieval or parsing error occurred during filtering.
  1231. func (it *HermezForgeBatchIterator) Error() error {
  1232. return it.fail
  1233. }
  1234. // Close terminates the iteration process, releasing any pending underlying
  1235. // resources.
  1236. func (it *HermezForgeBatchIterator) Close() error {
  1237. it.sub.Unsubscribe()
  1238. return nil
  1239. }
  1240. // HermezForgeBatch represents a ForgeBatch event raised by the Hermez contract.
  1241. type HermezForgeBatch struct {
  1242. BatchNum uint32
  1243. L1UserTxsLen uint16
  1244. Raw types.Log // Blockchain specific contextual infos
  1245. }
  1246. // FilterForgeBatch is a free log retrieval operation binding the contract event 0xe00040c8a3b0bf905636c26924e90520eafc5003324138236fddee2d34588618.
  1247. //
  1248. // Solidity: event ForgeBatch(uint32 indexed batchNum, uint16 l1UserTxsLen)
  1249. func (_Hermez *HermezFilterer) FilterForgeBatch(opts *bind.FilterOpts, batchNum []uint32) (*HermezForgeBatchIterator, error) {
  1250. var batchNumRule []interface{}
  1251. for _, batchNumItem := range batchNum {
  1252. batchNumRule = append(batchNumRule, batchNumItem)
  1253. }
  1254. logs, sub, err := _Hermez.contract.FilterLogs(opts, "ForgeBatch", batchNumRule)
  1255. if err != nil {
  1256. return nil, err
  1257. }
  1258. return &HermezForgeBatchIterator{contract: _Hermez.contract, event: "ForgeBatch", logs: logs, sub: sub}, nil
  1259. }
  1260. // WatchForgeBatch is a free log subscription operation binding the contract event 0xe00040c8a3b0bf905636c26924e90520eafc5003324138236fddee2d34588618.
  1261. //
  1262. // Solidity: event ForgeBatch(uint32 indexed batchNum, uint16 l1UserTxsLen)
  1263. func (_Hermez *HermezFilterer) WatchForgeBatch(opts *bind.WatchOpts, sink chan<- *HermezForgeBatch, batchNum []uint32) (event.Subscription, error) {
  1264. var batchNumRule []interface{}
  1265. for _, batchNumItem := range batchNum {
  1266. batchNumRule = append(batchNumRule, batchNumItem)
  1267. }
  1268. logs, sub, err := _Hermez.contract.WatchLogs(opts, "ForgeBatch", batchNumRule)
  1269. if err != nil {
  1270. return nil, err
  1271. }
  1272. return event.NewSubscription(func(quit <-chan struct{}) error {
  1273. defer sub.Unsubscribe()
  1274. for {
  1275. select {
  1276. case log := <-logs:
  1277. // New log arrived, parse the event and forward to the user
  1278. event := new(HermezForgeBatch)
  1279. if err := _Hermez.contract.UnpackLog(event, "ForgeBatch", log); err != nil {
  1280. return err
  1281. }
  1282. event.Raw = log
  1283. select {
  1284. case sink <- event:
  1285. case err := <-sub.Err():
  1286. return err
  1287. case <-quit:
  1288. return nil
  1289. }
  1290. case err := <-sub.Err():
  1291. return err
  1292. case <-quit:
  1293. return nil
  1294. }
  1295. }
  1296. }), nil
  1297. }
  1298. // ParseForgeBatch is a log parse operation binding the contract event 0xe00040c8a3b0bf905636c26924e90520eafc5003324138236fddee2d34588618.
  1299. //
  1300. // Solidity: event ForgeBatch(uint32 indexed batchNum, uint16 l1UserTxsLen)
  1301. func (_Hermez *HermezFilterer) ParseForgeBatch(log types.Log) (*HermezForgeBatch, error) {
  1302. event := new(HermezForgeBatch)
  1303. if err := _Hermez.contract.UnpackLog(event, "ForgeBatch", log); err != nil {
  1304. return nil, err
  1305. }
  1306. event.Raw = log
  1307. return event, nil
  1308. }
  1309. // HermezInitializeHermezEventIterator is returned from FilterInitializeHermezEvent and is used to iterate over the raw logs and unpacked data for InitializeHermezEvent events raised by the Hermez contract.
  1310. type HermezInitializeHermezEventIterator struct {
  1311. Event *HermezInitializeHermezEvent // Event containing the contract specifics and raw log
  1312. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1313. event string // Event name to use for unpacking event data
  1314. logs chan types.Log // Log channel receiving the found contract events
  1315. sub ethereum.Subscription // Subscription for errors, completion and termination
  1316. done bool // Whether the subscription completed delivering logs
  1317. fail error // Occurred error to stop iteration
  1318. }
  1319. // Next advances the iterator to the subsequent event, returning whether there
  1320. // are any more events found. In case of a retrieval or parsing error, false is
  1321. // returned and Error() can be queried for the exact failure.
  1322. func (it *HermezInitializeHermezEventIterator) Next() bool {
  1323. // If the iterator failed, stop iterating
  1324. if it.fail != nil {
  1325. return false
  1326. }
  1327. // If the iterator completed, deliver directly whatever's available
  1328. if it.done {
  1329. select {
  1330. case log := <-it.logs:
  1331. it.Event = new(HermezInitializeHermezEvent)
  1332. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1333. it.fail = err
  1334. return false
  1335. }
  1336. it.Event.Raw = log
  1337. return true
  1338. default:
  1339. return false
  1340. }
  1341. }
  1342. // Iterator still in progress, wait for either a data or an error event
  1343. select {
  1344. case log := <-it.logs:
  1345. it.Event = new(HermezInitializeHermezEvent)
  1346. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1347. it.fail = err
  1348. return false
  1349. }
  1350. it.Event.Raw = log
  1351. return true
  1352. case err := <-it.sub.Err():
  1353. it.done = true
  1354. it.fail = err
  1355. return it.Next()
  1356. }
  1357. }
  1358. // Error returns any retrieval or parsing error occurred during filtering.
  1359. func (it *HermezInitializeHermezEventIterator) Error() error {
  1360. return it.fail
  1361. }
  1362. // Close terminates the iteration process, releasing any pending underlying
  1363. // resources.
  1364. func (it *HermezInitializeHermezEventIterator) Close() error {
  1365. it.sub.Unsubscribe()
  1366. return nil
  1367. }
  1368. // HermezInitializeHermezEvent represents a InitializeHermezEvent event raised by the Hermez contract.
  1369. type HermezInitializeHermezEvent struct {
  1370. ForgeL1L2BatchTimeout uint8
  1371. FeeAddToken *big.Int
  1372. WithdrawalDelay uint64
  1373. Raw types.Log // Blockchain specific contextual infos
  1374. }
  1375. // FilterInitializeHermezEvent is a free log retrieval operation binding the contract event 0xc5272ad4c8d9f2e9af2f9555c11ead049be22b6e45c16975adc82371b7cd1040.
  1376. //
  1377. // Solidity: event InitializeHermezEvent(uint8 forgeL1L2BatchTimeout, uint256 feeAddToken, uint64 withdrawalDelay)
  1378. func (_Hermez *HermezFilterer) FilterInitializeHermezEvent(opts *bind.FilterOpts) (*HermezInitializeHermezEventIterator, error) {
  1379. logs, sub, err := _Hermez.contract.FilterLogs(opts, "InitializeHermezEvent")
  1380. if err != nil {
  1381. return nil, err
  1382. }
  1383. return &HermezInitializeHermezEventIterator{contract: _Hermez.contract, event: "InitializeHermezEvent", logs: logs, sub: sub}, nil
  1384. }
  1385. // WatchInitializeHermezEvent is a free log subscription operation binding the contract event 0xc5272ad4c8d9f2e9af2f9555c11ead049be22b6e45c16975adc82371b7cd1040.
  1386. //
  1387. // Solidity: event InitializeHermezEvent(uint8 forgeL1L2BatchTimeout, uint256 feeAddToken, uint64 withdrawalDelay)
  1388. func (_Hermez *HermezFilterer) WatchInitializeHermezEvent(opts *bind.WatchOpts, sink chan<- *HermezInitializeHermezEvent) (event.Subscription, error) {
  1389. logs, sub, err := _Hermez.contract.WatchLogs(opts, "InitializeHermezEvent")
  1390. if err != nil {
  1391. return nil, err
  1392. }
  1393. return event.NewSubscription(func(quit <-chan struct{}) error {
  1394. defer sub.Unsubscribe()
  1395. for {
  1396. select {
  1397. case log := <-logs:
  1398. // New log arrived, parse the event and forward to the user
  1399. event := new(HermezInitializeHermezEvent)
  1400. if err := _Hermez.contract.UnpackLog(event, "InitializeHermezEvent", log); err != nil {
  1401. return err
  1402. }
  1403. event.Raw = log
  1404. select {
  1405. case sink <- event:
  1406. case err := <-sub.Err():
  1407. return err
  1408. case <-quit:
  1409. return nil
  1410. }
  1411. case err := <-sub.Err():
  1412. return err
  1413. case <-quit:
  1414. return nil
  1415. }
  1416. }
  1417. }), nil
  1418. }
  1419. // ParseInitializeHermezEvent is a log parse operation binding the contract event 0xc5272ad4c8d9f2e9af2f9555c11ead049be22b6e45c16975adc82371b7cd1040.
  1420. //
  1421. // Solidity: event InitializeHermezEvent(uint8 forgeL1L2BatchTimeout, uint256 feeAddToken, uint64 withdrawalDelay)
  1422. func (_Hermez *HermezFilterer) ParseInitializeHermezEvent(log types.Log) (*HermezInitializeHermezEvent, error) {
  1423. event := new(HermezInitializeHermezEvent)
  1424. if err := _Hermez.contract.UnpackLog(event, "InitializeHermezEvent", log); err != nil {
  1425. return nil, err
  1426. }
  1427. event.Raw = log
  1428. return event, nil
  1429. }
  1430. // HermezL1UserTxEventIterator is returned from FilterL1UserTxEvent and is used to iterate over the raw logs and unpacked data for L1UserTxEvent events raised by the Hermez contract.
  1431. type HermezL1UserTxEventIterator struct {
  1432. Event *HermezL1UserTxEvent // Event containing the contract specifics and raw log
  1433. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1434. event string // Event name to use for unpacking event data
  1435. logs chan types.Log // Log channel receiving the found contract events
  1436. sub ethereum.Subscription // Subscription for errors, completion and termination
  1437. done bool // Whether the subscription completed delivering logs
  1438. fail error // Occurred error to stop iteration
  1439. }
  1440. // Next advances the iterator to the subsequent event, returning whether there
  1441. // are any more events found. In case of a retrieval or parsing error, false is
  1442. // returned and Error() can be queried for the exact failure.
  1443. func (it *HermezL1UserTxEventIterator) Next() bool {
  1444. // If the iterator failed, stop iterating
  1445. if it.fail != nil {
  1446. return false
  1447. }
  1448. // If the iterator completed, deliver directly whatever's available
  1449. if it.done {
  1450. select {
  1451. case log := <-it.logs:
  1452. it.Event = new(HermezL1UserTxEvent)
  1453. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1454. it.fail = err
  1455. return false
  1456. }
  1457. it.Event.Raw = log
  1458. return true
  1459. default:
  1460. return false
  1461. }
  1462. }
  1463. // Iterator still in progress, wait for either a data or an error event
  1464. select {
  1465. case log := <-it.logs:
  1466. it.Event = new(HermezL1UserTxEvent)
  1467. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1468. it.fail = err
  1469. return false
  1470. }
  1471. it.Event.Raw = log
  1472. return true
  1473. case err := <-it.sub.Err():
  1474. it.done = true
  1475. it.fail = err
  1476. return it.Next()
  1477. }
  1478. }
  1479. // Error returns any retrieval or parsing error occurred during filtering.
  1480. func (it *HermezL1UserTxEventIterator) Error() error {
  1481. return it.fail
  1482. }
  1483. // Close terminates the iteration process, releasing any pending underlying
  1484. // resources.
  1485. func (it *HermezL1UserTxEventIterator) Close() error {
  1486. it.sub.Unsubscribe()
  1487. return nil
  1488. }
  1489. // HermezL1UserTxEvent represents a L1UserTxEvent event raised by the Hermez contract.
  1490. type HermezL1UserTxEvent struct {
  1491. QueueIndex uint32
  1492. Position uint8
  1493. L1UserTx []byte
  1494. Raw types.Log // Blockchain specific contextual infos
  1495. }
  1496. // FilterL1UserTxEvent is a free log retrieval operation binding the contract event 0xdd5c7c5ea02d3c5d1621513faa6de53d474ee6f111eda6352a63e3dfe8c40119.
  1497. //
  1498. // Solidity: event L1UserTxEvent(uint32 indexed queueIndex, uint8 indexed position, bytes l1UserTx)
  1499. func (_Hermez *HermezFilterer) FilterL1UserTxEvent(opts *bind.FilterOpts, queueIndex []uint32, position []uint8) (*HermezL1UserTxEventIterator, error) {
  1500. var queueIndexRule []interface{}
  1501. for _, queueIndexItem := range queueIndex {
  1502. queueIndexRule = append(queueIndexRule, queueIndexItem)
  1503. }
  1504. var positionRule []interface{}
  1505. for _, positionItem := range position {
  1506. positionRule = append(positionRule, positionItem)
  1507. }
  1508. logs, sub, err := _Hermez.contract.FilterLogs(opts, "L1UserTxEvent", queueIndexRule, positionRule)
  1509. if err != nil {
  1510. return nil, err
  1511. }
  1512. return &HermezL1UserTxEventIterator{contract: _Hermez.contract, event: "L1UserTxEvent", logs: logs, sub: sub}, nil
  1513. }
  1514. // WatchL1UserTxEvent is a free log subscription operation binding the contract event 0xdd5c7c5ea02d3c5d1621513faa6de53d474ee6f111eda6352a63e3dfe8c40119.
  1515. //
  1516. // Solidity: event L1UserTxEvent(uint32 indexed queueIndex, uint8 indexed position, bytes l1UserTx)
  1517. func (_Hermez *HermezFilterer) WatchL1UserTxEvent(opts *bind.WatchOpts, sink chan<- *HermezL1UserTxEvent, queueIndex []uint32, position []uint8) (event.Subscription, error) {
  1518. var queueIndexRule []interface{}
  1519. for _, queueIndexItem := range queueIndex {
  1520. queueIndexRule = append(queueIndexRule, queueIndexItem)
  1521. }
  1522. var positionRule []interface{}
  1523. for _, positionItem := range position {
  1524. positionRule = append(positionRule, positionItem)
  1525. }
  1526. logs, sub, err := _Hermez.contract.WatchLogs(opts, "L1UserTxEvent", queueIndexRule, positionRule)
  1527. if err != nil {
  1528. return nil, err
  1529. }
  1530. return event.NewSubscription(func(quit <-chan struct{}) error {
  1531. defer sub.Unsubscribe()
  1532. for {
  1533. select {
  1534. case log := <-logs:
  1535. // New log arrived, parse the event and forward to the user
  1536. event := new(HermezL1UserTxEvent)
  1537. if err := _Hermez.contract.UnpackLog(event, "L1UserTxEvent", log); err != nil {
  1538. return err
  1539. }
  1540. event.Raw = log
  1541. select {
  1542. case sink <- event:
  1543. case err := <-sub.Err():
  1544. return err
  1545. case <-quit:
  1546. return nil
  1547. }
  1548. case err := <-sub.Err():
  1549. return err
  1550. case <-quit:
  1551. return nil
  1552. }
  1553. }
  1554. }), nil
  1555. }
  1556. // ParseL1UserTxEvent is a log parse operation binding the contract event 0xdd5c7c5ea02d3c5d1621513faa6de53d474ee6f111eda6352a63e3dfe8c40119.
  1557. //
  1558. // Solidity: event L1UserTxEvent(uint32 indexed queueIndex, uint8 indexed position, bytes l1UserTx)
  1559. func (_Hermez *HermezFilterer) ParseL1UserTxEvent(log types.Log) (*HermezL1UserTxEvent, error) {
  1560. event := new(HermezL1UserTxEvent)
  1561. if err := _Hermez.contract.UnpackLog(event, "L1UserTxEvent", log); err != nil {
  1562. return nil, err
  1563. }
  1564. event.Raw = log
  1565. return event, nil
  1566. }
  1567. // HermezSafeModeIterator is returned from FilterSafeMode and is used to iterate over the raw logs and unpacked data for SafeMode events raised by the Hermez contract.
  1568. type HermezSafeModeIterator struct {
  1569. Event *HermezSafeMode // Event containing the contract specifics and raw log
  1570. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1571. event string // Event name to use for unpacking event data
  1572. logs chan types.Log // Log channel receiving the found contract events
  1573. sub ethereum.Subscription // Subscription for errors, completion and termination
  1574. done bool // Whether the subscription completed delivering logs
  1575. fail error // Occurred error to stop iteration
  1576. }
  1577. // Next advances the iterator to the subsequent event, returning whether there
  1578. // are any more events found. In case of a retrieval or parsing error, false is
  1579. // returned and Error() can be queried for the exact failure.
  1580. func (it *HermezSafeModeIterator) Next() bool {
  1581. // If the iterator failed, stop iterating
  1582. if it.fail != nil {
  1583. return false
  1584. }
  1585. // If the iterator completed, deliver directly whatever's available
  1586. if it.done {
  1587. select {
  1588. case log := <-it.logs:
  1589. it.Event = new(HermezSafeMode)
  1590. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1591. it.fail = err
  1592. return false
  1593. }
  1594. it.Event.Raw = log
  1595. return true
  1596. default:
  1597. return false
  1598. }
  1599. }
  1600. // Iterator still in progress, wait for either a data or an error event
  1601. select {
  1602. case log := <-it.logs:
  1603. it.Event = new(HermezSafeMode)
  1604. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1605. it.fail = err
  1606. return false
  1607. }
  1608. it.Event.Raw = log
  1609. return true
  1610. case err := <-it.sub.Err():
  1611. it.done = true
  1612. it.fail = err
  1613. return it.Next()
  1614. }
  1615. }
  1616. // Error returns any retrieval or parsing error occurred during filtering.
  1617. func (it *HermezSafeModeIterator) Error() error {
  1618. return it.fail
  1619. }
  1620. // Close terminates the iteration process, releasing any pending underlying
  1621. // resources.
  1622. func (it *HermezSafeModeIterator) Close() error {
  1623. it.sub.Unsubscribe()
  1624. return nil
  1625. }
  1626. // HermezSafeMode represents a SafeMode event raised by the Hermez contract.
  1627. type HermezSafeMode struct {
  1628. Raw types.Log // Blockchain specific contextual infos
  1629. }
  1630. // FilterSafeMode is a free log retrieval operation binding the contract event 0x0410e6ef2bd89ecf5b2dc2f62157f9863e09e89cb7c7f1abb7d4ec43a6019d1e.
  1631. //
  1632. // Solidity: event SafeMode()
  1633. func (_Hermez *HermezFilterer) FilterSafeMode(opts *bind.FilterOpts) (*HermezSafeModeIterator, error) {
  1634. logs, sub, err := _Hermez.contract.FilterLogs(opts, "SafeMode")
  1635. if err != nil {
  1636. return nil, err
  1637. }
  1638. return &HermezSafeModeIterator{contract: _Hermez.contract, event: "SafeMode", logs: logs, sub: sub}, nil
  1639. }
  1640. // WatchSafeMode is a free log subscription operation binding the contract event 0x0410e6ef2bd89ecf5b2dc2f62157f9863e09e89cb7c7f1abb7d4ec43a6019d1e.
  1641. //
  1642. // Solidity: event SafeMode()
  1643. func (_Hermez *HermezFilterer) WatchSafeMode(opts *bind.WatchOpts, sink chan<- *HermezSafeMode) (event.Subscription, error) {
  1644. logs, sub, err := _Hermez.contract.WatchLogs(opts, "SafeMode")
  1645. if err != nil {
  1646. return nil, err
  1647. }
  1648. return event.NewSubscription(func(quit <-chan struct{}) error {
  1649. defer sub.Unsubscribe()
  1650. for {
  1651. select {
  1652. case log := <-logs:
  1653. // New log arrived, parse the event and forward to the user
  1654. event := new(HermezSafeMode)
  1655. if err := _Hermez.contract.UnpackLog(event, "SafeMode", log); err != nil {
  1656. return err
  1657. }
  1658. event.Raw = log
  1659. select {
  1660. case sink <- event:
  1661. case err := <-sub.Err():
  1662. return err
  1663. case <-quit:
  1664. return nil
  1665. }
  1666. case err := <-sub.Err():
  1667. return err
  1668. case <-quit:
  1669. return nil
  1670. }
  1671. }
  1672. }), nil
  1673. }
  1674. // ParseSafeMode is a log parse operation binding the contract event 0x0410e6ef2bd89ecf5b2dc2f62157f9863e09e89cb7c7f1abb7d4ec43a6019d1e.
  1675. //
  1676. // Solidity: event SafeMode()
  1677. func (_Hermez *HermezFilterer) ParseSafeMode(log types.Log) (*HermezSafeMode, error) {
  1678. event := new(HermezSafeMode)
  1679. if err := _Hermez.contract.UnpackLog(event, "SafeMode", log); err != nil {
  1680. return nil, err
  1681. }
  1682. event.Raw = log
  1683. return event, nil
  1684. }
  1685. // HermezUpdateBucketWithdrawIterator is returned from FilterUpdateBucketWithdraw and is used to iterate over the raw logs and unpacked data for UpdateBucketWithdraw events raised by the Hermez contract.
  1686. type HermezUpdateBucketWithdrawIterator struct {
  1687. Event *HermezUpdateBucketWithdraw // Event containing the contract specifics and raw log
  1688. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1689. event string // Event name to use for unpacking event data
  1690. logs chan types.Log // Log channel receiving the found contract events
  1691. sub ethereum.Subscription // Subscription for errors, completion and termination
  1692. done bool // Whether the subscription completed delivering logs
  1693. fail error // Occurred error to stop iteration
  1694. }
  1695. // Next advances the iterator to the subsequent event, returning whether there
  1696. // are any more events found. In case of a retrieval or parsing error, false is
  1697. // returned and Error() can be queried for the exact failure.
  1698. func (it *HermezUpdateBucketWithdrawIterator) Next() bool {
  1699. // If the iterator failed, stop iterating
  1700. if it.fail != nil {
  1701. return false
  1702. }
  1703. // If the iterator completed, deliver directly whatever's available
  1704. if it.done {
  1705. select {
  1706. case log := <-it.logs:
  1707. it.Event = new(HermezUpdateBucketWithdraw)
  1708. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1709. it.fail = err
  1710. return false
  1711. }
  1712. it.Event.Raw = log
  1713. return true
  1714. default:
  1715. return false
  1716. }
  1717. }
  1718. // Iterator still in progress, wait for either a data or an error event
  1719. select {
  1720. case log := <-it.logs:
  1721. it.Event = new(HermezUpdateBucketWithdraw)
  1722. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1723. it.fail = err
  1724. return false
  1725. }
  1726. it.Event.Raw = log
  1727. return true
  1728. case err := <-it.sub.Err():
  1729. it.done = true
  1730. it.fail = err
  1731. return it.Next()
  1732. }
  1733. }
  1734. // Error returns any retrieval or parsing error occurred during filtering.
  1735. func (it *HermezUpdateBucketWithdrawIterator) Error() error {
  1736. return it.fail
  1737. }
  1738. // Close terminates the iteration process, releasing any pending underlying
  1739. // resources.
  1740. func (it *HermezUpdateBucketWithdrawIterator) Close() error {
  1741. it.sub.Unsubscribe()
  1742. return nil
  1743. }
  1744. // HermezUpdateBucketWithdraw represents a UpdateBucketWithdraw event raised by the Hermez contract.
  1745. type HermezUpdateBucketWithdraw struct {
  1746. NumBucket uint8
  1747. BlockStamp *big.Int
  1748. Withdrawals *big.Int
  1749. Raw types.Log // Blockchain specific contextual infos
  1750. }
  1751. // FilterUpdateBucketWithdraw is a free log retrieval operation binding the contract event 0xa35fe9a9e21cdbbc4774aa8a56e7b97ea9c06afc09ffb06af593d26951e350aa.
  1752. //
  1753. // Solidity: event UpdateBucketWithdraw(uint8 indexed numBucket, uint256 indexed blockStamp, uint256 withdrawals)
  1754. func (_Hermez *HermezFilterer) FilterUpdateBucketWithdraw(opts *bind.FilterOpts, numBucket []uint8, blockStamp []*big.Int) (*HermezUpdateBucketWithdrawIterator, error) {
  1755. var numBucketRule []interface{}
  1756. for _, numBucketItem := range numBucket {
  1757. numBucketRule = append(numBucketRule, numBucketItem)
  1758. }
  1759. var blockStampRule []interface{}
  1760. for _, blockStampItem := range blockStamp {
  1761. blockStampRule = append(blockStampRule, blockStampItem)
  1762. }
  1763. logs, sub, err := _Hermez.contract.FilterLogs(opts, "UpdateBucketWithdraw", numBucketRule, blockStampRule)
  1764. if err != nil {
  1765. return nil, err
  1766. }
  1767. return &HermezUpdateBucketWithdrawIterator{contract: _Hermez.contract, event: "UpdateBucketWithdraw", logs: logs, sub: sub}, nil
  1768. }
  1769. // WatchUpdateBucketWithdraw is a free log subscription operation binding the contract event 0xa35fe9a9e21cdbbc4774aa8a56e7b97ea9c06afc09ffb06af593d26951e350aa.
  1770. //
  1771. // Solidity: event UpdateBucketWithdraw(uint8 indexed numBucket, uint256 indexed blockStamp, uint256 withdrawals)
  1772. func (_Hermez *HermezFilterer) WatchUpdateBucketWithdraw(opts *bind.WatchOpts, sink chan<- *HermezUpdateBucketWithdraw, numBucket []uint8, blockStamp []*big.Int) (event.Subscription, error) {
  1773. var numBucketRule []interface{}
  1774. for _, numBucketItem := range numBucket {
  1775. numBucketRule = append(numBucketRule, numBucketItem)
  1776. }
  1777. var blockStampRule []interface{}
  1778. for _, blockStampItem := range blockStamp {
  1779. blockStampRule = append(blockStampRule, blockStampItem)
  1780. }
  1781. logs, sub, err := _Hermez.contract.WatchLogs(opts, "UpdateBucketWithdraw", numBucketRule, blockStampRule)
  1782. if err != nil {
  1783. return nil, err
  1784. }
  1785. return event.NewSubscription(func(quit <-chan struct{}) error {
  1786. defer sub.Unsubscribe()
  1787. for {
  1788. select {
  1789. case log := <-logs:
  1790. // New log arrived, parse the event and forward to the user
  1791. event := new(HermezUpdateBucketWithdraw)
  1792. if err := _Hermez.contract.UnpackLog(event, "UpdateBucketWithdraw", log); err != nil {
  1793. return err
  1794. }
  1795. event.Raw = log
  1796. select {
  1797. case sink <- event:
  1798. case err := <-sub.Err():
  1799. return err
  1800. case <-quit:
  1801. return nil
  1802. }
  1803. case err := <-sub.Err():
  1804. return err
  1805. case <-quit:
  1806. return nil
  1807. }
  1808. }
  1809. }), nil
  1810. }
  1811. // ParseUpdateBucketWithdraw is a log parse operation binding the contract event 0xa35fe9a9e21cdbbc4774aa8a56e7b97ea9c06afc09ffb06af593d26951e350aa.
  1812. //
  1813. // Solidity: event UpdateBucketWithdraw(uint8 indexed numBucket, uint256 indexed blockStamp, uint256 withdrawals)
  1814. func (_Hermez *HermezFilterer) ParseUpdateBucketWithdraw(log types.Log) (*HermezUpdateBucketWithdraw, error) {
  1815. event := new(HermezUpdateBucketWithdraw)
  1816. if err := _Hermez.contract.UnpackLog(event, "UpdateBucketWithdraw", log); err != nil {
  1817. return nil, err
  1818. }
  1819. event.Raw = log
  1820. return event, nil
  1821. }
  1822. // HermezUpdateBucketsParametersIterator is returned from FilterUpdateBucketsParameters and is used to iterate over the raw logs and unpacked data for UpdateBucketsParameters events raised by the Hermez contract.
  1823. type HermezUpdateBucketsParametersIterator struct {
  1824. Event *HermezUpdateBucketsParameters // Event containing the contract specifics and raw log
  1825. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1826. event string // Event name to use for unpacking event data
  1827. logs chan types.Log // Log channel receiving the found contract events
  1828. sub ethereum.Subscription // Subscription for errors, completion and termination
  1829. done bool // Whether the subscription completed delivering logs
  1830. fail error // Occurred error to stop iteration
  1831. }
  1832. // Next advances the iterator to the subsequent event, returning whether there
  1833. // are any more events found. In case of a retrieval or parsing error, false is
  1834. // returned and Error() can be queried for the exact failure.
  1835. func (it *HermezUpdateBucketsParametersIterator) Next() bool {
  1836. // If the iterator failed, stop iterating
  1837. if it.fail != nil {
  1838. return false
  1839. }
  1840. // If the iterator completed, deliver directly whatever's available
  1841. if it.done {
  1842. select {
  1843. case log := <-it.logs:
  1844. it.Event = new(HermezUpdateBucketsParameters)
  1845. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1846. it.fail = err
  1847. return false
  1848. }
  1849. it.Event.Raw = log
  1850. return true
  1851. default:
  1852. return false
  1853. }
  1854. }
  1855. // Iterator still in progress, wait for either a data or an error event
  1856. select {
  1857. case log := <-it.logs:
  1858. it.Event = new(HermezUpdateBucketsParameters)
  1859. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1860. it.fail = err
  1861. return false
  1862. }
  1863. it.Event.Raw = log
  1864. return true
  1865. case err := <-it.sub.Err():
  1866. it.done = true
  1867. it.fail = err
  1868. return it.Next()
  1869. }
  1870. }
  1871. // Error returns any retrieval or parsing error occurred during filtering.
  1872. func (it *HermezUpdateBucketsParametersIterator) Error() error {
  1873. return it.fail
  1874. }
  1875. // Close terminates the iteration process, releasing any pending underlying
  1876. // resources.
  1877. func (it *HermezUpdateBucketsParametersIterator) Close() error {
  1878. it.sub.Unsubscribe()
  1879. return nil
  1880. }
  1881. // HermezUpdateBucketsParameters represents a UpdateBucketsParameters event raised by the Hermez contract.
  1882. type HermezUpdateBucketsParameters struct {
  1883. ArrayBuckets [5][4]*big.Int
  1884. Raw types.Log // Blockchain specific contextual infos
  1885. }
  1886. // FilterUpdateBucketsParameters is a free log retrieval operation binding the contract event 0x3c39a1e91c69d4cfeacb11190befc2b1c983746e6b21ab2441a3051de88d4480.
  1887. //
  1888. // Solidity: event UpdateBucketsParameters(uint256[4][5] arrayBuckets)
  1889. func (_Hermez *HermezFilterer) FilterUpdateBucketsParameters(opts *bind.FilterOpts) (*HermezUpdateBucketsParametersIterator, error) {
  1890. logs, sub, err := _Hermez.contract.FilterLogs(opts, "UpdateBucketsParameters")
  1891. if err != nil {
  1892. return nil, err
  1893. }
  1894. return &HermezUpdateBucketsParametersIterator{contract: _Hermez.contract, event: "UpdateBucketsParameters", logs: logs, sub: sub}, nil
  1895. }
  1896. // WatchUpdateBucketsParameters is a free log subscription operation binding the contract event 0x3c39a1e91c69d4cfeacb11190befc2b1c983746e6b21ab2441a3051de88d4480.
  1897. //
  1898. // Solidity: event UpdateBucketsParameters(uint256[4][5] arrayBuckets)
  1899. func (_Hermez *HermezFilterer) WatchUpdateBucketsParameters(opts *bind.WatchOpts, sink chan<- *HermezUpdateBucketsParameters) (event.Subscription, error) {
  1900. logs, sub, err := _Hermez.contract.WatchLogs(opts, "UpdateBucketsParameters")
  1901. if err != nil {
  1902. return nil, err
  1903. }
  1904. return event.NewSubscription(func(quit <-chan struct{}) error {
  1905. defer sub.Unsubscribe()
  1906. for {
  1907. select {
  1908. case log := <-logs:
  1909. // New log arrived, parse the event and forward to the user
  1910. event := new(HermezUpdateBucketsParameters)
  1911. if err := _Hermez.contract.UnpackLog(event, "UpdateBucketsParameters", log); err != nil {
  1912. return err
  1913. }
  1914. event.Raw = log
  1915. select {
  1916. case sink <- event:
  1917. case err := <-sub.Err():
  1918. return err
  1919. case <-quit:
  1920. return nil
  1921. }
  1922. case err := <-sub.Err():
  1923. return err
  1924. case <-quit:
  1925. return nil
  1926. }
  1927. }
  1928. }), nil
  1929. }
  1930. // ParseUpdateBucketsParameters is a log parse operation binding the contract event 0x3c39a1e91c69d4cfeacb11190befc2b1c983746e6b21ab2441a3051de88d4480.
  1931. //
  1932. // Solidity: event UpdateBucketsParameters(uint256[4][5] arrayBuckets)
  1933. func (_Hermez *HermezFilterer) ParseUpdateBucketsParameters(log types.Log) (*HermezUpdateBucketsParameters, error) {
  1934. event := new(HermezUpdateBucketsParameters)
  1935. if err := _Hermez.contract.UnpackLog(event, "UpdateBucketsParameters", log); err != nil {
  1936. return nil, err
  1937. }
  1938. event.Raw = log
  1939. return event, nil
  1940. }
  1941. // HermezUpdateFeeAddTokenIterator is returned from FilterUpdateFeeAddToken and is used to iterate over the raw logs and unpacked data for UpdateFeeAddToken events raised by the Hermez contract.
  1942. type HermezUpdateFeeAddTokenIterator struct {
  1943. Event *HermezUpdateFeeAddToken // Event containing the contract specifics and raw log
  1944. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1945. event string // Event name to use for unpacking event data
  1946. logs chan types.Log // Log channel receiving the found contract events
  1947. sub ethereum.Subscription // Subscription for errors, completion and termination
  1948. done bool // Whether the subscription completed delivering logs
  1949. fail error // Occurred error to stop iteration
  1950. }
  1951. // Next advances the iterator to the subsequent event, returning whether there
  1952. // are any more events found. In case of a retrieval or parsing error, false is
  1953. // returned and Error() can be queried for the exact failure.
  1954. func (it *HermezUpdateFeeAddTokenIterator) Next() bool {
  1955. // If the iterator failed, stop iterating
  1956. if it.fail != nil {
  1957. return false
  1958. }
  1959. // If the iterator completed, deliver directly whatever's available
  1960. if it.done {
  1961. select {
  1962. case log := <-it.logs:
  1963. it.Event = new(HermezUpdateFeeAddToken)
  1964. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1965. it.fail = err
  1966. return false
  1967. }
  1968. it.Event.Raw = log
  1969. return true
  1970. default:
  1971. return false
  1972. }
  1973. }
  1974. // Iterator still in progress, wait for either a data or an error event
  1975. select {
  1976. case log := <-it.logs:
  1977. it.Event = new(HermezUpdateFeeAddToken)
  1978. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1979. it.fail = err
  1980. return false
  1981. }
  1982. it.Event.Raw = log
  1983. return true
  1984. case err := <-it.sub.Err():
  1985. it.done = true
  1986. it.fail = err
  1987. return it.Next()
  1988. }
  1989. }
  1990. // Error returns any retrieval or parsing error occurred during filtering.
  1991. func (it *HermezUpdateFeeAddTokenIterator) Error() error {
  1992. return it.fail
  1993. }
  1994. // Close terminates the iteration process, releasing any pending underlying
  1995. // resources.
  1996. func (it *HermezUpdateFeeAddTokenIterator) Close() error {
  1997. it.sub.Unsubscribe()
  1998. return nil
  1999. }
  2000. // HermezUpdateFeeAddToken represents a UpdateFeeAddToken event raised by the Hermez contract.
  2001. type HermezUpdateFeeAddToken struct {
  2002. NewFeeAddToken *big.Int
  2003. Raw types.Log // Blockchain specific contextual infos
  2004. }
  2005. // FilterUpdateFeeAddToken is a free log retrieval operation binding the contract event 0xd1c873cd16013f0dc5f37992c0d12794389698512895ec036a568e393b46e3c1.
  2006. //
  2007. // Solidity: event UpdateFeeAddToken(uint256 newFeeAddToken)
  2008. func (_Hermez *HermezFilterer) FilterUpdateFeeAddToken(opts *bind.FilterOpts) (*HermezUpdateFeeAddTokenIterator, error) {
  2009. logs, sub, err := _Hermez.contract.FilterLogs(opts, "UpdateFeeAddToken")
  2010. if err != nil {
  2011. return nil, err
  2012. }
  2013. return &HermezUpdateFeeAddTokenIterator{contract: _Hermez.contract, event: "UpdateFeeAddToken", logs: logs, sub: sub}, nil
  2014. }
  2015. // WatchUpdateFeeAddToken is a free log subscription operation binding the contract event 0xd1c873cd16013f0dc5f37992c0d12794389698512895ec036a568e393b46e3c1.
  2016. //
  2017. // Solidity: event UpdateFeeAddToken(uint256 newFeeAddToken)
  2018. func (_Hermez *HermezFilterer) WatchUpdateFeeAddToken(opts *bind.WatchOpts, sink chan<- *HermezUpdateFeeAddToken) (event.Subscription, error) {
  2019. logs, sub, err := _Hermez.contract.WatchLogs(opts, "UpdateFeeAddToken")
  2020. if err != nil {
  2021. return nil, err
  2022. }
  2023. return event.NewSubscription(func(quit <-chan struct{}) error {
  2024. defer sub.Unsubscribe()
  2025. for {
  2026. select {
  2027. case log := <-logs:
  2028. // New log arrived, parse the event and forward to the user
  2029. event := new(HermezUpdateFeeAddToken)
  2030. if err := _Hermez.contract.UnpackLog(event, "UpdateFeeAddToken", log); err != nil {
  2031. return err
  2032. }
  2033. event.Raw = log
  2034. select {
  2035. case sink <- event:
  2036. case err := <-sub.Err():
  2037. return err
  2038. case <-quit:
  2039. return nil
  2040. }
  2041. case err := <-sub.Err():
  2042. return err
  2043. case <-quit:
  2044. return nil
  2045. }
  2046. }
  2047. }), nil
  2048. }
  2049. // ParseUpdateFeeAddToken is a log parse operation binding the contract event 0xd1c873cd16013f0dc5f37992c0d12794389698512895ec036a568e393b46e3c1.
  2050. //
  2051. // Solidity: event UpdateFeeAddToken(uint256 newFeeAddToken)
  2052. func (_Hermez *HermezFilterer) ParseUpdateFeeAddToken(log types.Log) (*HermezUpdateFeeAddToken, error) {
  2053. event := new(HermezUpdateFeeAddToken)
  2054. if err := _Hermez.contract.UnpackLog(event, "UpdateFeeAddToken", log); err != nil {
  2055. return nil, err
  2056. }
  2057. event.Raw = log
  2058. return event, nil
  2059. }
  2060. // HermezUpdateForgeL1L2BatchTimeoutIterator is returned from FilterUpdateForgeL1L2BatchTimeout and is used to iterate over the raw logs and unpacked data for UpdateForgeL1L2BatchTimeout events raised by the Hermez contract.
  2061. type HermezUpdateForgeL1L2BatchTimeoutIterator struct {
  2062. Event *HermezUpdateForgeL1L2BatchTimeout // Event containing the contract specifics and raw log
  2063. contract *bind.BoundContract // Generic contract to use for unpacking event data
  2064. event string // Event name to use for unpacking event data
  2065. logs chan types.Log // Log channel receiving the found contract events
  2066. sub ethereum.Subscription // Subscription for errors, completion and termination
  2067. done bool // Whether the subscription completed delivering logs
  2068. fail error // Occurred error to stop iteration
  2069. }
  2070. // Next advances the iterator to the subsequent event, returning whether there
  2071. // are any more events found. In case of a retrieval or parsing error, false is
  2072. // returned and Error() can be queried for the exact failure.
  2073. func (it *HermezUpdateForgeL1L2BatchTimeoutIterator) Next() bool {
  2074. // If the iterator failed, stop iterating
  2075. if it.fail != nil {
  2076. return false
  2077. }
  2078. // If the iterator completed, deliver directly whatever's available
  2079. if it.done {
  2080. select {
  2081. case log := <-it.logs:
  2082. it.Event = new(HermezUpdateForgeL1L2BatchTimeout)
  2083. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2084. it.fail = err
  2085. return false
  2086. }
  2087. it.Event.Raw = log
  2088. return true
  2089. default:
  2090. return false
  2091. }
  2092. }
  2093. // Iterator still in progress, wait for either a data or an error event
  2094. select {
  2095. case log := <-it.logs:
  2096. it.Event = new(HermezUpdateForgeL1L2BatchTimeout)
  2097. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2098. it.fail = err
  2099. return false
  2100. }
  2101. it.Event.Raw = log
  2102. return true
  2103. case err := <-it.sub.Err():
  2104. it.done = true
  2105. it.fail = err
  2106. return it.Next()
  2107. }
  2108. }
  2109. // Error returns any retrieval or parsing error occurred during filtering.
  2110. func (it *HermezUpdateForgeL1L2BatchTimeoutIterator) Error() error {
  2111. return it.fail
  2112. }
  2113. // Close terminates the iteration process, releasing any pending underlying
  2114. // resources.
  2115. func (it *HermezUpdateForgeL1L2BatchTimeoutIterator) Close() error {
  2116. it.sub.Unsubscribe()
  2117. return nil
  2118. }
  2119. // HermezUpdateForgeL1L2BatchTimeout represents a UpdateForgeL1L2BatchTimeout event raised by the Hermez contract.
  2120. type HermezUpdateForgeL1L2BatchTimeout struct {
  2121. NewForgeL1L2BatchTimeout uint8
  2122. Raw types.Log // Blockchain specific contextual infos
  2123. }
  2124. // FilterUpdateForgeL1L2BatchTimeout is a free log retrieval operation binding the contract event 0xff6221781ac525b04585dbb55cd2ebd2a92c828ca3e42b23813a1137ac974431.
  2125. //
  2126. // Solidity: event UpdateForgeL1L2BatchTimeout(uint8 newForgeL1L2BatchTimeout)
  2127. func (_Hermez *HermezFilterer) FilterUpdateForgeL1L2BatchTimeout(opts *bind.FilterOpts) (*HermezUpdateForgeL1L2BatchTimeoutIterator, error) {
  2128. logs, sub, err := _Hermez.contract.FilterLogs(opts, "UpdateForgeL1L2BatchTimeout")
  2129. if err != nil {
  2130. return nil, err
  2131. }
  2132. return &HermezUpdateForgeL1L2BatchTimeoutIterator{contract: _Hermez.contract, event: "UpdateForgeL1L2BatchTimeout", logs: logs, sub: sub}, nil
  2133. }
  2134. // WatchUpdateForgeL1L2BatchTimeout is a free log subscription operation binding the contract event 0xff6221781ac525b04585dbb55cd2ebd2a92c828ca3e42b23813a1137ac974431.
  2135. //
  2136. // Solidity: event UpdateForgeL1L2BatchTimeout(uint8 newForgeL1L2BatchTimeout)
  2137. func (_Hermez *HermezFilterer) WatchUpdateForgeL1L2BatchTimeout(opts *bind.WatchOpts, sink chan<- *HermezUpdateForgeL1L2BatchTimeout) (event.Subscription, error) {
  2138. logs, sub, err := _Hermez.contract.WatchLogs(opts, "UpdateForgeL1L2BatchTimeout")
  2139. if err != nil {
  2140. return nil, err
  2141. }
  2142. return event.NewSubscription(func(quit <-chan struct{}) error {
  2143. defer sub.Unsubscribe()
  2144. for {
  2145. select {
  2146. case log := <-logs:
  2147. // New log arrived, parse the event and forward to the user
  2148. event := new(HermezUpdateForgeL1L2BatchTimeout)
  2149. if err := _Hermez.contract.UnpackLog(event, "UpdateForgeL1L2BatchTimeout", log); err != nil {
  2150. return err
  2151. }
  2152. event.Raw = log
  2153. select {
  2154. case sink <- event:
  2155. case err := <-sub.Err():
  2156. return err
  2157. case <-quit:
  2158. return nil
  2159. }
  2160. case err := <-sub.Err():
  2161. return err
  2162. case <-quit:
  2163. return nil
  2164. }
  2165. }
  2166. }), nil
  2167. }
  2168. // ParseUpdateForgeL1L2BatchTimeout is a log parse operation binding the contract event 0xff6221781ac525b04585dbb55cd2ebd2a92c828ca3e42b23813a1137ac974431.
  2169. //
  2170. // Solidity: event UpdateForgeL1L2BatchTimeout(uint8 newForgeL1L2BatchTimeout)
  2171. func (_Hermez *HermezFilterer) ParseUpdateForgeL1L2BatchTimeout(log types.Log) (*HermezUpdateForgeL1L2BatchTimeout, error) {
  2172. event := new(HermezUpdateForgeL1L2BatchTimeout)
  2173. if err := _Hermez.contract.UnpackLog(event, "UpdateForgeL1L2BatchTimeout", log); err != nil {
  2174. return nil, err
  2175. }
  2176. event.Raw = log
  2177. return event, nil
  2178. }
  2179. // HermezUpdateTokenExchangeIterator is returned from FilterUpdateTokenExchange and is used to iterate over the raw logs and unpacked data for UpdateTokenExchange events raised by the Hermez contract.
  2180. type HermezUpdateTokenExchangeIterator struct {
  2181. Event *HermezUpdateTokenExchange // Event containing the contract specifics and raw log
  2182. contract *bind.BoundContract // Generic contract to use for unpacking event data
  2183. event string // Event name to use for unpacking event data
  2184. logs chan types.Log // Log channel receiving the found contract events
  2185. sub ethereum.Subscription // Subscription for errors, completion and termination
  2186. done bool // Whether the subscription completed delivering logs
  2187. fail error // Occurred error to stop iteration
  2188. }
  2189. // Next advances the iterator to the subsequent event, returning whether there
  2190. // are any more events found. In case of a retrieval or parsing error, false is
  2191. // returned and Error() can be queried for the exact failure.
  2192. func (it *HermezUpdateTokenExchangeIterator) Next() bool {
  2193. // If the iterator failed, stop iterating
  2194. if it.fail != nil {
  2195. return false
  2196. }
  2197. // If the iterator completed, deliver directly whatever's available
  2198. if it.done {
  2199. select {
  2200. case log := <-it.logs:
  2201. it.Event = new(HermezUpdateTokenExchange)
  2202. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2203. it.fail = err
  2204. return false
  2205. }
  2206. it.Event.Raw = log
  2207. return true
  2208. default:
  2209. return false
  2210. }
  2211. }
  2212. // Iterator still in progress, wait for either a data or an error event
  2213. select {
  2214. case log := <-it.logs:
  2215. it.Event = new(HermezUpdateTokenExchange)
  2216. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2217. it.fail = err
  2218. return false
  2219. }
  2220. it.Event.Raw = log
  2221. return true
  2222. case err := <-it.sub.Err():
  2223. it.done = true
  2224. it.fail = err
  2225. return it.Next()
  2226. }
  2227. }
  2228. // Error returns any retrieval or parsing error occurred during filtering.
  2229. func (it *HermezUpdateTokenExchangeIterator) Error() error {
  2230. return it.fail
  2231. }
  2232. // Close terminates the iteration process, releasing any pending underlying
  2233. // resources.
  2234. func (it *HermezUpdateTokenExchangeIterator) Close() error {
  2235. it.sub.Unsubscribe()
  2236. return nil
  2237. }
  2238. // HermezUpdateTokenExchange represents a UpdateTokenExchange event raised by the Hermez contract.
  2239. type HermezUpdateTokenExchange struct {
  2240. AddressArray []common.Address
  2241. ValueArray []uint64
  2242. Raw types.Log // Blockchain specific contextual infos
  2243. }
  2244. // FilterUpdateTokenExchange is a free log retrieval operation binding the contract event 0x10ff643ebeca3e33002e61b76fa85e7e10091e30afa39295f91af9838b3033b3.
  2245. //
  2246. // Solidity: event UpdateTokenExchange(address[] addressArray, uint64[] valueArray)
  2247. func (_Hermez *HermezFilterer) FilterUpdateTokenExchange(opts *bind.FilterOpts) (*HermezUpdateTokenExchangeIterator, error) {
  2248. logs, sub, err := _Hermez.contract.FilterLogs(opts, "UpdateTokenExchange")
  2249. if err != nil {
  2250. return nil, err
  2251. }
  2252. return &HermezUpdateTokenExchangeIterator{contract: _Hermez.contract, event: "UpdateTokenExchange", logs: logs, sub: sub}, nil
  2253. }
  2254. // WatchUpdateTokenExchange is a free log subscription operation binding the contract event 0x10ff643ebeca3e33002e61b76fa85e7e10091e30afa39295f91af9838b3033b3.
  2255. //
  2256. // Solidity: event UpdateTokenExchange(address[] addressArray, uint64[] valueArray)
  2257. func (_Hermez *HermezFilterer) WatchUpdateTokenExchange(opts *bind.WatchOpts, sink chan<- *HermezUpdateTokenExchange) (event.Subscription, error) {
  2258. logs, sub, err := _Hermez.contract.WatchLogs(opts, "UpdateTokenExchange")
  2259. if err != nil {
  2260. return nil, err
  2261. }
  2262. return event.NewSubscription(func(quit <-chan struct{}) error {
  2263. defer sub.Unsubscribe()
  2264. for {
  2265. select {
  2266. case log := <-logs:
  2267. // New log arrived, parse the event and forward to the user
  2268. event := new(HermezUpdateTokenExchange)
  2269. if err := _Hermez.contract.UnpackLog(event, "UpdateTokenExchange", log); err != nil {
  2270. return err
  2271. }
  2272. event.Raw = log
  2273. select {
  2274. case sink <- event:
  2275. case err := <-sub.Err():
  2276. return err
  2277. case <-quit:
  2278. return nil
  2279. }
  2280. case err := <-sub.Err():
  2281. return err
  2282. case <-quit:
  2283. return nil
  2284. }
  2285. }
  2286. }), nil
  2287. }
  2288. // ParseUpdateTokenExchange is a log parse operation binding the contract event 0x10ff643ebeca3e33002e61b76fa85e7e10091e30afa39295f91af9838b3033b3.
  2289. //
  2290. // Solidity: event UpdateTokenExchange(address[] addressArray, uint64[] valueArray)
  2291. func (_Hermez *HermezFilterer) ParseUpdateTokenExchange(log types.Log) (*HermezUpdateTokenExchange, error) {
  2292. event := new(HermezUpdateTokenExchange)
  2293. if err := _Hermez.contract.UnpackLog(event, "UpdateTokenExchange", log); err != nil {
  2294. return nil, err
  2295. }
  2296. event.Raw = log
  2297. return event, nil
  2298. }
  2299. // HermezUpdateWithdrawalDelayIterator is returned from FilterUpdateWithdrawalDelay and is used to iterate over the raw logs and unpacked data for UpdateWithdrawalDelay events raised by the Hermez contract.
  2300. type HermezUpdateWithdrawalDelayIterator struct {
  2301. Event *HermezUpdateWithdrawalDelay // Event containing the contract specifics and raw log
  2302. contract *bind.BoundContract // Generic contract to use for unpacking event data
  2303. event string // Event name to use for unpacking event data
  2304. logs chan types.Log // Log channel receiving the found contract events
  2305. sub ethereum.Subscription // Subscription for errors, completion and termination
  2306. done bool // Whether the subscription completed delivering logs
  2307. fail error // Occurred error to stop iteration
  2308. }
  2309. // Next advances the iterator to the subsequent event, returning whether there
  2310. // are any more events found. In case of a retrieval or parsing error, false is
  2311. // returned and Error() can be queried for the exact failure.
  2312. func (it *HermezUpdateWithdrawalDelayIterator) Next() bool {
  2313. // If the iterator failed, stop iterating
  2314. if it.fail != nil {
  2315. return false
  2316. }
  2317. // If the iterator completed, deliver directly whatever's available
  2318. if it.done {
  2319. select {
  2320. case log := <-it.logs:
  2321. it.Event = new(HermezUpdateWithdrawalDelay)
  2322. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2323. it.fail = err
  2324. return false
  2325. }
  2326. it.Event.Raw = log
  2327. return true
  2328. default:
  2329. return false
  2330. }
  2331. }
  2332. // Iterator still in progress, wait for either a data or an error event
  2333. select {
  2334. case log := <-it.logs:
  2335. it.Event = new(HermezUpdateWithdrawalDelay)
  2336. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2337. it.fail = err
  2338. return false
  2339. }
  2340. it.Event.Raw = log
  2341. return true
  2342. case err := <-it.sub.Err():
  2343. it.done = true
  2344. it.fail = err
  2345. return it.Next()
  2346. }
  2347. }
  2348. // Error returns any retrieval or parsing error occurred during filtering.
  2349. func (it *HermezUpdateWithdrawalDelayIterator) Error() error {
  2350. return it.fail
  2351. }
  2352. // Close terminates the iteration process, releasing any pending underlying
  2353. // resources.
  2354. func (it *HermezUpdateWithdrawalDelayIterator) Close() error {
  2355. it.sub.Unsubscribe()
  2356. return nil
  2357. }
  2358. // HermezUpdateWithdrawalDelay represents a UpdateWithdrawalDelay event raised by the Hermez contract.
  2359. type HermezUpdateWithdrawalDelay struct {
  2360. NewWithdrawalDelay uint64
  2361. Raw types.Log // Blockchain specific contextual infos
  2362. }
  2363. // FilterUpdateWithdrawalDelay is a free log retrieval operation binding the contract event 0x9db302c4547a21fb20a3a794e5f63ee87eb6e4afc3325ebdadba2d1fb4a90737.
  2364. //
  2365. // Solidity: event UpdateWithdrawalDelay(uint64 newWithdrawalDelay)
  2366. func (_Hermez *HermezFilterer) FilterUpdateWithdrawalDelay(opts *bind.FilterOpts) (*HermezUpdateWithdrawalDelayIterator, error) {
  2367. logs, sub, err := _Hermez.contract.FilterLogs(opts, "UpdateWithdrawalDelay")
  2368. if err != nil {
  2369. return nil, err
  2370. }
  2371. return &HermezUpdateWithdrawalDelayIterator{contract: _Hermez.contract, event: "UpdateWithdrawalDelay", logs: logs, sub: sub}, nil
  2372. }
  2373. // WatchUpdateWithdrawalDelay is a free log subscription operation binding the contract event 0x9db302c4547a21fb20a3a794e5f63ee87eb6e4afc3325ebdadba2d1fb4a90737.
  2374. //
  2375. // Solidity: event UpdateWithdrawalDelay(uint64 newWithdrawalDelay)
  2376. func (_Hermez *HermezFilterer) WatchUpdateWithdrawalDelay(opts *bind.WatchOpts, sink chan<- *HermezUpdateWithdrawalDelay) (event.Subscription, error) {
  2377. logs, sub, err := _Hermez.contract.WatchLogs(opts, "UpdateWithdrawalDelay")
  2378. if err != nil {
  2379. return nil, err
  2380. }
  2381. return event.NewSubscription(func(quit <-chan struct{}) error {
  2382. defer sub.Unsubscribe()
  2383. for {
  2384. select {
  2385. case log := <-logs:
  2386. // New log arrived, parse the event and forward to the user
  2387. event := new(HermezUpdateWithdrawalDelay)
  2388. if err := _Hermez.contract.UnpackLog(event, "UpdateWithdrawalDelay", log); err != nil {
  2389. return err
  2390. }
  2391. event.Raw = log
  2392. select {
  2393. case sink <- event:
  2394. case err := <-sub.Err():
  2395. return err
  2396. case <-quit:
  2397. return nil
  2398. }
  2399. case err := <-sub.Err():
  2400. return err
  2401. case <-quit:
  2402. return nil
  2403. }
  2404. }
  2405. }), nil
  2406. }
  2407. // ParseUpdateWithdrawalDelay is a log parse operation binding the contract event 0x9db302c4547a21fb20a3a794e5f63ee87eb6e4afc3325ebdadba2d1fb4a90737.
  2408. //
  2409. // Solidity: event UpdateWithdrawalDelay(uint64 newWithdrawalDelay)
  2410. func (_Hermez *HermezFilterer) ParseUpdateWithdrawalDelay(log types.Log) (*HermezUpdateWithdrawalDelay, error) {
  2411. event := new(HermezUpdateWithdrawalDelay)
  2412. if err := _Hermez.contract.UnpackLog(event, "UpdateWithdrawalDelay", log); err != nil {
  2413. return nil, err
  2414. }
  2415. event.Raw = log
  2416. return event, nil
  2417. }
  2418. // HermezWithdrawEventIterator is returned from FilterWithdrawEvent and is used to iterate over the raw logs and unpacked data for WithdrawEvent events raised by the Hermez contract.
  2419. type HermezWithdrawEventIterator struct {
  2420. Event *HermezWithdrawEvent // Event containing the contract specifics and raw log
  2421. contract *bind.BoundContract // Generic contract to use for unpacking event data
  2422. event string // Event name to use for unpacking event data
  2423. logs chan types.Log // Log channel receiving the found contract events
  2424. sub ethereum.Subscription // Subscription for errors, completion and termination
  2425. done bool // Whether the subscription completed delivering logs
  2426. fail error // Occurred error to stop iteration
  2427. }
  2428. // Next advances the iterator to the subsequent event, returning whether there
  2429. // are any more events found. In case of a retrieval or parsing error, false is
  2430. // returned and Error() can be queried for the exact failure.
  2431. func (it *HermezWithdrawEventIterator) Next() bool {
  2432. // If the iterator failed, stop iterating
  2433. if it.fail != nil {
  2434. return false
  2435. }
  2436. // If the iterator completed, deliver directly whatever's available
  2437. if it.done {
  2438. select {
  2439. case log := <-it.logs:
  2440. it.Event = new(HermezWithdrawEvent)
  2441. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2442. it.fail = err
  2443. return false
  2444. }
  2445. it.Event.Raw = log
  2446. return true
  2447. default:
  2448. return false
  2449. }
  2450. }
  2451. // Iterator still in progress, wait for either a data or an error event
  2452. select {
  2453. case log := <-it.logs:
  2454. it.Event = new(HermezWithdrawEvent)
  2455. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2456. it.fail = err
  2457. return false
  2458. }
  2459. it.Event.Raw = log
  2460. return true
  2461. case err := <-it.sub.Err():
  2462. it.done = true
  2463. it.fail = err
  2464. return it.Next()
  2465. }
  2466. }
  2467. // Error returns any retrieval or parsing error occurred during filtering.
  2468. func (it *HermezWithdrawEventIterator) Error() error {
  2469. return it.fail
  2470. }
  2471. // Close terminates the iteration process, releasing any pending underlying
  2472. // resources.
  2473. func (it *HermezWithdrawEventIterator) Close() error {
  2474. it.sub.Unsubscribe()
  2475. return nil
  2476. }
  2477. // HermezWithdrawEvent represents a WithdrawEvent event raised by the Hermez contract.
  2478. type HermezWithdrawEvent struct {
  2479. Idx *big.Int
  2480. NumExitRoot uint32
  2481. InstantWithdraw bool
  2482. Raw types.Log // Blockchain specific contextual infos
  2483. }
  2484. // FilterWithdrawEvent is a free log retrieval operation binding the contract event 0x69177d798b38e27bcc4e0338307e4f1490e12d1006729d0e6e9cc82a8732f415.
  2485. //
  2486. // Solidity: event WithdrawEvent(uint48 indexed idx, uint32 indexed numExitRoot, bool indexed instantWithdraw)
  2487. func (_Hermez *HermezFilterer) FilterWithdrawEvent(opts *bind.FilterOpts, idx []*big.Int, numExitRoot []uint32, instantWithdraw []bool) (*HermezWithdrawEventIterator, error) {
  2488. var idxRule []interface{}
  2489. for _, idxItem := range idx {
  2490. idxRule = append(idxRule, idxItem)
  2491. }
  2492. var numExitRootRule []interface{}
  2493. for _, numExitRootItem := range numExitRoot {
  2494. numExitRootRule = append(numExitRootRule, numExitRootItem)
  2495. }
  2496. var instantWithdrawRule []interface{}
  2497. for _, instantWithdrawItem := range instantWithdraw {
  2498. instantWithdrawRule = append(instantWithdrawRule, instantWithdrawItem)
  2499. }
  2500. logs, sub, err := _Hermez.contract.FilterLogs(opts, "WithdrawEvent", idxRule, numExitRootRule, instantWithdrawRule)
  2501. if err != nil {
  2502. return nil, err
  2503. }
  2504. return &HermezWithdrawEventIterator{contract: _Hermez.contract, event: "WithdrawEvent", logs: logs, sub: sub}, nil
  2505. }
  2506. // WatchWithdrawEvent is a free log subscription operation binding the contract event 0x69177d798b38e27bcc4e0338307e4f1490e12d1006729d0e6e9cc82a8732f415.
  2507. //
  2508. // Solidity: event WithdrawEvent(uint48 indexed idx, uint32 indexed numExitRoot, bool indexed instantWithdraw)
  2509. func (_Hermez *HermezFilterer) WatchWithdrawEvent(opts *bind.WatchOpts, sink chan<- *HermezWithdrawEvent, idx []*big.Int, numExitRoot []uint32, instantWithdraw []bool) (event.Subscription, error) {
  2510. var idxRule []interface{}
  2511. for _, idxItem := range idx {
  2512. idxRule = append(idxRule, idxItem)
  2513. }
  2514. var numExitRootRule []interface{}
  2515. for _, numExitRootItem := range numExitRoot {
  2516. numExitRootRule = append(numExitRootRule, numExitRootItem)
  2517. }
  2518. var instantWithdrawRule []interface{}
  2519. for _, instantWithdrawItem := range instantWithdraw {
  2520. instantWithdrawRule = append(instantWithdrawRule, instantWithdrawItem)
  2521. }
  2522. logs, sub, err := _Hermez.contract.WatchLogs(opts, "WithdrawEvent", idxRule, numExitRootRule, instantWithdrawRule)
  2523. if err != nil {
  2524. return nil, err
  2525. }
  2526. return event.NewSubscription(func(quit <-chan struct{}) error {
  2527. defer sub.Unsubscribe()
  2528. for {
  2529. select {
  2530. case log := <-logs:
  2531. // New log arrived, parse the event and forward to the user
  2532. event := new(HermezWithdrawEvent)
  2533. if err := _Hermez.contract.UnpackLog(event, "WithdrawEvent", log); err != nil {
  2534. return err
  2535. }
  2536. event.Raw = log
  2537. select {
  2538. case sink <- event:
  2539. case err := <-sub.Err():
  2540. return err
  2541. case <-quit:
  2542. return nil
  2543. }
  2544. case err := <-sub.Err():
  2545. return err
  2546. case <-quit:
  2547. return nil
  2548. }
  2549. }
  2550. }), nil
  2551. }
  2552. // ParseWithdrawEvent is a log parse operation binding the contract event 0x69177d798b38e27bcc4e0338307e4f1490e12d1006729d0e6e9cc82a8732f415.
  2553. //
  2554. // Solidity: event WithdrawEvent(uint48 indexed idx, uint32 indexed numExitRoot, bool indexed instantWithdraw)
  2555. func (_Hermez *HermezFilterer) ParseWithdrawEvent(log types.Log) (*HermezWithdrawEvent, error) {
  2556. event := new(HermezWithdrawEvent)
  2557. if err := _Hermez.contract.UnpackLog(event, "WithdrawEvent", log); err != nil {
  2558. return nil, err
  2559. }
  2560. event.Raw = log
  2561. return event, nil
  2562. }