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.

28 lines
974 B

  1. package eth
  2. import (
  3. "math/big"
  4. "testing"
  5. "github.com/stretchr/testify/assert"
  6. "github.com/stretchr/testify/require"
  7. )
  8. var rollupClient *RollupClient
  9. var absoluteMaxL1L2BatchTimeout = uint8(240)
  10. var maxTx = big.NewInt(512)
  11. var nLevels = big.NewInt(32)
  12. func TestRollupConstants(t *testing.T) {
  13. rollupConstants, err := rollupClient.RollupConstants()
  14. require.Nil(t, err)
  15. assert.Equal(t, absoluteMaxL1L2BatchTimeout, rollupConstants.AbsoluteMaxL1L2BatchTimeout)
  16. assert.Equal(t, auctionAddressConst, rollupConstants.HermezAuctionContract)
  17. assert.Equal(t, tokenERC777AddressConst, rollupConstants.TokenHEZ)
  18. assert.Equal(t, maxTx, rollupConstants.Verifiers[0].MaxTx)
  19. assert.Equal(t, nLevels, rollupConstants.Verifiers[0].NLevels)
  20. assert.Equal(t, governanceAddressConst, rollupConstants.HermezGovernanceDAOAddress)
  21. assert.Equal(t, safetyAddressConst, rollupConstants.SafetyAddress)
  22. assert.Equal(t, wdelayerAddressConst, rollupConstants.WithdrawDelayerContract)
  23. }