BlockfrostTestContext

scalus.testing.integration.BlockfrostTestContext
class BlockfrostTestContext(val cardanoInfo: CardanoInfo, val provider: BlockchainProvider, val parties: IndexedSeq[TestParty], val envName: String) extends IntegrationTestContext

Integration test context for real Cardano networks via Blockfrost.

Uses system time for slot calculation and Thread.sleep for time advancement. Real networks require longer wait times for transaction propagation.

Value parameters

cardanoInfo

Cardano network information

envName

Environment name ("Preprod" or "Mainnet")

parties

Available test parties (derived from wallet mnemonic)

provider

BlockfrostProvider connected to Preprod or Mainnet

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def awaitSlots(n: Long)(using ExecutionContext): Future[Unit]

Advance time by n slots (async).

Advance time by n slots (async).

  • Emulator: Directly sets slot to currentSlot + n (instant)
  • Yaci/Real networks: Waits for ~n seconds (1 slot = 1 sec in Yaci)

Value parameters

n

Number of slots to advance

Attributes

Definition Classes
override def currentSlot: SlotNo

Current slot number.

Current slot number.

Attributes

Definition Classes
override def submit(tx: Transaction)(using ExecutionContext): Future[Either[SubmitError, TransactionHash]]

Submit transaction and wait for confirmation (async).

Submit transaction and wait for confirmation (async).

Value parameters

tx

Transaction to submit

Attributes

Returns

Either an error or the transaction hash

Definition Classes

Inherited methods

Convenience accessor for Alice (first party).

Convenience accessor for Alice (first party).

Attributes

Inherited from:
IntegrationTestContext
def bob: TestParty

Convenience accessor for Bob (second party).

Convenience accessor for Bob (second party).

Attributes

Inherited from:
IntegrationTestContext
def eve: TestParty

Convenience accessor for Eve (eavesdropper party).

Convenience accessor for Eve (eavesdropper party).

Attributes

Inherited from:
IntegrationTestContext

Concrete fields

Cardano network information (protocol params, network, slot config).

Cardano network information (protocol params, network, slot config).

Attributes

val envName: String

Environment name for logging (e.g., "Emulator", "YaciDevKit", "Preprod").

Environment name for logging (e.g., "Emulator", "YaciDevKit", "Preprod").

Attributes

val parties: IndexedSeq[TestParty]

All available test parties.

All available test parties.

Attributes

Provider for blockchain queries and transaction submission.

Provider for blockchain queries and transaction submission.

Attributes