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.

3355 lines
145 KiB

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