A simpler native-tokens.cabal is part of this commit.
It's possible to generate UPLC code from parameterized policies. File nft.uplc can be generated by:
Run cabal repl.
Execute
import PlutusTx
import UntypedPlutusCore
import UntypedPlutusCore.Pretty
:l src/Contracts/NFT.hs
writeFile "nft.uplc" $ show $ prettyClassicDebug $ getPlc $ cPolicy
where cPolicy is a binding in src/Contracts/NFT.hs to the following snippet:
$$(PlutusTx.compile [|| \oref' tn' -> Scripts.wrapMintingPolicy $ mkPolicy oref' tn' ||])
native-tokens.cabal
is part of this commit.nft.uplc
can be generated by:cabal repl
.import PlutusTx
import UntypedPlutusCore
import UntypedPlutusCore.Pretty
:l src/Contracts/NFT.hs
writeFile "nft.uplc" $ show $ prettyClassicDebug $ getPlc $ cPolicy
wherecPolicy
is a binding insrc/Contracts/NFT.hs
to the following snippet:$$(PlutusTx.compile [|| \oref' tn' -> Scripts.wrapMintingPolicy $ mkPolicy oref' tn' ||])