2023-04-14 07:54:07 +00:00
|
|
|
|
using KubernetesWorkflow;
|
2023-04-25 09:31:15 +00:00
|
|
|
|
using Logging;
|
2023-04-24 12:09:23 +00:00
|
|
|
|
using NethereumWorkflow;
|
2023-04-14 07:54:07 +00:00
|
|
|
|
|
|
|
|
|
namespace DistTestCore.Marketplace
|
|
|
|
|
{
|
|
|
|
|
public class GethCompanionNodeInfo
|
|
|
|
|
{
|
2023-04-24 12:09:23 +00:00
|
|
|
|
public GethCompanionNodeInfo(RunningContainer runningContainer, string account, string privateKey)
|
2023-04-14 07:54:07 +00:00
|
|
|
|
{
|
|
|
|
|
RunningContainer = runningContainer;
|
|
|
|
|
Account = account;
|
2023-04-24 12:09:23 +00:00
|
|
|
|
PrivateKey = privateKey;
|
2023-04-14 07:54:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public RunningContainer RunningContainer { get; }
|
|
|
|
|
public string Account { get; }
|
2023-04-24 12:09:23 +00:00
|
|
|
|
public string PrivateKey { get; }
|
|
|
|
|
|
2023-04-25 09:31:15 +00:00
|
|
|
|
public NethereumInteraction StartInteraction(BaseLog log)
|
2023-04-24 12:09:23 +00:00
|
|
|
|
{
|
|
|
|
|
var ip = RunningContainer.Pod.Cluster.IP;
|
|
|
|
|
var port = RunningContainer.ServicePorts[0].Number;
|
|
|
|
|
var account = Account;
|
|
|
|
|
var privateKey = PrivateKey;
|
|
|
|
|
|
2023-04-25 09:31:15 +00:00
|
|
|
|
var creator = new NethereumInteractionCreator(log, ip, port, account, privateKey);
|
2023-04-24 12:09:23 +00:00
|
|
|
|
return creator.CreateWorkflow();
|
|
|
|
|
}
|
2023-04-14 07:54:07 +00:00
|
|
|
|
}
|
|
|
|
|
}
|