Smart Contracts Data Synchronization

This commit is contained in:
ToniRamirezM
2020-09-15 16:02:22 +02:00
committed by Eduard S
parent 5ad447c47c
commit 145f37b135
4 changed files with 348 additions and 44 deletions

View File

@@ -2,6 +2,7 @@ package common
import (
"math/big"
"time"
eth "github.com/ethereum/go-ethereum/common"
)
@@ -30,6 +31,16 @@ type AuctionVars struct {
AllocationRatio AllocationRatio
}
// WithdrawalDelayerVars contains the Withdrawal Delayer smart contract variables
type WithdrawalDelayerVars struct {
HermezRollupAddress eth.Address
HermezGovernanceDAOAddress eth.Address
WhiteHackGroupAddress eth.Address
WithdrawalDelay uint
EmergencyModeStartingTime time.Time
EmergencyModeEnabled bool
}
// MinBidSlots TODO
type MinBidSlots [6]uint

12
common/syncstatus.go Normal file
View File

@@ -0,0 +1,12 @@
package common
import ethCommon "github.com/ethereum/go-ethereum/common"
// SyncStatus is returned by the Status method of the Synchronizer
type SyncStatus struct {
CurrentBlock int64
CurrentBatch BatchNum
CurrentForgerAddr ethCommon.Address
NextForgerAddr ethCommon.Address
Synchronized bool
}