user4968: Is there some lower level code that Plutus code compiles to (akin to Solidity => EVM bytecode, or BSV sCrypt => OP_codes)?
Related (but distinct) how the state changes: https://cardano.stackexchange.com/a/7253/4968

user2335: Yes, there is a lower level code that is used onchain, it is called Untyped Plutus Core (UPLC)! When validators are written in template haskell, they get compiled via
1) GHC: Haskell -> GHC Core
2) Plutus Tx compiler: GHC Core -> Plutus IR
3) Plutus IR compiler: Plutus IR -> Typed Plutus Core
4) Type eraser: Typed Plutus Core -> Untyped Plutus Core

To learn more about UPLC have a look at this great blog.

4968: <p>Is there some lower level code that Plutus code compiles to (akin to Solidity =&gt; EVM bytecode, or BSV sCrypt =&gt; OP_codes)?</p>
<p>Related (but distinct) how the state changes: <a href="https://cardano.stackexchange.com/a/7253/4968">https://cardano.stackexchange.com/a/7253/4968</a></p>
 2335: <p>Yes, there is a lower level code that is used onchain, it is called Untyped Plutus Core (UPLC)! When validators are written in template haskell, they get <a href="https://iohk.io/en/blog/posts/2021/02/02/plutus-tx-compiling-haskell-into-plutus-core/" rel="nofollow noreferrer">compiled</a> via</p>
<pre><code>1) GHC: Haskell -&gt; GHC Core
2) Plutus Tx compiler: GHC Core -&gt; Plutus IR
3) Plutus IR compiler: Plutus IR -&gt; Typed Plutus Core
4) Type eraser: Typed Plutus Core -&gt; Untyped Plutus Core
</code></pre>
<p>To learn more about UPLC have a look at this great <a href="https://hachi.one/post/an-introduction-to-plutus-core/" rel="nofollow noreferrer">blog</a>.</p>
