Posts

Showing posts from February, 2024

An Introduction to the Non-Fungible Tokens (NFTs)

Image
In this tutorial, we are going to introduce the Non-Fungible Tokens or ERC-721 standard. In addition to that, we are going to get familiar with the interface of ERC-721 so that we can later use them in NFT deployments. Every NFT project also needs an ERC-721 JSON metadata that we are going to introduce in different sections. Introduction to Non-Fungible Tokens Non-Fungible or ERC-721 tokens are the kind of tokens that have unique features in other words, they cannot be exchanged by one another because they are all identified as unique. The use cases for NFTs are platforms that offer collectible items (like artworks), lottery tickets, numbered seats for cinemas, concerts, access keys, and so on. ERC-721 Interface As mentioned earlier, the NFTs follow the ERC-721 standard. Here we take a look at the ERC-721 interface, which we are going to use in the next parts of our NFT tutorials when we want to write a contract for our collectibles: pragma solidity ^ 0.4.2

#1 Git Basics (Git and GitHub Tutorials from Scratch)

Image
Git Basics Welcome to the first part of the git tutorials. In this part we will get familiar with some of the most basic concepts about Git and Github, why we need them, how they help us and how we should use them. If you are already familiar with all of these concepts, you can skip this video and start with the next one. In general, Git is a version control system that is designed to keep track of changes that has been made on a project by a team of developers. However, a single developer can still benefit from the use cases of this popular version control system. Using Git you can make different versions of the same project and save all of these versions inside the same folder without even seeing the the ones that are not activated. Watch The Video on Youtube https://blog.arashtad.com/updates/1-git-basics-git-and-github-tutorials-from-scratch/?feed_id=1917&_unique_id=65e131fb214ba

Lottery Project Compiling: A Complete Tutorial

Image
In this tutorial, We are going to finally compile the lottery project . After making sure that it has been successfully compiled, we will run all the written tests to make sure everything works correctly in the contract. In the end, we will deploy the Decentralized Application on the Rinkeby test network. To be able to interact with the deployed contract, we will get some test Link tokens from Rinkeby Faucet. Compiling the Lottery Project Dapp In this part, we are going to finally compile, run and test our Lottery Dapp. Coppied to clipboard. brownie compile The result should be: Coppied to clipboard. Brownie v1.18.1 - Python development framework for Ethereum 1.33MiB [00:03, 402kiB/s] New compatible solc version available: 0.7.0 Compiling contracts... Solc version: 0.7.0 Optimizer: Enabled Runs: 200 EVM Version: Istanbul WARNING: Unable to compile OpenZeppelin/openzeppelin-contracts@3.4.0 due to a CompilerError - you ma

#60 String Format (Python Tutorials)

Image
String Format In this part of our python tutorials series, you will learn about the string formatting in python. We have had tutorials about the strings at the beginning of the course. In this video, you will see the different ways in which you can push your integer or float or any other data type variable into a text which is of the type string. Watch The Video on Youtube https://blog.arashtad.com/updates/60-string-format-python-tutorials/?feed_id=1886&_unique_id=65e08ab3abbf1

Lottery Project Using Brownie: A Full Scale Dapp

Image
In this article, we are going to get started with the lottery project using Brownie. The main purpose of a lottery project in every network is to check the reliability of the randomness and use it for different purposes such as the lottery itself. In the lottery project, we are going to create a decentralized application using Brownie . In the end, we will be able to run the smart contract via Etherscan. Using Brownie for Lottery Project In this tutorial, we are going to first write a smart contract related to a lottery and write scripts related to testing and deploying the smart contract. We also want to make it a full-scale decentralized application, meaning that it is going to be an end-to-end Dapp with easy to use user experience. Every lottery needs a random variable. As randomness is a very complicated concept when it is going to be applied on the internet and here we are going to run it via the blockchain, it must be protected from hacks and cheating. What makes random

#59 JSON (Python Tutorials)

Image
JSON In this part of our python tutorials series, you will learn about JSON in python. JSON stands for Java Script Object Notation and it is a format of data that you can easily create out of dictionaries in python and then convert into string to become a JSON data. Afterward, you can store it inside of a .json file format to transfer it as data that is readable by any other programming language. Watch The Video on Youtube https://blog.arashtad.com/updates/59-json-python-tutorials/?feed_id=1855&_unique_id=65dfe0c2a69ef

Getting Started with Decentralized Apps (Dapps) Using Python

Image
If you have ever heard of blockchain, bitcoin, web3, etc, you are most probably familiar with the word Dapp. Dapps or Decentralized applications are web3-based apps that operate autonomously using smart contracts . A simple example of Dapp is a wallet that is connected to a blockchain like Ethereum and operates the transactions automatically without the need for any third-party organizations or central servers. In this article, we are going to get more familiar with the Dapps using Python. Using Python for Dapps: Installing the Dependencies The first step for getting started with the development of decentralized applications in python is learning how to work with smart contracts using web3.py tools. With that being said, let’s get started by installing web3.py on your operating system. The default operating system for this tutorial is Linux but we will mention the necessary installation guides for those who work with Windows or Mac OS. On Linux, make sure you have pip3 in

#58 File Handling - Part 2 (Python Tutorials)

Image
File Handling (Part 2) In this part of our python tutorials series, you will learn about file handling in python. Python allows you to create any type of document with .txt or .json or other file formats. In this video and the next one, you will see how you can create these kind of files, edit, update, read, write and remove them. Watch The Video on Youtube https://blog.arashtad.com/updates/58-file-handling-part-2-python-tutorials/?feed_id=1824&_unique_id=65df3788830ab

ERC-20 Event and Function + Sample Smart Contract

Image
In this article, we are going to analyze the ERC-20 event and function deeper and get familiar with the building blocks of any ERC-20 smart contract . Learning these methods and events will help us write the smart contract of our desired token. Throughout this article, you will see the functionalities of all the smart contracts that we wrote for creating an ERC20 token in the last article. Functions and Event of all ERC-20 contracts: In general, every ERC-20 token has the below functions and events: function name() public view returns (string) function symbol() public view returns (string) function decimals() public view returns (uint8) function totalSupply() public view returns (uint256) function balanceOf(address _owner) public view returns (uint256 balance) function transfer(address _to, uint256 _value) public returns (bool success) function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) function approve(address _spe

#57 File Handling - Part 1 (Python Tutorials)

Image
File Handling (Part 1) In this part of our python tutorials series, you will learn about file handling in python. Python allows you to create any type of document with .txt or .json or other file formats. In this video and the next one, you will see how you can create these kind of files, edit, update, read, write and remove them. Watch The Video on Youtube https://blog.arashtad.com/updates/57-file-handling-part-1-python-tutorials/?feed_id=1793&_unique_id=65de90955ae39

How to Share Your Scripts on GitHub: A Useful Intro

Image
GitHub is a well-known social network for coders and developers to share their latest developments and modifications. This social network or code-sharing platform enables users to share their scripts publicly or privately . Throughout this tutorial, you will see how you can share your scripts and the latest development on GitHub. It is also worth mentioning that you can share whatever you want on GitHub, on Gitlab as well. Sharing Yours Scripts on GitHub Sharing your code is an important step toward making yourself known to the programmers' community and displaying your talents and projects to reference in your resume. In addition to that, any successful team shares their code with their teammates in order to be able to optimize their code more efficiently. In this tutorial, we are going to see how we can use GitHub as a tool to share our codes and be able to modify them according to the latest updates we have had. Creating A Profile on GitHub The first step is to