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.

30 lines
1.4 KiB

  1. package common
  2. import ethCommon "github.com/ethereum/go-ethereum/common"
  3. // WDelayerConstants are the constants of the Withdrawal Delayer Smart Contract
  4. type WDelayerConstants struct {
  5. // Max Withdrawal Delay
  6. MaxWithdrawalDelay uint64 `json:"maxWithdrawalDelay"`
  7. // Max Emergency mode time
  8. MaxEmergencyModeTime uint64 `json:"maxEmergencyModeTime"`
  9. // HermezRollup smartcontract address
  10. HermezRollup ethCommon.Address `json:"hermezRollup"`
  11. }
  12. // WDelayerVariables are the variables of the Withdrawal Delayer Smart Contract
  13. type WDelayerVariables struct {
  14. EthBlockNum int64 `json:"ethereumBlockNum" meddler:"eth_block_num"`
  15. // HermezRollupAddress ethCommon.Address `json:"hermezRollupAddress" meddler:"rollup_address"`
  16. HermezGovernanceAddress ethCommon.Address `json:"hermezGovernanceAddress" meddler:"govdao_address" validate:"required"`
  17. EmergencyCouncilAddress ethCommon.Address `json:"whiteHackGroupAddress" meddler:"whg_address" validate:"required"`
  18. WithdrawalDelay uint64 `json:"withdrawalDelay" meddler:"withdrawal_delay" validate:"required"`
  19. EmergencyModeStartingTime uint64 `json:"emergencyModeStartingTime" meddler:"emergency_start_time"`
  20. EmergencyMode bool `json:"emergencyMode" meddler:"emergency_mode"`
  21. }
  22. // Copy returns a deep copy of the Variables
  23. func (v *WDelayerVariables) Copy() *WDelayerVariables {
  24. vCpy := *v
  25. return &vCpy
  26. }