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	HermezGovernanceAddress   ethCommon.Address `json:"hermezGovernanceAddress" meddler:"gov_address" validate:"required"`
20	EmergencyCouncilAddress   ethCommon.Address `json:"emergencyCouncilAddress" meddler:"emg_address" validate:"required"`
21	WithdrawalDelay           uint64            `json:"withdrawalDelay" meddler:"withdrawal_delay" validate:"required"`
22	EmergencyModeStartingTime uint64            `json:"emergencyModeStartingTime" meddler:"emergency_start_time"`
23	EmergencyMode             bool              `json:"emergencyMode" meddler:"emergency_mode"`
24}
25
26// Copy returns a deep copy of the Variables
27func (v *WDelayerVariables) Copy() *WDelayerVariables {
28	vCpy := *v
29	return &vCpy
30}