2 Related Work
2.1 The Impact of Blockchain Technology on Education
2.2 Incorporating Scratch into Tinker Learning for Computational Thinking
2.3 Using Polygon SDK for JavaScript to Interact with a Smart Contract
2.4 Challenges in Blockchain Education and the Need for User-friendly Tools
Our paper proposes a novel method for updating the metadata of non-fungible tokens (NFTs) using an API layer to reduce barriers to entry and enable K-12 students to explore blockchain technology. Our approach leverages Google Blockly, a visual programming language, to make updating NFT metadata more accessible and engaging for young learners. By creating a custom block in Blockly using the Blockly Developer Tools, we can create an interface that generates JavaScript and XML code for the block. This interface should allow the block’s JavaScript code to interact directly with the Polygon software development kit (SDK) and smart contracts. By integrating this custom block into the BlocklyDuino editor, K-12 learners can manipulate data collected from Arduino sensors and upload it to the Polygon blockchain using the custom block.
In our paper, we present a method for creating custom blocks in Google Blockly and using them to update NFT metadata. First, we create a custom block in Google Blockly that outputs the "Hello World" message. Then, we name the block and add a dummy input before visually representing the custom block and adding it to the MyBlocks category. Next, we write a code generator function that generates the code required to update NFT metadata when the custom block is used. We modify the code to update the metadata with the desired information, export the custom block toolbox and import it into BlocklyDuino. This open-source visual programming platform generates Arduino code, and we also provide all the necessary files required for running the custom block. Finally, we import the toolbox into BlocklyDuino and verify that the custom block can be used to update NFT metadata. Our proposed method could promote student engagement and understanding of blockchain technology and NFTs, which could have significant implications forthe future of education. By leveraging a familiar and engaging visual programming language like Google Blockly, we hope to inspire a new generation of blockchain enthusiasts and foster a deeper understanding of digital ownership and value.
Our paper’s third authoris a seventh-grade student responsible for following the teaching steps we provided to interact with Blockly and smart contracts to create an IoT plant watering and growing log. He used an NFT as a digital identity for the observed plant and regularly uploaded data to the blockchain while updating the NFT’s attributes. This demonstrates that our proposed method significantly lowers the barrier to entry for K-12 students to enter the blockchain world. Currently, our focus is on validating the process, but we plan to design more new course materials that create value for blockchain applications in the future.
The Google Blockly Custom Block Tutorial is from creating the "Hello World" block and using it in BlocklyDuino. This tutorial will guide us through creating our first custom block in Google Blockly and integrating it into BlocklyDuino. The "Hello World" block will output "Hello World" in BlocklyDuino. Google Blockly demo (Custom block development tool): https://blocklydemo.appspot.com/static/demos/blockfactory/index.html. Creating the First Custom Block in Google Blockly "Hello World." The approach for creating custom blocks in Blockly is as follows:
(1) Custom block in the "Blockly Developer Tools" and name the custom block "helloworld." https://blockly-demo.appspot. com/static/demos/blockfactory/index.html.
(2) Add a dummy input and use the Block Factory to design our custom block. We can set the block’s type, input, output, and other properties.
(3) Generate code. We can generate the code for it using the Block Factory. Teachers can help students add the Polygon SDK in the step.
(4) Import the custom block’s XML definition into our BlocklyDuino workspace. https://qiudaru.github.io/webduino/.
(5) Use the custom block in our BlocklyDuino programs by dragging it from the toolbox and connecting it to other blocks.
Following these steps, we can create custom blocks in Blockly to add new functionality to the visual programming language.
Google Blockly is a visual programming language that allows users to create JavaScript code by selecting and connecting blocks representing desired functionality [? ]. This involves choosing the desired block, dragging and dropping it into the workspace, linking the blocks, configuring them by setting properties such as text, color, and tooltip, generating the JavaScript code, and exporting it to a JavaScript file or copying and pasting it into a project. Users can then test and refine the code to improve its functionality and performance. By pushing Blockly JavaScript files to a GitHub repository and configuring BlocklyDuino to access the repository’s page, users can create programs that set data to a smart contract with Polygon SDK [? ]. This involves creating a GitHub repository to store the Blockly JavaScript files, pushing the files to the repository,
As shown in figure 2, the Block Definition on the right side defines the block.
As shown in figure 2, the generated code in the "Generator stub" is:
creating a GitHub page for the repository, configuring BlocklyDuino to access the GitHub page, creating a program in Blockly
that sets data to a smart contract with Polygon SDK, generating the JavaScript code, uploading the code to an Arduino board using BlocklyDuino, connecting the board to the smart contract, and executing the program to set the data.
Authors:
(1) Yun-Cheng Tsai, National Taiwan Normal University, Taipei, Taiwan ([email protected]);
(2) Jiun-Yu Huang, Small Town Intelligence Co., Ltd, Taiwan ([email protected]);
(3) Da-Ru Chiou, Taitung Tung Hai Junior High School, Taiwan ([email protected]).
This paper is