Emulator

scalus.cardano.node.Emulator
See theEmulator companion class
object Emulator

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Emulator.type

Members list

Value members

Concrete methods

def withAddresses(addresses: Seq[Address], initialValue: Value = ...): Emulator

Creates an Emulator with the specified addresses, each with the given initial value.

Creates an Emulator with the specified addresses, each with the given initial value.

Value parameters

addresses

The addresses to initialize with funds

initialValue

Initial value per address (default: 10,000 ADA like Yaci Devkit)

Attributes

Returns

An Emulator instance with the addresses funded

def withRegisteredStakeCredentials(initialUtxos: Utxos, initialStakeRewards: Map[Credential, Coin], initialContext: Context = ...): Emulator

Creates an Emulator with pre-registered stake credentials and specified reward balances.

Creates an Emulator with pre-registered stake credentials and specified reward balances.

Useful for the zero-withdrawal trick: the staking address must be registered before a zero-value withdrawal can trigger a script reward validator, without needing a registration transaction.

Value parameters

initialContext

Context (default: testMainnet)

initialStakeRewards

Map from stake credential to its initial reward balance

initialUtxos

Initial UTxO set

Attributes

Returns

An Emulator with the credentials already registered

Concrete fields