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
540 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, accountAux, ks, nil)
  12. consts, err := client.EthERC20Consts(tokenERC20AddressConst)
  13. require.Nil(t, err)
  14. assert.Equal(t, "ERC20_0", consts.Name)
  15. assert.Equal(t, "20_0", consts.Symbol)
  16. assert.Equal(t, uint64(18), consts.Decimals)
  17. }