I am currently working on Lecture 8 in the Plutus Pioneer program.
I want to view funds available at a script address.
There appears to be a function that makes this easy in Ledger.AddressMap
-- | Get the funds available at a particular address. fundsAt :: Address -> Lens' AddressMap UtxoMap fundsAt addr = at addr . non mempty
However, I have not been able to get this to work.
When I try this
I get the following error
Ambiguous type variable ‘f0’ arising from a use of ‘fundsAt’ prevents the constraint ‘(Prelude.Functor f0)’ from being solved.
My attempts at trying to make the type unambiguous have not worked, and I am struggling to understand
Does anyone know how to get the
fundsAt function to work?