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.

22 lines
576 B

  1. package eth
  2. import (
  3. "testing"
  4. "github.com/ethereum/go-ethereum/ethclient"
  5. "github.com/stretchr/testify/assert"
  6. "github.com/stretchr/testify/require"
  7. )
  8. func TestEthERC20(t *testing.T) {
  9. ethClient, err := ethclient.Dial(ethClientDialURL)
  10. require.Nil(t, err)
  11. client, err := NewEthereumClient(ethClient, auxAccount, ks, nil)
  12. require.Nil(t, err)
  13. consts, err := client.EthERC20Consts(tokenHEZAddressConst)
  14. require.Nil(t, err)
  15. assert.Equal(t, "Hermez Network Token", consts.Name)
  16. assert.Equal(t, "HEZ", consts.Symbol)
  17. assert.Equal(t, uint64(18), consts.Decimals)
  18. }