
Simple Solidity HelloWorld Contract Deployment Guide
Learn how to write, compile, and deploy a basic HelloWorld Solidity contract on a local Ethereum blockchain. Follow step-by-step instructions and examples to get started with Solidity programming for Ethereum development.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
02. HelloWorld Solidity + Ethereum local blockchain r.almeida@studenti.unipi.it
How to write, compile and deploy a simple HelloWorld Solidity contract
Solidity: Simple HelloWorld example function sayHello(string memory greet) public pure returns (string memory) { string memory hello = "Hello "; return string.concat(hello, greet); }
Solidity: Simple HelloWorld example truffle(ganache)> HelloWorld.deployed() .then(function(instance) { return instance.sayHello("Ricardo"); } );
Solidity: run scripts var HelloWorld = artifacts.require("HelloWorld"); module.exports = async function(callback) { try { let hello_deployed = await HelloWorld.deployed(); let greet = process.argv[4]; const message = await hello_deployed.sayHello(greet); console.log(message); } catch(error) { console.log("ERROR: " + error); } callback(); }