2023-09-15 14:27:08 +00:00
|
|
|
|
using Core;
|
|
|
|
|
using GethPlugin;
|
|
|
|
|
|
|
|
|
|
namespace CodexContractsPlugin
|
|
|
|
|
{
|
|
|
|
|
public static class CoreInterfaceExtensions
|
|
|
|
|
{
|
2023-09-20 08:13:29 +00:00
|
|
|
|
public static CodexContractsDeployment DeployCodexContracts(this CoreInterface ci, IGethNode gethNode)
|
2023-09-15 14:27:08 +00:00
|
|
|
|
{
|
|
|
|
|
return Plugin(ci).DeployContracts(gethNode);
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-20 08:13:29 +00:00
|
|
|
|
public static ICodexContracts WrapCodexContractsDeployment(this CoreInterface ci, CodexContractsDeployment deployment)
|
2023-09-20 07:16:57 +00:00
|
|
|
|
{
|
|
|
|
|
return Plugin(ci).WrapDeploy(deployment);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static ICodexContracts StartCodexContracts(this CoreInterface ci, IGethNode gethNode)
|
|
|
|
|
{
|
|
|
|
|
var deployment = DeployCodexContracts(ci, gethNode);
|
|
|
|
|
return WrapCodexContractsDeployment(ci, deployment);
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-15 14:27:08 +00:00
|
|
|
|
private static CodexContractsPlugin Plugin(CoreInterface ci)
|
|
|
|
|
{
|
|
|
|
|
return ci.GetPlugin<CodexContractsPlugin>();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|