You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
1.2 KiB

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