How exactly can I fund the emulator wallets with custom currencies? Please show an emulator example doing so.
Here's an example:
import Data.Default (def) import qualified Data.Map as Map import qualified Ledger.Ada as Ada import qualified Ledger.Value as Value import Wallet.Emulator.Wallet (Wallet(..)) import Plutus.Trace.Emulator (EmulatorTrace, EmulatorConfig(..), runEmulatorTraceIO', activateContractWallet) main :: IO () main = do let dist = Map.fromList [ (Wallet 1, Ada.lovelaceValueOf 100_000_000 <> Value.singleton "ffff" "mytoken" 10) , (Wallet 2, Ada.lovelaceValueOf 25_000_000) ] emCfg = EmulatorConfig (Left dist) def def runEmulatorTraceIO' def emCfg myTrace
Wallet 1 starts of with 100 ADA, and 10 tokens with currency symbol
ffff and token name
Wallet 2 simply starts with 25 ADA.
The Auction use-case example demonstrates that.