Adds IHasContainer to geth objects.
This commit is contained in:
parent
2f81927bef
commit
e4716b5471
@ -16,7 +16,7 @@ namespace CodexContractsPlugin
|
|||||||
{
|
{
|
||||||
var config = startupConfig.Get<CodexContractsContainerConfig>();
|
var config = startupConfig.Get<CodexContractsContainerConfig>();
|
||||||
|
|
||||||
var ip = config.GethNode.StartResult.RunningContainer.Pod.PodInfo.Ip;
|
var ip = config.GethNode.StartResult.Container.Pod.PodInfo.Ip;
|
||||||
var port = config.GethNode.StartResult.HttpPort.Number;
|
var port = config.GethNode.StartResult.HttpPort.Number;
|
||||||
|
|
||||||
AddEnvVar("DISTTEST_NETWORK_URL", $"http://{ip}:{port}");
|
AddEnvVar("DISTTEST_NETWORK_URL", $"http://{ip}:{port}");
|
||||||
|
@ -81,7 +81,7 @@ namespace CodexPlugin
|
|||||||
{
|
{
|
||||||
var mconfig = config.MarketplaceConfig;
|
var mconfig = config.MarketplaceConfig;
|
||||||
var gethStart = mconfig.GethNode.StartResult;
|
var gethStart = mconfig.GethNode.StartResult;
|
||||||
var ip = gethStart.RunningContainer.Pod.PodInfo.Ip;
|
var ip = gethStart.Container.Pod.PodInfo.Ip;
|
||||||
var port = gethStart.WsPort.Number;
|
var port = gethStart.WsPort.Number;
|
||||||
var marketplaceAddress = mconfig.CodexContracts.Deployment.MarketplaceAddress;
|
var marketplaceAddress = mconfig.CodexContracts.Deployment.MarketplaceAddress;
|
||||||
|
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
using KubernetesWorkflow;
|
using Core;
|
||||||
|
using KubernetesWorkflow;
|
||||||
|
|
||||||
namespace GethPlugin
|
namespace GethPlugin
|
||||||
{
|
{
|
||||||
public class GethDeployment
|
public class GethDeployment : IHasContainer
|
||||||
{
|
{
|
||||||
public GethDeployment(RunningContainer runningContainer, Port discoveryPort, Port httpPort, Port wsPort, AllGethAccounts allAccounts, string pubKey)
|
public GethDeployment(RunningContainer runningContainer, Port discoveryPort, Port httpPort, Port wsPort, AllGethAccounts allAccounts, string pubKey)
|
||||||
{
|
{
|
||||||
RunningContainer = runningContainer;
|
Container = runningContainer;
|
||||||
DiscoveryPort = discoveryPort;
|
DiscoveryPort = discoveryPort;
|
||||||
HttpPort = httpPort;
|
HttpPort = httpPort;
|
||||||
WsPort = wsPort;
|
WsPort = wsPort;
|
||||||
@ -14,7 +15,7 @@ namespace GethPlugin
|
|||||||
PubKey = pubKey;
|
PubKey = pubKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RunningContainer RunningContainer { get; }
|
public RunningContainer Container { get; }
|
||||||
public Port DiscoveryPort { get; }
|
public Port DiscoveryPort { get; }
|
||||||
public Port HttpPort { get; }
|
public Port HttpPort { get; }
|
||||||
public Port WsPort { get; }
|
public Port WsPort { get; }
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
using Logging;
|
using Core;
|
||||||
|
using KubernetesWorkflow;
|
||||||
|
using Logging;
|
||||||
using Nethereum.Contracts;
|
using Nethereum.Contracts;
|
||||||
using NethereumWorkflow;
|
using NethereumWorkflow;
|
||||||
|
|
||||||
namespace GethPlugin
|
namespace GethPlugin
|
||||||
{
|
{
|
||||||
public interface IGethNode
|
public interface IGethNode : IHasContainer
|
||||||
{
|
{
|
||||||
GethDeployment StartResult { get; }
|
GethDeployment StartResult { get; }
|
||||||
|
|
||||||
@ -32,6 +34,7 @@ namespace GethPlugin
|
|||||||
|
|
||||||
public GethDeployment StartResult { get; }
|
public GethDeployment StartResult { get; }
|
||||||
public GethAccount Account { get; }
|
public GethAccount Account { get; }
|
||||||
|
public RunningContainer Container => StartResult.Container;
|
||||||
|
|
||||||
public Ether GetEthBalance()
|
public Ether GetEthBalance()
|
||||||
{
|
{
|
||||||
@ -70,7 +73,7 @@ namespace GethPlugin
|
|||||||
|
|
||||||
private NethereumInteraction StartInteraction()
|
private NethereumInteraction StartInteraction()
|
||||||
{
|
{
|
||||||
var address = StartResult.RunningContainer.Address;
|
var address = StartResult.Container.Address;
|
||||||
var account = Account;
|
var account = Account;
|
||||||
|
|
||||||
var creator = new NethereumInteractionCreator(log, address.Host, address.Port, account.PrivateKey);
|
var creator = new NethereumInteractionCreator(log, address.Host, address.Port, account.PrivateKey);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user