Package org.cardanofoundation.hydra.test
Class HydraDevNetwork
java.lang.Object
org.cardanofoundation.hydra.test.HydraDevNetwork
- All Implemented Interfaces:
AutoCloseable,org.testcontainers.lifecycle.Startable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.testcontainers.containers.GenericContainer<?>protected org.testcontainers.containers.GenericContainer<?>static final intprotected org.testcontainers.containers.GenericContainer<?>static final Stringstatic final intprotected static final com.fasterxml.jackson.databind.ObjectMapperstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionHydraDevNetwork(boolean withCardanoLogging, boolean withHydraLogging) HydraDevNetwork(boolean withCardanoLogging, boolean withHydraLogging, Map<String, Integer> initialFunds) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.testcontainers.containers.GenericContainer<?>createAliceHydraNode(org.testcontainers.containers.GenericContainer<?> cardanoContainer, String scriptsTxId, org.testcontainers.containers.Network network) protected org.testcontainers.containers.GenericContainer<?>createBobHydraNode(org.testcontainers.containers.GenericContainer<?> cardanoContainer, String scriptsTxId, org.testcontainers.containers.Network network) protected org.testcontainers.containers.GenericContainer<?>createCardanoNodeContainer(org.testcontainers.containers.Network network) protected org.testcontainers.containers.GenericContainer<?>createTxSubmitAPI(org.testcontainers.containers.GenericContainer<?> cardanoContainer, org.testcontainers.containers.Network network) static StringgetCardanoRemoteNetworkSocketUrl(org.testcontainers.containers.GenericContainer<?> container) static StringgetHydraApiWebSocketUrl(org.testcontainers.containers.GenericContainer<?> container) static StringgetHydraApiWebUrl(org.testcontainers.containers.GenericContainer<?> container) static StringgetTxSubmitWebUrl(org.testcontainers.containers.GenericContainer<?> container) protected voidprotected voidseedActor(org.testcontainers.containers.GenericContainer<?> cardanoNodeContainer, String faucetAddress, String actor, int adaAmount) protected voidseedActors(org.testcontainers.containers.GenericContainer<?> cardanoContainer) voidstart()voidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.testcontainers.lifecycle.Startable
close, getDependencies
-
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:
-
TX_SUBMIT_API_PORT
public static final int TX_SUBMIT_API_PORT- See Also:
-
GHCR_IO_BLINKLABS_IO_TX_SUBMIT_API_LATEST
- 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
-
HydraDevNetwork
public HydraDevNetwork(boolean withCardanoLogging, boolean withHydraLogging) -
HydraDevNetwork
public HydraDevNetwork()
-
-
Method Details
-
getInitialFunds
-
getCardanoLocalSocketPath
-
getRemoteCardanoLocalSocketPath
-
start
public void start()- Specified by:
startin interfaceorg.testcontainers.lifecycle.Startable
-
stop
public void stop()- Specified by:
stopin interfaceorg.testcontainers.lifecycle.Startable
-
getHydraApiWebSocketUrl
public static String getHydraApiWebSocketUrl(org.testcontainers.containers.GenericContainer<?> container) -
getHydraApiWebUrl
-
getTxSubmitWebUrl
-
getCardanoRemoteNetworkSocketUrl
public static String getCardanoRemoteNetworkSocketUrl(org.testcontainers.containers.GenericContainer<?> container) -
prepareDevNet
- Throws:
IOException
-
createCardanoNodeContainer
protected org.testcontainers.containers.GenericContainer<?> createCardanoNodeContainer(org.testcontainers.containers.Network network) -
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) -
createTxSubmitAPI
protected org.testcontainers.containers.GenericContainer<?> createTxSubmitAPI(org.testcontainers.containers.GenericContainer<?> cardanoContainer, org.testcontainers.containers.Network network) -
seedActor
protected void seedActor(org.testcontainers.containers.GenericContainer<?> cardanoNodeContainer, String faucetAddress, String actor, int adaAmount) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
seedActors
protected void seedActors(org.testcontainers.containers.GenericContainer<?> cardanoContainer) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-