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.

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