arnaucube
arnaucube/hermez-nodePublic Self-hosted repository
hermez-node/common/smartcontractparams.go
common/smartcontractparams.goRaw
 1package common
 2
 3import (
 4	"math/big"
 5
 6	ethCommon "github.com/ethereum/go-ethereum/common"
 7)
 8
 9// SmartContractParameters describes the constant values of the parameters of the Hermez smart contracts
10// WARNING: not stable at all
11type SmartContractParameters struct {
12	SlotDuration        uint64            // number of ethereum blocks in a slot
13	Slot0BlockNum       uint64            // ethereum block number of the first slot (slot 0)
14	MaxL1UserTxs        uint64            // maximum number of L1UserTxs that can be queued for a single batch
15	FreeCoordinatorWait uint64            // if the winning coordinator doesn't forge during this number of blocks, anyone can forge
16	ContractAddr        ethCommon.Address // Ethereum address of the rollup smart contract
17	NLevels             uint16            // Heigth of the SMT. This will determine the maximum number of accounts that can coexist in the Hermez network by 2^nLevels
18	MaxTxs              uint16            // Max amount of txs that can be added in a batch, either L1 or L2
19	FeeL1Tx             *big.Int          // amount of eth (in wei) that has to be paid to do a L1 tx
20	FeeDeposit          *big.Int          // amount of eth (in wei) that has to be paid to do a deposit
21}