Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
435 views4 pages

Blockchain Food Traceability

The document acknowledges and thanks several people for their guidance and support during the completion of the project titled "FOOD TRACEABILITY USING BLOCKCHAIN". It expresses gratitude to the principal, head of department, internal guide, teaching and non-teaching staff for providing the resources and environment needed to finish the project. The document also thanks parents and friends for their encouragement and help. It is signed by four students who worked on the project.

Uploaded by

yashas babu c m
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
435 views4 pages

Blockchain Food Traceability

The document acknowledges and thanks several people for their guidance and support during the completion of the project titled "FOOD TRACEABILITY USING BLOCKCHAIN". It expresses gratitude to the principal, head of department, internal guide, teaching and non-teaching staff for providing the resources and environment needed to finish the project. The document also thanks parents and friends for their encouragement and help. It is signed by four students who worked on the project.

Uploaded by

yashas babu c m
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

ACKNOWLEDGEMENT

The satisfaction that accompanies to this project would be incomplete without the
mention of the people who made it possible, without whose constant guidance and
encouragement would have made our efforts go in vain.

We consider ourselves privileged to express our gratitude and respect towards all those who
guided us through the Major Project,“FOOD TRACEABILITY USING BLOCKCHAIN”.

We would like to express our profuse gratitude to Dr. C.NANJUNDASWAMY, Principal,


Dr.AIT, for providing us the congenial environment to work in.

We would like to express our profuse gratitude to Dr. SIDDARAJU, HOD, Dept. of
Computer Science & Engineering, Dr.AIT, for giving us the support, encouragement and
providing us the required lab facilities that was necessary for the completion of this project.

As a token of gratitude, we would like to acknowledge our sincere gratefulness to the internal
guide Mrs.Sangeetha G M, Asst. Professor, Dept. of CSE, Dr.AIT for their unlimited
support and encouragement provided throughout the process.

We also express our gratitude and sincere thanks to all the teaching and non-teaching staff of
Computer Science & Engineering Department.

Finally, yet importantly, we would like to express our heartfelt thanks to our beloved Parents
and Friends for their help and wishes for the successful completion of the project.

TEJAS M P [1DA15CS160]

THEJAS P [1DA15CS163]

YASHASBABU C M [1DA15CS175]

TEJAS D S [1DA15CS185]
CONTENTS

INTRODUCTION................................................................................................................1
1.1 Existing System..........................................................................................................1
1.2 Proposed System........................................................................................................2
1.2.2 Aim of the project................................................................................................3
REQUIREMENT SPECIFICATIONS.................................................................................4
2.1 Details of Software.....................................................................................................4
2.1.1 Ganache...............................................................................................................4
2.1.2 Truffle..................................................................................................................4
2.1.3 Solidity................................................................................................................5
2.1.4 Metamask............................................................................................................5
2.1.5 npm(Node Package Manager).............................................................................5
2.1.6 JavaScript............................................................................................................6
2.1.7 HTML.................................................................................................................7
2.1.8 CSS......................................................................................................................7
2.2 System Requirements.................................................................................................8
2.2.1 Hardware Requirements......................................................................................8
2.2.2 Software Requirements.......................................................................................9
SYSTEM DESIGN............................................................................................................10
3.1 Dataflow Diagram....................................................................................................10
3.1.1 System Dataflow Diagram................................................................................10
3.1.2 Blockchain Dataflow Diagram..........................................................................11
3.2 Sequence Diagram....................................................................................................11
SYSTEM IMPLEMENTATION........................................................................................13
4.1 Download & install truffle Ganache........................................................................13
4.2 Download & install Metamask wallet......................................................................13
4.3 Compiling the truffle project....................................................................................14
4.3.1 Migrations.sol code:..........................................................................................14
4.4 StructStorage.sol code..............................................................................................15
4.5 Running migrations..................................................................................................18
4.6 Creating a smart contract..........................................................................................19
4.7 Starting the local server............................................................................................43
4.8 Deploying smart contract to blockchain...................................................................44
4.9 Frontend...................................................................................................................55
TESTING...........................................................................................................................63
5.1 Manual Testing.........................................................................................................63
5.2 Automation Testing..................................................................................................64
5.3 White box testing.....................................................................................................64
5.3.1 White Box Testing Techniques:.........................................................................64
5.4 Black box testing......................................................................................................64
5.5 Unit testing...............................................................................................................65
5.6 Integration testing.....................................................................................................68
5.7 System testing..........................................................................................................69
5.8 Acceptance testing....................................................................................................70
5.9 Usability testing.......................................................................................................71
SAMPLE OUTPUT...........................................................................................................72
CONCLUSION AND FUTURE ENHANCEMENT.........................................................83
BIBLIOGRAPHY..............................................................................................................84

LIST OF FIGURES

Figure 3.1 Dataflow Diagram of Agricultural Food Chain Traceability............................10


Figure 3.2 Blockchain Dataflow Diagram.........................................................................11
Figure 3.3 Sequence Diagram............................................................................................12
Figure 6.1 Ganache home page with mnemonic code & block addresses.........................72
Figure 6.2 Setting up the Metamask wallet & an account using the mnemonic code.......73
Figure 6.3 Metamask wallet setup account creation success message...............................73
Figure 6.4 Compiling the solidity code using truffle.........................................................74
Figure 6.5 Deploying smart contracts to Ethereum network.............................................74
Figure 6.6 Starting the lite server (Web3) bootstrap..........................................................75
Figure 6.7 Application home page opened at localhost://3000..........................................75
Figure 6.8 Entering & submitting the farmer details.........................................................76
Figure 6.9 Metamask transaction confirmation dialog box................................................76
Figure 6.10 Quality Testing & approving the product details............................................77
Figure 6.11 Entering the product details after passing QT & getting the approval............77
Figure 6.12 Verifying crop quality by the customer...........................................................78
Figure 6.13 Micro-Finance feature to fund the farmer.......................................................78
Figure 6.14 Metamask showing transaction history...........................................................79
Figure 6.15 Every transaction is hashed & stored in each block forming blockchain.......79
Figure 6.16 Ganache logs generated for all actions...........................................................80
Figure 6.17 Each blocks transactions detail.......................................................................80
Figure 6.18 Block 3 transaction hash details......................................................................81
Figure 6.19 Block 2 public address & transaction id.........................................................81
Figure 6.20 Block 2 transaction details..............................................................................82
Figure 6.21 Genesis Block transaction details...................................................................82

LIST OF TABLES

Table 5.1 Ganache Test Case..............................................................................................65


Table 5.2 Metamask Test Case...........................................................................................66
Table 5.3 Truffle Test Case.................................................................................................66
Table 5.4 Transaction Registration Test Case....................................................................67
Table 5.5 Crop Details Test Case......................................................................................67
Table 5.6 Ganache and Metamask Test Case.....................................................................68
Table 5.7 Ganache and Truffle Test Case...........................................................................69
Table 5.8 System Test Case................................................................................................70

You might also like