2

I'm a bit confused about CurrencySymbol type. In the documentation it appears twice in 2 modules: Plutus.V1.Ledger.Value (first image) and Ledger. (second image)

Are they the same type? When import each?

Thanks in advance!

enter image description here

enter image description here

1 Answer 1

3

If you look at the source of Ledger, you will see that it reexports CurrencySymbol from the Value module, so yes, they are the same:

module Ledger (
    module Export,
    AssetClass,
    CurrencySymbol,
    TokenName,
    Value,
    Ada
    ) where

import Ledger.Blockchain as Export
import Ledger.Index as Export
import Ledger.Orphans ()
-- We manually re-export 'Plutus.V1.Ledger.Scripts' so we can include some
-- extra instances
import Ledger.Address as Export
import Ledger.Contexts as Export
import Ledger.Crypto as Export
import Ledger.Scripts as Export
import Ledger.Tx as Export
import Ledger.Value as Export (noAdaValue)
import Plutus.V1.Ledger.Ada (Ada)
import Plutus.V1.Ledger.Interval as Export
import Plutus.V1.Ledger.Orphans ()
import Plutus.V1.Ledger.Slot as Export
import Plutus.V1.Ledger.Time as Export
import Plutus.V1.Ledger.TxId as Export
import Plutus.V1.Ledger.Value (AssetClass, CurrencySymbol, TokenName, Value)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.