How does PlutusTx target plutus core?
https://plutus.readthedocs.io/en/latest/plutus/tutorials/plutus-tx.html https://playground.plutus.iohkdev.io/tutorial/haddock/plutus-tx/html/Language-PlutusTx.html
The compile
function produces CompiledCode
.
Plutus Core can be extracted from that using getPlc
.
Trying it out
- Clone plutus-starter
- We are going to compile
Plutus.Contracts.Game
. You can find it inexamples/src/Plutus/Contract/Game.hs
. - Since it is available as a library we can import it. The on-chain parts are indicated by
PlutusTx.compile
. These are thevalidateGuess
,wrap
. For now we will tryvalidateGuess
.