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

33 lines
884 B
C#
Raw Normal View History

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