cs-codex-dist-tests/ProjectPlugins/CodexPlugin/MarketplaceStarter.cs

20 lines
566 B
C#
Raw Normal View History

2023-09-19 09:51:59 +00:00
using GethPlugin;
using Nethereum.Hex.HexConvertors.Extensions;
2023-09-19 08:24:43 +00:00
using Nethereum.Web3.Accounts;
namespace CodexPlugin
{
public class MarketplaceStarter
{
public MarketplaceStartResults Start()
{
var ecKey = Nethereum.Signer.EthECKey.GenerateKey();
var privateKey = ecKey.GetPrivateKeyAsBytes().ToHex();
var account = new Account(privateKey);
2023-09-19 09:51:59 +00:00
var ethAddress = new EthAddress(account.Address);
2023-09-19 08:24:43 +00:00
2023-09-19 09:51:59 +00:00
return new MarketplaceStartResults(ethAddress, account.PrivateKey);
2023-09-19 08:24:43 +00:00
}
}
}