cs-codex-dist-tests/Nethereum/NethereumWorkflowCreator.cs

30 lines
773 B
C#
Raw Normal View History

2023-04-14 08:51:35 +00:00
using Nethereum.Web3;
namespace NethereumWorkflow
{
public class NethereumWorkflowCreator
{
private readonly string ip;
private readonly int port;
private readonly string rootAccount;
public NethereumWorkflowCreator(string ip, int port, string rootAccount)
{
this.ip = ip;
this.port = port;
this.rootAccount = rootAccount;
}
public NethereumWorkflow CreateWorkflow()
{
return new NethereumWorkflow(CreateWeb3(), rootAccount);
}
private Web3 CreateWeb3()
{
//var bootstrapaccount = new ManagedAccount(bootstrapInfo.Account, "qwerty!@#$%^");
return new Web3($"http://{ip}:{port}");
}
}
}