2025-04-22 17:11:34 +02:00
|
|
|
|
using CodexClient;
|
|
|
|
|
|
using Core;
|
2023-09-15 16:27:08 +02:00
|
|
|
|
using GethPlugin;
|
|
|
|
|
|
|
|
|
|
|
|
namespace CodexContractsPlugin
|
|
|
|
|
|
{
|
|
|
|
|
|
public static class CoreInterfaceExtensions
|
|
|
|
|
|
{
|
2025-04-22 17:11:34 +02:00
|
|
|
|
public static CodexContractsDeployment DeployCodexContracts(this CoreInterface ci, IGethNode gethNode, DebugInfoVersion versionInfo)
|
2023-09-15 16:27:08 +02:00
|
|
|
|
{
|
2025-04-22 17:11:34 +02:00
|
|
|
|
return Plugin(ci).DeployContracts(ci, gethNode, versionInfo);
|
2023-09-15 16:27:08 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-10-30 13:30:14 +01:00
|
|
|
|
public static ICodexContracts WrapCodexContractsDeployment(this CoreInterface ci, IGethNode gethNode, CodexContractsDeployment deployment)
|
2023-09-20 09:16:57 +02:00
|
|
|
|
{
|
2023-10-30 13:30:14 +01:00
|
|
|
|
return Plugin(ci).WrapDeploy(gethNode, deployment);
|
2023-09-20 09:16:57 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-22 17:11:34 +02:00
|
|
|
|
public static ICodexContracts StartCodexContracts(this CoreInterface ci, IGethNode gethNode, DebugInfoVersion versionInfo)
|
2023-09-20 09:16:57 +02:00
|
|
|
|
{
|
2025-04-22 17:11:34 +02:00
|
|
|
|
var deployment = DeployCodexContracts(ci, gethNode, versionInfo);
|
2023-10-30 13:30:14 +01:00
|
|
|
|
return WrapCodexContractsDeployment(ci, gethNode, deployment);
|
2023-09-20 09:16:57 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-09-15 16:27:08 +02:00
|
|
|
|
private static CodexContractsPlugin Plugin(CoreInterface ci)
|
|
|
|
|
|
{
|
|
|
|
|
|
return ci.GetPlugin<CodexContractsPlugin>();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|