Class HydraDevNetwork

java.lang.Object
org.cardanofoundation.hydra.test.HydraDevNetwork
All Implemented Interfaces:
AutoCloseable, org.testcontainers.lifecycle.Startable

public class HydraDevNetwork extends Object implements org.testcontainers.lifecycle.Startable
  • Field Details

    • objectMapper

      protected static final com.fasterxml.jackson.databind.ObjectMapper objectMapper
    • CARDANO_REMOTE_PORT

      public static final int CARDANO_REMOTE_PORT
      See Also:
    • HYDRA_API_REMOTE_PORT

      public static final int HYDRA_API_REMOTE_PORT
      See Also:
    • cardanoContainer

      protected org.testcontainers.containers.GenericContainer<?> cardanoContainer
    • aliceHydraContainer

      protected org.testcontainers.containers.GenericContainer<?> aliceHydraContainer
    • bobHydraContainer

      protected org.testcontainers.containers.GenericContainer<?> bobHydraContainer
  • Constructor Details

    • HydraDevNetwork

      public HydraDevNetwork(boolean withCardanoLogging, boolean withHydraLogging, Map<String,Integer> initialFunds)
    • HydraDevNetwork

      public HydraDevNetwork()
  • Method Details

    • getInitialFunds

      public static Map<String,Integer> getInitialFunds()
    • start

      public void start()
      Specified by:
      start in interface org.testcontainers.lifecycle.Startable
    • getAliceHydraContainer

      public org.testcontainers.containers.GenericContainer<?> getAliceHydraContainer()
    • getBobHydraContainer

      public org.testcontainers.containers.GenericContainer<?> getBobHydraContainer()
    • stop

      public void stop()
      Specified by:
      stop in interface org.testcontainers.lifecycle.Startable
    • getHydraApiUrl

      public static String getHydraApiUrl(org.testcontainers.containers.GenericContainer<?> container)
    • prepareDevNet

      protected void prepareDevNet() throws IOException
      Throws:
      IOException
    • createCardanoNodeContainer

      protected org.testcontainers.containers.GenericContainer<?> createCardanoNodeContainer()
    • createAliceHydraNode

      protected org.testcontainers.containers.GenericContainer<?> createAliceHydraNode(org.testcontainers.containers.GenericContainer<?> cardanoContainer, String scriptsTxId, org.testcontainers.containers.Network network)
    • createBobHydraNode

      protected org.testcontainers.containers.GenericContainer<?> createBobHydraNode(org.testcontainers.containers.GenericContainer<?> cardanoContainer, String scriptsTxId, org.testcontainers.containers.Network network)
    • seedActor

      protected void seedActor(org.testcontainers.containers.GenericContainer<?> cardanoNodeContainer, String faucetAddress, String actor, int adaAmount, boolean marker) throws IOException, InterruptedException
      Throws:
      IOException
      InterruptedException
    • seedActors

      protected void seedActors(org.testcontainers.containers.GenericContainer<?> cardanoContainer) throws IOException, InterruptedException
      Throws:
      IOException
      InterruptedException