Plutus | Cardano Docs (2024)

info

To start developing with Plutus, see:

Plutus is the native smart contract language for Cardano. It is aTuring-complete language written in Haskell, and Plutus smart contracts areeffectively Haskell programs. By using Plutus, you can be confident in thecorrect execution of your smart contracts. It draws from modern languageresearch to provide a safe, full-stack programming environment based on Haskell,the leading purely-functional programming language.

Plutus smart contracts

Plutus smart contracts consist of parts that run on the blockchain (on-chaincode) and parts that run on a user’s machine (off-chain or client code).Off-chain code can be written using the Plutus Application Framework (PAF), andthis code is then compiled by the GHC (Glasgow Haskell Compiler), whereason-chain code is compiled by the Plutus compiler into Plutus Core.

Accounting model used by Plutus

Cardano uses theextended UTXO accounting model (EUTXO)which extends the unspent (U) transaction (TX) output (O) accounting model(UTXO) (used by Bitcoin). In the UTXO model, a transaction has inputsand outputs, where the inputs are unspent outputs from previoustransactions. As soon as an output is used as input in a transaction, it becomesspent and can never be used again. The output is specified by an address(a public key or public key hash) and a value (consisting of an ada amount andoptional, additional native token amounts).

EUTXO extends the UTXO model by allowing output addresses to contain complexlogic to decide which transactions can unlock them, and by adding custom datato all outputs. This model offers unique advantages over other accountingmodels. The success or failure of transaction validation depends only on thetransaction itself and its inputs and not on anything else on the blockchain.Consequently, the validity of a transaction can be checked off-chain beforethe transaction is sent to the blockchain. A transaction can still fail if someother transaction concurrently consumes an input that the transaction isexpecting. However, if all inputs are still present, the transaction isguaranteed to succeed.

Plutus Core

Plutus Core is the scripting language used by Cardano to implement the EUTXOmodel. It is a functional language similar to Haskell, and a largesubset of Haskell can be used to write Plutus Core scripts. As a smart contractauthor, you don’t write any Plutus Core; rather, all Plutus Core scripts aregenerated by a Haskell compiler plugin.

These scripts will be executed by nodes during transaction validation ‘live’ onthe chain. They will either lock EUTXOs in the form of validator scripts or asminting policies, which control the minting and burning of native tokens.

In practice, when developing smart contracts, you will write validator scriptsin Haskell, which will then be automatically compiled into Plutus Core using aGHC plug-in called Plutus Tx.

Plutus and native tokens

Each native token comes with its own minting policy, which determines theconditions under which tokens can be minted and burnt. Users can write mintingpolicies in Haskell and compile them to Plutus Core. During the minting orburning process, the Plutus Core policy script is executed in the context of theminting or burning transaction, and the script will have to approve or forbidthe action. This feature further accelerates the growth of non-fungible tokens(NFTs) on Cardano by enabling the creation of much more complex minting policiesand allowing the creation of NFTs in a trustless manner.

Advantages of Plutus

Plutus provides considerable security advantages. It delivers an easier, morerobust way to show that your smart contracts are correct and will not encounterthe problems found in previous smart contract language design.

Plutus enables a novel integrated approach to smart contract and distributedapplication development that is more convenient and safer than previousalternatives. Both the on-chain and off-chain code are based on the samelanguage. You use a uniform code base, which the Plutus toolchain thenautomatically separates into on-chain and off-chain code and packages fordeployment.

Additionally, in contrast to Ethereum, Plutus supports user-defined tokens (bothfungible and non-fungible) natively which does not require an accompanying smartcontract.

Plutus developer resources

Plutus Core

Plutus Core is the scripting language embedded in the Cardano ledger. It formsthe basis of the Plutus Platform – an application development platform fordeveloping decentralized applications (DApps) on the Cardano blockchain.

Developer resources:

  • Plutus Core GitHub repository:includes the implementation, specification, and mechanized metatheory ofPlutus Core as well as Plutus Tx – the compiler from Haskell to Plutus Core.

Associated links:

Official Haskell language server implementation

Haskell language server implementation is an implementation of a server for theLanguage Server Protocol (LSP). A language server talks to a client, who can askthe server to perform various operations, such as reporting errors or providingcode completions.

Developer resources:

Haskell course

Plutus Core is written in Haskell. To use Plutus,it is essential to know the basics of Haskell. To help with the onboardingjourney, IOG's education team created the Haskell course for beginners. You canfind the repository with explainers, links to lectures, and more below.

Plutus user documentation

This section includes references to Plutus user documentation such asexplanations, tutorials, how-to guides, etc.

Documentation:

Plutus Pioneer Program

Plutus Pioneer community notes:

Plutus community resources

This section provides links to Plutus community resources.

If you are a community member engaged with Plutus development, please raise apull request to add more relevant links and information.

Discussions & support:

There are different tools that developers can use to evaluate and deploy smartcontracts on Cardano:

Plutus | Cardano Docs (2024)
Top Articles
Google vs Microsoft Cloud Face-Off: Decoding the Duel
Article Detail Page
Unit 30 Quiz: Idioms And Pronunciation
Chicago Neighborhoods: Lincoln Square & Ravenswood - Chicago Moms
Dollywood's Smoky Mountain Christmas - Pigeon Forge, TN
Dew Acuity
Top Scorers Transfermarkt
Phone Number For Walmart Automotive Department
Call Follower Osrs
27 Places With The Absolute Best Pizza In NYC
Noaa Weather Philadelphia
Produzione mondiale di vino
Music Archives | Hotel Grand Bach - Hotel GrandBach
Monticello Culver's Flavor Of The Day
Bill Devane Obituary
Lantana Blocc Compton Crips
Thayer Rasmussen Cause Of Death
Brutál jó vegán torta! – Kókusz-málna-csoki trió
Premier Reward Token Rs3
Lesson 8 Skills Practice Solve Two-Step Inequalities Answer Key
Echat Fr Review Pc Retailer In Qatar Prestige Pc Providers – Alpha Marine Group
Everything We Know About Gladiator 2
Vipleaguenba
Lcwc 911 Live Incident List Live Status
Nordstrom Rack Glendale Photos
Walgreens Tanque Verde And Catalina Hwy
Gopher Hockey Forum
Ubg98.Github.io Unblocked
Is A Daytona Faster Than A Scat Pack
Diakimeko Leaks
Bjerrum difference plots - Big Chemical Encyclopedia
Play It Again Sports Norman Photos
Costco Gas Hours St Cloud Mn
Ihub Fnma Message Board
Sadie Sink Reveals She Struggles With Imposter Syndrome
Craigslist Comes Clean: No More 'Adult Services,' Ever
Amazing Lash Bay Colony
Rogold Extension
Missing 2023 Showtimes Near Mjr Southgate
Vlocity Clm
The Ultimate Guide to Obtaining Bark in Conan Exiles: Tips and Tricks for the Best Results
Roch Hodech Nissan 2023
Kokomo Mugshots Busted
24 slang words teens and Gen Zers are using in 2020, and what they really mean
Rogers Centre is getting a $300M reno. Here's what the Blue Jays ballpark will look like | CBC News
Scarlet Maiden F95Zone
Craigslist Woodward
Kaamel Hasaun Wikipedia
Walmart Listings Near Me
Mytmoclaim Tracking
WHAT WE CAN DO | Arizona Tile
One Facing Life Maybe Crossword
Latest Posts
Article information

Author: Melvina Ondricka

Last Updated:

Views: 6806

Rating: 4.8 / 5 (48 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Melvina Ondricka

Birthday: 2000-12-23

Address: Suite 382 139 Shaniqua Locks, Paulaborough, UT 90498

Phone: +636383657021

Job: Dynamic Government Specialist

Hobby: Kite flying, Watching movies, Knitting, Model building, Reading, Wood carving, Paintball

Introduction: My name is Melvina Ondricka, I am a helpful, fancy, friendly, innocent, outstanding, courageous, thoughtful person who loves writing and wants to share my knowledge and understanding with you.