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.

1910 lines
86 KiB

  1. // Code generated - DO NOT EDIT.
  2. // This file is a generated binding and any manual changes will be lost.
  3. package WithdrawalDelayer
  4. import (
  5. "math/big"
  6. "strings"
  7. ethereum "github.com/ethereum/go-ethereum"
  8. "github.com/ethereum/go-ethereum/accounts/abi"
  9. "github.com/ethereum/go-ethereum/accounts/abi/bind"
  10. "github.com/ethereum/go-ethereum/common"
  11. "github.com/ethereum/go-ethereum/core/types"
  12. "github.com/ethereum/go-ethereum/event"
  13. "github.com/hermeznetwork/tracerr"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var (
  17. _ = big.NewInt
  18. _ = strings.NewReader
  19. _ = ethereum.NotFound
  20. _ = bind.Bind
  21. _ = common.Big1
  22. _ = types.BloomLookup
  23. _ = event.NewSubscription
  24. )
  25. // WithdrawalDelayerABI is the input ABI used to generate the binding from.
  26. const WithdrawalDelayerABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint192\",\"name\":\"amount\",\"type\":\"uint192\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"depositTimestamp\",\"type\":\"uint64\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EmergencyModeEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"EscapeHatchWithdrawal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"initialWithdrawalDelay\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initialHermezGovernanceAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initialEmergencyCouncil\",\"type\":\"address\"}],\"name\":\"InitializeWithdrawalDelayerEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newEmergencyCouncil\",\"type\":\"address\"}],\"name\":\"NewEmergencyCouncil\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newHermezGovernanceAddress\",\"type\":\"address\"}],\"name\":\"NewHermezGovernanceAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"withdrawalDelay\",\"type\":\"uint64\"}],\"name\":\"NewWithdrawalDelay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint192\",\"name\":\"amount\",\"type\":\"uint192\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_EMERGENCY_MODE_TIME\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_WITHDRAWAL_DELAY\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_newWithdrawalDelay\",\"type\":\"uint64\"}],\"name\":\"changeWithdrawalDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimEmergencyCouncil\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint192\",\"name\":\"_amount\",\"type\":\"uint192\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"depositInfo\",\"outputs\":[{\"internalType\":\"uint192\",\"name\":\"\",\"type\":\"uint192\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"deposits\",\"outputs\":[{\"internalType\":\"uint192\",\"name\":\"amount\",\"type\":\"uint192\"},{\"internalType\":\"uint64\",\"name\":\"depositTimestamp\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enableEmergencyMode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"escapeHatchWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getEmergencyCouncil\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getEmergencyModeStartingTime\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHermezGovernanceAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWithdrawalDelay\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hermezRollupAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isEmergencyMode\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingEmergencyCouncil\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingGovernance\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"newEmergencyCouncil\",\"type\":\"address\"}],\"name\":\"transferEmergencyCouncil\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newGovernance\",\"type\":\"address\"}],\"name\":\"transferGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"withdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_initialWithdrawalDelay\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_initialHermezRollup\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_initialHermezGovernanceAddress\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"_initialEmergencyCouncil\",\"type\":\"address\"}],\"name\":\"withdrawalDelayerInitializer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
  27. // WithdrawalDelayer is an auto generated Go binding around an Ethereum contract.
  28. type WithdrawalDelayer struct {
  29. WithdrawalDelayerCaller // Read-only binding to the contract
  30. WithdrawalDelayerTransactor // Write-only binding to the contract
  31. WithdrawalDelayerFilterer // Log filterer for contract events
  32. }
  33. // WithdrawalDelayerCaller is an auto generated read-only Go binding around an Ethereum contract.
  34. type WithdrawalDelayerCaller struct {
  35. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  36. }
  37. // WithdrawalDelayerTransactor is an auto generated write-only Go binding around an Ethereum contract.
  38. type WithdrawalDelayerTransactor struct {
  39. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  40. }
  41. // WithdrawalDelayerFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  42. type WithdrawalDelayerFilterer struct {
  43. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  44. }
  45. // WithdrawalDelayerSession is an auto generated Go binding around an Ethereum contract,
  46. // with pre-set call and transact options.
  47. type WithdrawalDelayerSession struct {
  48. Contract *WithdrawalDelayer // Generic contract binding to set the session for
  49. CallOpts bind.CallOpts // Call options to use throughout this session
  50. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  51. }
  52. // WithdrawalDelayerCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  53. // with pre-set call options.
  54. type WithdrawalDelayerCallerSession struct {
  55. Contract *WithdrawalDelayerCaller // Generic contract caller binding to set the session for
  56. CallOpts bind.CallOpts // Call options to use throughout this session
  57. }
  58. // WithdrawalDelayerTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  59. // with pre-set transact options.
  60. type WithdrawalDelayerTransactorSession struct {
  61. Contract *WithdrawalDelayerTransactor // Generic contract transactor binding to set the session for
  62. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  63. }
  64. // WithdrawalDelayerRaw is an auto generated low-level Go binding around an Ethereum contract.
  65. type WithdrawalDelayerRaw struct {
  66. Contract *WithdrawalDelayer // Generic contract binding to access the raw methods on
  67. }
  68. // WithdrawalDelayerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  69. type WithdrawalDelayerCallerRaw struct {
  70. Contract *WithdrawalDelayerCaller // Generic read-only contract binding to access the raw methods on
  71. }
  72. // WithdrawalDelayerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  73. type WithdrawalDelayerTransactorRaw struct {
  74. Contract *WithdrawalDelayerTransactor // Generic write-only contract binding to access the raw methods on
  75. }
  76. // NewWithdrawalDelayer creates a new instance of WithdrawalDelayer, bound to a specific deployed contract.
  77. func NewWithdrawalDelayer(address common.Address, backend bind.ContractBackend) (*WithdrawalDelayer, error) {
  78. contract, err := bindWithdrawalDelayer(address, backend, backend, backend)
  79. if err != nil {
  80. return nil, tracerr.Wrap(err)
  81. }
  82. return &WithdrawalDelayer{WithdrawalDelayerCaller: WithdrawalDelayerCaller{contract: contract}, WithdrawalDelayerTransactor: WithdrawalDelayerTransactor{contract: contract}, WithdrawalDelayerFilterer: WithdrawalDelayerFilterer{contract: contract}}, nil
  83. }
  84. // NewWithdrawalDelayerCaller creates a new read-only instance of WithdrawalDelayer, bound to a specific deployed contract.
  85. func NewWithdrawalDelayerCaller(address common.Address, caller bind.ContractCaller) (*WithdrawalDelayerCaller, error) {
  86. contract, err := bindWithdrawalDelayer(address, caller, nil, nil)
  87. if err != nil {
  88. return nil, tracerr.Wrap(err)
  89. }
  90. return &WithdrawalDelayerCaller{contract: contract}, nil
  91. }
  92. // NewWithdrawalDelayerTransactor creates a new write-only instance of WithdrawalDelayer, bound to a specific deployed contract.
  93. func NewWithdrawalDelayerTransactor(address common.Address, transactor bind.ContractTransactor) (*WithdrawalDelayerTransactor, error) {
  94. contract, err := bindWithdrawalDelayer(address, nil, transactor, nil)
  95. if err != nil {
  96. return nil, tracerr.Wrap(err)
  97. }
  98. return &WithdrawalDelayerTransactor{contract: contract}, nil
  99. }
  100. // NewWithdrawalDelayerFilterer creates a new log filterer instance of WithdrawalDelayer, bound to a specific deployed contract.
  101. func NewWithdrawalDelayerFilterer(address common.Address, filterer bind.ContractFilterer) (*WithdrawalDelayerFilterer, error) {
  102. contract, err := bindWithdrawalDelayer(address, nil, nil, filterer)
  103. if err != nil {
  104. return nil, tracerr.Wrap(err)
  105. }
  106. return &WithdrawalDelayerFilterer{contract: contract}, nil
  107. }
  108. // bindWithdrawalDelayer binds a generic wrapper to an already deployed contract.
  109. func bindWithdrawalDelayer(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  110. parsed, err := abi.JSON(strings.NewReader(WithdrawalDelayerABI))
  111. if err != nil {
  112. return nil, tracerr.Wrap(err)
  113. }
  114. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  115. }
  116. // Call invokes the (constant) contract method with params as input values and
  117. // sets the output to result. The result type might be a single field for simple
  118. // returns, a slice of interfaces for anonymous returns and a struct for named
  119. // returns.
  120. func (_WithdrawalDelayer *WithdrawalDelayerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  121. return _WithdrawalDelayer.Contract.WithdrawalDelayerCaller.contract.Call(opts, result, method, params...)
  122. }
  123. // Transfer initiates a plain transaction to move funds to the contract, calling
  124. // its default method if one is available.
  125. func (_WithdrawalDelayer *WithdrawalDelayerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  126. return _WithdrawalDelayer.Contract.WithdrawalDelayerTransactor.contract.Transfer(opts)
  127. }
  128. // Transact invokes the (paid) contract method with params as input values.
  129. func (_WithdrawalDelayer *WithdrawalDelayerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  130. return _WithdrawalDelayer.Contract.WithdrawalDelayerTransactor.contract.Transact(opts, method, params...)
  131. }
  132. // Call invokes the (constant) contract method with params as input values and
  133. // sets the output to result. The result type might be a single field for simple
  134. // returns, a slice of interfaces for anonymous returns and a struct for named
  135. // returns.
  136. func (_WithdrawalDelayer *WithdrawalDelayerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  137. return _WithdrawalDelayer.Contract.contract.Call(opts, result, method, params...)
  138. }
  139. // Transfer initiates a plain transaction to move funds to the contract, calling
  140. // its default method if one is available.
  141. func (_WithdrawalDelayer *WithdrawalDelayerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  142. return _WithdrawalDelayer.Contract.contract.Transfer(opts)
  143. }
  144. // Transact invokes the (paid) contract method with params as input values.
  145. func (_WithdrawalDelayer *WithdrawalDelayerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  146. return _WithdrawalDelayer.Contract.contract.Transact(opts, method, params...)
  147. }
  148. // MAXEMERGENCYMODETIME is a free data retrieval call binding the contract method 0xb4b8e39d.
  149. //
  150. // Solidity: function MAX_EMERGENCY_MODE_TIME() view returns(uint64)
  151. func (_WithdrawalDelayer *WithdrawalDelayerCaller) MAXEMERGENCYMODETIME(opts *bind.CallOpts) (uint64, error) {
  152. var out []interface{}
  153. err := _WithdrawalDelayer.contract.Call(opts, &out, "MAX_EMERGENCY_MODE_TIME")
  154. if err != nil {
  155. return *new(uint64), tracerr.Wrap(err)
  156. }
  157. out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
  158. return out0, tracerr.Wrap(err)
  159. }
  160. // MAXEMERGENCYMODETIME is a free data retrieval call binding the contract method 0xb4b8e39d.
  161. //
  162. // Solidity: function MAX_EMERGENCY_MODE_TIME() view returns(uint64)
  163. func (_WithdrawalDelayer *WithdrawalDelayerSession) MAXEMERGENCYMODETIME() (uint64, error) {
  164. return _WithdrawalDelayer.Contract.MAXEMERGENCYMODETIME(&_WithdrawalDelayer.CallOpts)
  165. }
  166. // MAXEMERGENCYMODETIME is a free data retrieval call binding the contract method 0xb4b8e39d.
  167. //
  168. // Solidity: function MAX_EMERGENCY_MODE_TIME() view returns(uint64)
  169. func (_WithdrawalDelayer *WithdrawalDelayerCallerSession) MAXEMERGENCYMODETIME() (uint64, error) {
  170. return _WithdrawalDelayer.Contract.MAXEMERGENCYMODETIME(&_WithdrawalDelayer.CallOpts)
  171. }
  172. // MAXWITHDRAWALDELAY is a free data retrieval call binding the contract method 0xa238f9df.
  173. //
  174. // Solidity: function MAX_WITHDRAWAL_DELAY() view returns(uint64)
  175. func (_WithdrawalDelayer *WithdrawalDelayerCaller) MAXWITHDRAWALDELAY(opts *bind.CallOpts) (uint64, error) {
  176. var out []interface{}
  177. err := _WithdrawalDelayer.contract.Call(opts, &out, "MAX_WITHDRAWAL_DELAY")
  178. if err != nil {
  179. return *new(uint64), tracerr.Wrap(err)
  180. }
  181. out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
  182. return out0, tracerr.Wrap(err)
  183. }
  184. // MAXWITHDRAWALDELAY is a free data retrieval call binding the contract method 0xa238f9df.
  185. //
  186. // Solidity: function MAX_WITHDRAWAL_DELAY() view returns(uint64)
  187. func (_WithdrawalDelayer *WithdrawalDelayerSession) MAXWITHDRAWALDELAY() (uint64, error) {
  188. return _WithdrawalDelayer.Contract.MAXWITHDRAWALDELAY(&_WithdrawalDelayer.CallOpts)
  189. }
  190. // MAXWITHDRAWALDELAY is a free data retrieval call binding the contract method 0xa238f9df.
  191. //
  192. // Solidity: function MAX_WITHDRAWAL_DELAY() view returns(uint64)
  193. func (_WithdrawalDelayer *WithdrawalDelayerCallerSession) MAXWITHDRAWALDELAY() (uint64, error) {
  194. return _WithdrawalDelayer.Contract.MAXWITHDRAWALDELAY(&_WithdrawalDelayer.CallOpts)
  195. }
  196. // DepositInfo is a free data retrieval call binding the contract method 0x493b0170.
  197. //
  198. // Solidity: function depositInfo(address _owner, address _token) view returns(uint192, uint64)
  199. func (_WithdrawalDelayer *WithdrawalDelayerCaller) DepositInfo(opts *bind.CallOpts, _owner common.Address, _token common.Address) (*big.Int, uint64, error) {
  200. var out []interface{}
  201. err := _WithdrawalDelayer.contract.Call(opts, &out, "depositInfo", _owner, _token)
  202. if err != nil {
  203. return *new(*big.Int), *new(uint64), tracerr.Wrap(err)
  204. }
  205. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  206. out1 := *abi.ConvertType(out[1], new(uint64)).(*uint64)
  207. return out0, out1, tracerr.Wrap(err)
  208. }
  209. // DepositInfo is a free data retrieval call binding the contract method 0x493b0170.
  210. //
  211. // Solidity: function depositInfo(address _owner, address _token) view returns(uint192, uint64)
  212. func (_WithdrawalDelayer *WithdrawalDelayerSession) DepositInfo(_owner common.Address, _token common.Address) (*big.Int, uint64, error) {
  213. return _WithdrawalDelayer.Contract.DepositInfo(&_WithdrawalDelayer.CallOpts, _owner, _token)
  214. }
  215. // DepositInfo is a free data retrieval call binding the contract method 0x493b0170.
  216. //
  217. // Solidity: function depositInfo(address _owner, address _token) view returns(uint192, uint64)
  218. func (_WithdrawalDelayer *WithdrawalDelayerCallerSession) DepositInfo(_owner common.Address, _token common.Address) (*big.Int, uint64, error) {
  219. return _WithdrawalDelayer.Contract.DepositInfo(&_WithdrawalDelayer.CallOpts, _owner, _token)
  220. }
  221. // Deposits is a free data retrieval call binding the contract method 0x3d4dff7b.
  222. //
  223. // Solidity: function deposits(bytes32 ) view returns(uint192 amount, uint64 depositTimestamp)
  224. func (_WithdrawalDelayer *WithdrawalDelayerCaller) Deposits(opts *bind.CallOpts, arg0 [32]byte) (struct {
  225. Amount *big.Int
  226. DepositTimestamp uint64
  227. }, error) {
  228. var out []interface{}
  229. err := _WithdrawalDelayer.contract.Call(opts, &out, "deposits", arg0)
  230. outstruct := new(struct {
  231. Amount *big.Int
  232. DepositTimestamp uint64
  233. })
  234. outstruct.Amount = out[0].(*big.Int)
  235. outstruct.DepositTimestamp = out[1].(uint64)
  236. return *outstruct, tracerr.Wrap(err)
  237. }
  238. // Deposits is a free data retrieval call binding the contract method 0x3d4dff7b.
  239. //
  240. // Solidity: function deposits(bytes32 ) view returns(uint192 amount, uint64 depositTimestamp)
  241. func (_WithdrawalDelayer *WithdrawalDelayerSession) Deposits(arg0 [32]byte) (struct {
  242. Amount *big.Int
  243. DepositTimestamp uint64
  244. }, error) {
  245. return _WithdrawalDelayer.Contract.Deposits(&_WithdrawalDelayer.CallOpts, arg0)
  246. }
  247. // Deposits is a free data retrieval call binding the contract method 0x3d4dff7b.
  248. //
  249. // Solidity: function deposits(bytes32 ) view returns(uint192 amount, uint64 depositTimestamp)
  250. func (_WithdrawalDelayer *WithdrawalDelayerCallerSession) Deposits(arg0 [32]byte) (struct {
  251. Amount *big.Int
  252. DepositTimestamp uint64
  253. }, error) {
  254. return _WithdrawalDelayer.Contract.Deposits(&_WithdrawalDelayer.CallOpts, arg0)
  255. }
  256. // GetEmergencyCouncil is a free data retrieval call binding the contract method 0x99ef11c5.
  257. //
  258. // Solidity: function getEmergencyCouncil() view returns(address)
  259. func (_WithdrawalDelayer *WithdrawalDelayerCaller) GetEmergencyCouncil(opts *bind.CallOpts) (common.Address, error) {
  260. var out []interface{}
  261. err := _WithdrawalDelayer.contract.Call(opts, &out, "getEmergencyCouncil")
  262. if err != nil {
  263. return *new(common.Address), tracerr.Wrap(err)
  264. }
  265. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  266. return out0, tracerr.Wrap(err)
  267. }
  268. // GetEmergencyCouncil is a free data retrieval call binding the contract method 0x99ef11c5.
  269. //
  270. // Solidity: function getEmergencyCouncil() view returns(address)
  271. func (_WithdrawalDelayer *WithdrawalDelayerSession) GetEmergencyCouncil() (common.Address, error) {
  272. return _WithdrawalDelayer.Contract.GetEmergencyCouncil(&_WithdrawalDelayer.CallOpts)
  273. }
  274. // GetEmergencyCouncil is a free data retrieval call binding the contract method 0x99ef11c5.
  275. //
  276. // Solidity: function getEmergencyCouncil() view returns(address)
  277. func (_WithdrawalDelayer *WithdrawalDelayerCallerSession) GetEmergencyCouncil() (common.Address, error) {
  278. return _WithdrawalDelayer.Contract.GetEmergencyCouncil(&_WithdrawalDelayer.CallOpts)
  279. }
  280. // GetEmergencyModeStartingTime is a free data retrieval call binding the contract method 0x668cdd67.
  281. //
  282. // Solidity: function getEmergencyModeStartingTime() view returns(uint64)
  283. func (_WithdrawalDelayer *WithdrawalDelayerCaller) GetEmergencyModeStartingTime(opts *bind.CallOpts) (uint64, error) {
  284. var out []interface{}
  285. err := _WithdrawalDelayer.contract.Call(opts, &out, "getEmergencyModeStartingTime")
  286. if err != nil {
  287. return *new(uint64), tracerr.Wrap(err)
  288. }
  289. out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
  290. return out0, tracerr.Wrap(err)
  291. }
  292. // GetEmergencyModeStartingTime is a free data retrieval call binding the contract method 0x668cdd67.
  293. //
  294. // Solidity: function getEmergencyModeStartingTime() view returns(uint64)
  295. func (_WithdrawalDelayer *WithdrawalDelayerSession) GetEmergencyModeStartingTime() (uint64, error) {
  296. return _WithdrawalDelayer.Contract.GetEmergencyModeStartingTime(&_WithdrawalDelayer.CallOpts)
  297. }
  298. // GetEmergencyModeStartingTime is a free data retrieval call binding the contract method 0x668cdd67.
  299. //
  300. // Solidity: function getEmergencyModeStartingTime() view returns(uint64)
  301. func (_WithdrawalDelayer *WithdrawalDelayerCallerSession) GetEmergencyModeStartingTime() (uint64, error) {
  302. return _WithdrawalDelayer.Contract.GetEmergencyModeStartingTime(&_WithdrawalDelayer.CallOpts)
  303. }
  304. // GetHermezGovernanceAddress is a free data retrieval call binding the contract method 0x0b21d430.
  305. //
  306. // Solidity: function getHermezGovernanceAddress() view returns(address)
  307. func (_WithdrawalDelayer *WithdrawalDelayerCaller) GetHermezGovernanceAddress(opts *bind.CallOpts) (common.Address, error) {
  308. var out []interface{}
  309. err := _WithdrawalDelayer.contract.Call(opts, &out, "getHermezGovernanceAddress")
  310. if err != nil {
  311. return *new(common.Address), tracerr.Wrap(err)
  312. }
  313. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  314. return out0, tracerr.Wrap(err)
  315. }
  316. // GetHermezGovernanceAddress is a free data retrieval call binding the contract method 0x0b21d430.
  317. //
  318. // Solidity: function getHermezGovernanceAddress() view returns(address)
  319. func (_WithdrawalDelayer *WithdrawalDelayerSession) GetHermezGovernanceAddress() (common.Address, error) {
  320. return _WithdrawalDelayer.Contract.GetHermezGovernanceAddress(&_WithdrawalDelayer.CallOpts)
  321. }
  322. // GetHermezGovernanceAddress is a free data retrieval call binding the contract method 0x0b21d430.
  323. //
  324. // Solidity: function getHermezGovernanceAddress() view returns(address)
  325. func (_WithdrawalDelayer *WithdrawalDelayerCallerSession) GetHermezGovernanceAddress() (common.Address, error) {
  326. return _WithdrawalDelayer.Contract.GetHermezGovernanceAddress(&_WithdrawalDelayer.CallOpts)
  327. }
  328. // GetWithdrawalDelay is a free data retrieval call binding the contract method 0x03160940.
  329. //
  330. // Solidity: function getWithdrawalDelay() view returns(uint64)
  331. func (_WithdrawalDelayer *WithdrawalDelayerCaller) GetWithdrawalDelay(opts *bind.CallOpts) (uint64, error) {
  332. var out []interface{}
  333. err := _WithdrawalDelayer.contract.Call(opts, &out, "getWithdrawalDelay")
  334. if err != nil {
  335. return *new(uint64), tracerr.Wrap(err)
  336. }
  337. out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
  338. return out0, tracerr.Wrap(err)
  339. }
  340. // GetWithdrawalDelay is a free data retrieval call binding the contract method 0x03160940.
  341. //
  342. // Solidity: function getWithdrawalDelay() view returns(uint64)
  343. func (_WithdrawalDelayer *WithdrawalDelayerSession) GetWithdrawalDelay() (uint64, error) {
  344. return _WithdrawalDelayer.Contract.GetWithdrawalDelay(&_WithdrawalDelayer.CallOpts)
  345. }
  346. // GetWithdrawalDelay is a free data retrieval call binding the contract method 0x03160940.
  347. //
  348. // Solidity: function getWithdrawalDelay() view returns(uint64)
  349. func (_WithdrawalDelayer *WithdrawalDelayerCallerSession) GetWithdrawalDelay() (uint64, error) {
  350. return _WithdrawalDelayer.Contract.GetWithdrawalDelay(&_WithdrawalDelayer.CallOpts)
  351. }
  352. // HermezRollupAddress is a free data retrieval call binding the contract method 0x0fd266d7.
  353. //
  354. // Solidity: function hermezRollupAddress() view returns(address)
  355. func (_WithdrawalDelayer *WithdrawalDelayerCaller) HermezRollupAddress(opts *bind.CallOpts) (common.Address, error) {
  356. var out []interface{}
  357. err := _WithdrawalDelayer.contract.Call(opts, &out, "hermezRollupAddress")
  358. if err != nil {
  359. return *new(common.Address), tracerr.Wrap(err)
  360. }
  361. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  362. return out0, tracerr.Wrap(err)
  363. }
  364. // HermezRollupAddress is a free data retrieval call binding the contract method 0x0fd266d7.
  365. //
  366. // Solidity: function hermezRollupAddress() view returns(address)
  367. func (_WithdrawalDelayer *WithdrawalDelayerSession) HermezRollupAddress() (common.Address, error) {
  368. return _WithdrawalDelayer.Contract.HermezRollupAddress(&_WithdrawalDelayer.CallOpts)
  369. }
  370. // HermezRollupAddress is a free data retrieval call binding the contract method 0x0fd266d7.
  371. //
  372. // Solidity: function hermezRollupAddress() view returns(address)
  373. func (_WithdrawalDelayer *WithdrawalDelayerCallerSession) HermezRollupAddress() (common.Address, error) {
  374. return _WithdrawalDelayer.Contract.HermezRollupAddress(&_WithdrawalDelayer.CallOpts)
  375. }
  376. // IsEmergencyMode is a free data retrieval call binding the contract method 0x20a194b8.
  377. //
  378. // Solidity: function isEmergencyMode() view returns(bool)
  379. func (_WithdrawalDelayer *WithdrawalDelayerCaller) IsEmergencyMode(opts *bind.CallOpts) (bool, error) {
  380. var out []interface{}
  381. err := _WithdrawalDelayer.contract.Call(opts, &out, "isEmergencyMode")
  382. if err != nil {
  383. return *new(bool), tracerr.Wrap(err)
  384. }
  385. out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
  386. return out0, tracerr.Wrap(err)
  387. }
  388. // IsEmergencyMode is a free data retrieval call binding the contract method 0x20a194b8.
  389. //
  390. // Solidity: function isEmergencyMode() view returns(bool)
  391. func (_WithdrawalDelayer *WithdrawalDelayerSession) IsEmergencyMode() (bool, error) {
  392. return _WithdrawalDelayer.Contract.IsEmergencyMode(&_WithdrawalDelayer.CallOpts)
  393. }
  394. // IsEmergencyMode is a free data retrieval call binding the contract method 0x20a194b8.
  395. //
  396. // Solidity: function isEmergencyMode() view returns(bool)
  397. func (_WithdrawalDelayer *WithdrawalDelayerCallerSession) IsEmergencyMode() (bool, error) {
  398. return _WithdrawalDelayer.Contract.IsEmergencyMode(&_WithdrawalDelayer.CallOpts)
  399. }
  400. // PendingEmergencyCouncil is a free data retrieval call binding the contract method 0x67fa2403.
  401. //
  402. // Solidity: function pendingEmergencyCouncil() view returns(address)
  403. func (_WithdrawalDelayer *WithdrawalDelayerCaller) PendingEmergencyCouncil(opts *bind.CallOpts) (common.Address, error) {
  404. var out []interface{}
  405. err := _WithdrawalDelayer.contract.Call(opts, &out, "pendingEmergencyCouncil")
  406. if err != nil {
  407. return *new(common.Address), tracerr.Wrap(err)
  408. }
  409. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  410. return out0, tracerr.Wrap(err)
  411. }
  412. // PendingEmergencyCouncil is a free data retrieval call binding the contract method 0x67fa2403.
  413. //
  414. // Solidity: function pendingEmergencyCouncil() view returns(address)
  415. func (_WithdrawalDelayer *WithdrawalDelayerSession) PendingEmergencyCouncil() (common.Address, error) {
  416. return _WithdrawalDelayer.Contract.PendingEmergencyCouncil(&_WithdrawalDelayer.CallOpts)
  417. }
  418. // PendingEmergencyCouncil is a free data retrieval call binding the contract method 0x67fa2403.
  419. //
  420. // Solidity: function pendingEmergencyCouncil() view returns(address)
  421. func (_WithdrawalDelayer *WithdrawalDelayerCallerSession) PendingEmergencyCouncil() (common.Address, error) {
  422. return _WithdrawalDelayer.Contract.PendingEmergencyCouncil(&_WithdrawalDelayer.CallOpts)
  423. }
  424. // PendingGovernance is a free data retrieval call binding the contract method 0xf39c38a0.
  425. //
  426. // Solidity: function pendingGovernance() view returns(address)
  427. func (_WithdrawalDelayer *WithdrawalDelayerCaller) PendingGovernance(opts *bind.CallOpts) (common.Address, error) {
  428. var out []interface{}
  429. err := _WithdrawalDelayer.contract.Call(opts, &out, "pendingGovernance")
  430. if err != nil {
  431. return *new(common.Address), tracerr.Wrap(err)
  432. }
  433. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  434. return out0, tracerr.Wrap(err)
  435. }
  436. // PendingGovernance is a free data retrieval call binding the contract method 0xf39c38a0.
  437. //
  438. // Solidity: function pendingGovernance() view returns(address)
  439. func (_WithdrawalDelayer *WithdrawalDelayerSession) PendingGovernance() (common.Address, error) {
  440. return _WithdrawalDelayer.Contract.PendingGovernance(&_WithdrawalDelayer.CallOpts)
  441. }
  442. // PendingGovernance is a free data retrieval call binding the contract method 0xf39c38a0.
  443. //
  444. // Solidity: function pendingGovernance() view returns(address)
  445. func (_WithdrawalDelayer *WithdrawalDelayerCallerSession) PendingGovernance() (common.Address, error) {
  446. return _WithdrawalDelayer.Contract.PendingGovernance(&_WithdrawalDelayer.CallOpts)
  447. }
  448. // ChangeWithdrawalDelay is a paid mutator transaction binding the contract method 0x0e670af5.
  449. //
  450. // Solidity: function changeWithdrawalDelay(uint64 _newWithdrawalDelay) returns()
  451. func (_WithdrawalDelayer *WithdrawalDelayerTransactor) ChangeWithdrawalDelay(opts *bind.TransactOpts, _newWithdrawalDelay uint64) (*types.Transaction, error) {
  452. return _WithdrawalDelayer.contract.Transact(opts, "changeWithdrawalDelay", _newWithdrawalDelay)
  453. }
  454. // ChangeWithdrawalDelay is a paid mutator transaction binding the contract method 0x0e670af5.
  455. //
  456. // Solidity: function changeWithdrawalDelay(uint64 _newWithdrawalDelay) returns()
  457. func (_WithdrawalDelayer *WithdrawalDelayerSession) ChangeWithdrawalDelay(_newWithdrawalDelay uint64) (*types.Transaction, error) {
  458. return _WithdrawalDelayer.Contract.ChangeWithdrawalDelay(&_WithdrawalDelayer.TransactOpts, _newWithdrawalDelay)
  459. }
  460. // ChangeWithdrawalDelay is a paid mutator transaction binding the contract method 0x0e670af5.
  461. //
  462. // Solidity: function changeWithdrawalDelay(uint64 _newWithdrawalDelay) returns()
  463. func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) ChangeWithdrawalDelay(_newWithdrawalDelay uint64) (*types.Transaction, error) {
  464. return _WithdrawalDelayer.Contract.ChangeWithdrawalDelay(&_WithdrawalDelayer.TransactOpts, _newWithdrawalDelay)
  465. }
  466. // ClaimEmergencyCouncil is a paid mutator transaction binding the contract method 0xca79033f.
  467. //
  468. // Solidity: function claimEmergencyCouncil() returns()
  469. func (_WithdrawalDelayer *WithdrawalDelayerTransactor) ClaimEmergencyCouncil(opts *bind.TransactOpts) (*types.Transaction, error) {
  470. return _WithdrawalDelayer.contract.Transact(opts, "claimEmergencyCouncil")
  471. }
  472. // ClaimEmergencyCouncil is a paid mutator transaction binding the contract method 0xca79033f.
  473. //
  474. // Solidity: function claimEmergencyCouncil() returns()
  475. func (_WithdrawalDelayer *WithdrawalDelayerSession) ClaimEmergencyCouncil() (*types.Transaction, error) {
  476. return _WithdrawalDelayer.Contract.ClaimEmergencyCouncil(&_WithdrawalDelayer.TransactOpts)
  477. }
  478. // ClaimEmergencyCouncil is a paid mutator transaction binding the contract method 0xca79033f.
  479. //
  480. // Solidity: function claimEmergencyCouncil() returns()
  481. func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) ClaimEmergencyCouncil() (*types.Transaction, error) {
  482. return _WithdrawalDelayer.Contract.ClaimEmergencyCouncil(&_WithdrawalDelayer.TransactOpts)
  483. }
  484. // ClaimGovernance is a paid mutator transaction binding the contract method 0x5d36b190.
  485. //
  486. // Solidity: function claimGovernance() returns()
  487. func (_WithdrawalDelayer *WithdrawalDelayerTransactor) ClaimGovernance(opts *bind.TransactOpts) (*types.Transaction, error) {
  488. return _WithdrawalDelayer.contract.Transact(opts, "claimGovernance")
  489. }
  490. // ClaimGovernance is a paid mutator transaction binding the contract method 0x5d36b190.
  491. //
  492. // Solidity: function claimGovernance() returns()
  493. func (_WithdrawalDelayer *WithdrawalDelayerSession) ClaimGovernance() (*types.Transaction, error) {
  494. return _WithdrawalDelayer.Contract.ClaimGovernance(&_WithdrawalDelayer.TransactOpts)
  495. }
  496. // ClaimGovernance is a paid mutator transaction binding the contract method 0x5d36b190.
  497. //
  498. // Solidity: function claimGovernance() returns()
  499. func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) ClaimGovernance() (*types.Transaction, error) {
  500. return _WithdrawalDelayer.Contract.ClaimGovernance(&_WithdrawalDelayer.TransactOpts)
  501. }
  502. // Deposit is a paid mutator transaction binding the contract method 0xcfc0b641.
  503. //
  504. // Solidity: function deposit(address _owner, address _token, uint192 _amount) payable returns()
  505. func (_WithdrawalDelayer *WithdrawalDelayerTransactor) Deposit(opts *bind.TransactOpts, _owner common.Address, _token common.Address, _amount *big.Int) (*types.Transaction, error) {
  506. return _WithdrawalDelayer.contract.Transact(opts, "deposit", _owner, _token, _amount)
  507. }
  508. // Deposit is a paid mutator transaction binding the contract method 0xcfc0b641.
  509. //
  510. // Solidity: function deposit(address _owner, address _token, uint192 _amount) payable returns()
  511. func (_WithdrawalDelayer *WithdrawalDelayerSession) Deposit(_owner common.Address, _token common.Address, _amount *big.Int) (*types.Transaction, error) {
  512. return _WithdrawalDelayer.Contract.Deposit(&_WithdrawalDelayer.TransactOpts, _owner, _token, _amount)
  513. }
  514. // Deposit is a paid mutator transaction binding the contract method 0xcfc0b641.
  515. //
  516. // Solidity: function deposit(address _owner, address _token, uint192 _amount) payable returns()
  517. func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) Deposit(_owner common.Address, _token common.Address, _amount *big.Int) (*types.Transaction, error) {
  518. return _WithdrawalDelayer.Contract.Deposit(&_WithdrawalDelayer.TransactOpts, _owner, _token, _amount)
  519. }
  520. // EnableEmergencyMode is a paid mutator transaction binding the contract method 0xc5b1c7d0.
  521. //
  522. // Solidity: function enableEmergencyMode() returns()
  523. func (_WithdrawalDelayer *WithdrawalDelayerTransactor) EnableEmergencyMode(opts *bind.TransactOpts) (*types.Transaction, error) {
  524. return _WithdrawalDelayer.contract.Transact(opts, "enableEmergencyMode")
  525. }
  526. // EnableEmergencyMode is a paid mutator transaction binding the contract method 0xc5b1c7d0.
  527. //
  528. // Solidity: function enableEmergencyMode() returns()
  529. func (_WithdrawalDelayer *WithdrawalDelayerSession) EnableEmergencyMode() (*types.Transaction, error) {
  530. return _WithdrawalDelayer.Contract.EnableEmergencyMode(&_WithdrawalDelayer.TransactOpts)
  531. }
  532. // EnableEmergencyMode is a paid mutator transaction binding the contract method 0xc5b1c7d0.
  533. //
  534. // Solidity: function enableEmergencyMode() returns()
  535. func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) EnableEmergencyMode() (*types.Transaction, error) {
  536. return _WithdrawalDelayer.Contract.EnableEmergencyMode(&_WithdrawalDelayer.TransactOpts)
  537. }
  538. // EscapeHatchWithdrawal is a paid mutator transaction binding the contract method 0x7fd6b102.
  539. //
  540. // Solidity: function escapeHatchWithdrawal(address _to, address _token, uint256 _amount) returns()
  541. func (_WithdrawalDelayer *WithdrawalDelayerTransactor) EscapeHatchWithdrawal(opts *bind.TransactOpts, _to common.Address, _token common.Address, _amount *big.Int) (*types.Transaction, error) {
  542. return _WithdrawalDelayer.contract.Transact(opts, "escapeHatchWithdrawal", _to, _token, _amount)
  543. }
  544. // EscapeHatchWithdrawal is a paid mutator transaction binding the contract method 0x7fd6b102.
  545. //
  546. // Solidity: function escapeHatchWithdrawal(address _to, address _token, uint256 _amount) returns()
  547. func (_WithdrawalDelayer *WithdrawalDelayerSession) EscapeHatchWithdrawal(_to common.Address, _token common.Address, _amount *big.Int) (*types.Transaction, error) {
  548. return _WithdrawalDelayer.Contract.EscapeHatchWithdrawal(&_WithdrawalDelayer.TransactOpts, _to, _token, _amount)
  549. }
  550. // EscapeHatchWithdrawal is a paid mutator transaction binding the contract method 0x7fd6b102.
  551. //
  552. // Solidity: function escapeHatchWithdrawal(address _to, address _token, uint256 _amount) returns()
  553. func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) EscapeHatchWithdrawal(_to common.Address, _token common.Address, _amount *big.Int) (*types.Transaction, error) {
  554. return _WithdrawalDelayer.Contract.EscapeHatchWithdrawal(&_WithdrawalDelayer.TransactOpts, _to, _token, _amount)
  555. }
  556. // TransferEmergencyCouncil is a paid mutator transaction binding the contract method 0xdb2a1a81.
  557. //
  558. // Solidity: function transferEmergencyCouncil(address newEmergencyCouncil) returns()
  559. func (_WithdrawalDelayer *WithdrawalDelayerTransactor) TransferEmergencyCouncil(opts *bind.TransactOpts, newEmergencyCouncil common.Address) (*types.Transaction, error) {
  560. return _WithdrawalDelayer.contract.Transact(opts, "transferEmergencyCouncil", newEmergencyCouncil)
  561. }
  562. // TransferEmergencyCouncil is a paid mutator transaction binding the contract method 0xdb2a1a81.
  563. //
  564. // Solidity: function transferEmergencyCouncil(address newEmergencyCouncil) returns()
  565. func (_WithdrawalDelayer *WithdrawalDelayerSession) TransferEmergencyCouncil(newEmergencyCouncil common.Address) (*types.Transaction, error) {
  566. return _WithdrawalDelayer.Contract.TransferEmergencyCouncil(&_WithdrawalDelayer.TransactOpts, newEmergencyCouncil)
  567. }
  568. // TransferEmergencyCouncil is a paid mutator transaction binding the contract method 0xdb2a1a81.
  569. //
  570. // Solidity: function transferEmergencyCouncil(address newEmergencyCouncil) returns()
  571. func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) TransferEmergencyCouncil(newEmergencyCouncil common.Address) (*types.Transaction, error) {
  572. return _WithdrawalDelayer.Contract.TransferEmergencyCouncil(&_WithdrawalDelayer.TransactOpts, newEmergencyCouncil)
  573. }
  574. // TransferGovernance is a paid mutator transaction binding the contract method 0xd38bfff4.
  575. //
  576. // Solidity: function transferGovernance(address newGovernance) returns()
  577. func (_WithdrawalDelayer *WithdrawalDelayerTransactor) TransferGovernance(opts *bind.TransactOpts, newGovernance common.Address) (*types.Transaction, error) {
  578. return _WithdrawalDelayer.contract.Transact(opts, "transferGovernance", newGovernance)
  579. }
  580. // TransferGovernance is a paid mutator transaction binding the contract method 0xd38bfff4.
  581. //
  582. // Solidity: function transferGovernance(address newGovernance) returns()
  583. func (_WithdrawalDelayer *WithdrawalDelayerSession) TransferGovernance(newGovernance common.Address) (*types.Transaction, error) {
  584. return _WithdrawalDelayer.Contract.TransferGovernance(&_WithdrawalDelayer.TransactOpts, newGovernance)
  585. }
  586. // TransferGovernance is a paid mutator transaction binding the contract method 0xd38bfff4.
  587. //
  588. // Solidity: function transferGovernance(address newGovernance) returns()
  589. func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) TransferGovernance(newGovernance common.Address) (*types.Transaction, error) {
  590. return _WithdrawalDelayer.Contract.TransferGovernance(&_WithdrawalDelayer.TransactOpts, newGovernance)
  591. }
  592. // Withdrawal is a paid mutator transaction binding the contract method 0xde35f282.
  593. //
  594. // Solidity: function withdrawal(address _owner, address _token) returns()
  595. func (_WithdrawalDelayer *WithdrawalDelayerTransactor) Withdrawal(opts *bind.TransactOpts, _owner common.Address, _token common.Address) (*types.Transaction, error) {
  596. return _WithdrawalDelayer.contract.Transact(opts, "withdrawal", _owner, _token)
  597. }
  598. // Withdrawal is a paid mutator transaction binding the contract method 0xde35f282.
  599. //
  600. // Solidity: function withdrawal(address _owner, address _token) returns()
  601. func (_WithdrawalDelayer *WithdrawalDelayerSession) Withdrawal(_owner common.Address, _token common.Address) (*types.Transaction, error) {
  602. return _WithdrawalDelayer.Contract.Withdrawal(&_WithdrawalDelayer.TransactOpts, _owner, _token)
  603. }
  604. // Withdrawal is a paid mutator transaction binding the contract method 0xde35f282.
  605. //
  606. // Solidity: function withdrawal(address _owner, address _token) returns()
  607. func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) Withdrawal(_owner common.Address, _token common.Address) (*types.Transaction, error) {
  608. return _WithdrawalDelayer.Contract.Withdrawal(&_WithdrawalDelayer.TransactOpts, _owner, _token)
  609. }
  610. // WithdrawalDelayerInitializer is a paid mutator transaction binding the contract method 0x42cb7216.
  611. //
  612. // Solidity: function withdrawalDelayerInitializer(uint64 _initialWithdrawalDelay, address _initialHermezRollup, address _initialHermezGovernanceAddress, address _initialEmergencyCouncil) returns()
  613. func (_WithdrawalDelayer *WithdrawalDelayerTransactor) WithdrawalDelayerInitializer(opts *bind.TransactOpts, _initialWithdrawalDelay uint64, _initialHermezRollup common.Address, _initialHermezGovernanceAddress common.Address, _initialEmergencyCouncil common.Address) (*types.Transaction, error) {
  614. return _WithdrawalDelayer.contract.Transact(opts, "withdrawalDelayerInitializer", _initialWithdrawalDelay, _initialHermezRollup, _initialHermezGovernanceAddress, _initialEmergencyCouncil)
  615. }
  616. // WithdrawalDelayerInitializer is a paid mutator transaction binding the contract method 0x42cb7216.
  617. //
  618. // Solidity: function withdrawalDelayerInitializer(uint64 _initialWithdrawalDelay, address _initialHermezRollup, address _initialHermezGovernanceAddress, address _initialEmergencyCouncil) returns()
  619. func (_WithdrawalDelayer *WithdrawalDelayerSession) WithdrawalDelayerInitializer(_initialWithdrawalDelay uint64, _initialHermezRollup common.Address, _initialHermezGovernanceAddress common.Address, _initialEmergencyCouncil common.Address) (*types.Transaction, error) {
  620. return _WithdrawalDelayer.Contract.WithdrawalDelayerInitializer(&_WithdrawalDelayer.TransactOpts, _initialWithdrawalDelay, _initialHermezRollup, _initialHermezGovernanceAddress, _initialEmergencyCouncil)
  621. }
  622. // WithdrawalDelayerInitializer is a paid mutator transaction binding the contract method 0x42cb7216.
  623. //
  624. // Solidity: function withdrawalDelayerInitializer(uint64 _initialWithdrawalDelay, address _initialHermezRollup, address _initialHermezGovernanceAddress, address _initialEmergencyCouncil) returns()
  625. func (_WithdrawalDelayer *WithdrawalDelayerTransactorSession) WithdrawalDelayerInitializer(_initialWithdrawalDelay uint64, _initialHermezRollup common.Address, _initialHermezGovernanceAddress common.Address, _initialEmergencyCouncil common.Address) (*types.Transaction, error) {
  626. return _WithdrawalDelayer.Contract.WithdrawalDelayerInitializer(&_WithdrawalDelayer.TransactOpts, _initialWithdrawalDelay, _initialHermezRollup, _initialHermezGovernanceAddress, _initialEmergencyCouncil)
  627. }
  628. // WithdrawalDelayerDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the WithdrawalDelayer contract.
  629. type WithdrawalDelayerDepositIterator struct {
  630. Event *WithdrawalDelayerDeposit // Event containing the contract specifics and raw log
  631. contract *bind.BoundContract // Generic contract to use for unpacking event data
  632. event string // Event name to use for unpacking event data
  633. logs chan types.Log // Log channel receiving the found contract events
  634. sub ethereum.Subscription // Subscription for errors, completion and termination
  635. done bool // Whether the subscription completed delivering logs
  636. fail error // Occurred error to stop iteration
  637. }
  638. // Next advances the iterator to the subsequent event, returning whether there
  639. // are any more events found. In case of a retrieval or parsing error, false is
  640. // returned and Error() can be queried for the exact failure.
  641. func (it *WithdrawalDelayerDepositIterator) Next() bool {
  642. // If the iterator failed, stop iterating
  643. if it.fail != nil {
  644. return false
  645. }
  646. // If the iterator completed, deliver directly whatever's available
  647. if it.done {
  648. select {
  649. case log := <-it.logs:
  650. it.Event = new(WithdrawalDelayerDeposit)
  651. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  652. it.fail = err
  653. return false
  654. }
  655. it.Event.Raw = log
  656. return true
  657. default:
  658. return false
  659. }
  660. }
  661. // Iterator still in progress, wait for either a data or an error event
  662. select {
  663. case log := <-it.logs:
  664. it.Event = new(WithdrawalDelayerDeposit)
  665. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  666. it.fail = err
  667. return false
  668. }
  669. it.Event.Raw = log
  670. return true
  671. case err := <-it.sub.Err():
  672. it.done = true
  673. it.fail = err
  674. return it.Next()
  675. }
  676. }
  677. // Error returns any retrieval or parsing error occurred during filtering.
  678. func (it *WithdrawalDelayerDepositIterator) Error() error {
  679. return it.fail
  680. }
  681. // Close terminates the iteration process, releasing any pending underlying
  682. // resources.
  683. func (it *WithdrawalDelayerDepositIterator) Close() error {
  684. it.sub.Unsubscribe()
  685. return nil
  686. }
  687. // WithdrawalDelayerDeposit represents a Deposit event raised by the WithdrawalDelayer contract.
  688. type WithdrawalDelayerDeposit struct {
  689. Owner common.Address
  690. Token common.Address
  691. Amount *big.Int
  692. DepositTimestamp uint64
  693. Raw types.Log // Blockchain specific contextual infos
  694. }
  695. // FilterDeposit is a free log retrieval operation binding the contract event 0x41219b99485f78192a5b9b1be28c7d53c3a2bdbe7900ae40c79fae8d9d6108fd.
  696. //
  697. // Solidity: event Deposit(address indexed owner, address indexed token, uint192 amount, uint64 depositTimestamp)
  698. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) FilterDeposit(opts *bind.FilterOpts, owner []common.Address, token []common.Address) (*WithdrawalDelayerDepositIterator, error) {
  699. var ownerRule []interface{}
  700. for _, ownerItem := range owner {
  701. ownerRule = append(ownerRule, ownerItem)
  702. }
  703. var tokenRule []interface{}
  704. for _, tokenItem := range token {
  705. tokenRule = append(tokenRule, tokenItem)
  706. }
  707. logs, sub, err := _WithdrawalDelayer.contract.FilterLogs(opts, "Deposit", ownerRule, tokenRule)
  708. if err != nil {
  709. return nil, tracerr.Wrap(err)
  710. }
  711. return &WithdrawalDelayerDepositIterator{contract: _WithdrawalDelayer.contract, event: "Deposit", logs: logs, sub: sub}, nil
  712. }
  713. // WatchDeposit is a free log subscription operation binding the contract event 0x41219b99485f78192a5b9b1be28c7d53c3a2bdbe7900ae40c79fae8d9d6108fd.
  714. //
  715. // Solidity: event Deposit(address indexed owner, address indexed token, uint192 amount, uint64 depositTimestamp)
  716. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *WithdrawalDelayerDeposit, owner []common.Address, token []common.Address) (event.Subscription, error) {
  717. var ownerRule []interface{}
  718. for _, ownerItem := range owner {
  719. ownerRule = append(ownerRule, ownerItem)
  720. }
  721. var tokenRule []interface{}
  722. for _, tokenItem := range token {
  723. tokenRule = append(tokenRule, tokenItem)
  724. }
  725. logs, sub, err := _WithdrawalDelayer.contract.WatchLogs(opts, "Deposit", ownerRule, tokenRule)
  726. if err != nil {
  727. return nil, tracerr.Wrap(err)
  728. }
  729. return event.NewSubscription(func(quit <-chan struct{}) error {
  730. defer sub.Unsubscribe()
  731. for {
  732. select {
  733. case log := <-logs:
  734. // New log arrived, parse the event and forward to the user
  735. event := new(WithdrawalDelayerDeposit)
  736. if err := _WithdrawalDelayer.contract.UnpackLog(event, "Deposit", log); err != nil {
  737. return tracerr.Wrap(err)
  738. }
  739. event.Raw = log
  740. select {
  741. case sink <- event:
  742. case err := <-sub.Err():
  743. return tracerr.Wrap(err)
  744. case <-quit:
  745. return nil
  746. }
  747. case err := <-sub.Err():
  748. return tracerr.Wrap(err)
  749. case <-quit:
  750. return nil
  751. }
  752. }
  753. }), nil
  754. }
  755. // ParseDeposit is a log parse operation binding the contract event 0x41219b99485f78192a5b9b1be28c7d53c3a2bdbe7900ae40c79fae8d9d6108fd.
  756. //
  757. // Solidity: event Deposit(address indexed owner, address indexed token, uint192 amount, uint64 depositTimestamp)
  758. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) ParseDeposit(log types.Log) (*WithdrawalDelayerDeposit, error) {
  759. event := new(WithdrawalDelayerDeposit)
  760. if err := _WithdrawalDelayer.contract.UnpackLog(event, "Deposit", log); err != nil {
  761. return nil, tracerr.Wrap(err)
  762. }
  763. event.Raw = log
  764. return event, nil
  765. }
  766. // WithdrawalDelayerEmergencyModeEnabledIterator is returned from FilterEmergencyModeEnabled and is used to iterate over the raw logs and unpacked data for EmergencyModeEnabled events raised by the WithdrawalDelayer contract.
  767. type WithdrawalDelayerEmergencyModeEnabledIterator struct {
  768. Event *WithdrawalDelayerEmergencyModeEnabled // Event containing the contract specifics and raw log
  769. contract *bind.BoundContract // Generic contract to use for unpacking event data
  770. event string // Event name to use for unpacking event data
  771. logs chan types.Log // Log channel receiving the found contract events
  772. sub ethereum.Subscription // Subscription for errors, completion and termination
  773. done bool // Whether the subscription completed delivering logs
  774. fail error // Occurred error to stop iteration
  775. }
  776. // Next advances the iterator to the subsequent event, returning whether there
  777. // are any more events found. In case of a retrieval or parsing error, false is
  778. // returned and Error() can be queried for the exact failure.
  779. func (it *WithdrawalDelayerEmergencyModeEnabledIterator) Next() bool {
  780. // If the iterator failed, stop iterating
  781. if it.fail != nil {
  782. return false
  783. }
  784. // If the iterator completed, deliver directly whatever's available
  785. if it.done {
  786. select {
  787. case log := <-it.logs:
  788. it.Event = new(WithdrawalDelayerEmergencyModeEnabled)
  789. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  790. it.fail = err
  791. return false
  792. }
  793. it.Event.Raw = log
  794. return true
  795. default:
  796. return false
  797. }
  798. }
  799. // Iterator still in progress, wait for either a data or an error event
  800. select {
  801. case log := <-it.logs:
  802. it.Event = new(WithdrawalDelayerEmergencyModeEnabled)
  803. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  804. it.fail = err
  805. return false
  806. }
  807. it.Event.Raw = log
  808. return true
  809. case err := <-it.sub.Err():
  810. it.done = true
  811. it.fail = err
  812. return it.Next()
  813. }
  814. }
  815. // Error returns any retrieval or parsing error occurred during filtering.
  816. func (it *WithdrawalDelayerEmergencyModeEnabledIterator) Error() error {
  817. return it.fail
  818. }
  819. // Close terminates the iteration process, releasing any pending underlying
  820. // resources.
  821. func (it *WithdrawalDelayerEmergencyModeEnabledIterator) Close() error {
  822. it.sub.Unsubscribe()
  823. return nil
  824. }
  825. // WithdrawalDelayerEmergencyModeEnabled represents a EmergencyModeEnabled event raised by the WithdrawalDelayer contract.
  826. type WithdrawalDelayerEmergencyModeEnabled struct {
  827. Raw types.Log // Blockchain specific contextual infos
  828. }
  829. // FilterEmergencyModeEnabled is a free log retrieval operation binding the contract event 0x2064d51aa5a8bd67928c7675e267e05c67ad5adf7c9098d0a602d01f36fda9c5.
  830. //
  831. // Solidity: event EmergencyModeEnabled()
  832. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) FilterEmergencyModeEnabled(opts *bind.FilterOpts) (*WithdrawalDelayerEmergencyModeEnabledIterator, error) {
  833. logs, sub, err := _WithdrawalDelayer.contract.FilterLogs(opts, "EmergencyModeEnabled")
  834. if err != nil {
  835. return nil, tracerr.Wrap(err)
  836. }
  837. return &WithdrawalDelayerEmergencyModeEnabledIterator{contract: _WithdrawalDelayer.contract, event: "EmergencyModeEnabled", logs: logs, sub: sub}, nil
  838. }
  839. // WatchEmergencyModeEnabled is a free log subscription operation binding the contract event 0x2064d51aa5a8bd67928c7675e267e05c67ad5adf7c9098d0a602d01f36fda9c5.
  840. //
  841. // Solidity: event EmergencyModeEnabled()
  842. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) WatchEmergencyModeEnabled(opts *bind.WatchOpts, sink chan<- *WithdrawalDelayerEmergencyModeEnabled) (event.Subscription, error) {
  843. logs, sub, err := _WithdrawalDelayer.contract.WatchLogs(opts, "EmergencyModeEnabled")
  844. if err != nil {
  845. return nil, tracerr.Wrap(err)
  846. }
  847. return event.NewSubscription(func(quit <-chan struct{}) error {
  848. defer sub.Unsubscribe()
  849. for {
  850. select {
  851. case log := <-logs:
  852. // New log arrived, parse the event and forward to the user
  853. event := new(WithdrawalDelayerEmergencyModeEnabled)
  854. if err := _WithdrawalDelayer.contract.UnpackLog(event, "EmergencyModeEnabled", log); err != nil {
  855. return tracerr.Wrap(err)
  856. }
  857. event.Raw = log
  858. select {
  859. case sink <- event:
  860. case err := <-sub.Err():
  861. return tracerr.Wrap(err)
  862. case <-quit:
  863. return nil
  864. }
  865. case err := <-sub.Err():
  866. return tracerr.Wrap(err)
  867. case <-quit:
  868. return nil
  869. }
  870. }
  871. }), nil
  872. }
  873. // ParseEmergencyModeEnabled is a log parse operation binding the contract event 0x2064d51aa5a8bd67928c7675e267e05c67ad5adf7c9098d0a602d01f36fda9c5.
  874. //
  875. // Solidity: event EmergencyModeEnabled()
  876. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) ParseEmergencyModeEnabled(log types.Log) (*WithdrawalDelayerEmergencyModeEnabled, error) {
  877. event := new(WithdrawalDelayerEmergencyModeEnabled)
  878. if err := _WithdrawalDelayer.contract.UnpackLog(event, "EmergencyModeEnabled", log); err != nil {
  879. return nil, tracerr.Wrap(err)
  880. }
  881. event.Raw = log
  882. return event, nil
  883. }
  884. // WithdrawalDelayerEscapeHatchWithdrawalIterator is returned from FilterEscapeHatchWithdrawal and is used to iterate over the raw logs and unpacked data for EscapeHatchWithdrawal events raised by the WithdrawalDelayer contract.
  885. type WithdrawalDelayerEscapeHatchWithdrawalIterator struct {
  886. Event *WithdrawalDelayerEscapeHatchWithdrawal // Event containing the contract specifics and raw log
  887. contract *bind.BoundContract // Generic contract to use for unpacking event data
  888. event string // Event name to use for unpacking event data
  889. logs chan types.Log // Log channel receiving the found contract events
  890. sub ethereum.Subscription // Subscription for errors, completion and termination
  891. done bool // Whether the subscription completed delivering logs
  892. fail error // Occurred error to stop iteration
  893. }
  894. // Next advances the iterator to the subsequent event, returning whether there
  895. // are any more events found. In case of a retrieval or parsing error, false is
  896. // returned and Error() can be queried for the exact failure.
  897. func (it *WithdrawalDelayerEscapeHatchWithdrawalIterator) Next() bool {
  898. // If the iterator failed, stop iterating
  899. if it.fail != nil {
  900. return false
  901. }
  902. // If the iterator completed, deliver directly whatever's available
  903. if it.done {
  904. select {
  905. case log := <-it.logs:
  906. it.Event = new(WithdrawalDelayerEscapeHatchWithdrawal)
  907. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  908. it.fail = err
  909. return false
  910. }
  911. it.Event.Raw = log
  912. return true
  913. default:
  914. return false
  915. }
  916. }
  917. // Iterator still in progress, wait for either a data or an error event
  918. select {
  919. case log := <-it.logs:
  920. it.Event = new(WithdrawalDelayerEscapeHatchWithdrawal)
  921. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  922. it.fail = err
  923. return false
  924. }
  925. it.Event.Raw = log
  926. return true
  927. case err := <-it.sub.Err():
  928. it.done = true
  929. it.fail = err
  930. return it.Next()
  931. }
  932. }
  933. // Error returns any retrieval or parsing error occurred during filtering.
  934. func (it *WithdrawalDelayerEscapeHatchWithdrawalIterator) Error() error {
  935. return it.fail
  936. }
  937. // Close terminates the iteration process, releasing any pending underlying
  938. // resources.
  939. func (it *WithdrawalDelayerEscapeHatchWithdrawalIterator) Close() error {
  940. it.sub.Unsubscribe()
  941. return nil
  942. }
  943. // WithdrawalDelayerEscapeHatchWithdrawal represents a EscapeHatchWithdrawal event raised by the WithdrawalDelayer contract.
  944. type WithdrawalDelayerEscapeHatchWithdrawal struct {
  945. Who common.Address
  946. To common.Address
  947. Token common.Address
  948. Amount *big.Int
  949. Raw types.Log // Blockchain specific contextual infos
  950. }
  951. // FilterEscapeHatchWithdrawal is a free log retrieval operation binding the contract event 0xde200220117ba95c9a6c4a1a13bb06b0b7be90faa85c8fb4576630119f891693.
  952. //
  953. // Solidity: event EscapeHatchWithdrawal(address indexed who, address indexed to, address indexed token, uint256 amount)
  954. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) FilterEscapeHatchWithdrawal(opts *bind.FilterOpts, who []common.Address, to []common.Address, token []common.Address) (*WithdrawalDelayerEscapeHatchWithdrawalIterator, error) {
  955. var whoRule []interface{}
  956. for _, whoItem := range who {
  957. whoRule = append(whoRule, whoItem)
  958. }
  959. var toRule []interface{}
  960. for _, toItem := range to {
  961. toRule = append(toRule, toItem)
  962. }
  963. var tokenRule []interface{}
  964. for _, tokenItem := range token {
  965. tokenRule = append(tokenRule, tokenItem)
  966. }
  967. logs, sub, err := _WithdrawalDelayer.contract.FilterLogs(opts, "EscapeHatchWithdrawal", whoRule, toRule, tokenRule)
  968. if err != nil {
  969. return nil, tracerr.Wrap(err)
  970. }
  971. return &WithdrawalDelayerEscapeHatchWithdrawalIterator{contract: _WithdrawalDelayer.contract, event: "EscapeHatchWithdrawal", logs: logs, sub: sub}, nil
  972. }
  973. // WatchEscapeHatchWithdrawal is a free log subscription operation binding the contract event 0xde200220117ba95c9a6c4a1a13bb06b0b7be90faa85c8fb4576630119f891693.
  974. //
  975. // Solidity: event EscapeHatchWithdrawal(address indexed who, address indexed to, address indexed token, uint256 amount)
  976. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) WatchEscapeHatchWithdrawal(opts *bind.WatchOpts, sink chan<- *WithdrawalDelayerEscapeHatchWithdrawal, who []common.Address, to []common.Address, token []common.Address) (event.Subscription, error) {
  977. var whoRule []interface{}
  978. for _, whoItem := range who {
  979. whoRule = append(whoRule, whoItem)
  980. }
  981. var toRule []interface{}
  982. for _, toItem := range to {
  983. toRule = append(toRule, toItem)
  984. }
  985. var tokenRule []interface{}
  986. for _, tokenItem := range token {
  987. tokenRule = append(tokenRule, tokenItem)
  988. }
  989. logs, sub, err := _WithdrawalDelayer.contract.WatchLogs(opts, "EscapeHatchWithdrawal", whoRule, toRule, tokenRule)
  990. if err != nil {
  991. return nil, tracerr.Wrap(err)
  992. }
  993. return event.NewSubscription(func(quit <-chan struct{}) error {
  994. defer sub.Unsubscribe()
  995. for {
  996. select {
  997. case log := <-logs:
  998. // New log arrived, parse the event and forward to the user
  999. event := new(WithdrawalDelayerEscapeHatchWithdrawal)
  1000. if err := _WithdrawalDelayer.contract.UnpackLog(event, "EscapeHatchWithdrawal", log); err != nil {
  1001. return tracerr.Wrap(err)
  1002. }
  1003. event.Raw = log
  1004. select {
  1005. case sink <- event:
  1006. case err := <-sub.Err():
  1007. return tracerr.Wrap(err)
  1008. case <-quit:
  1009. return nil
  1010. }
  1011. case err := <-sub.Err():
  1012. return tracerr.Wrap(err)
  1013. case <-quit:
  1014. return nil
  1015. }
  1016. }
  1017. }), nil
  1018. }
  1019. // ParseEscapeHatchWithdrawal is a log parse operation binding the contract event 0xde200220117ba95c9a6c4a1a13bb06b0b7be90faa85c8fb4576630119f891693.
  1020. //
  1021. // Solidity: event EscapeHatchWithdrawal(address indexed who, address indexed to, address indexed token, uint256 amount)
  1022. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) ParseEscapeHatchWithdrawal(log types.Log) (*WithdrawalDelayerEscapeHatchWithdrawal, error) {
  1023. event := new(WithdrawalDelayerEscapeHatchWithdrawal)
  1024. if err := _WithdrawalDelayer.contract.UnpackLog(event, "EscapeHatchWithdrawal", log); err != nil {
  1025. return nil, tracerr.Wrap(err)
  1026. }
  1027. event.Raw = log
  1028. return event, nil
  1029. }
  1030. // WithdrawalDelayerInitializeWithdrawalDelayerEventIterator is returned from FilterInitializeWithdrawalDelayerEvent and is used to iterate over the raw logs and unpacked data for InitializeWithdrawalDelayerEvent events raised by the WithdrawalDelayer contract.
  1031. type WithdrawalDelayerInitializeWithdrawalDelayerEventIterator struct {
  1032. Event *WithdrawalDelayerInitializeWithdrawalDelayerEvent // Event containing the contract specifics and raw log
  1033. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1034. event string // Event name to use for unpacking event data
  1035. logs chan types.Log // Log channel receiving the found contract events
  1036. sub ethereum.Subscription // Subscription for errors, completion and termination
  1037. done bool // Whether the subscription completed delivering logs
  1038. fail error // Occurred error to stop iteration
  1039. }
  1040. // Next advances the iterator to the subsequent event, returning whether there
  1041. // are any more events found. In case of a retrieval or parsing error, false is
  1042. // returned and Error() can be queried for the exact failure.
  1043. func (it *WithdrawalDelayerInitializeWithdrawalDelayerEventIterator) Next() bool {
  1044. // If the iterator failed, stop iterating
  1045. if it.fail != nil {
  1046. return false
  1047. }
  1048. // If the iterator completed, deliver directly whatever's available
  1049. if it.done {
  1050. select {
  1051. case log := <-it.logs:
  1052. it.Event = new(WithdrawalDelayerInitializeWithdrawalDelayerEvent)
  1053. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1054. it.fail = err
  1055. return false
  1056. }
  1057. it.Event.Raw = log
  1058. return true
  1059. default:
  1060. return false
  1061. }
  1062. }
  1063. // Iterator still in progress, wait for either a data or an error event
  1064. select {
  1065. case log := <-it.logs:
  1066. it.Event = new(WithdrawalDelayerInitializeWithdrawalDelayerEvent)
  1067. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1068. it.fail = err
  1069. return false
  1070. }
  1071. it.Event.Raw = log
  1072. return true
  1073. case err := <-it.sub.Err():
  1074. it.done = true
  1075. it.fail = err
  1076. return it.Next()
  1077. }
  1078. }
  1079. // Error returns any retrieval or parsing error occurred during filtering.
  1080. func (it *WithdrawalDelayerInitializeWithdrawalDelayerEventIterator) Error() error {
  1081. return it.fail
  1082. }
  1083. // Close terminates the iteration process, releasing any pending underlying
  1084. // resources.
  1085. func (it *WithdrawalDelayerInitializeWithdrawalDelayerEventIterator) Close() error {
  1086. it.sub.Unsubscribe()
  1087. return nil
  1088. }
  1089. // WithdrawalDelayerInitializeWithdrawalDelayerEvent represents a InitializeWithdrawalDelayerEvent event raised by the WithdrawalDelayer contract.
  1090. type WithdrawalDelayerInitializeWithdrawalDelayerEvent struct {
  1091. InitialWithdrawalDelay uint64
  1092. InitialHermezGovernanceAddress common.Address
  1093. InitialEmergencyCouncil common.Address
  1094. Raw types.Log // Blockchain specific contextual infos
  1095. }
  1096. // FilterInitializeWithdrawalDelayerEvent is a free log retrieval operation binding the contract event 0x8b81dca4c96ae06989fa8aa1baa4ccc05dfb42e0948c7d5b7505b68ccde41eec.
  1097. //
  1098. // Solidity: event InitializeWithdrawalDelayerEvent(uint64 initialWithdrawalDelay, address initialHermezGovernanceAddress, address initialEmergencyCouncil)
  1099. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) FilterInitializeWithdrawalDelayerEvent(opts *bind.FilterOpts) (*WithdrawalDelayerInitializeWithdrawalDelayerEventIterator, error) {
  1100. logs, sub, err := _WithdrawalDelayer.contract.FilterLogs(opts, "InitializeWithdrawalDelayerEvent")
  1101. if err != nil {
  1102. return nil, tracerr.Wrap(err)
  1103. }
  1104. return &WithdrawalDelayerInitializeWithdrawalDelayerEventIterator{contract: _WithdrawalDelayer.contract, event: "InitializeWithdrawalDelayerEvent", logs: logs, sub: sub}, nil
  1105. }
  1106. // WatchInitializeWithdrawalDelayerEvent is a free log subscription operation binding the contract event 0x8b81dca4c96ae06989fa8aa1baa4ccc05dfb42e0948c7d5b7505b68ccde41eec.
  1107. //
  1108. // Solidity: event InitializeWithdrawalDelayerEvent(uint64 initialWithdrawalDelay, address initialHermezGovernanceAddress, address initialEmergencyCouncil)
  1109. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) WatchInitializeWithdrawalDelayerEvent(opts *bind.WatchOpts, sink chan<- *WithdrawalDelayerInitializeWithdrawalDelayerEvent) (event.Subscription, error) {
  1110. logs, sub, err := _WithdrawalDelayer.contract.WatchLogs(opts, "InitializeWithdrawalDelayerEvent")
  1111. if err != nil {
  1112. return nil, tracerr.Wrap(err)
  1113. }
  1114. return event.NewSubscription(func(quit <-chan struct{}) error {
  1115. defer sub.Unsubscribe()
  1116. for {
  1117. select {
  1118. case log := <-logs:
  1119. // New log arrived, parse the event and forward to the user
  1120. event := new(WithdrawalDelayerInitializeWithdrawalDelayerEvent)
  1121. if err := _WithdrawalDelayer.contract.UnpackLog(event, "InitializeWithdrawalDelayerEvent", log); err != nil {
  1122. return tracerr.Wrap(err)
  1123. }
  1124. event.Raw = log
  1125. select {
  1126. case sink <- event:
  1127. case err := <-sub.Err():
  1128. return tracerr.Wrap(err)
  1129. case <-quit:
  1130. return nil
  1131. }
  1132. case err := <-sub.Err():
  1133. return tracerr.Wrap(err)
  1134. case <-quit:
  1135. return nil
  1136. }
  1137. }
  1138. }), nil
  1139. }
  1140. // ParseInitializeWithdrawalDelayerEvent is a log parse operation binding the contract event 0x8b81dca4c96ae06989fa8aa1baa4ccc05dfb42e0948c7d5b7505b68ccde41eec.
  1141. //
  1142. // Solidity: event InitializeWithdrawalDelayerEvent(uint64 initialWithdrawalDelay, address initialHermezGovernanceAddress, address initialEmergencyCouncil)
  1143. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) ParseInitializeWithdrawalDelayerEvent(log types.Log) (*WithdrawalDelayerInitializeWithdrawalDelayerEvent, error) {
  1144. event := new(WithdrawalDelayerInitializeWithdrawalDelayerEvent)
  1145. if err := _WithdrawalDelayer.contract.UnpackLog(event, "InitializeWithdrawalDelayerEvent", log); err != nil {
  1146. return nil, tracerr.Wrap(err)
  1147. }
  1148. event.Raw = log
  1149. return event, nil
  1150. }
  1151. // WithdrawalDelayerNewEmergencyCouncilIterator is returned from FilterNewEmergencyCouncil and is used to iterate over the raw logs and unpacked data for NewEmergencyCouncil events raised by the WithdrawalDelayer contract.
  1152. type WithdrawalDelayerNewEmergencyCouncilIterator struct {
  1153. Event *WithdrawalDelayerNewEmergencyCouncil // Event containing the contract specifics and raw log
  1154. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1155. event string // Event name to use for unpacking event data
  1156. logs chan types.Log // Log channel receiving the found contract events
  1157. sub ethereum.Subscription // Subscription for errors, completion and termination
  1158. done bool // Whether the subscription completed delivering logs
  1159. fail error // Occurred error to stop iteration
  1160. }
  1161. // Next advances the iterator to the subsequent event, returning whether there
  1162. // are any more events found. In case of a retrieval or parsing error, false is
  1163. // returned and Error() can be queried for the exact failure.
  1164. func (it *WithdrawalDelayerNewEmergencyCouncilIterator) Next() bool {
  1165. // If the iterator failed, stop iterating
  1166. if it.fail != nil {
  1167. return false
  1168. }
  1169. // If the iterator completed, deliver directly whatever's available
  1170. if it.done {
  1171. select {
  1172. case log := <-it.logs:
  1173. it.Event = new(WithdrawalDelayerNewEmergencyCouncil)
  1174. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1175. it.fail = err
  1176. return false
  1177. }
  1178. it.Event.Raw = log
  1179. return true
  1180. default:
  1181. return false
  1182. }
  1183. }
  1184. // Iterator still in progress, wait for either a data or an error event
  1185. select {
  1186. case log := <-it.logs:
  1187. it.Event = new(WithdrawalDelayerNewEmergencyCouncil)
  1188. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1189. it.fail = err
  1190. return false
  1191. }
  1192. it.Event.Raw = log
  1193. return true
  1194. case err := <-it.sub.Err():
  1195. it.done = true
  1196. it.fail = err
  1197. return it.Next()
  1198. }
  1199. }
  1200. // Error returns any retrieval or parsing error occurred during filtering.
  1201. func (it *WithdrawalDelayerNewEmergencyCouncilIterator) Error() error {
  1202. return it.fail
  1203. }
  1204. // Close terminates the iteration process, releasing any pending underlying
  1205. // resources.
  1206. func (it *WithdrawalDelayerNewEmergencyCouncilIterator) Close() error {
  1207. it.sub.Unsubscribe()
  1208. return nil
  1209. }
  1210. // WithdrawalDelayerNewEmergencyCouncil represents a NewEmergencyCouncil event raised by the WithdrawalDelayer contract.
  1211. type WithdrawalDelayerNewEmergencyCouncil struct {
  1212. NewEmergencyCouncil common.Address
  1213. Raw types.Log // Blockchain specific contextual infos
  1214. }
  1215. // FilterNewEmergencyCouncil is a free log retrieval operation binding the contract event 0xcc267667d474ef34ee2de2d060e7c8b2c7295cefa22e57fd7049e22b5fdb5396.
  1216. //
  1217. // Solidity: event NewEmergencyCouncil(address newEmergencyCouncil)
  1218. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) FilterNewEmergencyCouncil(opts *bind.FilterOpts) (*WithdrawalDelayerNewEmergencyCouncilIterator, error) {
  1219. logs, sub, err := _WithdrawalDelayer.contract.FilterLogs(opts, "NewEmergencyCouncil")
  1220. if err != nil {
  1221. return nil, tracerr.Wrap(err)
  1222. }
  1223. return &WithdrawalDelayerNewEmergencyCouncilIterator{contract: _WithdrawalDelayer.contract, event: "NewEmergencyCouncil", logs: logs, sub: sub}, nil
  1224. }
  1225. // WatchNewEmergencyCouncil is a free log subscription operation binding the contract event 0xcc267667d474ef34ee2de2d060e7c8b2c7295cefa22e57fd7049e22b5fdb5396.
  1226. //
  1227. // Solidity: event NewEmergencyCouncil(address newEmergencyCouncil)
  1228. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) WatchNewEmergencyCouncil(opts *bind.WatchOpts, sink chan<- *WithdrawalDelayerNewEmergencyCouncil) (event.Subscription, error) {
  1229. logs, sub, err := _WithdrawalDelayer.contract.WatchLogs(opts, "NewEmergencyCouncil")
  1230. if err != nil {
  1231. return nil, tracerr.Wrap(err)
  1232. }
  1233. return event.NewSubscription(func(quit <-chan struct{}) error {
  1234. defer sub.Unsubscribe()
  1235. for {
  1236. select {
  1237. case log := <-logs:
  1238. // New log arrived, parse the event and forward to the user
  1239. event := new(WithdrawalDelayerNewEmergencyCouncil)
  1240. if err := _WithdrawalDelayer.contract.UnpackLog(event, "NewEmergencyCouncil", log); err != nil {
  1241. return tracerr.Wrap(err)
  1242. }
  1243. event.Raw = log
  1244. select {
  1245. case sink <- event:
  1246. case err := <-sub.Err():
  1247. return tracerr.Wrap(err)
  1248. case <-quit:
  1249. return nil
  1250. }
  1251. case err := <-sub.Err():
  1252. return tracerr.Wrap(err)
  1253. case <-quit:
  1254. return nil
  1255. }
  1256. }
  1257. }), nil
  1258. }
  1259. // ParseNewEmergencyCouncil is a log parse operation binding the contract event 0xcc267667d474ef34ee2de2d060e7c8b2c7295cefa22e57fd7049e22b5fdb5396.
  1260. //
  1261. // Solidity: event NewEmergencyCouncil(address newEmergencyCouncil)
  1262. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) ParseNewEmergencyCouncil(log types.Log) (*WithdrawalDelayerNewEmergencyCouncil, error) {
  1263. event := new(WithdrawalDelayerNewEmergencyCouncil)
  1264. if err := _WithdrawalDelayer.contract.UnpackLog(event, "NewEmergencyCouncil", log); err != nil {
  1265. return nil, tracerr.Wrap(err)
  1266. }
  1267. event.Raw = log
  1268. return event, nil
  1269. }
  1270. // WithdrawalDelayerNewHermezGovernanceAddressIterator is returned from FilterNewHermezGovernanceAddress and is used to iterate over the raw logs and unpacked data for NewHermezGovernanceAddress events raised by the WithdrawalDelayer contract.
  1271. type WithdrawalDelayerNewHermezGovernanceAddressIterator struct {
  1272. Event *WithdrawalDelayerNewHermezGovernanceAddress // Event containing the contract specifics and raw log
  1273. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1274. event string // Event name to use for unpacking event data
  1275. logs chan types.Log // Log channel receiving the found contract events
  1276. sub ethereum.Subscription // Subscription for errors, completion and termination
  1277. done bool // Whether the subscription completed delivering logs
  1278. fail error // Occurred error to stop iteration
  1279. }
  1280. // Next advances the iterator to the subsequent event, returning whether there
  1281. // are any more events found. In case of a retrieval or parsing error, false is
  1282. // returned and Error() can be queried for the exact failure.
  1283. func (it *WithdrawalDelayerNewHermezGovernanceAddressIterator) Next() bool {
  1284. // If the iterator failed, stop iterating
  1285. if it.fail != nil {
  1286. return false
  1287. }
  1288. // If the iterator completed, deliver directly whatever's available
  1289. if it.done {
  1290. select {
  1291. case log := <-it.logs:
  1292. it.Event = new(WithdrawalDelayerNewHermezGovernanceAddress)
  1293. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1294. it.fail = err
  1295. return false
  1296. }
  1297. it.Event.Raw = log
  1298. return true
  1299. default:
  1300. return false
  1301. }
  1302. }
  1303. // Iterator still in progress, wait for either a data or an error event
  1304. select {
  1305. case log := <-it.logs:
  1306. it.Event = new(WithdrawalDelayerNewHermezGovernanceAddress)
  1307. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1308. it.fail = err
  1309. return false
  1310. }
  1311. it.Event.Raw = log
  1312. return true
  1313. case err := <-it.sub.Err():
  1314. it.done = true
  1315. it.fail = err
  1316. return it.Next()
  1317. }
  1318. }
  1319. // Error returns any retrieval or parsing error occurred during filtering.
  1320. func (it *WithdrawalDelayerNewHermezGovernanceAddressIterator) Error() error {
  1321. return it.fail
  1322. }
  1323. // Close terminates the iteration process, releasing any pending underlying
  1324. // resources.
  1325. func (it *WithdrawalDelayerNewHermezGovernanceAddressIterator) Close() error {
  1326. it.sub.Unsubscribe()
  1327. return nil
  1328. }
  1329. // WithdrawalDelayerNewHermezGovernanceAddress represents a NewHermezGovernanceAddress event raised by the WithdrawalDelayer contract.
  1330. type WithdrawalDelayerNewHermezGovernanceAddress struct {
  1331. NewHermezGovernanceAddress common.Address
  1332. Raw types.Log // Blockchain specific contextual infos
  1333. }
  1334. // FilterNewHermezGovernanceAddress is a free log retrieval operation binding the contract event 0x3bf02437d5cd40067085d9dac2c3cdcbef0a449d98a259a40d9c24380aca81bf.
  1335. //
  1336. // Solidity: event NewHermezGovernanceAddress(address newHermezGovernanceAddress)
  1337. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) FilterNewHermezGovernanceAddress(opts *bind.FilterOpts) (*WithdrawalDelayerNewHermezGovernanceAddressIterator, error) {
  1338. logs, sub, err := _WithdrawalDelayer.contract.FilterLogs(opts, "NewHermezGovernanceAddress")
  1339. if err != nil {
  1340. return nil, tracerr.Wrap(err)
  1341. }
  1342. return &WithdrawalDelayerNewHermezGovernanceAddressIterator{contract: _WithdrawalDelayer.contract, event: "NewHermezGovernanceAddress", logs: logs, sub: sub}, nil
  1343. }
  1344. // WatchNewHermezGovernanceAddress is a free log subscription operation binding the contract event 0x3bf02437d5cd40067085d9dac2c3cdcbef0a449d98a259a40d9c24380aca81bf.
  1345. //
  1346. // Solidity: event NewHermezGovernanceAddress(address newHermezGovernanceAddress)
  1347. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) WatchNewHermezGovernanceAddress(opts *bind.WatchOpts, sink chan<- *WithdrawalDelayerNewHermezGovernanceAddress) (event.Subscription, error) {
  1348. logs, sub, err := _WithdrawalDelayer.contract.WatchLogs(opts, "NewHermezGovernanceAddress")
  1349. if err != nil {
  1350. return nil, tracerr.Wrap(err)
  1351. }
  1352. return event.NewSubscription(func(quit <-chan struct{}) error {
  1353. defer sub.Unsubscribe()
  1354. for {
  1355. select {
  1356. case log := <-logs:
  1357. // New log arrived, parse the event and forward to the user
  1358. event := new(WithdrawalDelayerNewHermezGovernanceAddress)
  1359. if err := _WithdrawalDelayer.contract.UnpackLog(event, "NewHermezGovernanceAddress", log); err != nil {
  1360. return tracerr.Wrap(err)
  1361. }
  1362. event.Raw = log
  1363. select {
  1364. case sink <- event:
  1365. case err := <-sub.Err():
  1366. return tracerr.Wrap(err)
  1367. case <-quit:
  1368. return nil
  1369. }
  1370. case err := <-sub.Err():
  1371. return tracerr.Wrap(err)
  1372. case <-quit:
  1373. return nil
  1374. }
  1375. }
  1376. }), nil
  1377. }
  1378. // ParseNewHermezGovernanceAddress is a log parse operation binding the contract event 0x3bf02437d5cd40067085d9dac2c3cdcbef0a449d98a259a40d9c24380aca81bf.
  1379. //
  1380. // Solidity: event NewHermezGovernanceAddress(address newHermezGovernanceAddress)
  1381. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) ParseNewHermezGovernanceAddress(log types.Log) (*WithdrawalDelayerNewHermezGovernanceAddress, error) {
  1382. event := new(WithdrawalDelayerNewHermezGovernanceAddress)
  1383. if err := _WithdrawalDelayer.contract.UnpackLog(event, "NewHermezGovernanceAddress", log); err != nil {
  1384. return nil, tracerr.Wrap(err)
  1385. }
  1386. event.Raw = log
  1387. return event, nil
  1388. }
  1389. // WithdrawalDelayerNewWithdrawalDelayIterator is returned from FilterNewWithdrawalDelay and is used to iterate over the raw logs and unpacked data for NewWithdrawalDelay events raised by the WithdrawalDelayer contract.
  1390. type WithdrawalDelayerNewWithdrawalDelayIterator struct {
  1391. Event *WithdrawalDelayerNewWithdrawalDelay // Event containing the contract specifics and raw log
  1392. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1393. event string // Event name to use for unpacking event data
  1394. logs chan types.Log // Log channel receiving the found contract events
  1395. sub ethereum.Subscription // Subscription for errors, completion and termination
  1396. done bool // Whether the subscription completed delivering logs
  1397. fail error // Occurred error to stop iteration
  1398. }
  1399. // Next advances the iterator to the subsequent event, returning whether there
  1400. // are any more events found. In case of a retrieval or parsing error, false is
  1401. // returned and Error() can be queried for the exact failure.
  1402. func (it *WithdrawalDelayerNewWithdrawalDelayIterator) Next() bool {
  1403. // If the iterator failed, stop iterating
  1404. if it.fail != nil {
  1405. return false
  1406. }
  1407. // If the iterator completed, deliver directly whatever's available
  1408. if it.done {
  1409. select {
  1410. case log := <-it.logs:
  1411. it.Event = new(WithdrawalDelayerNewWithdrawalDelay)
  1412. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1413. it.fail = err
  1414. return false
  1415. }
  1416. it.Event.Raw = log
  1417. return true
  1418. default:
  1419. return false
  1420. }
  1421. }
  1422. // Iterator still in progress, wait for either a data or an error event
  1423. select {
  1424. case log := <-it.logs:
  1425. it.Event = new(WithdrawalDelayerNewWithdrawalDelay)
  1426. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1427. it.fail = err
  1428. return false
  1429. }
  1430. it.Event.Raw = log
  1431. return true
  1432. case err := <-it.sub.Err():
  1433. it.done = true
  1434. it.fail = err
  1435. return it.Next()
  1436. }
  1437. }
  1438. // Error returns any retrieval or parsing error occurred during filtering.
  1439. func (it *WithdrawalDelayerNewWithdrawalDelayIterator) Error() error {
  1440. return it.fail
  1441. }
  1442. // Close terminates the iteration process, releasing any pending underlying
  1443. // resources.
  1444. func (it *WithdrawalDelayerNewWithdrawalDelayIterator) Close() error {
  1445. it.sub.Unsubscribe()
  1446. return nil
  1447. }
  1448. // WithdrawalDelayerNewWithdrawalDelay represents a NewWithdrawalDelay event raised by the WithdrawalDelayer contract.
  1449. type WithdrawalDelayerNewWithdrawalDelay struct {
  1450. WithdrawalDelay uint64
  1451. Raw types.Log // Blockchain specific contextual infos
  1452. }
  1453. // FilterNewWithdrawalDelay is a free log retrieval operation binding the contract event 0x6b3670ab51e04a9da086741e5fd1eb36ffaf1d661a15330c528e1f3e0c8722d7.
  1454. //
  1455. // Solidity: event NewWithdrawalDelay(uint64 withdrawalDelay)
  1456. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) FilterNewWithdrawalDelay(opts *bind.FilterOpts) (*WithdrawalDelayerNewWithdrawalDelayIterator, error) {
  1457. logs, sub, err := _WithdrawalDelayer.contract.FilterLogs(opts, "NewWithdrawalDelay")
  1458. if err != nil {
  1459. return nil, tracerr.Wrap(err)
  1460. }
  1461. return &WithdrawalDelayerNewWithdrawalDelayIterator{contract: _WithdrawalDelayer.contract, event: "NewWithdrawalDelay", logs: logs, sub: sub}, nil
  1462. }
  1463. // WatchNewWithdrawalDelay is a free log subscription operation binding the contract event 0x6b3670ab51e04a9da086741e5fd1eb36ffaf1d661a15330c528e1f3e0c8722d7.
  1464. //
  1465. // Solidity: event NewWithdrawalDelay(uint64 withdrawalDelay)
  1466. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) WatchNewWithdrawalDelay(opts *bind.WatchOpts, sink chan<- *WithdrawalDelayerNewWithdrawalDelay) (event.Subscription, error) {
  1467. logs, sub, err := _WithdrawalDelayer.contract.WatchLogs(opts, "NewWithdrawalDelay")
  1468. if err != nil {
  1469. return nil, tracerr.Wrap(err)
  1470. }
  1471. return event.NewSubscription(func(quit <-chan struct{}) error {
  1472. defer sub.Unsubscribe()
  1473. for {
  1474. select {
  1475. case log := <-logs:
  1476. // New log arrived, parse the event and forward to the user
  1477. event := new(WithdrawalDelayerNewWithdrawalDelay)
  1478. if err := _WithdrawalDelayer.contract.UnpackLog(event, "NewWithdrawalDelay", log); err != nil {
  1479. return tracerr.Wrap(err)
  1480. }
  1481. event.Raw = log
  1482. select {
  1483. case sink <- event:
  1484. case err := <-sub.Err():
  1485. return tracerr.Wrap(err)
  1486. case <-quit:
  1487. return nil
  1488. }
  1489. case err := <-sub.Err():
  1490. return tracerr.Wrap(err)
  1491. case <-quit:
  1492. return nil
  1493. }
  1494. }
  1495. }), nil
  1496. }
  1497. // ParseNewWithdrawalDelay is a log parse operation binding the contract event 0x6b3670ab51e04a9da086741e5fd1eb36ffaf1d661a15330c528e1f3e0c8722d7.
  1498. //
  1499. // Solidity: event NewWithdrawalDelay(uint64 withdrawalDelay)
  1500. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) ParseNewWithdrawalDelay(log types.Log) (*WithdrawalDelayerNewWithdrawalDelay, error) {
  1501. event := new(WithdrawalDelayerNewWithdrawalDelay)
  1502. if err := _WithdrawalDelayer.contract.UnpackLog(event, "NewWithdrawalDelay", log); err != nil {
  1503. return nil, tracerr.Wrap(err)
  1504. }
  1505. event.Raw = log
  1506. return event, nil
  1507. }
  1508. // WithdrawalDelayerWithdrawIterator is returned from FilterWithdraw and is used to iterate over the raw logs and unpacked data for Withdraw events raised by the WithdrawalDelayer contract.
  1509. type WithdrawalDelayerWithdrawIterator struct {
  1510. Event *WithdrawalDelayerWithdraw // Event containing the contract specifics and raw log
  1511. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1512. event string // Event name to use for unpacking event data
  1513. logs chan types.Log // Log channel receiving the found contract events
  1514. sub ethereum.Subscription // Subscription for errors, completion and termination
  1515. done bool // Whether the subscription completed delivering logs
  1516. fail error // Occurred error to stop iteration
  1517. }
  1518. // Next advances the iterator to the subsequent event, returning whether there
  1519. // are any more events found. In case of a retrieval or parsing error, false is
  1520. // returned and Error() can be queried for the exact failure.
  1521. func (it *WithdrawalDelayerWithdrawIterator) Next() bool {
  1522. // If the iterator failed, stop iterating
  1523. if it.fail != nil {
  1524. return false
  1525. }
  1526. // If the iterator completed, deliver directly whatever's available
  1527. if it.done {
  1528. select {
  1529. case log := <-it.logs:
  1530. it.Event = new(WithdrawalDelayerWithdraw)
  1531. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1532. it.fail = err
  1533. return false
  1534. }
  1535. it.Event.Raw = log
  1536. return true
  1537. default:
  1538. return false
  1539. }
  1540. }
  1541. // Iterator still in progress, wait for either a data or an error event
  1542. select {
  1543. case log := <-it.logs:
  1544. it.Event = new(WithdrawalDelayerWithdraw)
  1545. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1546. it.fail = err
  1547. return false
  1548. }
  1549. it.Event.Raw = log
  1550. return true
  1551. case err := <-it.sub.Err():
  1552. it.done = true
  1553. it.fail = err
  1554. return it.Next()
  1555. }
  1556. }
  1557. // Error returns any retrieval or parsing error occurred during filtering.
  1558. func (it *WithdrawalDelayerWithdrawIterator) Error() error {
  1559. return it.fail
  1560. }
  1561. // Close terminates the iteration process, releasing any pending underlying
  1562. // resources.
  1563. func (it *WithdrawalDelayerWithdrawIterator) Close() error {
  1564. it.sub.Unsubscribe()
  1565. return nil
  1566. }
  1567. // WithdrawalDelayerWithdraw represents a Withdraw event raised by the WithdrawalDelayer contract.
  1568. type WithdrawalDelayerWithdraw struct {
  1569. Token common.Address
  1570. Owner common.Address
  1571. Amount *big.Int
  1572. Raw types.Log // Blockchain specific contextual infos
  1573. }
  1574. // FilterWithdraw is a free log retrieval operation binding the contract event 0x72608e45b52a95a12c2ac7f15ff53f92fc9572c9d84b6e6b5d7f0f7826cf3271.
  1575. //
  1576. // Solidity: event Withdraw(address indexed token, address indexed owner, uint192 amount)
  1577. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) FilterWithdraw(opts *bind.FilterOpts, token []common.Address, owner []common.Address) (*WithdrawalDelayerWithdrawIterator, error) {
  1578. var tokenRule []interface{}
  1579. for _, tokenItem := range token {
  1580. tokenRule = append(tokenRule, tokenItem)
  1581. }
  1582. var ownerRule []interface{}
  1583. for _, ownerItem := range owner {
  1584. ownerRule = append(ownerRule, ownerItem)
  1585. }
  1586. logs, sub, err := _WithdrawalDelayer.contract.FilterLogs(opts, "Withdraw", tokenRule, ownerRule)
  1587. if err != nil {
  1588. return nil, tracerr.Wrap(err)
  1589. }
  1590. return &WithdrawalDelayerWithdrawIterator{contract: _WithdrawalDelayer.contract, event: "Withdraw", logs: logs, sub: sub}, nil
  1591. }
  1592. // WatchWithdraw is a free log subscription operation binding the contract event 0x72608e45b52a95a12c2ac7f15ff53f92fc9572c9d84b6e6b5d7f0f7826cf3271.
  1593. //
  1594. // Solidity: event Withdraw(address indexed token, address indexed owner, uint192 amount)
  1595. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) WatchWithdraw(opts *bind.WatchOpts, sink chan<- *WithdrawalDelayerWithdraw, token []common.Address, owner []common.Address) (event.Subscription, error) {
  1596. var tokenRule []interface{}
  1597. for _, tokenItem := range token {
  1598. tokenRule = append(tokenRule, tokenItem)
  1599. }
  1600. var ownerRule []interface{}
  1601. for _, ownerItem := range owner {
  1602. ownerRule = append(ownerRule, ownerItem)
  1603. }
  1604. logs, sub, err := _WithdrawalDelayer.contract.WatchLogs(opts, "Withdraw", tokenRule, ownerRule)
  1605. if err != nil {
  1606. return nil, tracerr.Wrap(err)
  1607. }
  1608. return event.NewSubscription(func(quit <-chan struct{}) error {
  1609. defer sub.Unsubscribe()
  1610. for {
  1611. select {
  1612. case log := <-logs:
  1613. // New log arrived, parse the event and forward to the user
  1614. event := new(WithdrawalDelayerWithdraw)
  1615. if err := _WithdrawalDelayer.contract.UnpackLog(event, "Withdraw", log); err != nil {
  1616. return tracerr.Wrap(err)
  1617. }
  1618. event.Raw = log
  1619. select {
  1620. case sink <- event:
  1621. case err := <-sub.Err():
  1622. return tracerr.Wrap(err)
  1623. case <-quit:
  1624. return nil
  1625. }
  1626. case err := <-sub.Err():
  1627. return tracerr.Wrap(err)
  1628. case <-quit:
  1629. return nil
  1630. }
  1631. }
  1632. }), nil
  1633. }
  1634. // ParseWithdraw is a log parse operation binding the contract event 0x72608e45b52a95a12c2ac7f15ff53f92fc9572c9d84b6e6b5d7f0f7826cf3271.
  1635. //
  1636. // Solidity: event Withdraw(address indexed token, address indexed owner, uint192 amount)
  1637. func (_WithdrawalDelayer *WithdrawalDelayerFilterer) ParseWithdraw(log types.Log) (*WithdrawalDelayerWithdraw, error) {
  1638. event := new(WithdrawalDelayerWithdraw)
  1639. if err := _WithdrawalDelayer.contract.UnpackLog(event, "Withdraw", log); err != nil {
  1640. return nil, tracerr.Wrap(err)
  1641. }
  1642. event.Raw = log
  1643. return event, nil
  1644. }