Update ethclient wdelayer & add auction events

This commit is contained in:
laisolizq
2020-09-21 15:47:29 +02:00
committed by Eduard S
parent 0c9a6e3f2d
commit 7a3407a561
8 changed files with 931 additions and 318 deletions

View File

@@ -1,36 +1,13 @@
package eth
import (
"io/ioutil"
"testing"
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/stretchr/testify/require"
)
var rollupClient *RollupClient
func TestNewRollupClient(t *testing.T) {
key, err := crypto.HexToECDSA(governancePrivateKey)
require.Nil(t, err)
dir, err := ioutil.TempDir("", "tmpks")
require.Nil(t, err)
ks := keystore.NewKeyStore(dir, keystore.StandardScryptN, keystore.StandardScryptP)
account, err := ks.ImportECDSA(key, password)
require.Nil(t, err)
err = ks.Unlock(account, password)
require.Nil(t, err)
// Init eth client
ethClient, err := ethclient.Dial(ehtClientDialURL)
require.Nil(t, err)
ethereumClient := NewEthereumClient(ethClient, &account, ks, nil)
if integration != "" {
rollupClient = NewRollupClient(ethereumClient, HERMEZROLLUP)
}
}
func TestRollupConstants(t *testing.T) {
if rollupClient != nil {
_, err := rollupClient.RollupConstants()