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.

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