Add sync interface

This commit is contained in:
Arnau B
2020-08-20 16:17:14 +02:00
parent 87a74c471a
commit 1cbf54acc7
6 changed files with 118 additions and 16 deletions

12
common/exittree.go Normal file
View File

@@ -0,0 +1,12 @@
package common
import (
"math/big"
)
type ExitTreeLeaf struct {
AccountIdx Idx
MerkleProof []byte
Amount *big.Int
Nullifier *big.Int
}

View File

@@ -32,8 +32,6 @@ func (tx *L1Tx) Tx() *Tx {
FromIdx: tx.FromIdx,
ToIdx: tx.ToIdx,
Amount: tx.Amount,
Nonce: 0,
Fee: 0,
Type: tx.Type,
}
}

37
common/scvars.go Normal file
View File

@@ -0,0 +1,37 @@
package common
import (
"math/big"
eth "github.com/ethereum/go-ethereum/common"
)
type RollupVars struct {
EthBlockNum uint64
ForgeL1Timeout *big.Int
FeeL1UserTx *big.Int
FeeAddToken *big.Int
TokensHEZ eth.Address
Governance eth.Address
}
type PoDVars struct {
EthBlockNum uint64
SlotDeadline uint
CloseAuctionSlots uint
OpenAuctionSlots uint
Governance eth.Address
MinBidSlots MinBidSlots
Outbidding int
DonationAddress eth.Address
GovernanceAddress eth.Address
AllocationRatio AllocationRatio
}
type MinBidSlots [6]uint
type AllocationRatio struct {
Donation uint
Burn uint
Forger uint
}