mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 11:26:44 +01:00
Update to follow DB spec
This commit is contained in:
21
common/smartcontractparams.go
Normal file
21
common/smartcontractparams.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
eth "github.com/ethereum/go-ethereum/common"
|
||||
)
|
||||
|
||||
// SmartContractParameters describes the constant values of the parameters of the Hermez smart contracts
|
||||
// WARNING: not stable at all
|
||||
type SmartContractParameters struct {
|
||||
SlotDuration uint64 // number of ethereum blocks in a slot
|
||||
Slot0BlockNum uint64 // ethereum block number of the first slot (slot 0)
|
||||
MaxL1UserTxs uint64 // maximum number of L1UserTxs that can be queued for a single batch
|
||||
FreeCoordinatorWait uint64 // if the winning coordinator doesn't forge during this number of blocks, anyone can forge
|
||||
ContractAddr eth.Address // Ethereum address of the rollup smart contract
|
||||
NLevels uint16 // Heigth of the SMT. This will determine the maximum number of accounts that can coexist in the Hermez network by 2^nLevels
|
||||
MaxTxs uint16 // Max amount of txs that can be added in a batch, either L1 or L2
|
||||
FeeL1Tx *big.Int // amount of eth (in wei) that has to be payed to do a L1 tx
|
||||
FeeDeposit *big.Int // amount of eth (in wei) that has to be payed to do a deposit
|
||||
}
|
||||
Reference in New Issue
Block a user