Skip to content

📋 Decentralised app using the Ethereum blockchain with Javascript and Solidity

Notifications You must be signed in to change notification settings

AndrewJBateman/blockchain-ethereum-contract

Repository files navigation

Blockchain Ethereum Contract

  • Truffle Framework used to create an Ethereum app using Javascript and Solidity.
  • Code from Fazt Code - see 👏 Inspiration below
  • Note: to open web links in a new window use: ctrl+click on link

GitHub repo size GitHub pull requests GitHub Repo stars GitHub last commit

📄 Table of contents

📚 General info

  • Ethereum blockchain app is written in Solidity, similar to Javascript
  • The app is a simple todo list with title & description strings, integer id & date fields with a boolean 'done' field
  • Truffle suite includes Ganache, required to run the tests

📷 Screenshots

Example screenshot Example screenshot

📶 Technologies

💾 Setup

Solidity code:

  • truffle console to start Truffle command prompt
  • truffle migrate to compile app

Frontend:

  • npm run dev for a server-lite dev server

🔦 Testing

  • truffle test to run tests on Solidity code - Ganache has to be running

💻 Code Examples

  • contracts/TasksContract.sol extract - In order to make events stand out with regards to regular function calls, emit TaskCreated(var1, var2...) as opposed to just EventName() is used to "call" the TaskCreated function.
function createTask(string memory _title, string memory _description) public {
  taskCounter++;
  tasks[taskCounter] = Task(taskCounter, _title, _description, false, block.timestamp);
  emit TaskCreated(taskCounter, _title, _description, false, block.timestamp);
}

🆒 Features

  • connects with MetaMask Ethereum wallet Chrome Extension - see top screen print

📋 Status & To-Do List

  • Working
  • To-Do: Replace Bootstrap cards etc. with new style

👏 Inspiration

📁 License

  • N/A

✉️ Contact

About

📋 Decentralised app using the Ethereum blockchain with Javascript and Solidity

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published