Wednesday, July 8, 2020
Setting Up A Smart Contract Development Environment
Setting Up A Smart Contract Development Environment Setting Up A Smart Contract Development Environment Last updated on Apr 29,2020 882 Views Omkar S Hiremath Tech Enthusiast in Blockchain, Hadoop, Python, Cyber-Security, Ethical Hacking. Interested in anything... Tech Enthusiast in Blockchain, Hadoop, Python, Cyber-Security, Ethical Hacking. Interested in anything and everything about Computers. Bookmark 2 / 4 Blog from Smart Contracts Most commonly heard term across any Blockchain discussion is Smart Contract, this has been dubbed as the most compelling feature of Blockchain. A Smart Contract is the backbone of any Ethereum Applications. And setting up a Smart Contract development environment is a very important thing for a Blockchain Developer.In this Setting up a Smart Contract Development Environment blog, I will be covering the following topics:What is a Smart Contract?How to start setting up a smart contract development environment?Smart Contract LanguageSetting up the Development EnvironmentWhat is a Smart Contract? Well , doing a simple google search one ends up with multiple links.Wikipediadefinition A smart contract is a computer protocol intended to digitally facilitate, verify, or enforce the negotiation or performance of a contract.Nick Szabo defines a smart contract as a general-purpose computation that takes place on a Blockchain or distributed ledger.A smart contract, in essence, is a contract built into the code. For example, Purchase order is a contract that exists between a buyer and a seller, keeping it in the simplest form. Certain conditions have to be fulfilled for the purchase order to be executed successfully. Few of the conditionsSuccessful payment for the goods by the buyer.Goods provided in the right condition to the buyer by the supplier.Goods delivered before the due date agreed upon at the time of purchase.Conditions for return of goods agreed upon in the purchase order.These are a few of the simple conditions in the simplest of a purchase order.These conditions can be conver ted into digital format i.e. digitally facilitated.Actions like creating a purchase order, fulfillment of the order are exposed as a function in the program, these actions are called transactions.Transactions can only be executed by the designated actors (buyer, seller) hence the verification. For example, a buyer can place an order, a supplier can fulfill the order.All the transactions require computation i.e. they have to be executed by a processor. In the case of the Blockchain network, it is a distributed computing network or general purpose computing.As these transactions are verified and enforced by the network, once confirmed the transactions cannot be reverted.A smart contract can be summarized asA business contract built in the form of a programWhich resides on the Blockchain network, the network provides the computation required to execute the program.To execute the function of the program, permissions are provided to the designated actors, which verifies.This blogon Edure ka, provides in-depth information about Smart Contracts.The next big question which comes to mind is how to get started, what is required to build a smart contract. So lets see how to get started.How to start setting up a smart contract development environment?In the previous section, we discussed what Smart Contracts are, in this section we are going to look at the following topics:What is required to build a smart contract?What are the different languages available for building smart contract?The choice of the language, to build smart contract is dependent on the blockchain platform. For this blog series, the blockchain platform of choice is Ethereum. Ethereum is the blockchain platform which has been dubbed as Planetary level computer or world computer a huge public network of many private computers that facilitate running of internet applications (DApp Distributed Applications) without any third parties.Smart Contract LanguageA Smart Contract language (SCL) is a programming lan guage that is either used to write a Smart Contract directly or is compiled to it. Smart Contract languages for Ethereum are:SolidityeWASMVyperEthereum bytecodeFor this blog series, we are going to focus on Solidity as the smart contract development language. Solidity is the most popular smart contract language for Ethereum. So now we have chosen our language for smart contract development, let us see what is required to get started.Setting up the development environment Back Home Categories Online Courses Mock Interviews Webinars NEW Community Write for Us Categories Artificial Intelligence AI vs Machine Learning vs Deep LearningMachine Learning AlgorithmsArtificial Intelligence TutorialWhat is Deep LearningDeep Learning TutorialInstall TensorFlowDeep Learning with PythonBackpropagationTensorFlow TutorialConvolutional Neural Network TutorialVIEW ALL BI and Visualization What is TableauTableau TutorialTableau Interview QuestionsWhat is InformaticaInformatica Interview QuestionsPower BI TutorialPower BI Interview QuestionsOLTP vs OLAPQlikView TutorialAdvanced Excel Formulas TutorialVIEW ALL Big Data What is HadoopHadoop ArchitectureHadoop TutorialHadoop Interview QuestionsHadoop EcosystemData Science vs Big Data vs Data AnalyticsWhat is Big DataMapReduce TutorialPig TutorialSpark TutorialSpark Interview QuestionsBig Data TutorialHive TutorialVIEW ALL Blockchain Blockchain TutorialWhat is BlockchainHyperledger FabricWhat Is EthereumEthereum TutorialB lockchain ApplicationsSolidity TutorialBlockchain ProgrammingHow Blockchain WorksVIEW ALL Cloud Computing What is AWSAWS TutorialAWS CertificationAzure Interview QuestionsAzure TutorialWhat Is Cloud ComputingWhat Is SalesforceIoT TutorialSalesforce TutorialSalesforce Interview QuestionsVIEW ALL Cyber Security Cloud SecurityWhat is CryptographyNmap TutorialSQL Injection AttacksHow To Install Kali LinuxHow to become an Ethical Hacker?Footprinting in Ethical HackingNetwork Scanning for Ethical HackingARP SpoofingApplication SecurityVIEW ALL Data Science Python Pandas TutorialWhat is Machine LearningMachine Learning TutorialMachine Learning ProjectsMachine Learning Interview QuestionsWhat Is Data ScienceSAS TutorialR TutorialData Science ProjectsHow to become a data scientistData Science Interview QuestionsData Scientist SalaryVIEW ALL Data Warehousing and ETL What is Data WarehouseDimension Table in Data WarehousingData Warehousing Interview QuestionsData warehouse architectureTalend T utorialTalend ETL ToolTalend Interview QuestionsFact Table and its TypesInformatica TransformationsInformatica TutorialVIEW ALL Databases What is MySQLMySQL Data TypesSQL JoinsSQL Data TypesWhat is MongoDBMongoDB Interview QuestionsMySQL TutorialSQL Interview QuestionsSQL CommandsMySQL Interview QuestionsVIEW ALL DevOps What is DevOpsDevOps vs AgileDevOps ToolsDevOps TutorialHow To Become A DevOps EngineerDevOps Interview QuestionsWhat Is DockerDocker TutorialDocker Interview QuestionsWhat Is ChefWhat Is KubernetesKubernetes TutorialVIEW ALL Front End Web Development What is JavaScript â" All You Need To Know About JavaScriptJavaScript TutorialJavaScript Interview QuestionsJavaScript FrameworksAngular TutorialAngular Interview QuestionsWhat is REST API?React TutorialReact vs AngularjQuery TutorialNode TutorialReact Interview QuestionsVIEW ALL Mobile Development Android TutorialAndroid Interview QuestionsAndroid ArchitectureAndroid SQLite DatabaseProgramming aria-current=page>Uncat egorizedSetting Up A Smart Contract De... Blockchain and Ethereum Certification Tr... (6 Blogs) AWS Global Infrastructure Blockchain Introduction What is Blockchain? Step-by-Step Guide for BeginnersBlockchain Technology â" Everything you need to know about Blockchain and BitcoinDifferent Types Of Blockchain And Why We Need ThemBlockchain Tutorial - A Beginner's Guide to Blockchain TechnologyBlockchain Applications That Are Changing The WorldBlockchain Security: Is Blockchain Really Secure?Everything You Need to Know about Blockchain ArchitectureBlockchain Mining- All You Need To Know Blockchain Basics What is Blockchain Technology? How Blockchain WorksBlockchain Technology â" Everything you need to know about Blockchain and BitcoinBitcoin Blockchain Explained : Understanding Bitcoin and BlockchainAll You Need to Know about Blockchain Programming Ethereum What Is Ethereum? A Platform To Decentralize The WorldEthereum Tutorial â" A Deeper Look Into Ethereum!Ethereum Upgrades : All you need to know about Ethereum's IstanbulBest Ethereum Development Tools To Create DappsBlockchain 2.0: Ethereum DApps and Job TrendsTruffle Ethereum Tutorial â" Developing Ethereum DApps with TruffleEthereum Private Network â" Create your own Ethereum Blockchain!Solidity Tutorial â" Solidity Programming For Beginners Smart Contracts What are Smart Contracts? A Beginner's Guide To Smart ContractsSetting Up A Smart Contract Development EnvironmentHow to write your first Smart Contract?Ethereum Smart Contract â" How to execute a Smart Contract? Hyperledger What is Hyperledger â" An Industrial Approach to BlockchainHyperledger Fabric â" A Platform For Business SolutionsHyperledger vs Ethereum â" Which Blockchain Platform Will Benefit Your Business? Career Opportunities Top 10 Reasons Why You Should Learn BlockchainHow to learn Blockchain? Advantages, Learning path and FutureHow to Become a Blockchain Developer? â" Types, Roles and SkillsBlockchain Beyond Bitcoin â " Blockchain Platforms and TrendsTop 5 Cryptocurrencies To Look Out For In 2019 Interview Questions Top 55 Blockchain Interview Questions You Must Prepare In 2020Setting Up A Smart Contract Development Environment Last updated on Apr 29,2020 882 Views Omkar S Hiremath Tech Enthusiast in Blockchain, Hadoop, Python, Cyber-Security, Ethical Hacking. Interested in anything... Tech Enthusiast in Blockchain, Hadoop, Python, Cyber-Security, Ethical Hacking. Interested in anything and everything about Computers. Bookmark 2 / 4 Blog from Smart Contracts Most commonly heard term across any Blockchain discussion is Smart Contract, this has been dubbed as the most compelling feature of Blockchain. A Smart Contract is the backbone of any Ethereum Applications. And setting up a Smart Contract development environment is a very important thing for a Blockchain Developer.In this Setting up a Smart Contract Development Environment blog, I will be covering the following topics:What is a Smart Contract?How to start setting up a smart contract development environment?Smart Contract LanguageSetting up the Development EnvironmentWhat is a Smart Contract? Well, doing a simple google search one ends up with multiple links.Wikipediadefinition A smart contract is a computer protocol intended to digitally facilitate, verify, or enforce the negotiation or performance of a contract.Nick Szabo defines a smart contract as a general-purpose computation that takes place on a Blockchain or distributed ledger.A smart contract, in essence, is a contract built into the code. For example, Purchase order is a contract that exists between a buyer and a seller, keeping it in the simplest form. Certain conditions have to be fulfilled for the purchase order to be executed successfully. Few of the conditionsSuccessful payment for the goods by the buyer.Goods provided in the right condition to the buyer by the supplier.Goods delivered before the due date agreed upon at the time of purchase.Conditi ons for return of goods agreed upon in the purchase order.These are a few of the simple conditions in the simplest of a purchase order.These conditions can be converted into digital format i.e. digitally facilitated.Actions like creating a purchase order, fulfillment of the order are exposed as a function in the program, these actions are called transactions.Transactions can only be executed by the designated actors (buyer, seller) hence the verification. For example, a buyer can place an order, a supplier can fulfill the order.All the transactions require computation i.e. they have to be executed by a processor. In the case of the Blockchain network, it is a distributed computing network or general purpose computing.As these transactions are verified and enforced by the network, once confirmed the transactions cannot be reverted.A smart contract can be summarized asA business contract built in the form of a programWhich resides on the Blockchain network, the network provides the co mputation required to execute the program.To execute the function of the program, permissions are provided to the designated actors, which verifies.This blogon Edureka, provides in-depth information about Smart Contracts.The next big question which comes to mind is how to get started, what is required to build a smart contract. So lets see how to get started.How to start setting up a smart contract development environment?In the previous section, we discussed what Smart Contracts are, in this section we are going to look at the following topics:What is required to build a smart contract?What are the different languages available for building smart contract?The choice of the language, to build smart contract is dependent on the blockchain platform. For this blog series, the blockchain platform of choice is Ethereum. Ethereum is the blockchain platform which has been dubbed as Planetary level computer or world computer a huge public network of many private computers that facilitate ru nning of internet applications (DApp Distributed Applications) without any third parties.Smart Contract LanguageA Smart Contract language (SCL) is a programming language that is either used to write a Smart Contract directly or is compiled to it. Smart Contract languages for Ethereum are:SolidityeWASMVyperEthereum bytecodeFor this blog series, we are going to focus on Solidity as the smart contract development language. Solidity is the most popular smart contract language for Ethereum. So now we have chosen our language for smart contract development, let us see what is required to get started.Setting up the development environmentIn physics, we have often heard static friction is greater than dynamic friction. Getting started with smart contract requires setting up of development environment, which is the prerequisite. In this blog, we will look at the steps required to set up the development environment and what are the options available. Similarly, knowing about the development environment for Smart Contract development is a greater hurdle than actual development. There are a plethora of choices available, which overwhelm anyone new to building a Smart Contract. Simplifying the environment set up is the first step towards dwelling deeper into the blockchain world. In order to set up the environment for developing a Smart Contract, two choices are available.Remix Online IDELocal Set UpRemix IDEThe first choice is to use online remix IDE (integrated development environment) to build and test the smart contract. This is a quick, easy and recommended way for beginners.ProsNo installation required, completely onlineGet started without any challenges, quick for prototyping and validating Smart ContractProvides a local Ethereum virtual networkConsAs the progression goes from building Smart Contract, to consuming the smart contract in DApp (Distributed Application) Remix IDE has serious limitations.Local SetupAn alternative to using Remix IDE is to set up a local machine for developing Smart Contracts.Toolset required for smart contract development is as follows:NodeThe latest version of the node can be downloaded here.Using NVM (Node Version Manager)Windows InstallationDownload installer from hereDownload and run the installer, this should install the nvmOpen up a windows terminal and run nvm versionnvm --versionThis should return the current version on nvm.Mac InstallationRun the following script, this should automatically install nvm on the machine.curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bashIn order to validate the installation run the following command nvm --versionPost-InstallationOnce the nvm is installed run the following command.Run the following command nvm list. This will list down the node version installed locallynvm listTo list down the node version available for download please run the following commandnvm ls-remoteIn order to install a specific version of node run the following command n vm install node-versione.g. nvm install 10.15.0 this will install node version 10.15.0.nvm install 10.15.0Check the current version of the node being used by following commandnode --versionFor further details on nvm or node, please look at details here.Visual Studio CodeVisual Studio Code has been one of the best IDE provided by Microsoft for solidity smart contract development. Visual Studio code can be downloaded from here.Truffle SuiteTruffle suite provides an excellent framework for Smart Contract.Installation of truffle is done via npm (node package manager), which is installed with node.In order to install truffle, open up the terminal window or command prompt window.In the terminal window run the following command, npm install -g truffle(g flag in the command stands for global)Post installation of truffle is completed, run the following command to verify the version installedtruffle --versionGanache (Single node local Ethereum network)The setup file for ganache can be downloa ded hereSelect the installation package based on the operating system.Run the installer, once the installation is completed following screen should appearIn order to customize the ganache test Ethereum node running, please click on the gear icon on the right corner of the ganache tool, the following screen should be visible.Port and network id can be customized, post customization, please click on the restart button on the top left corner.This will reinitialize the node and RPC location will be http://[host-name]:[port]. In case of the setting as seen in the above screen the RPC endpoint will be http://127.0.0.1:7000Ganache installation is running and can be interacted with using the above-mentioned RPC endpoint.ProsFlexibility in building up enterprise-grade applications.Ease of selection of tools to build up Distributed Application (DApp)ConsEnvironment set up is tedious and takes time.The first step in any journey is to understand what path to take and what toolset are available. Now we are aware of what smart contracts are, what is required to build a smart contract. The option of language available and toolset available to build them. This is the first blog in a series which will focus on solidity and smart contract development. In the next blog, we are going to build our first smart contract and start looking into the basics of solidity.Got a question for us? Please post it onEdureka Communityand we will get back to you.If you wish to learn Blockchain and build a career in Blockchain Technologies, then check out ourBlockchainCertificationTrainingwhichcomes with instructor-led live training and real-life project experience.This training will help you understand what is Blockchain in an exhaustive manner and help you achieve mastery over the subject.Recommended blogs for you Vol. VI â" Edureka Career Watch â" 16th Feb. 2019 Read Article Automation Testing Tutorial: All You Need To Know About Automation Testing Read Article What is Debugging and Why is it important? Read Article Apache Cassandra Career Opportunities: How To Bag Top Cassandra NoSQL jobs Read Article Everything You Need To Know About Pointers In C Read Article Automation Anywhere Control Room One Stop Solution To The Brain of Automation Anywhere Read Article 5 Trends that can Shape Your Content Marketing Read Article Stack in Python: How, why and where? Read Article What is Agile Testing? Know about Methods, Advantages and Principles Read Article Scrum Board: Everything You Need to Know Read Article Software Testing Tools : All You Need To Know About Top Testing Tools Read Article What is the Difference between Agile and Scrum? Read Article Vol. XVII â" Edureka Career Watch â" 27th July 2019 Read Article How to evaluate ROI on different models of IT Training? Read Article 8 Reasons why AngularJS should be used for development Read Article Edureka Success Story â" Shyamâs transition from EMC Storage Consultant to Tech Lead Read Article What is Acceptance Testing in Software Testing? Read Article Everything you Must Know about Velocity in Agile Read Article Infographic A Beginners Guide to the Indian IT Ecosystem Read Article Top 10 Reasons to Learn Ethical Hacking Read Article Comments 0 Comments Trending Courses Python Certification Training for Data Scienc ...66k Enrolled LearnersWeekend/WeekdayLive Class Reviews 5 (26200)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.