mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Load an ethereum keystore when the node is started in coordinator mode. The private key corresponding to the forger address must be imported into the keystore before running the node in coordinator mode. You can see an examples in `cli/node/load-sk-example.sh`.
23 lines
576 B
Go
23 lines
576 B
Go
package eth
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/ethereum/go-ethereum/ethclient"
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestEthERC20(t *testing.T) {
|
|
ethClient, err := ethclient.Dial(ethClientDialURL)
|
|
require.Nil(t, err)
|
|
client, err := NewEthereumClient(ethClient, auxAccount, ks, nil)
|
|
require.Nil(t, err)
|
|
|
|
consts, err := client.EthERC20Consts(tokenHEZAddressConst)
|
|
require.Nil(t, err)
|
|
assert.Equal(t, "Hermez Network Token", consts.Name)
|
|
assert.Equal(t, "HEZ", consts.Symbol)
|
|
assert.Equal(t, uint64(18), consts.Decimals)
|
|
}
|