The graduation certificate of Tianjin University will be permanently recorded on the CyberMiles blockchain, which can be stored permanently and cannot be tampered with! How is this achieved?
The entire Dapp design is divided into two parts: * The smart contract records key information to ensure that the information cannot be corrected. This part is equivalent to the replacement of traditional applications; * The front-end display page is implemented using HTML, JavaScript, and CSS, 100% copying the real world certificate.
The two parts of the smart contract and the front-end display page are implemented through web3-cmt.js.
The following is a detailed explanation of the smart contract part for everyone. The contract basically does not involve calculations, and is mainly implemented through strings
|
|
Open BUIDL for CMT,Copy and paste the above code into BUIDL, click on compile,get the ABI and parameter of the contract.
Fill in the parameters on the graduation certificate, name, gender, date of birth, study time, certificate number, certificate submission time, and graduation certificate student photo link into the information field at the beginning, and click “Deploy on the chain”.
Pay a little gas, and the contract is deployed. Click the call button and you can see the information just recorded on the chain. In this way, the core information on the graduation certificate is put on the chain. The next thing that needs to work on is the front-end display page.