forked from cerc-io/laconicd-deprecated
all: cleanup imports (#524)
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||
ethcrypto "github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
)
|
||||
|
||||
func TestPersonal_ListAccounts(t *testing.T) {
|
||||
@@ -47,18 +47,18 @@ func TestPersonal_Sign(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPersonal_ImportRawKey(t *testing.T) {
|
||||
privkey, err := ethcrypto.GenerateKey()
|
||||
privkey, err := crypto.GenerateKey()
|
||||
require.NoError(t, err)
|
||||
|
||||
// parse priv key to hex
|
||||
hexPriv := common.Bytes2Hex(ethcrypto.FromECDSA(privkey))
|
||||
hexPriv := common.Bytes2Hex(crypto.FromECDSA(privkey))
|
||||
rpcRes := Call(t, "personal_importRawKey", []string{hexPriv, "password"})
|
||||
|
||||
var res hexutil.Bytes
|
||||
err = json.Unmarshal(rpcRes.Result, &res)
|
||||
require.NoError(t, err)
|
||||
|
||||
addr := ethcrypto.PubkeyToAddress(privkey.PublicKey)
|
||||
addr := crypto.PubkeyToAddress(privkey.PublicKey)
|
||||
resAddr := common.BytesToAddress(res)
|
||||
|
||||
require.Equal(t, addr.String(), resAddr.String())
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
ethermint "github.com/tharsis/ethermint/types"
|
||||
evmtypes "github.com/tharsis/ethermint/x/evm/types"
|
||||
|
||||
ethcmn "github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
||||
)
|
||||
@@ -339,7 +339,7 @@ func TestEth_blockNumber(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEth_coinbase(t *testing.T) {
|
||||
zeroAddress := hexutil.Bytes(ethcmn.Address{}.Bytes())
|
||||
zeroAddress := hexutil.Bytes(common.Address{}.Bytes())
|
||||
rpcRes := call(t, "eth_coinbase", []string{})
|
||||
|
||||
var res hexutil.Bytes
|
||||
@@ -470,7 +470,7 @@ func TestEth_GetFilterChanges_BlockFilter(t *testing.T) {
|
||||
time.Sleep(5 * time.Second)
|
||||
|
||||
changesRes := call(t, "eth_getFilterChanges", []string{ID})
|
||||
var hashes []ethcmn.Hash
|
||||
var hashes []common.Hash
|
||||
err = json.Unmarshal(changesRes.Result, &hashes)
|
||||
require.NoError(t, err)
|
||||
require.GreaterOrEqual(t, len(hashes), 1)
|
||||
@@ -579,7 +579,7 @@ func TestEth_GetTransactionReceipt_ContractDeployment(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, "0x1", receipt["status"].(string))
|
||||
|
||||
require.NotEqual(t, ethcmn.Address{}.String(), receipt["contractAddress"].(string))
|
||||
require.NotEqual(t, common.Address{}.String(), receipt["contractAddress"].(string))
|
||||
require.NotNil(t, receipt["logs"])
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user