cs-codex-dist-tests/DistTestCore/Marketplace/GethBootstrapNodeInfo.cs

35 lines
1.1 KiB
C#
Raw Normal View History

2023-04-14 07:54:07 +00:00
using KubernetesWorkflow;
using NethereumWorkflow;
2023-04-14 07:54:07 +00:00
namespace DistTestCore.Marketplace
{
public class GethBootstrapNodeInfo
{
2023-04-19 05:59:28 +00:00
public GethBootstrapNodeInfo(RunningContainers runningContainers, string account, string pubKey, string privateKey, Port discoveryPort)
2023-04-14 07:54:07 +00:00
{
RunningContainers = runningContainers;
Account = account;
PubKey = pubKey;
2023-04-18 11:22:41 +00:00
PrivateKey = privateKey;
DiscoveryPort = discoveryPort;
2023-04-14 07:54:07 +00:00
}
public RunningContainers RunningContainers { get; }
public string Account { get; }
public string PubKey { get; }
2023-04-18 11:22:41 +00:00
public string PrivateKey { get; }
public Port DiscoveryPort { get; }
public NethereumInteraction StartInteraction()
{
var ip = RunningContainers.RunningPod.Cluster.IP;
var port = RunningContainers.Containers[0].ServicePorts[0].Number;
var account = Account;
var privateKey = PrivateKey;
var creator = new NethereumInteractionCreator(ip, port, account, privateKey);
return creator.CreateWorkflow();
}
2023-04-14 07:54:07 +00:00
}
}