Posted By : Siddharth
Cardano is a global blockchain initiative as it is the first blockchain to be peer-reviewed and academically developed by a panel of experts in the field.
Composed of engineers, academics, and one of the founders of Ethereum, the Cardano team chose to do something different and created an original blockchain from scratch, and together they focused on making sure that Cardano would fulfill its purpose to run a digital platform free of intermediaries. This system is more comprehensive and sustainable than other blockchain platforms.
The Cardano blockchain is based on the Shelley consensus algorithm, which is a new consensus algorithm. The platform was designed to be secure, scalable, and easy to use for building and running decentralized applications.
Cardano's native cryptocurrency, ADA, is a valuable asset on the Cardano blockchain. You can use ADA on the Cardano blockchain just as you would ETH on the Ethereum blockchain. ADA can be used as both a digital currency and a token. As a token, ADA is the only currency that rewards holders
It is a smart contract platform for the Cardano blockchain. The SDK enables developers to build apps that communicate with the Cardano blockchain. Plutus makes it possible for all programming to be done in Haskell using a single library. The Cardano platform makes it easy to create safe apps, acquire new assets, and create smart contracts. Additionally, developers do not have to test their work on a complete Cardano node to make sure it is correct. You can create new Plutus tokens in a minimal environment, create smart contracts, and create scripts.
Haskell is the language of choice for developing applications on Plutus. Cardano uses a programming language to create smart contracts. Haskell is Cardano's first choice when it comes to implementing programming languages.
import Data.Text qualified as T
import Playground.Contract
import Plutus.Contract
import PlutusTx.Prelude
import Prelude qualified as Haskell
hello :: Contract () EmptySchema T.Text ()
hello = logInfo @Haskell.String "Hello, oodles"
endpoints :: Contract () EmptySchema T.Text ()
endpoints = hello
type DemoSchema = Endpoint "demo" ()
mkSchemaDefinitions ''DemoSchema
$(mkKnownCurrencies [])
1. Libraries
Plutus.Contract for using Plutus core library
Data.Text for converting strings to text
PlutusTx.Prelude for replacing the Haskell library
Playground.Contract for importing the interface to the playground
2. Code
Function name – hello
Contract () EmptySchema T.Text () will tell that nothing is returned
logInfo is used to print out data to the console
endpoints will create a “hello” function to run the code
3. Output
Hello, oodles
September 8, 2024 at 02:36 am
Your comment is awaiting moderation.