Everything you need to know about smart contracts

Jollier

Professional
Messages
1,127
Reputation
6
Reaction score
1,105
Points
113
Introduction
We all live in a world of intermediaries.

What is it?
A smart contract is a program built on blockchain technology. Now most smart contracts are based on Ethereum and it is thanks to them that this coin is worth as much as it is worth. Now there will be the simplest and most clumsy explanation, but before you understand smart contracts, I would still advise you to find out how the blockchain works (by the way, there is a video about this on my channel). A smart contract is a code sealed with digital signatures of both parties to the transaction, which sets out all the conditions for the execution of this transaction.

How does it work?
Here you may have a logical question: how can the code find out if all the terms of the transaction are met? This is not a super cool AI that monitors everyone and can check everything. Technology simply hasn't gotten there yet. In general, I will tell you that smart contracts can handle this. Unfortunately, they are not yet suitable for use in absolutely all spheres of life. Somewhere it will work, but somewhere it will still need people. The easiest way to explain it is with examples. Smart contracts work well, for example, in the field of investment.

Why is it good?
Here the answer is obvious - because it is cheaper. The code will charge you much less Commission than the same intermediary company. You can compare ether contracts with Bitcoin, for example. The second one is aimed at killing banks as intermediaries for conducting payment transactions, and smart contracts, in turn, should close all other areas with more complex and prescribed conditions, like the same loan. Well, the main question is: why do they work? All thanks to our favorite blockchain.

Result
Smart contracts are a great thing that in the future will completely eliminate the human factor from any financial relationships, thereby significantly reducing the degree of negativity in society, as well as the number of broken ribs.

P.S. if you want a detailed analysis of how smart contracts are created, write in the comments.
 

Jollier

Professional
Messages
1,127
Reputation
6
Reaction score
1,105
Points
113

How do I create a smart contract?​


Introduction
After reading the previous post about smart contracts, many of you might be interested in this beautiful technology. Solid positive - a world without intermediaries, the exclusion of the human factor, low commission. And nothing that while smart contracts are not very popular. We'll wait! But everything is not as rosy as it may seem at first glance. In this post, you will learn what lies under the hood of smart contracts and how they look in real life. According to the classic version, there will not be a full-fledged guide for creating contracts. So, the Internet is full of them.

t20_YwQLYW.jpg


Why do you need a smart contract?
First, let's define our target audience. First of all, these are people who are planning or have already connected their lives with the crypt. In this case, you need to search through smart contracts. Having a basic knowledge of creating smart contracts opens up the following opportunities: the ability to safely sell something in crypto, conduct an ICO to raise money for your startup, and create your own cryptocurrency based on Ethereum. For example, I would use smart contracts to sell ads on my channels, since I accept all payments only in crypt.

1455142094853


What do I need to create a smart contract?
The most important point. Be well versed in programming. You can't do without a minimum of basic knowledge, because you can't even really understand the guides. There is also a workaround. Hire a programmer to write the contract. This is a bad option, as the prices for such a pleasure are crazy. Yesterday I read on some forum that one contract can cost $ 15,000. As for me, it is better to invest such a sum in Bitcoin and not suffer from garbage.

Smart-contract-code-1.png


What does a smart contract look like?
This is a code snippet, as you can see from the picture above. Most smart contracts run on the Ethereum blockchain and are created using a special Solidity language, which is not much different from the classic Java Script. Using this language, a smart contract specifies all the conditions: the transaction amount, data about the parties to the transaction, and conditions for completing the transaction. In the case of an ICO, this is the volume of tokens issued, their value, and the maximum and minimum amount of funds raised.

Screenshot%202020-09-11%20at%2017.40.22.png


How do I create a smart contract?
The algorithm itself looks simple. First, we need Solidity-enabled software to create a contract. The most popular ones are Truffle and Ethereum Remix. Roughly speaking, these are notebooks in which the contract code is written. Then use My Ethereum Wallet to upload our contract to the blockchain. You can also use Ganache to test the operation of a contract on the local blockchain without commission. Total - we load ourselves the Ethereum blockchain (the same wallet), create a smart contract in Notepad and launch it into circulation for a mining commission.

Result
As you can see, the thing is complicated. Smart contracts will not soon become available to the General public, as they need to be able to read. And to be able to read, you need to understand Solidity. Nevertheless, after spending a few weeks on the guides, using the right template and spending a little ether, you can still make your own smart contract. Go for it.
 
Top