Saltar la navegación

3.4.3.1 Session: Smart Contract Design

30 minutes ⇒ Level: Low

Smart Contract Design Introduction (10 minutes)

  • Briefly revisit the project's goal: seamlessly integrating blockchain technology with an IIoT-enabled 3D printer for automated manufacturing based on smart contract transactions.
  • Explain that the focus shifts to the implementation of the smart contract in Solidity and its deployment on the local Ethereum test network.
  • Highlight the fundamental structure of a smart contract, encompassing state variables (such as structs, arrays, and mappings), functions, modifiers, and events. ⇒ using slides (4.3-smart_contract_implementation.pptx)
  • Provide a brief overview of the Solidity programming language, emphasizing its purpose, syntax, and its role in developing smart contracts on the Ethereum blockchain.


Smart Contract Design (20 minutes)

  • Encourage previously assigned groups of students to discuss and outline their system's desired functionality and the role of the smart contract within this system in the processes defined in module 3.4.1.
  • Each group should define the key value and reference types used in their system's smart contract (e.g., uint, address, structs, mappings).
  • Each group should define key smart contract functions, including modifiers, visibility, and custom functions.
  • Instruct students to design flowcharts for their smart contract's key functions, focusing on the logic that governs the contract's operations and state transitions.
  • If there is some time left, the groups can share their flowcharts with other groups to open up discussions on the correctness of the flowcharts according to the desired functionality.

Creado con eXeLearning (Ventana nueva)