2023-09-15 10:36:35 +00:00
|
|
|
|
using Core;
|
|
|
|
|
|
|
|
|
|
namespace GethPlugin
|
|
|
|
|
{
|
|
|
|
|
public static class CoreInterfaceExtensions
|
|
|
|
|
{
|
2023-09-20 08:13:29 +00:00
|
|
|
|
public static GethDeployment DeployGeth(this CoreInterface ci, Action<IGethSetup> setup)
|
2023-09-20 07:16:57 +00:00
|
|
|
|
{
|
|
|
|
|
return Plugin(ci).DeployGeth(setup);
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-20 08:13:29 +00:00
|
|
|
|
public static IGethNode WrapGethDeployment(this CoreInterface ci, GethDeployment deployment)
|
2023-09-20 07:16:57 +00:00
|
|
|
|
{
|
|
|
|
|
return Plugin(ci).WrapGethDeployment(deployment);
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-19 08:24:43 +00:00
|
|
|
|
public static IGethNode StartGethNode(this CoreInterface ci, Action<IGethSetup> setup)
|
2023-09-15 13:52:02 +00:00
|
|
|
|
{
|
2023-09-20 07:16:57 +00:00
|
|
|
|
var deploy = DeployGeth(ci, setup);
|
|
|
|
|
return WrapGethDeployment(ci, deploy);
|
2023-09-15 13:52:02 +00:00
|
|
|
|
}
|
2023-09-15 10:36:35 +00:00
|
|
|
|
|
2023-09-15 13:52:02 +00:00
|
|
|
|
private static GethPlugin Plugin(CoreInterface ci)
|
|
|
|
|
{
|
|
|
|
|
return ci.GetPlugin<GethPlugin>();
|
|
|
|
|
}
|
2023-09-15 10:36:35 +00:00
|
|
|
|
}
|
|
|
|
|
}
|