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