You are on page 1of 96

BLOCKCHAIN POWERED PROCUREMENT SYSTEM FOR GAIL

A project report submitted in partial fulfillment of the Requirements for

the degree of

BACHELOR OF TECHNOLOGY

IN

COMPUTER SCIENCE & ENGINEERING

Submitted by

CH. SRAVANI [16L61A0553]


CH. NIRMALA [16L61A0504]
R. SURYA BHAVANI [16L61A0533]
VISHAL SHRESTHA [16L61A0550]
R.SURYA PRAKASH [16L61A0546]

Under the esteemed Guidance of

Sri. I.S. SRINIVASA RAO, M. Tech. (Ph.D.)

Associate Professor Department of CSE

Department of Computer Science and Engineering

CHAITANYA ENGINEERING COLLEGE


Accredited by NBA, Approved by A.I.C.T.E

(Affiliated to Jawaharlal Nehru Technological University, Kakinada, A.P)

KOMMADI VILLAGE, VISAKHAPATNAM-530048

2016 – 2020
CHAITANYA ENGINEERING COLLEGE
(Affiliated to Jawaharlal Nehru Technological University, Kakinada, A.P)

DEPARTMENT

OF

COMPUTER SCIENCE AND ENGINEERING

CERTIFICATE

This is to certify the project report entitled “BLOCKCHAIN POWERED


PROCUREMENT SYSTEM FOR GAIL ” is original work done by “CH.SRAVANI
[16L61A0553], CH. NIRMALA [16L61A0504],R.SURYABHAVANI [16L61A0533],
VISHAL SHRESTHA [16L61A0550], R. SURYA PRAKASH [16L61A0546]” in
partial fulfilment of the requirements for the award of the degree of Bachelor of
Technology in Computer Science during the academic year 2019-2020. The result
presented in thesis has been verified and are found to be satisfactory.

PROJECT GUIDE HEAD OF THE DEPARTMENT

I.S. SRINIVASA RAO, M.Tech., (Ph.D.) P. LAXMIKANTH, M.Tech., (Ph.D.)

Assistant Professor Assistant Professor

Dept. of Computer Science and Engineering Dept. of Computer Science and Engineering

EXTERNAL EXAMINER
ACKNOWLEDGEMENT

We wish to express our deepest gratitude to our project guide Mr. I.S. SRINIVASA
RAO, M. Tech. (Ph.D.), in department of Computer Science and Engineering for his
valuable advice and technical support from the beginning of our project. He has always
been a source of inspiration for us and has given us whole-hearted help and deep routed
support.

We sincerely thank Sri. P. LAXMIKANTH, M.Tech., (Ph.D.) Head of Department for


providing access to all required facilities in department of Computer Science and
Engineering and for constantly motivating us throughout the project.

We would like to extend our sincere thanks to all our faculty, non-teaching staff,
classmates in department and our family members for helping us to make this project
successful.

We take the privilege to thank our principal Dr. R. UMAMAHESWARA RAO M.E.,
Ph.D. who has made the atmosphere so early to work, I remember him for his valuable
encouragement.

CH. SRAVANI [16L61A0553]


CH. NIRMALA [16L61A0504]
R.SURYA BHAVANI [16L61A0533]
VISHAL SHRESTHA [16L61A0550]
R.SURYA PRAKASH [16L61A0546]
DECLARATION

We do hereby declare that this report for the main project entitled “BLOCKCHAIN
POWERED PROCUREMENT SYSTEM FOR GAIL” has been carried out by us and
submitted in partial fulfilment of the curriculum for the award of degree of Bachelor of
Technology in COMPUTER SCIENCE AND ENGINEERING, Chaitanya
Engineering College, Visakhapatnam.

The various contents incorporated in this document have not been submitted for the award
of any other degree of any other institution or university.

PROJECT ASSOCIATES

CH. SRAVANI [16L61A0553]


CH. NIRMALA [16L61A0504]
S. SURYA BHAVANI [16L61A0533]
VISHAL SHRESTHA [16L61A0550]
R.SURYA PRAKASH [16L61A0546]
ABSTRACT

A Block chain based secured solution for the procurement process of required materials
for GAIL. This will provide more security. In the procurement process we required more
transparency and security. so for that we are creating a website which gives more
transparency and security. Now a days bidding process is done through the Public
procurement process which is less transparency and less secured with the help of website
time can be consumed less and unauthorized person can not access the data. This can be
done by using block chain technology by using platform Ethereum. Ethereum provides a
smart contract. It is a constantly growing ledger that keeps a permanent record of all the
transaction that has taken place in a secure, chronological, and immutable way. It is
encoded and decentralized database.
CONTENTS
DESCRIPTION
1. INTRODUCTION
1.1. Project Purpose
1.2. Project Scope
1.3. Features
1.4. Existing System
1.5. Proposed System
1.6. Objective
2. SYSTEM REQUIREMENTS
2.1. Functional Requirements
2.2. Non-Functional Requirements
2.3. Software Requirements Specification
3. SYSTEM ANALYSIS
3.1. System Analysis

3.1.1. Data Flow Diagram

3.1.2. System architecture

3.1.3.Modules Description

3.2. Feasibility Analysis

3.3. Software Description

4. SYSTEM DESIGN
4.1. UML diagrams

4.1.1. Use-case Diagram

4.1.2. Class Diagram

4.1.3. Activity Diagram

4.1.4. Deployment Diagram

4.1.5. Component Diagram

5. SYSTEM IMPLEMENTATION

6. TESTING
6.1. Testing Techniques

6.2. Test Cases


7. OUTPUT SCREENS

8. CONCLUSION

9. FUTURE ENHANCEMENT
10. BIBLIOGRAPHY
1.INTRODUCTION
1. INTRODUCTION
INTRODUCTION
Security is the most aspect thing for a system. GAIL use tendering for bidding purpose. Procurement
requires more security. If we don’t have a security then we may face a lot of problems. So, in order to
make the procurement process more secure we implement end to end process for steel pipes that contains
steps like procurement from Indian/Overseas vendor, shipping, transportation in intermediary points,
acceptance at GAIL store, Payment to vendor using Smart Contracts using Ethereum technology.

What is Procurement Process?


Procurement is the process of finding and agreeing to terms, and acquiring goods, services, or works
from an external source, often via a tendering or competitive bidding process. Procurement generally
involves making buying decisions under conditions of scarcity.

Project Purpose
The Purpose of this project is to provide more transparency and security. The main objective of this
proposed system is to provide a safe payment and security, Smart contract between user and client. This
can be done through a website using block chain technology. Though we have public procurement
process it is a time taken process and they are less secure. To overcome this problem we are creating a
website called block chain technology.
Project Scope
The scope of this project is to give more security and transparency in the procurement for the GAIL. As
per our proposed system reduces the time and no one can access the data with the more transparency.

Features
The main features provided by this project are transparency, safe payment, smart contract, unauthorized
person can not access.

Existing System
At present GAIL procures most of the raw materials, items, office supplies and service through public
procurement portal based on tendering system. GAIL procurement system is facing a bit lack of security.
Transparency and payment gateway are the areas facing a bit lack of security.

Drawbacks
• Lack of Safety during Payment.
• Lack of Security.
• Lack of Integrity.

Proposed System
In this proposed system, we are developing a website to solve the current problems of the procurement
process in which this website helps us to bid the procurement by using block chain technology. And this
will provide more security, required transparency and this uses open source technology such as Ethereum
and able to show simple and good user interface. Block chain in procurement process could enable the
creation of tamper proof smart contracts which is automatically implemented. Block chain has the
potential to transfer all kinds of digital transactions, including in procurement and supply chain safely
and securely.

Advantages
• High Security.
• High Integrity.
• Required Transparency.
• Safe Payments.

Objective
Our main objective is to design and develop Web application that can provide more transparency and
security. The main objective of this proposed system is to provide a safe payment and security, Smart
contract between user and client. This can be done through a website using block chain technology. It is
encoded and decentralized database.
2. SYSTEM REQUIREMENT
2.SYSTEM REQUIREMENT
2.1. Functional Requirements

Seller Registration

This is an important module where the initial authentication of seller is done through gmail and
Password.

• Seller Login

The website provides seller login facility, which provides separate space for every seller to
perform operations which are specially intended for his / her beneficiary.

• Buyer Registration

This is an important module where the initial authentication of buyer is done through gmail and
Password.

• Buyer Login

The website provides seller login facility, which provides separate space for every buyer to
perform operations which are specially intended for his / her beneficiary.

• Notification

Notification module in this website helps the buyer to get the info from the seller to and react to it.

2.2. Non – Functional Requirements


• Usability

The website is user friendly, the buyer and seller can easily access through login.

• Reliability

The Website is highly consistent and reliable.

• Availability

This Website provides smart contract between seller and buyer.

2.3. Software Requirement Specification


Software requirements specification is the starting point of the software developing activity as a system
grew more complex it became evident that the goal of the entire system cannot be easily comprehended.
Hence the needs of requirement phase arouse. The software project is initiated by dedicated individuals
who need a schedule planning solution for more productivity but lack enough economy to maintain a
personal assistant. The purpose of the software requirements specification is to reduce the
communication gap between the clients and the developers. Software Requirements is the medium
through which the client and user need are accurately specified. It forms the basis of developments. A
good SRS should satisfy all parties involved in the system.

Hardware Requirements
The following are the required hardware components for the website to function:

• Smart phone.
• Laptop/computer.

Software Requirements
Bowser : Firefox, Google etc.

Front End : CSS & HTML

Back End : Node JS, Python, Firebase Database, Solidity


Mozilla Firefox

Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla
Foundation and its subsidiary, Mozilla Corporation. Firefox uses the Gecko layout engine to render web
pages, which implements current and anticipated web standards. In 2017, Firefox began incorporating
new technology under the code name Quantum to promote parallelism and a more intuitive user interface.
Firefox is officially available for Windows 7 or newer, macOS, and Linux. Its unofficial ports are
available for various Unix and Unix-like operating systems including FreeBSD, OpenBSD, NetBSD,
illumos, and Solaris Unix. Firefox is also available for Android and iOS; however, the iOS version uses
the WebKit layout engine instead of Gecko due to platform limitations, as with all other iOS web
browsers.Firefox was created in 2002 under the codename "Phoenix" by the Mozilla community
members who desired a standalone browser, rather than the Mozilla Application Suite bundle. During its
beta phase, Firefox proved to be popular with its testers and was praised for its speed, security, and
addons compared to Microsoft's then-dominant Internet Explorer 6. Firefox was released on November 9,
2004, and challenged Internet Explorer's dominance with 60 million downloads within nine months.
Firefox is the spiritual successor of Netscape Navigator, as the Mozilla community was created by
Netscape in 1998 before their acquisition by AOL.Firefox usage grew to a peak of 32.21% at the end of
2009, with version 3.5 overtaking Internet Explorer 7, although not all versions of Internet Explorer as a
whole. Usage then declined in competition with Google Chrome. As of January 2020, Firefox has 9.87%
usage share as a "desktop" browser, according to StatCounter, making it the second-most popular
browser against Google Chrome with 68.78% (while share of Firefox is exceptionally high in some
countries where it is most popular; up to over 75% share); usage share across all platforms is lower at
4.7% (third-most popular overall). According to Mozilla, in December 2014, there were half a billion
Firefox users around the world. Although the majority of countries have Google Chrome as their main
web browser, Firefox still has over 50% desktop usage in Cuba and Eritrea. Firefox also still has over
40% usage in Armenia and over 20% usage in Germany, Austria, Poland, Luxembourg, Iran, Myanmar,
East Timor, Burkina Faso, Madagascar, Cameroon, Ethiopia, Mali, Togo and Uganda.
Google

Google LLC is an American multinational technology company that specializes in Internet-related


services and products, which include online advertising technologies, search engine, cloud computing,
software, and hardware. It is considered one of the Big Four technology companies, alongside Amazon,
Apple, and Microsoft.Google was founded in September 1998 by Larry Page and Sergey Brin while they
were Ph.D. students at Stanford University in California. Together they own about 14 percent of its
shares and control 56 percent of the stockholder voting power through supervoting stock. They
incorporated Google as a California privately held company on September 4, 1998, in California. Google
was then reincorporated in Delaware on October 22, 2002.[12] An initial public offering (IPO) took
place on August 19, 2004, and Google moved to its headquarters in Mountain View, California,
nicknamed the Googleplex. In August 2015, Google announced plans to reorganize its various interests
as a conglomerate called Alphabet Inc. Google is Alphabet's leading subsidiary and will continue to be
the umbrella company for Alphabet's Internet interests. Sundar Pichai was appointed CEO of Google,
replacing Larry Page who became the CEO of Alphabet.The company's rapid growth since incorporation
has triggered a chain of products, acquisitions, and partnerships beyond Google's core search engine
(Google Search). It offers services designed for work and productivity (Google Docs, Google Sheets, and
Google Slides), email (Gmail), scheduling and time management (Google Calendar), cloud storage
(Google Drive), instant messaging and video chat (Duo, Hangouts), language translation (Google
Translate), mapping and navigation (Google Maps, Waze, Google Earth, Street View), video sharing
(YouTube), note-taking (Google Keep), and photo organizing and editing (Google Photos). The company
leads the development of the Android mobile operating system, the Google Chrome web browser, and
Chrome OS, a lightweight operating system based on the Chrome browser. Google has moved
increasingly into hardware; from 2010 to 2015, it partnered with major electronics manufacturers in the
production of its Nexus devices, and it released multiple hardware products in October 2016, including
the Google Pixel smartphone, Google Home smart speaker, Google Wifi mesh wireless router, and
Google Daydream virtual reality headset. Google has also experimented with becoming an Internet
carrier (Google Fiber, Google Fi, and Google Station).Google.com is the most visited website in the
world. Several other Google services also figure in the top 100 most visited websites, including YouTube
and Blogger. Google was the most valuable brand in the world as of 2017, but has received significant
criticism involving issues such as privacy concerns, tax avoidance, antitrust, censorship, and search
neutrality. Google's mission statement is "to organize the world's information and make it universally
accessible and useful". The company's unofficial slogan "Don't be evil" was removed from the
company's code of conduct around May 2018, but reinstated by July 31, 2018.

Programming Language

BACKEND

Node JS

Node.js is a very powerful JavaScript-based platform built on Google Chrome's JavaScript V8 Engine. It
is used to develop I/O intensive web applications like video streaming sites, single-page applications, and
other web applications. Node.js is open source, completely free, and used by thousands of developers
around the world. Node.js is a server-side platform built on Google Chrome's JavaScript Engine (V8
Engine).
Node.js was developed by Ryan Dahl in 2009 and its latest version is v0.10.36. The definition of Node.js
as supplied by it is as follows −Node.js is a platform built on for easily building fast and scalable
network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight
and efficient, perfect for data-intensive real-time applications that run across distributed devices.Node.js
is an open source, cross-platform runtime environment for developing server-side and networking
applications. Node.js applications are written in JavaScript, and can be run within the Node.js runtime on
OS X, Microsoft Windows, and Linux.Node.js also provides a rich library of various JavaScript modules
which simplifies the development of web applications using Node.js to a great extent.

Firebase Database

The Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON and synchronized in
realtime to every connected client. When you build cross-platform apps with our iOS, Android, and
JavaScript SDKs, all of your clients share one Realtime Database instance and automatically receive
updates with the newest data.

The Firebase Real time Database lets you build rich, collaborative applications by allowing secure access
to the database directly from client-side code. Data is persisted locally, and even while offline, real time
events continue to fire, giving the end user a responsive experience. When the device regains connection,
the Realtime Database synchronizes the local data changes with the remote updates that occurred while
the client was offline, merging any conflicts automatically.

The Realtime Database provides a flexible, expression-based rules language, called Firebase Realtime
Database Security Rules, to define how your data should be structured and when data can be read from or
written to. When integrated with Firebase Authentication, developers can define who has access to what
data, and how they can access it.

The Realtime Database is a NoSQL database and as such has different optimizations and functionality
compared to a relational database. The Realtime Database API is designed to only allow operations that
can be executed quickly. This enables you to build a great realtime experience that can serve millions of
users without compromising on responsiveness. Because of this, it is important to think about how users
need to access your data and then structure it accordingly.
Python

Python is a general purpose, dynamic, high-level, and interpreted programming language. It supports
Object Oriented programming approach to develop applications. It is simple and easy to learn and
provides lots of high-level data structures.

Python supports multiple programming patterns, including object-oriented, imperative, and functional or
procedural programming styles. Python is not intended to work in a particular area, such as web
programming. That is why it is known as multipurpose programming language because it can be used
with web, enterprise, 3D CAD, etc. Python makes the development and debugging fast because there is
no compilation step included in Python development, and edit-test-debug cycle is very fast.

Block chain

A block chain is a constantly growing ledger which keeps a permanent record of all the transactions that
have taken place in a secure, chronological, and immutable way.

Let's breakdown the definition,

Ledger: It is a file that is constantly growing.

Permanent: It means once the transaction goes inside a block chain, you can put up it
permanently in the ledger.

Secure: Block chain placed information in a secure way. It uses very advanced cryptography to
make sure that the information is locked inside the block chain.

Chronological: Chronological means every transaction happens after the previous one.

Immutable: It means as you build all the transaction onto the block chain, this ledger can never
be changed.

A block chain is a chain of blocks which contain information. Each block records all of the recent
transactions, and once completed goes into the block chain as a permanent database. Each time a block
gets completed, a new block is generated.
Block chain technology can be integrated into multiple areas. The primary use of block chains is as a
distributed ledger for cryptocurrencies. It shows great promise across a wide range of business
applications like Banking, Finance, Government, Healthcare, Insurance, Media and Entertainment, Retail,
etc.

Need of Block chain

Block chain technology has become popular because of the following.

Time reduction: In the financial industry, block chain can allow the quicker settlement of trades.
It does not take a lengthy process for verification, settlement, and clearance. It is because of a
single version of agreed-upon data available between all stakeholders.

Unchangeable transactions: Block chain register transactions in a chronological order which


certifies the unalterability of all operations, means when a new block is added to the chain of
ledgers, it cannot be removed or modified.

Reliability: Block chain certifies and verifies the identities of each interested parties. This
removes double records, reducing rates and accelerates transactions.

Security: Block chain uses very advanced cryptography to make sure that the information is
locked inside the block chain. It uses Distributed Ledger Technology where each party holds a
copy of the original chain, so the system remains operative, even the large number of other nodes
fall.

Collaboration: It allows each party to transact directly with each other without requiring a
thirdparty intermediary.
Decentralized: It is decentralized because there is no central authority supervising anything.
There are standards rules on how every node exchanges the block chain information. This method
ensures that all transactions are validated, and all valid transactions are added one by one.

History of Block chain

The block chain technology was described in 1991 by the research scientist Stuart Haber and W. Scott
Stornetta. They wanted to introduce a computationally practical solution for time-stamping digital
documents so that they could not be backdated or tampered. They develop a system using the concept of
cryptographically secured chain of blocks to store the time-stamped documents.

In 1992, Merkle Trees were incorporated into the design, which makes block chain more efficient by
allowing several documents to be collected into one block. Merkle Trees are used to create a 'secured
chain of blocks.' It stored a series of data records, and each data records connected to the one before it.
The newest record in this chain contains the history of the entire chain. However, this technology went
unused, and the patent lapsed in 2004.

Blockchain Merkle Tree

Merkle tree is a fundamental part of block chain technology. It is a mathematical data structure
composed of hashes of different blocks of data, and which serves as a summary of all the transactions in
a block. It also allows for efficient and secure verification of content in a large body of data. It also helps
to verify the consistency and content of the data. Both Bitcoin and Ethereum use Merkle Trees structure.
Merkle Tree is also known as Hash Tree.

The concept of Merkle Tree is named after Ralph Merkle, who patented the idea in 1979.
Fundamentally, it is a data structure tree in which every leaf node labelled with the hash of a data block, and
the non-leaf node labelled with the cryptographic hash of the labels of its child nodes. The leaf nodes are the
lowest node in the tree

How do Merkle trees work?

A Merkle tree stores all the transactions in a block by producing a digital fingerprint of the entire set of
transactions. It allows the user to verify whether a transaction can be included in a block or not.

Merkle trees are created by repeatedly calculating hashing pairs of nodes until there is only one hash left.
This hash is called the Merkle Root, or the Root Hash. The Merkle Trees are constructed in a bottom-up
approach.

Every leaf node is a hash of transactional data, and the non-leaf node is a hash of its previous hashes.
Merkle trees are in a binary tree, so it requires an even number of leaf nodes. If there are an odd number
of transactions, the last hash will be duplicated once to create an even number of leaf nodes.

Merkle trees have three benefits:

• It provides a means to maintain the integrity and validity of data.


• It helps in saving the memory or disk space as the proofs, computationally easy and fast.
• Their proofs and management require tiny amounts of information to be transmitted
across networks.

What is Bitcoin?

Satoshi Nakamoto introduced the bitcoin in the year 2008. Bitcoin is a cryptocurrency (virtual currency),
or a digital currency that uses rules of cryptography for regulation and generation of units of currency. A
Bitcoin fell under the scope of cryptocurrency and became the first and most valuable among them. It is
commonly called decentralized digital currency.

For example, Suppose you click on a photo that you want to send it to another person, so you can simply
attach that photo to an email, type the receiver email address and send it. The other person will receive
the photo, and you think it would end, but it is not. Now, we have two copies of photo, one is a simple
email, and another is an original file which is still on my computer. Here, we send the copy of the file of
the photo, not the original file. This issue is commonly known as the double-spend problem.
The double-spend problem provides a challenge to determine whether a transaction is real or not. How
you can send a bitcoin to someone over the internet without needing a bank or some other institution to
certify the transfer took place. The answer arises in a global network of thousands of computers called a
Bitcoin Network and a special type of decentralized laser technology called blockchain.

In Bitcoin, all the information related to the transaction is captured securely by using maths, protected
cryptographically, and the data is stored and verified across the entire network of computers. In other
words, instead of having a centralized database of the third-party such as banks to certify the transaction
took place. Bitcoin uses blockchain technology across a decentralized network of computers to securely
verify, confirm and record each transaction. Since data is stored in a decentralized manner across a wide
network, there is no single point of failure. This makes blockchain more secure and less prone to fraud,
tampering or general system failure than keeping them in a single centralized location.

Blockchain Version

The brief description of the evolution of block chain technology and its versioning from 1.0 to 3.0 are
explained below.
Block chain 1.0: Currency

The idea of creating money through solving computational puzzles was first introduced in 2005 by Hal
Finney, who created the first concept for cryptocurrencies (The implementation of distributed ledger
technology). This ledger allows financial transactions based on blockchain technology or DLT to be
executed with Bitcoin. Bitcoin is the most prominent example in this segment. It is being used as cash
for the Internet and seen as the enabler of an Internet of Money.

Block chain 2.0: Smart Contracts

The main issues that came with Bitcoin are wasteful mining and lack of network scalability. To
overcome these issues, this version extends the concept of Bitcoin beyond currency. The new key
concepts are Smart Contracts. It is small computer programs that "live" in the blockchain. They are free
computer programs which executed automatically and checked conditions which are defined earlier like
facilitation, verification or enforcement. The big advantage of this technology that blockchain offers,
making it impossible to tamper or hack Smart Contracts. A most prominent example is the Ethereum
Blockchain, which provides a platform where the developer community can build distributed
applications for the Blockchain network.

Quickly, the blockchain 2.0 version is successfully processing a high number of daily transactions on a
public network, where millions were raised through ICO (Initial Coin Offerings), and the market cap
increased rapidly.

Block chain 3.0: DApps

DApps is also known as a decentralized application. It uses decentralized storage and communication. Its
backend code is running on a decentralized peer-to-peer network. A DApp can have frontend code
hosted on decentralized storages such as Ethereum Swarm and user interfaces written in any language
that can make a call to its backend like a traditional Apps.

Block chain Hash Function

A hash function takes an input string (numbers, alphabets, media files) of any length and transforms it
into a fixed length. The fixed bit length can vary (like 32-bit or 64-bit or 128-bit or 256-bit) depending
on the hash function which is being used. The fixed-length output is called a hash. This hash is also the
cryptographic byproduct of a hash algorithm. We can understand it from the following diagram.
The hash algorithm has certain unique properties:

1. It produces a unique output (or hash).


2. It is a one-way function.

In the context of cryptocurrencies like Bitcoin, the blockchain uses this cryptographic hash function's
properties in its consensus mechanism. A cryptographic hash is a digest or digital fingerprints of a certain
amount of data. In cryptographic hash functions, the transactions are taken as an input and run through a
hashing algorithm which gives an output of a fixed size.

SHA-256

A Bitcoin's blockchain uses SHA-256 (Secure Hash Algorithm) hashing algorithm. In 2001, SHA-256
Hashing algorithm was developed by the National Security Agency (NSA) in the USA.

How does the hashing process works?

For this hash function, we are going to use a program developed by Anders Brownworth. This program
can be found in the below link.

Example:

Anders Brownworth Hash Program: https://anders.com/blockchain/hash.html


If we type any character in the data section, we will observe its corresponding cryptographic hash in the
hash section.

For example: We have type in data section: This is a great tutorial.

It will generate the corresponding Hash:

1. 759831720aa978c890b11f62ae49d2417f600f26aaa51b3291a8d21a4216582a

You will find the corresponding Hash:

1. 4bc35380792eb7884df411ade1fa5fc3e82ab2da76f76dc83e1baecf48d60018

Since the Hash function is a one-way function, there is no way to get back entire text from the generated
hash. This is different from traditional cryptographic functions like encryption where you can encrypt
something using the key and by using decryption, you can decrypt the message to its original form.

Blockchain Key Areas

In the blockchain technology, bitcoin is the best-known implementation of the blockchain. There is a lot
of development and the direction is based on the premise of what blockchain does to enable Bitcoin to
happen. We can learn and expand how it can spread into so many different areas.

The blockchain technology fixes three things that the Internet was not designed to do. These three things
are:

1. Value
2. Trust
3. Reliability

Here, we are mainly using Block chain version 2.0 which provides Smart contract by using ethereum
network.

Ethereum

Ether is the cryptocurrency generated by the Ethereum platform as a reward to mining nodes for
computations performed and is the only currency accepted in the payment of transaction fees.

Ethereum provides a decentralized virtual machine, the Ethereum Virtual Machine (EVM), which can
execute scripts using an international network of public nodes. The virtual machine's instruction set, in
contrast to others like Bitcoin Script, is Turing-complete. "Gas", an internal transaction pricing
mechanism, is used to mitigate spam and allocate resources on the network

Ethereum was proposed in late 2013 by Vitalik Buterin, a cryptocurrency researcher and programmer.
Development was funded by an online crowdsale that took place between July and August 2014.The
system then went live on 30 July 2015, with 72 million coins minted. This accounts for about 68 percent
of the total circulating supply in 2019.[non-primary source needed]

In 2016, as a result of the exploitation of a flaw in The DAO project's smart contract software, and
subsequent theft of $50 million worth of ether, Ethereum was split into two separate blockchains – the
new separate version became Ethereum (ETH) with the theft reversed, and the original continued as
Ethereum Classic (ETC).

Smart contracts can be public, which opens up the possibility to prove functionality, e.g. self-contained
provably fair casinos. One issue related to using smart contracts on a public blockchain is that bugs,
including security holes, are visible to all but cannot be fixed quickly. One example of this is the 17 June
2016 attack on The DAO, which could not be quickly stopped or reversed.

There is ongoing research on how to use formal verification to express and prove non-trivial properties.
A Microsoft Research report noted that writing solid smart contracts can be extremely difficult in
practice, using The DAO hack to illustrate this problem. The report discussed tools that Microsoft had
developed for verifying contracts, and noted that a large-scale analysis of published contracts is likely to
uncover widespread vulnerabilities. The report also stated that it is possible to verify the equivalence of a
Solidity program and the EVM code.
Metamask

Metamask is a cryptocurrency wallet which can be used on the Chrome, Firefox and Brave browsers. It’s
also a browser extension. This means that it works like a bridge between normal browsers and the
Ethereum blockchain.

The Ethereum blockchain is a network where users can build their own apps (which are called dApps)
and cryptocurrencies. Ethereum also allows its users to write transaction guidelines called smart
contracts. MetaMask can be used to store keys for Ethereum cryptocurrencies only.

So, the MetaMask wallet can be used for storing keys for Ether and ERC20 tokens on three different web
browsers. It also allows users to browse the Ethereum blockchain from a standard browser. MetaMask
requires no login and does not store your private keys in any server; instead they are stored on Chrome
and password protected.

Solidity

Solidity is an object-oriented, high-level language for implementing smart contracts. Smart contracts are
programs which govern the behaviour of accounts within the Ethereum state.

Solidity was influenced by C++, Python and JavaScript and is designed to target the Ethereum Virtual
Machine (EVM).Solidity is statically typed, supports inheritance, libraries and complex user-defined
types among other features.

With Solidity you can create contracts for uses such as voting, crowdfunding, blind auctions, and
multisignature wallets.
Introduction to Smart Contracts

A Simple Smart Contract

Let us begin with a basic example that sets the value of a variable and exposes it for other contracts to
access.

Storage Example

Pragma solidity >=0.4.0 <0.7.0;

contract SimpleStorage { uint

storedData; function set(uint x)

public { storedData = x;

} function get() public view returns

(uint)

{ return

storedData;

The first line tells you that the source code is written for Solidity version 0.4.0, or a newer version of the
language up to, but not including version 0.7.0. This is to ensure that the contract is not compilable with
a new (breaking) compiler version, where it could behave differently. Pragmas are common instructions
for compilers about how to treat the source code (e.g. pragma once).

A contract in the sense of Solidity is a collection of code (its functions) and data (its state) that resides at
a specific address on the Ethereum blockchain. The line uint storedData; declares a state variable called
storedData of type uint (unsigned integer of 256 bits). You can think of it as a single slot in a database
that you can query and alter by calling functions of the code that manages the database. In this example,
the contract defines the functions set and get that can be used to modify or retrieve the value of the
variable. To access a state variable, you do not need the prefix this. As is common in other languages.

This contract does not do much yet apart from (due to the infrastructure built by Ethereum) allowing
anyone to store a single number that is accessible by anyone in the world without a (feasible) way to
prevent you from publishing this number. Anyone could call set again with a different value and
overwrite your number, but the number is still stored in the history of the blockchain. Later, you will see
how you can impose access restrictions so that only you can alter the number.
FRONTEND

HTML

HTML stands for Hyper Text Markup Language, which is the most widely used language on Web to
develop web pages. HTML was created by Berners-Lee in late 1991 but "HTML 2.0" was the first
standard HTML specification which as published in 1995. HTML 4.01 was a major version of HTML
and it was published in late 1999. Though HTML 4.01 version is widely used but currently we are
having HTML-5 version which is an extension to HTML 4.01, and this version was published in 2012.

CSS

CSS is used to control the style of a web document in a simple and easy way. CSS is the acronym for
"Cascading Style Sheet". This tutorial covers both the versions CSS1,CSS2 and CSS3, and gives a
complete understanding of CSS, starting from its basics to advanced concepts. Cascading Style Sheets,
fondly referred to as CSS, is a simple design language intended to simplify the process of making web
pages presentable.

CSS handles the look and feel part of a web page. Using CSS, you can control the color of the text, the
style of fonts, the spacing between paragraphs, how columns are sized and laid out, what background
images or colors are used, layout designs,variations in display for different devices and screen sizes as
well as a variety of other effects. CSS is easy to learn and understand but it provides powerful control
over the presentation of an HTML document. Most commonly, CSS is combined with the markup
languages HTML or XHTML.

CSS ADVANTAGES

• CSS saves time − You can write CSS once and then reuse same sheet in multiple HTML pages. You
can define a style for each HTML element and apply it to as many Web pages as you want.

• Pages load faster − If you are using CSS, you do not need to write HTML tag attributes

every time. Just write one CSS rule of a tag and apply it to all the occurrences of that tag.
So less code means faster download times.
• Easy maintenance − To make a global change, simply change the style, and all elements in all the

web pages will be updated automatically.

• Superior styles to HTML − CSS has a much wider array of attributes than HTML, so you can give
a far better look to your HTML page in comparison to HTML attributes.

• Multiple Device Compatibility − Style sheets allow content to be optimized for more than one type
of device. By using the same HTML document, different versions of a website can be presented for
handheld devices such as PDAs and cell phones or for printing.

• Global web standards − Now HTML attributes are being deprecated and it is being recommended
to use CSS. So its a good idea to start using CSS in all the HTML pages to make them compatible to
future browsers.
3.SOFTWARE ANALYSIS
3. SOFTWARE ANALYSIS
3.1. System Analysis
3.1.1. Data Flow Diagram

A data flow diagram (DFD) is a graphical representation of the "flow" of data through an information
system, modeling its process aspects. A DFD is often used as a preliminary step to create an overview of
the system without going into great detail, which can later be elaborated. DFDs can also be used for the
visualization of data processing (structured design).

A DFD shows what kind of information will be input to and output from the system, how the data will
advance through the system, and where the data will be stored. It does not show information about
process timing or whether processes will operate in sequence or in parallel, unlike a traditional structured
flowchart which focuses on control flow, or a UML activity workflow diagram, which presents both
control and data flow as a unified model.

A data flow diagram (DFD) maps out the flow of information for any process or system. It uses defined
symbols like rectangles, circles and arrows, plus short text labels, to show data inputs, outputs, storage
points and the routes between each destination. Data flowcharts can range from simple, even hand-drawn
process overviews, to in-depth, multi-level DFDs that dig progressively deeper into how the data is
handled. They can be used to analyze an existing system or model a new one.
SYSTEM DATAFLOW DIAGRAM
Seller Dataflow Diagram
Buyer Dataflow Diagram
SYSTEM ARCHITECTURE

WORKING
1. The Client can get all the Raw Materials, Items, Office Supplies and Service whichever he wants
from the website.
2. The website consists of all the products and services given by GAIL.
3. The website is designed with Block Chain Technology on Ethereum platform where ever it is
needed.
4. The using of Block Chain enables Safe Payments which is directed between the GAIL, Client and
the Bank and no other party can access it.
5. The usage of Block Chainalso gives Integrity to the Website.
6. The Website contains Smart Contracts between the client and GAIL.
7. The Website also provides features like Transportation, Shipment Tracking and acceptance and
GAIL Store.
How-it –works Architecture

MODULES

Seller: Supplies the items

Buyer: Purchase the Items, Raw materials, Goods, from the lowest bidding vendor in
procurement process.

Bank: Transaction between Buyer to Seller.

3.2. FEASIBILITY STUDY


The feasibility of the project is analysed in this phase and business proposal is put forth with a very
general plan for the project and some cost estimates. During system analysis the feasibility study of the
proposed system is to be carried out. This is to ensure that the proposed system is not a burden to the
company. For feasibility analysis, some understanding of the major requirements for the system is
essential.

Three key considerations involved in the feasibility analysis are


ECONOMICAL FEASIBILITY

TECHNICAL FEASIBILITY

SOCIAL FEASIBILITY

3.2.1. ECONOMICAL FEASIBILITY

This study is carried out to check the economic impact that the system will have on the organization. The
amount of fund that the company can pour into the research and development of the system is limited.
The expenditures must be justified.

3.2.2. TECHNICAL FEASIBILITY

This study is carried out to check the technical feasibility, that is, the technical requirements of the
system. Any system developed must not have a high demand on the available technical resources. This
will lead to high demands on the available technical resources. This will lead to high demands being
placed on the client. The developed system must have a modest requirement, as only minimal or null
changes are required for implementing this system.

3.2.3. SOCIAL FEASIBILITY

The aspect of study is to check the level of acceptance of the system by the user. This includes the
process of training the user to use the system efficiently. The user must not feel threatened by the system,
instead must accept it as a necessity. The level of acceptance by the users solely depends on the methods
that are employed to educate the user about the system and to make him familiar with it. His level of
confidence must be raised so that he is also able to make some constructive criticism, which is welcomed,
as he is the final user of the system.

3.3. SOFTWARE DESCRIPTION


1. Node JS:

Node.js is a server-side platform built on Google Chrome's JavaScript Engine (V8


Engine).Node.js is a platform built on Chrome's JavaScript runtime for easily building
fast and scalable network applications. Node.js uses an event-driven, non-blocking I/O
model that makes it lightweight and efficient, perfect for data-intensive real-time
applications that run across distributed devices.
Features of Node.js

Following are some of the important features that make Node.js the first choice of software architects.

• Asynchronous and Event Driven − All APIs of Node.js library are asynchronous, that is,
nonblocking. It essentially means a Node.js based server never waits for an API to return data. The
server moves to the next API after calling it and a notification mechanism of Events of Node.js
helps the server to get a response from the previous API call.
• Very Fast − Being built on Google Chrome's V8 JavaScript Engine, Node.js library is very fast in
code execution.
• Single Threaded but Highly Scalable − Node.js uses a single threaded model with event looping.
Event mechanism helps the server to respond in a non-blocking way and makes the server highly
scalable as opposed to traditional servers which create limited threads to handle requests. Node.js
uses a single threaded program and the same program can provide service to a much larger number
of requests than traditional servers like Apache HTTP Server.
• No Buffering − Node.js applications never buffer any data. These applications simply output the
data in chunks.
• License − Node.js is released under the MIT license.

Where to Use Node.js?

Following are the areas where Node.js is proving itself as a perfect technology partner.

• I/O bound Applications


• Data Streaming Applications
• Data Intensive Real-time Applications (DIRT)
• JSON APIs based Applications
• Single Page Applications
4. SYSTEM DESIGN
4. SYSTEM DESIGN
UML DIAGRAMS

UML stands for Unified Modelling Language. UML is a standardized general-purpose modeling
language in the field of object-oriented software engineering. The standard is managed, and was created
by, the Object Management Group.

The goal is for UML to become a common language for creating models of object oriented computer
software. In its current form UML is comprised of two major components: a Meta-model and a notation.
In the future, some form of method or process may also be added to; or associated with, UML.

The Unified Modeling Language is a standard language for specifying, Visualization, Constructing and
documenting the artifacts of software system, as well as for business modelling and other non-software
systems.

The UML represents a collection of best engineering practices that have proven successful in the
modelling of large and complex systems.

The UML is a very important part of developing objects oriented software and the software development
process. The UML uses mostly graphical notations to express the design of software projects.

GOALS

The Primary goals in the design of the UML are as follows:

1. Provide users a ready-to-use, expressive visual modelling Language so that they can develop
and exchange meaningful models.

2. Provide extendibility and specialization mechanisms to extend the core concepts.

3. Be independent of particular programming languages and development process.

4. Provide a formal basis for understanding the modelling language.

5. Encourage the growth of OO tools market.


6. Support higher level development concepts such as collaborations, frameworks, patterns and
components.

UML (Unified Modeling Language) DESIGN DIAGRAMS

UML stands for Unified Modeling Language. UML is a language for specifying, visualizing and
documenting the system. This is the step while developing any product after analysis. The goal from this
is to produce a model of the entities involved in the project which later need to build. The representation
of the entities involved in the project which later need to be built.

The unified modeling language allows the software engineer to express an analysis model using the
modeling notation that is governed by a set of syntactic, semantic and pragmatic rules.

A UML system is represented using five different views that describe the system from

distinctly perspective.

Each view is defined by a set of diagrams, which is as

follows. • Use-case view


Logical view


Implementation view


Process view


Deployment view

Use-case view:

A view showing the functionality of the system as perceived by external actors. An actor interacts with
system. The actor can be a user or another system. The use-case view is used by customers, designers,
developers and testers. It is described in use-case diagrams, sometimes with support from activity
diagrams.
The desired usage of the system is described as a number of use cases in the use-case view, where a use
case is a generic description of a function requested.

Logical view:
A view showing how the functionality is designed inside the system, in terms of the system’s static
structure and dynamic behaviour. It is mainly for the designers and developers. It describes both static
structure (classes, objects and relationships) and the dynamic collaborations that occur when the objects
send messages to each other to provide a given function.

Properties such as persistence and concurrency are also defined, as well as the interfaces and the internal
structure of classes. The static structure is described in class and object diagrams. The dynamic
modelling is described in state machines and interaction and activity diagrams.

Implementation view:
The implementation view describes the main modules and their dependencies. It is mainly for developers
and consists of the main software artifacts. The artifacts include different types of code modules shown
with their structure and dependencies.

Process view:
A view showing main elements in the system related to process performance. This view includes
scalability, throughput, and basic time performance and can touch on some very complex calculations for
advanced systems. The view consists of dynamic diagrams(state machines, interaction and activity
diagrams) and implementation diagrams(interaction and deployment diagrams).

Deployment view:
Finally the deployment view shows the physical deployment of the system such as the computers and
devices (nodes) and how they connect to each other. The various execution environments within the
processors can be specified as well. The deployment view is used by the developers, integrators and
testers. It is represented by the deployment diagram.
Diagrams:
The diagrams contain the graphical elements arranged to illustrate a particular part or aspect of the
system. A system model typically has several diagrams of varying types, depending on the goal for the
model.

Software design is a process that gradually changes as various new, better and more Complex methods
with a broader understanding of the whole problem in general come in to existence. There are various
kinds of diagrams used in software design.

Mainly These Are As Follows:

• Use case diagrams

• Class diagram

• Object diagram

• Sequence diagrams

• Collaboration diagrams

• Activity diagram

• State chart diagram


• Component diagram

• Deployment diagram
USE-CASE DIAGRAM:

Use Case diagrams identify the functionality provided by the system (use cases), the users who interact
with the system (actors), and the association between the users and the functionality. Use Cases are used
in the Analysis phase of software development to articulate the high-level requirements of the system.

The primary goals of Use Case diagrams include:

• Providing a high-level view of what the system does


• Identifying the users ("actors") of the system
• Determining areas needing human-computer interfaces
Use Cases extend beyond pictorial diagrams. In fact, text-based use case descriptions are often used to
supplement diagrams, and explore use case functionality in more detail.

Graphical Notation:

The basic components of Use Case diagrams are the Actor, the Use Case, and the Association.

Actor

An Actor, as mentioned, is a user of the system, and is depicted using a stick figure. The role of the user
is written beneath the icon. Actors are not limited to humans. If a system communicates with another
application, and expects input or delivers output, then that application can also be considered an actor.

Use Case

A Use Case is functionality provided by the system, typically described as verb object (ex. Register Car,
Delete User). Use Cases are depicted with an ellipse. The name of the use case is written within the
ellipse.
Association

Associations are used to link Actors with Use Cases, and indicate that an Actor participates in the Use Case
in some form. Associations are depicted by a line connecting the Actor and the Use Case.

The following image shows how these three basic elements work together to form a use case diagram.

Text Notation

Behind each Use Case is a series of actions to achieve the proper functionality, as well as alternate paths
for instances where validation fails, or errors occur. These actions can be further defined in a Use Case
description. Because this is not addressed in UML 1.4, there are no standards for Use Case descriptions.
However, there are some common templates you can follow, and whole books on the subject writing of
Use Case descriptions.

Common methods of writing Use Case descriptions include:

• Write a paragraph describing the sequence of activities in the Use Case

• List two columns, with the activities of the actor and the responses by the system

• Use a template (such as those from the Rational Unified Process or Alistair Cockburn's book,
Writing Effective Use Cases) identifying actors, preconditions, post conditions, main success
scenarios, and extensions. Remember, the goal of the process is to be able to communicate the
requirements of the system, so use whichever method is best for your team and your
organization
SYSTEM USECASE DIAGRAM
CLASS DIAGRAM:
Class diagrams identify the class structure of a system, including the properties and methods of each
class. Also depicted are the various relationships that can exist between classes, such as an inheritance
relationship. The Class diagram is one of the most widely used diagrams from the UML specification.
Part of the popularity of Class diagrams stems from the fact that many CASE tools, such as Rational
XDE, will auto-generate code in a variety of languages, including Java, C++, and C#, from these models.
These tools can synchronize models and code, reducing your workload, and can also generate Class
diagrams from object-oriented code, for those "code-then-design" maintenance projects.

Notation:

The elements on a Class diagram are classes and the relationships between them

Class

Classes are the building blocks in object-oriented programming. A Class is depicted using a rectangle
divided into three sections. The top section is the name of the Class. The middle section defines the
properties of the Class. The bottom section lists the methods of the class.

Association

An Association is a generic relationship between two classes, and is modeled by a line connectingthe

two classes.This line can be qualified with the type of relationship, and can also feature multipli-city

rules (ex. one-to-one, one-many, many-to-many)for the relation-ship.


Composition
If a class not exists by itself and instead must be member of another class then that class has a compos -
ition with containing class. A composition relationship is indicated by a line with a filled diamond.

Dependency

When a class uses another class, perhaps as a member variable or a parameter. And so “depends” on that
class, a dependency relationship is formed. A dependency relationship is indicated by a line with a hollow
diamond.

Generalization

A general relationship is the equivalent of an inheritance relationship in object oriented terms (an “is-a”
relationship).a generalization relationship is indicated by an arrow with a hollow arrow head pointing to
base, or “parent”,class.

To validate your model, you can apply real-world data into instances of the classes. In fact, there is a
diagram for precisely this task, the Class Diagram
System Class Diagram
Activity Diagram

The activity diagram is used to demonstrate the flow of control within the system rather than the
implementation. It models the concurrent and sequential activities.

The activity diagram helps in envisioning the workflow from one activity to another. It put emphasis on
the condition of flow and the order in which it occurs. The flow can be sequential, branched, or
concurrent, and to deal with such kinds of flows, the activity diagram has come up with a fork, join, etc.

Notation:

Activity diagram constitutes following notation.

Initial State

It depicts the initial stage or beginning of the set of actions.

Decision Box

It makes sure that the control flow or object flow will follow only one path.

Action Box

It represents the set of actions that are to be performed.


System Activity Diagram
Deployment Diagram:

The deployment diagram visualizes the physical hardware on which the software will be deployed. It
portrays the static deployment view of a system. It involves the nodes and their relationships.

It ascertains how software is deployed on the hardware. It maps the software architecture created in
design to the physical system architecture, where the software will be executed as a node. Since it
involves many nodes, the relationship is shown by utilizing communication paths.

Notation:

The deployment diagram consist of the following notations

• A component
• An artifact
• An interface
• A node
System Deployment Diagram

WEBSITE

SELLER BUYER CART

REGISTER REGISTER
LOGIN LOGIN

UPDATE SEARCH
PRODUCT REQUIRED
ITEMS

PAYMENT

ORDER
SMART TRACKING
BANK CONTRACT
Component Diagram

A component diagram is used to break down a large object-oriented system into the smaller components,
so as to make them more manageable. It models the physical view of a system such as executable, files,
libraries, etc. that resides within the node.

It visualizes the relationships as well as the organization between the components present in the system.
It helps in forming an executable system. A component is a single unit of the system, which is
replaceable and executable. The implementation details of a component are hidden, and it necessitates an
interface to execute a function. It is like a black box whose behavior is explained by the provided and
required interfaces.

Notation

• A component
• A node
System Component Diagram
5. SYSTEM IMPLEMENTATION
5. SYSTEM IMPLEMENTATION

Index.html

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<meta http-equiv="x-ua-compatible" content="ie=edge">

<link rel="shortcut icon" type="image/png" href="{{ url_for('static', filename='img/nexttech-icon.png')


}}">

<title>BlockChain Procure</title>

<linkrel="stylesheet"href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-
beta.2/css/bootstrap.min.css" integrity="sha384-
PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb"
crossorigin="anonymous">

<linkhref="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-
awesome.min.css"rel="stylesheet"integrity="sha384wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+
Q kPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">

<!-- main style -->

<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/main.css') }}">

<!-- Global Site Tag (gtag.js) - Google Analytics -->

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-107490980-1"></script>

<script> window.dataLayer =

window.dataLayer || [ ]; function
gtag(){dataLayer.push(arguments)};

gtag('js', new Date()); gtag('config', 'UA-

107490980-1');

</script>

<!-- Font Awesome -->

<linkrel="stylesheet"href="https://cdnjs.cloudflare.com/ajax/libs/fontawesome/4.7.0/css/fontawesome.mi
n.css">

<!-- Bootstrap core CSS -->

<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">

<!-- Material Design Bootstrap -->

<link href="{{ url_for('static', filename='css/mdb.min.css') }}" rel="stylesheet">

<!-- Your custom styles (optional) -->

<link href="{{ url_for('static', filename='css/style.min.css') }}" rel="stylesheet">

<style type="text/css"> body { font-

family: "Open Sans", sans-serif;

} h2 { color: #333; text-align:

center; font-family: "Roboto",

sans-serif; font-weight: bold;

position: relative;

margin: 30px 0

60px; } h2::after

{ content: ""; width:


100px; position:

absolute; margin: 0

auto; height: 3px;

background: #8fbc54;

left: 0; right: 0;

bottom: -10px; } .col-

center { margin: 0

auto; float:

none !important; } .ca

rousel { margin: 50px

auto; padding: 0

70px; }

.carousel .item {
color: #999; font-size:

14px;

{ alert("Install MetaMask / other Web3 Injector to use this portal");

web3=newWeb3(newWeb3.providers.HttpProvider("http://teamsatoshi.pythonanywhere.co"))

;}

</script>

<!--Footer-->

<footer class="page-footer text-center font-small mt-4 wow fadeIn">

<!--Call to action-->
<div class="pt-4">

</div>

<!--/.Call to action-->

<hr class="my-4">

<!--Copyright-->

<div class="footer-copyright py-3">© 2020 Copyright:</div><!--/.Copyright-->

</footer>

<!--/.Footer-->

<div class="containerx">

<span class="write">

</span>

</div>

</body>

</html>

Tender.html

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">


<meta http-equiv="x-ua-compatible" content="ie=edge">

<linkrel="shortcuticon"type="image/png"href="{{url_for('static', filename='img/nexttech-icon.png')
}}">

<title>Tender Details</title>

<!-- Font Awesome -->

<linkrel="stylesheet"href="https://maxcdn.bootstrapcdn.com/fontawesome/4.7.0/css/fontawesome.min.c
ss">

<!-- Bootstrap core CSS -->

<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">

<!-- Material Design Bootstrap -->

<link href="{{ url_for('static', filename='css/mdb.min.css') }}" rel="stylesheet">

<!-- Your custom styles (optional) -->

<link href="{{ url_for('static', filename='css/style.min.css') }}" rel="stylesheet">

<style> #customers { font-family: "Trebuchet MS",

Arial, Helvetica, sans-serif; border-collapse: collapse;

width: 100%;

}#customers td, #customers th

{ border: 1px solid #ddd;

padding: 8px; text-align: left;

#customers tr:nth-child(even){background-color: #f2f2f2;}

#customers tr:hover {background-color: #ddd;}


#customers th

{ padding-top: 12px;

padding-bottom: 12px;

text-align: left;

background-color: #4CAF50;

color: white; }

</style>

<style>

header { font-

family:

'Roboto';

</style>

<style type="text/css"> .btn-round-

lg{ border-radius: 22.5px; font-

family: 'Roboto';font-size: 15px;

</style>

<link href='https://fonts.googleapis.com/css' rel='stylesheet'>

<script src="./node_modules/web3/dist/web3.min.js"></script>

</head>
<body>

<!-- Navbar -->

<nav class="navbar fixed-top navbar-expand-lg navbar-dark scrolling-navbar">

<div class="container">

<!-- Brand -->

<a class="navbar-brand" href="{{ url_for('index') }}">

<button type="button" class="btn btn-default btn-round-lg"><strong>BlockChain


Procure</strong></button>

</a>

<!-- Collapse -->

<buttonclass="navbar-toggler"type="buttondata-
toggle="collapse"datatarget="#navbarSupportedContent" aria-controls="navbarSupportedContent"aria-
expanded="false" arialabel="Toggle navigation">

<span class="navbar-toggler-icon"></span>

</button>

<!-- Links -->

<div class="collapse navbar-collapse" id="navbarSupportedContent">

<!-- Left -->

<ul class="navbar-nav mr-auto">

<li class="nav-item">

</li>

</ul>

<!-- Right -->


<ul class="navbar-nav nav-flex-icons">{% if session['logged_in'] or session['dealer_logged_in'] %}<li

class="nav-item"><a href="{{ url_for('userpage') }}" class="nav-link border border-light rounded"> <i

class="fa fa-user mr-2"></i>{{user}}

</a>

</li>

{% else %}

<li class="nav-item">

<a href="{{ url_for('login') }}" class="nav-link border border-light rounded">

<i class="fa fa-user mr-2"></i>Login

</a>

</li>&nbsp;&nbsp;

<li class="nav-item"><a href="{{ url_for('register') }}" class="nav-link border border-light rounded">

<i class="fa fa-user mr-2"></i>Sign Up

</a>

</li>

{% endif %}

</ul>

</div>

</div>

</nav>

<!-- Navbar -->

<!--Main layout-->
<main class="mt-5 pt-4">

<div class="container">

<h3 class="my-5 h3 text-center">Tender details</h3>

<table id="customers">

<tr>

<th>Bid Closing Date</th>

<td>{{data[0]}}</td>

<th>Bid Opening Place</th>

<td>{{data[1]}}</td>

<th>Bid Opening Date</th>

<td>{{data[2]}}</td>

</tr>

<tr>

<th>Clarification End Date</th>

<td>{{data[3]}}</td>

<th>Clarification Start Date</th>

<td>{{data[4]}}</td>

<th>Document Download End Date</th>

<td>{{data[5]}}</td>

</tr>

<tr>
"outputs":

[{

"name": "",

"type": "string"

},

"name": "",

"type": "string"

},

"name": "",

"type": "string"

},

"name": "",

"type": "uint256"

],

"payable": false,

"stateMutability": "view",

"type": "function"
<scripttype="text/javascript"src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></scr
ipt>

<!-- Bootstrap tooltips -->

<script type="text/javascript" src="{{ url_for('static', filename='js/popper.min.js') }}"></script>

<!-- Bootstrap core JavaScript -->

<script type="text/javascript" src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script> <!-

- MDB core JavaScript -->

<script type="text/javascript" src="{{ url_for('static', filename='js/mdb.min.js') }}"></script> <!-

- Initializations -->

<script type="text/javascript">// Animations initialization

new WOW().init();

</script>

</body>

</html>

Smart Contract

pragma solidity ^0.4.4;

contract OraclizeI {

address public cbAddress;

function query(uint _timestamp, string _datasource, string _arg) payable returns (bytes32 _id);

function query_withGasLimit(uint _timestamp, string _datasource, string _arg, uint _gaslimit) payable
returns (bytes32 _id);

function query2(uint _timestamp, string _datasource, string _arg1, string _arg2) payable returns (bytes32
_id);
function query2_withGasLimit(uint _timestamp, string _datasource, string _arg1, string _arg2, uint
_gaslimit) payable returns (bytes32 _id);

function getPrice(string _datasource) returns (uint _dsprice);

function getPrice(string _datasource, uint gaslimit) returns (uint _dsprice);

function useCoupon(string _coupon);

function setProofType(byte _proofType);

function setConfig(bytes32 _config);

function setCustomGasPrice(uint _gasPrice);

contract OraclizeAddrResolverI {

function getAddress() returns (address _addr);

contract usingOraclize {

uint constant day = 60*60*24;

uint constant week = 60*60*24*7;

uint constant month = 60*60*24*30;

byte constant proofType_NONE = 0x00;

byte constant proofType_TLSNotary = 0x10;

byte constant proofStorage_IPFS = 0x01;

uint8 constant networkID_auto = 0;

uint8 constant networkID_mainnet = 1;

uint8 constant networkID_testnet = 2;


uint8 constant networkID_morden = 2;

uint8 constant networkID_consensys = 161;

OraclizeAddrResolverI OAR;

OraclizeI oraclize;

modifier oraclizeAPI {

if(address(OAR)==0) oraclize_setNetwork(networkID_auto);

oraclize = OraclizeI(OAR.getAddress());

_;

modifier coupon(string code){

oraclize = OraclizeI(OAR.getAddress());

oraclize.useCoupon(code);

_;

function oraclize_setNetwork(uint8 networkID) internal returns(bool){

if (getCodeSize(0x1d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed)>0){ //mainnet

OAR = OraclizeAddrResolverI(0x1d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed);

return true;
}

if (getCodeSize(0xc03a2615d5efaf5f49f60b7bb6583eaec212fdf1)>0){ //ropsten testnet

OAR = OraclizeAddrResolverI(0xc03a2615d5efaf5f49f60b7bb6583eaec212fdf1);

return true;

if (getCodeSize(0x20e12a1f859b3feae5fb2a0a32c18f5a65555bbf)>0){ //ether.camp ide

OAR = OraclizeAddrResolverI(0x20e12a1f859b3feae5fb2a0a32c18f5a65555bbf);

return true;

if (getCodeSize(0x93bbbe5ce77034e3095f0479919962a903f898ad)>0){ //norsborg testnet

OAR = OraclizeAddrResolverI(0x93bbbe5ce77034e3095f0479919962a903f898ad);

return true;

if (getCodeSize(0x51efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa)>0){ //browser-solidity

OAR = OraclizeAddrResolverI(0x51efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa);

return true;

return false;

function __callback(bytes32 myid, string result) {


__callback(myid, result, new bytes(0));

function __callback(bytes32 myid, string result, bytes proof) {

function oraclize_getPrice(string datasource) oraclizeAPI internal returns (uint){

return oraclize.getPrice(datasource);

function oraclize_getPrice(string datasource, uint gaslimit) oraclizeAPI internal returns (uint){

return oraclize.getPrice(datasource, gaslimit);

function oraclize_query(string datasource, string arg) oraclizeAPI internal returns (bytes32 id){

uint price = oraclize.getPrice(datasource);

if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price

return oraclize.query.value(price)(0, datasource, arg);

function oraclize_query(uint timestamp, string datasource, string arg) oraclizeAPI internal returns (bytes32
id){

uint price = oraclize.getPrice(datasource);

if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price

return oraclize.query.value(price)(timestamp, datasource, arg);


}

function oraclize_query(uint timestamp, string datasource, string arg, uint gaslimit) oraclizeAPI internal
returns (bytes32 id){

uint price = oraclize.getPrice(datasource, gaslimit);

if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price

return oraclize.query_withGasLimit.value(price)(timestamp, datasource, arg, gaslimit);

function oraclize_query(string datasource, string arg, uint gaslimit) oraclizeAPI internal returns (bytes32
id){

uint price = oraclize.getPrice(datasource, gaslimit);

if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price

return oraclize.query_withGasLimit.value(price)(0, datasource, arg, gaslimit);

function oraclize_query(string datasource, string arg1, string arg2) oraclizeAPI internal returns (bytes32
id){

uint price = oraclize.getPrice(datasource);

if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price

return oraclize.query2.value(price)(0, datasource, arg1, arg2);

function oraclize_query(uint timestamp, string datasource, string arg1, string arg2) oraclizeAPI internal
returns (bytes32 id){

uint price = oraclize.getPrice(datasource);

if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price


return oraclize.query2.value(price)(timestamp, datasource, arg1, arg2);

function oraclize_query(uint timestamp, string datasource, string arg1, string arg2, uint gaslimit)
oraclizeAPI internal returns (bytes32 id){

uint price = oraclize.getPrice(datasource, gaslimit);

if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price

return oraclize.query2_withGasLimit.value(price)(timestamp, datasource, arg1, arg2, gaslimit);

function oraclize_query(string datasource, string arg1, string arg2, uint gaslimit) oraclizeAPI internal
returns (bytes32 id){

uint price = oraclize.getPrice(datasource, gaslimit);

if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price

return oraclize.query2_withGasLimit.value(price)(0, datasource, arg1, arg2, gaslimit);

function oraclize_cbAddress() oraclizeAPI internal returns (address){

return oraclize.cbAddress();

function oraclize_setProof(byte proofP) oraclizeAPI internal {

return oraclize.setProofType(proofP);

function oraclize_setCustomGasPrice(uint gasPrice) oraclizeAPI internal {

return oraclize.setCustomGasPrice(gasPrice);
}

function oraclize_setConfig(bytes32 config) oraclizeAPI internal {

return oraclize.setConfig(config);

function getCodeSize(address _addr) constant internal returns(uint _size) {

assembly {

_size := extcodesize(_addr)

function disselselectors(uint tender_id) constant returns(uint[])

return tendertoselector[tender_id];

mapping (uint => uint[]) tendertoselector;

function selectrandomselector(uint tender_id) {

uint selarrlength=selectorarr.length;

tendertoselector[tender_id]=[0];

for(uint i=0;i<5;i++)

uint loc=result%selarrlength;
selectedselectors.push(selectorarr[loc]);

tendertoselector[tender_id].push(selectorarr[loc]);

result+=109;

result+=now;

mapping (uint => uint) biddercount;

function opinion(uint tenderid,uint bidder_reg_no) {

biddercount[bidder_reg_no]++;

mapping (uint => uint) tendertowinner;

function checkwinner(uint tender_id) {

uint[] arr=tendertobidderarray[tender_id];

uint max=biddercount[arr[0]];

uint winner;

for(uint i=0;i<arr.length;i++)

if(biddercount[arr[i]]>max)

max=biddercount[arr[i]];

winner=arr[i];
}

tendertowinner[tender_id]=winner;

function displaywinner(uint tenderid) constant returns (uint) {

return tendertowinner[tenderid];

}
6. TESTING
6.1. Testing Technique
Unit Testing

Unit Testing is a level of software testing where individual units/components of the software are tested.
The purpose is to validate that each unit of the software performs as designed. A unit is the smallest
testable part of software. It usually has one or a few inputs and usually a single output. Typically the unit
test will establish some sort of artificial environment and then invoke methods in the unit being tested. It
then checks the results returned against some known value. When the units are assembled we can use the
same tests to test the system as a hole.

Testing of Login and Register pages

Number of tests carried Sending system error msg Passing valid data

5 4 1

Testing of report

Number of Tests Sent Received Error msg


Carried

5 5 4 1

Integration Testing

Upon completion of unit testing, the units or modules are to be integrated which gives raise to
integration testing. The purpose of integration testing is to verify the functional, performance, and
reliability between the modules that are integrated. In the system, the QR tags which are individually
tested and then integration of wallet update, pass generation is done and their working is tested.
Similarly, every unit is integrated after the testing of every single unit is done individually.
System Testing

System testing of software or hardware is the testing conducted on a complete, integrated system to
evaluate the system’s compliance with its specified requirements. The hardware and the software units
are tested separately and then tested together to check if the desired results are obtained.

Performance Testing

Performance testing, a non-functional testing technique performed to determine the system parameters in
terms of responsiveness and stability under various workload. Performance testing measures the quality
attributes of the system, such as scalability, reliability and resource usage.

Acceptance Testing

Acceptance testing, a testing technique performed to determine whether or not the software system has
met the requirement specifications. The main purpose of this test is to evaluate the system's compliance
with the business requirements and verify if it is has met the required criteria for delivery to end users. In
the interface designed for the system, the LOGIN and REGISTER button acts as the Acceptance testing.

Test Results
All the test cases mentioned above passed successfully. No defects encountered.
Test Case Reports

Test case: 1

Test Case# : 1 Priority(H,L): High

Test Objective: To let the user and admin enter the correct username and password.

Test Description: username and password are tested against standard formats.

Requirements Verified: username and password are checked

Test Environment: chrome remote device tools

Test setup or Pre-conditions: User should enter some thing

Actions Expected Results

Incorrect username and password A message “Check your username and

password” is displayed.
Correct Id

Pass: Yes Conditional Pass: Fail:

Problems or issues: Nil


Test case: 2

Test Case# : 2 Priority(H,L): High

Test Objective: Correct Registration

Test Description: Username is checked

Requirements Verified: Username is checked in the database

Test Environment: Chrome remote devices tools

Test setup or Pre-conditions: User initiates any control mechanism like Submit button.

Actions Expected Results

If the username already exists A message “Username already exists.

Enter another name and try again” is

displayed.

Check and his account is created if all the


required fields are entered correctly
If the username is valid

Pass: Yes Conditional Pass: Fail:

Problems or issues: Nil


Test case: 3

Test Case# : 3 Priority(H,L): High

Test Objective: To let the user enter all the required fields

Test Description: All the necessary fields are checked

Requirements Verified: All the necessary fields should be entered

Test Environment: Internet Explorer/Firefox

Test setup or Pre-conditions :User initiates any control mechanism like submit or Go buttons

Actions Expected Results

Incomplete Necessary fields Error message “this Field is required” will come against
the incomplete fields and the user is allowed to
complete those fields and form will not be submitted
until that has been done Just check and go to the next
activity.

Completion of all the necessary fields


Pass: Yes Condition Pass: Fail:

Problems or issue: Nill


7.OUTPUT SCREENS
1. Front page of our Website

2. Register page/Login page

3. After Buyer login page


4. Database Screen

5. JSON Data preview

6. Issues Id
7. ID card to wallet
8. Gail Dept

i. Assets
ii. Participants

iii. Transactions

9. Gail Manager
10.Trader 1

11. Gail Manager

i. Assets
Creating Asset

ii. Transactions
Creating Transaction
8.CONCLUSION
Conclusion
The System thus proposed the usage of Block Chain enabled with Ethereum platform and with easy and
user friendly interface makes the Website more Safe and Secure with better performance and helps the
Procurement System Process more easy and reliable for GAIL.
9.FUTURE ENHANCEMENT
Future Enhancement
The future scope of our project is the usage of Block Chain enabled with Ethereum platform and with
easy and user friendly interface makes the Website more Safe and Secure with better performance and
helps the Procurement System Process more easy and reliable for GAIL.
10.BIBLIOGRAPHY
Bibliography

The following website were referred during the analysis and execution phase of this project

https://sourceforge.net/projects/osboxes/files/v/vb/55-U-u/16.04/16.04.6/1604.664.7z/download

https://blog.devcolor.org/heating-up-with-firebase-tutorial-on-how-to-integrate-firebase-into-
your-app-6ce97440175d

https://github.com/thisbejim/Pyrebase

https://solidity.readthedocs.io/en/v0.6.4/solidity-by-example.html

https://remix.ethereum.org/

https://medium.com/@vanflymen/learn-blockchains-by-building-one-117428612f46

https://andersbrownworth.com/blockchain/

https://medium.com/@vanflymen/learn-blockchains-using-spreadsheets-b97ad92b9b4d

https://metamask.io/

You might also like