From 78aebf069dc156c9f38f642137baea3c0b845ab2 Mon Sep 17 00:00:00 2001 From: James Kim Date: Tue, 24 Sep 2024 15:37:06 -0400 Subject: [PATCH] fix: default dev account printing --- config/chain.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/chain.go b/config/chain.go index e6356e89..bb33654e 100644 --- a/config/chain.go +++ b/config/chain.go @@ -12,7 +12,9 @@ import ( "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient" ) @@ -159,8 +161,8 @@ func DefaultSecretsConfigAsString() string { fmt.Fprintf(&b, "-----------------------\n") for i := range DefaultSecretsConfig.Accounts { - privateKeyHex, _ := keys.Secret(devkeys.UserKey(i)) - fmt.Fprintf(&b, "(%d): %s\n", i, privateKeyHex) + privateKey, _ := keys.Secret(devkeys.UserKey(i)) + fmt.Fprintf(&b, "(%d): %s\n", i, hexutil.Encode(crypto.FromECDSA(privateKey))) } return b.String()