mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-01-02 21:43:08 +00:00
35 lines
1.3 KiB
C#
35 lines
1.3 KiB
C#
using GethPlugin;
|
|
using KubernetesWorkflow;
|
|
using KubernetesWorkflow.Recipe;
|
|
|
|
namespace CodexContractsPlugin
|
|
{
|
|
public class CodexContractsContainerRecipe : ContainerRecipeFactory
|
|
{
|
|
public const string MarketplaceAddressFilename = "/hardhat/deployments/codexdisttestnetwork/Marketplace.json";
|
|
public const string MarketplaceArtifactFilename = "/hardhat/artifacts/contracts/Marketplace.sol/Marketplace.json";
|
|
private readonly VersionRegistry versionRegistry;
|
|
|
|
public override string AppName => "codex-contracts";
|
|
public override string Image => versionRegistry.GetContractsDockerImage();
|
|
|
|
public CodexContractsContainerRecipe(VersionRegistry versionRegistry)
|
|
{
|
|
this.versionRegistry = versionRegistry;
|
|
}
|
|
|
|
protected override void Initialize(StartupConfig startupConfig)
|
|
{
|
|
var config = startupConfig.Get<CodexContractsContainerConfig>();
|
|
|
|
var address = config.GethNode.StartResult.Container.GetAddress(GethContainerRecipe.HttpPortTag);
|
|
|
|
SetSchedulingAffinity(notIn: "false");
|
|
|
|
AddEnvVar("DISTTEST_NETWORK_URL", address.ToString());
|
|
AddEnvVar("HARDHAT_NETWORK", "codexdisttestnetwork");
|
|
AddEnvVar("KEEP_ALIVE", "1");
|
|
}
|
|
}
|
|
}
|