Dr. Hidaia Mahmood Alassouli - Creation and Deployment of Smart Contracts on Ethereum Blockchain

Здесь есть возможность читать онлайн «Dr. Hidaia Mahmood Alassouli - Creation and Deployment of Smart Contracts on Ethereum Blockchain» — ознакомительный отрывок электронной книги совершенно бесплатно, а после прочтения отрывка купить полную версию. В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Жанр: unrecognised, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

Creation and Deployment of Smart Contracts on Ethereum Blockchain: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Creation and Deployment of Smart Contracts on Ethereum Blockchain»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

This work explains briefly the creation and deployment Of Smart Contract on Ethereum Blockchain. The work consists from the following sectionsBlockchainSolidity variables and types How to Setup or Install Ethereum on WindowsHow to compile and deploy smart contract on JavaScriptVMHow to install Ganache Blockchain on Windows and deploy smart contract using it.How to compile and deploy Smart Contract on Test Networks,Quick example of deploying ERC20 token smart contract.Getting started tutorial on SolidityCreating ERC-20 smart contract and crowd sale (ICO) smart contract without coding ERC-20 smart contract and crowd sale (ICO) smart contract:Creating Ethereum ERC-20 Tokens and Crowd Sales (ICO) without coding with Token Wizard:Example of creating and deploying an ERC20 token on the test and main network!!!

Creation and Deployment of Smart Contracts on Ethereum Blockchain — читать онлайн ознакомительный отрывок

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Creation and Deployment of Smart Contracts on Ethereum Blockchain», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Creation and Deployment of Smart Contracts on Ethereum Blockchain

By

Dr. Hidaia Mahmood Alassouli

Hidaia_alassouli@hotmail.com

1. Overview:

This work explains briefly the creation and deployment Of Smart Contract on Ethereum Blockchain. The work consists from the following sections

Blockchain

Solidity variables and types

How to Setup or Install Ethereum on Windows

How to compile and deploy smart contract on JavaScriptVM

How to install Ganache Blockchain on Windows and deploy smart contract using it.

How to compile and deploy Smart Contract on Test Networks,

Quick example of deploying ERC20 token smart contract.

Getting started tutorial on Solidity

Creating ERC-20 smart contract and crowd sale (ICO) smart contract without coding

ERC-20 smart contract and crowd sale (ICO) smart contract:

Creating Ethereum ERC-20 Tokens and Crowd Sales (ICO) without coding with Token Wizard:

Example of creating and deploying an ERC20 token on the test and main network!!!

2. Blockchain:

A blockchain is a digital record of transactions. The name comes from its structure, in which individual records, called blocks, are linked together in single list, called a chain. Blockchains are used for recording transactions made with cryptocurrencies, such as Bitcoin, and have many other applications.

Each transaction added to a blockchain is validated by multiple computers on the Internet. These systems, which are configured to monitor specific types of blockchain transactions, form a peer-to-peer network. They work together to ensure each transaction is valid before it is added to the blockchain. This decentralized network of computers ensures a single system cannot add invalid blocks to the chain.

When a new block is added to a blockchain, it is linked to the previous block using a cryptographic hash generated from the contents of the previous block. This ensures the chain is never broken and that each block is permanently recorded. It is also intentionally difficult to alter past transactions in blockchain since all the subsequent blocks must be altered first.

Blockchain Uses: While blockchain is widely known for its use in cryptocurrencies such as Bitcoin, Litecoin, and Ether, the technology has several other uses. For example, it enables "smart contracts," which execute when certain conditions are met. This provides an automated escrow system for transactions between two parties. Blockchain can potentially be used to allow individuals to pay each other without a central clearing point, which is required for ACH and wire transfers. It has potential to greatly increase the efficiency of stock trading by allowing transactions to settle almost instantly instead of requiring three or more days for each transaction to clear. Blockchain technology can also be used for non-financial purposes. For example, the InterPlanetary File System (IFPS) uses blockchain to decentralize file storage by linking files together over the Internet. Some digital signature platforms now use blockchain to record signatures and verify documents have been digitally signed. Blockchain can even be used to protect intellectual property by linking the distribution of content to the original source.

Blockchain is decentralized database that consists from records and data. The entire data is spread out in bounch of distributed computers to end to be pear to pear p2p network. The records in these databases are stored in form of blocks which linked together in secured way.

The bitcoin blockchain stores data specific to keep track of crypto currencies balances between different parties.

Ethereum block chain can store much more deep data than bitcoin block chain. Ethereum block chain allows building decentralized apps. These decentralized apps defined by smart contracts. So smart contract allows individuals to exchange information in trusted confident free manner without relying on third party as bank or lawyer or other way. So these Ethereum smart contracts stored in special transections in Ethereum blockchain which can be used then to build applications. So you can think on smart contracts as decentralized api's. As smart contracts stored in Ethereum blockchains, they need to be validated or mined as any other transactions. So there is small costs associated with deploying smart contracts.

How to code smart contract. We do that with solidity. Solidity is a code used. Solidity is a language used to code smart contract. And syntax is similar to java script and is designed with Ethereum virtual machine in mind. So we will use solidity to create smart contract in web based ide called remex

3. Solidity variables and types

You can write the solidity and test code in https://remix.ethereum.org/.

Here screen of https://remix.ethereum.org

Create new contract I called it Coursetro Start off by writing or pasting - фото 1

Create new contract. I called it Coursetro.

Start off by writing (or pasting) the following code:

pragma solidity ^0.4.18;

contract Coursetro {

}

The very first line defines the version of solidity you're going to use.

Next, you define the contract and its name and open it up like a JavaScript class.

On the right side of the browser under the Run tab, you will see a Deploy button. Click on this. You will notice that underneath the Deploy button shows a new section with the name of the contract and "at 0x..." (memory):

This means that the smart contract yes its not very smart at this point - фото 2

This means that the smart contract (yes, it's not very smart at this point) lives at an address. To see this full address along with other information, in the debugger if you click on the Details button, it will provide you with more information:

Notice there's a contractAddress, this is where the smart contract actually lives. No, it's not live on the Ethereum Blockchain because right now, we're simply working within the Javascript EVM.

Also notice gas. Every time a contract is deployed and modified, nodes on the Ethereum network must verify the contract. It's referred to as being redundantly parallel, as a way to reach consensus.Gas is the name for the execution fee that senders of transactions (in our case, senders of a smart contract transaction) will pay for verification.

Elaborating on this further, from etherdocs.org:

"Gas is the name for the execution fee that senders of transactions need to pay for every operation made on an Ethereum blockchain. The name gas is inspired by the view that this fee acts as cryptofuel, driving the motion of smart contracts. Gas is purchased for ether from the miners that execute the code. Gas and ether are decoupled deliberately since units of gas align with computation units having a natural cost, while the price of ether generally fluctuates as a result of market forces. The two are mediated by a free market: the price of gas is actually decided by the miners, who can refuse to process a transaction with a lower gas price than their minimum limit. To get gas you simply need to add ether to your account. The Ethereum clients automatically purchase gas for your ether in the amount you specify as your maximum expenditure for the transaction."

In Solidity, you define a variable by first specifying its type.

What other types are there?

1 boolThis is a Boolean, which returns true or false.

2 int / uintBoth int and uint represent integers, or number values. The primary difference between int and uint (Unsigned Integer), is that int can hold negative numbers as values.

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «Creation and Deployment of Smart Contracts on Ethereum Blockchain»

Представляем Вашему вниманию похожие книги на «Creation and Deployment of Smart Contracts on Ethereum Blockchain» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «Creation and Deployment of Smart Contracts on Ethereum Blockchain»

Обсуждение, отзывы о книге «Creation and Deployment of Smart Contracts on Ethereum Blockchain» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x