Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/fund/fund.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func getAddressesAndKeysFromKeyFile(keyFilePath string) ([]common.Address, []*ec
addresses[i] = util.GetAddress(context.Background(), privateKey)
log.Trace().
Interface("address", addresses[i]).
Str("privateKey", hex.EncodeToString(privateKey.D.Bytes())).
Str("privateKey", hex.EncodeToString(crypto.FromECDSA(privateKey))).
Msg("New wallet derived from key file")
}
log.Info().Int("count", len(addresses)).Msg("Wallet(s) derived from key file")
Expand Down Expand Up @@ -284,7 +284,7 @@ func generateWalletsWithKeys(n int) ([]common.Address, []*ecdsa.PrivateKey, erro
}
privateKeys[i] = pk
addresses[i] = crypto.PubkeyToAddress(pk.PublicKey)
log.Trace().Interface("address", addresses[i]).Str("privateKey", hex.EncodeToString(pk.D.Bytes())).Msg("New wallet generated")
log.Trace().Interface("address", addresses[i]).Str("privateKey", hex.EncodeToString(crypto.FromECDSA(pk))).Msg("New wallet generated")
}
log.Info().Int("count", n).Msg("Wallet(s) generated")

Expand All @@ -304,7 +304,7 @@ func saveToFile(fileName string, privateKeys []*ecdsa.PrivateKey) error {
address := crypto.PubkeyToAddress(privateKey.PublicKey)
data[i] = wallet{
Address: address.String(),
PrivateKey: hex.EncodeToString(privateKey.D.Bytes()),
PrivateKey: hex.EncodeToString(crypto.FromECDSA(privateKey)),
}
}

Expand Down