Ad

Tuesday, November 16, 2021

What is a Smart Contract? - Blockchain tech explained

 What's a smart contract? Chainlink explains it really well. Be sure to read our disclaimer before proceeding to read the tutorial. 

"When deployed to a blockchain, a smart contract is a set of instructions that can be executed without intervention from third parties. The code of a smart contract determines how it responds to input, just like the code of any other computer program.

A valuable feature of smart contracts is that they can store and manage on-chain assets (like ETH or ERC20 tokens), just like you can with an Ethereum wallet. Because they have an on-chain address like a wallet, they can do everything any other address can. This opens the door for programming automated actions when receiving and transferring assets.

Smart contracts can connect to real-world market prices of assets to produce powerful applications. Being able to securely connect smart contracts with off-chain data and services is what makes them hybrid smart contracts. This is done with oracles, which we will discuss later in this tutorial."

The language for programming smart contracts is solidity. 

An example of smart contract - Chainlink


In the screenshot above, you can see this smart contract has one variable, publicly accessible - message. When initiated, the message would have been set, and there's also a function to update that variable. 

The first pragma specifies the version of solidity. The main logic is enclosed in a class like contract HelloWorld{ ... }.

Source https://docs.chain.link/docs/beginners-tutorial/



Disclaimer - WARNING: https://www.siliconvanity.com/2021/11/blockchain-crypto-stock-personal.html

No comments:

Post a Comment

Metaverse

We all heard that facebook wants to be META but one simply doesn't just become meta $MANA $YGG snoop dog Metaverse game that every one i...