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
550 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 := NewEthereumClient(ethClient, auxAccount, ks, nil)
  12. consts, err := client.EthERC20Consts(tokenHEZAddressConst)
  13. require.Nil(t, err)
  14. assert.Equal(t, "Hermez Network Token", consts.Name)
  15. assert.Equal(t, "HEZ", consts.Symbol)
  16. assert.Equal(t, uint64(18), consts.Decimals)
  17. }