Skip to content

A public blockchain based Mobile Operator and IoT Device Management PoC level solution for eSIM

License

Notifications You must be signed in to change notification settings

FahimDev/eSIM-Ethereum-Blockchain-Dapp-PoC-HardHat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eSIM Ethereum Blockchain Dapp PoC HardHat

A PoC Project on Public Blockchain Network

framework project-name web-type

Full video presentation by IBM is available at Youtube.


Abstract

This project is a PoC-level public blockchain technology-based solution on eSIM. This project will cover a basic overview of eSIM functionality scopes. Generally, we will cover from the Administration level, in which eSIM identity will be tokenized and distributed according to the imported/manufactured phone's IMEI number. Then we will cover from the telecommunication mobile network operator's perspective. Where network operator's MNO-Communication-Profile can be easily managed from the consumer level by mapping with the eSIM identity. In here we can manage an immutable ledger of Consumer's mobile network switching records to keep track of security and monetary purpose. After that, we will cover how the IoT devices interact with the device owners (Consumer SIM and M2M SIM), how their networks are operating with the eSIM, and how a single owner of multiple IoT devices can be identified with a web3 token with Fractional Ownership with maximum gas cost efficiency.


Installation

First create the local environment and initialize the node package manager.

Install node package manager

npm install 

Setup the environment using npm ...

npm init –yes​

Installing HardHat: Ethereum development environment.

Note: Some issues at latest version

npm install --save-dev hardhat@2.9.9​

View the HardHat instructions:​ npx hardhat

Install testing component (https://nomic.foundation/):

npm install --save-dev @nomiclabs/hardhat-ethers ethers @nomiclabs/hardhat-waffle ethereum-waffle chai

Add all dependencies to your environment by using:

npm install

Operational Commands

This command will compile Solidity Contract files into JSON file:

npx hardhat compile

This command will execute the scripts of unit test:

​npx hardhat test

This command will deploy the network at Hardhat local network.​

npx hardhat deploy scripts/deploy.js​

To test the network with Ganache

npx hardhat run ./scripts/deploy.js --network ganache

To test the network with Ropsten and Alchemy API

npx hardhat deploy scripts/deploy.js --network ropsten

Dapp with NextJS

For creating a new Next.js app I am using create-next-app, which sets up everything automatically for us. To create a project, run:

​npx create-next-app@latest --typescript

After the installation is complete, to start the development server on http://localhost:3000 run the given command:

​npm run dev

To ensure the security in three individual tires I am using API in the middle of our Blockchain ecosystem and Front-end. And to ensure security I am introducing JWT in our API layer.

npm i jsonwebtoken

To use JWT in type-specific, this package contains type definitions for JSON web token

npm install --save @types/jsonwebtoken --save-dev

For API development and testing, I am also using the Swagger tools suite. For that, I have installed the following packages.

npm i --save-dev @types/swagger-jsdoc
npm i --save-dev @types/swagger-ui-express

Then I installed the next-swagger-doc (TS) package with the following command. And followed the rest of the instructions from this link: https://www.npmjs.com/package/next-swagger-doc

npm i next-swagger-doc

NOTE: To view the Swagger UI: http://localhost:3000/api-doc

Guide

For coding style and conventions we will follow the official Solidity style guide.

Cite:

About

A public blockchain based Mobile Operator and IoT Device Management PoC level solution for eSIM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published