Loading video player...
Hello all of you. Welcome back to yet
another project video. In this project,
you're going to build your first ever
most advanced messaging app on the
blockchain where you don't need to pay
any transactional cost. You can create
your account, send the messages and
perform the chat. So it's totally
gasless messaging tab. Let me give you a
complete walk through that what are the
feature and functionality we have
included in this tab and how you can
able to interact with the smart contract
and perform the transaction. So when you
will come back to the application this
is the first homepage you will find. I
have called gasless messaging DAP. We
have deployed the smart contract to
sofal test network to perform the
transaction. You can click here and you
can collect your wallet and here you
will find the details about the feature
we are providing. So we are providing no
gas fee. So when you will perform the
transaction you don't need to pay any
transactional cost. The data is going to
be stored onchain and it's 100%
decentralization. And the main thing we
are focusing on this particular protocol
and the smart contract model ERC2771
protocol. So we'll talk about the entire
protocol and the smart contract
structure. So let's connect our volume.
So I'll click on this connect and here I
will be connected with my metamas and
you will come back to your dashboard.
There you can able to find the complete
details about the project. You will have
your friend list the group that's all
you will find. So this application is
divided in three part. On the top bar we
have our title for our application
gasless messaging on Sofali. Then we
have the our username and this is your
wallet. So you can disconnect and you
can connect one more time and you would
be connected and you will have the
interface. On the sidebar section you
will have this two different tab. One is
the chat. So all the friends you are
connected that's what you will find and
you can see the messages or if you want
to go to the groups you can simply
select and you can able to open the
groups and you can read the messages. So
you can click here and you can able to
read the messages. Sim you can do with a
chat. So I got five messages. I have
sent five messages from this account to
this particular user. If I go with this
one, I can see the messages which I have
sent. So that's how you can able to go
to the friends and the chat groups which
you can explore and send the messages.
Got it? So this is the beautiful
interface we have. So now let me show
you how you can perform the transaction
and send the messages. So what I will do
I'll come back here and I will say hey.
And now you can click on this send and
it's going to make a call to our
metamas. I have to give my credential.
So let me give the login. And you can
see that here you will find the data we
are passing. That's the only thing we
have to do. We are interacting with the
contract. Click on this confirm and the
transaction in the process. I'm not
going to pay any transactional cost.
So just wait. Soon the transaction will
complete and the message is going to be
reflecting in our dashboard. And finally
the message is send successful and you
will find that is going to reflect here.
So we have performed the transaction
successfully. Now what I will do I'll
come back here open my metamas and I'm
going to switch my account. So you will
find that I will come back to my account
number. I have changed my account. Now I
will come back here simple give a reload
and every single thing would be reset.
Click on this connect to start and here
is going to reload your dashboard. You
will find your friends. If I click here
you will find that I have sent this one
message. If I go with this one, I have
sent this high. I can give the message
this one. I can click on this send and
you will find the transaction is
happening. This particular contract
which handling all the signer model and
click on this confirm. And you will find
that I don't have any fund in my wallet.
But still the transaction is going to
take place because other account will
handle the entire cost of the
transaction. And you will find that we
are performing the transaction. Soon
we'll get the confirmation from our
Metamas and it's going to reflect the
message. You can see the transaction is
the process and finally the transaction
is completed and you got the
notification message and here you got
the details about the message which you
have sent. So you can send more messages
if you want to communicate in the
groups. You can click here you can find
the details about the group. So I can
click on this blockchain group and here
I have already got couple of messages.
If I want to send message I can paste
here. Click on this send and I would be
sending the messages. You can see I'm
signing the transaction. Click on this
confirm and here the transaction is in
the process. Once the transaction will
complete you will find the data is going
to be reflecting in our group chat. So
transaction in the pending just give
some time and the message is
successfully sent. We got the
notification and it's going to follow
the indexing model and it's going to
display the message right up here. So we
got the message which we have sent. If
you want to create a group, you can do
that very easily. Or if you want to add
any user as your friend, you can do
that. So you can click here and you can
click on this. Here you will have an
option. So right now I am already friend
with all of this user. So if I want to
become a friend or send the message to
for example this user, I already have
the user which I have sent. If I want to
come back here, go back to the time
block and I have sent any message to the
time block. So I can simply give this
message and I can click on this send and
the message would be sent to this
particular user. I can click on this
confirm and here the transaction is
processing.
So that's how you can able to add the
friend to your list and you can send the
message straight away directly to their
inbox and the transaction is completed
successfully. You will find the message
is going to reflect here and here we got
it. So that's how you can able to add
the friend. You can click here. You can
come back here. If you give a reload
once you will reload the page you can
find that this is the message you have
sent that's how you can able to add new
friend if you want to create a group you
can create so you can come back here or
you can simply click on this plus icon
and here you will find the group model
so you can create a new group and add
your friends so I'll say new
group and I want to add these three user
in the group so I can click on this
create gas group and here you will have
this one so we are performing the
transaction and I can click on this
confirm and you will see the transaction
in the process we are creating the group
if you check your metamas wallet all the
activity section is empty because I
don't have any fund but still we are
interacting with the contract because
it's a gasless transaction we have to
only sign the data and every single
transaction will taken care by taken
care by the contract and if I give a
quick re quick reload you will find that
I got the group so you can click on this
group and you can go back to the new
group which you have created and it's
absolutely empty. You can simply come
back here, give the message you have,
click on the send gasless transaction or
you can call the send and click on this
confirm and the transaction is in the
process. Once the transaction will
complete the message would be reflecting
in our chat model. So just wait and the
message is sent successfully. It's going
to follow the indexing and it's going to
reflect in our chat group. You can able
to create the group, send the messages
and add your friends. So if I come back
here, go back to the previous account
which I have already added the account
number one in that you will find that I
have couple of fund. If I go to the
token but this fund we are not using for
performing any one of this transaction.
So this is the messages I have received.
You can come back to the group the
message I will open and here you will
find the new group message I got it. So
that looks absolutely fine. Now let me
show you that how new user will create
their account. So I'll come back here
and I'll go back to my account list and
you can see that all of this account has
zero font the account number five and
I'll click here I'll click on this
connect account and it would be
connected successfully. Now I have to
give a quick reload and here I have
given my reload. I can click on this
connect to start and here is going to
reload the page. You will find that we
got a welcome message that we have to
enter our username. If I show you my
wallet fund I don't have any fund in
this but still I can able to perform the
transaction. So I can call this let's
say and I want to register myself. So
click on this registration. Here it's
performing the transaction. You can see
all the interaction the data. Click on
this confirm and the transaction in the
process. You are creating account you
are not paying any transactional cost
because it's a gasless transaction. So
just wait soon once we write the data on
the chain in the contract successfully
we'll get the confirmation. So we got
the details you have registered
successfully. successfully. Now you have
to simply give a quick reload and here
you will have the option click on this
connect wallet to start and you will be
redirect to the dashboard. You can able
to find your name which you have
provided your wallet address and here
you will find all the details. So you
are not added in any one of these group
that's why it's empty. And if you come
back to the chat you don't have any one
of these users. So you can click here
and here you will have the user which
you can select to communicate. So I can
go with the admin and here you will find
that I don't have any message. I can
simply give this and I can send the
message and here I'm performing the
transaction. You can see the
interaction. Click on this confirm and
the transaction in the process. If you
can come back to Metamas you can see we
don't have any fund. We are signing the
transaction and every single thing is
taken care by the smart contract and the
protocol transaction is happening. Once
we get the confirmation now the message
is going to be displayed in our
dashboard. So it's taking a little bit
time because we are following the
indexing or if you want you can simply
reload the page to follow the data
quickly and you can select the user. Now
you can click on this and you will find
the messages reflecting fine. So that's
how new user can register create an
account and perform all the transaction
even though they don't have any fund. In
the same way I can come back here I can
go back to the account number seven and
let's create a brand new account. So
make sure to click on this connect
account and here you will find that I
will be redirected. I can simply reload
the page. I got this. I can click on
this start. And here it will give me
this option. I can call this let's say
SEVN7. You can call whatever you want.
Click on this registration. We are
performing the transaction. Click on
this confirm and the transaction is
taking place. So once we'll get the
confirmation. Now we are ready to get
into the dashboard and perform all the
transaction and send the messages. Click
on this connect wallet to start. And
here you will find that I'm into my
dashboard. Now if I want to create a
group I can simply click here and I can
call the group let's say
fine and I can select the user which I
want to have. So I want to have all of
the user in the group so they can get
the messages. I can click on this create
and here I'm creating a group. I'm
sending the transaction. Click on this
confirmation and the transaction is in
the process. Once we'll get the
confirmation and you will find the group
would be created and we'll have the list
to perform the transaction and send the
messages. So just wait and finally the
transaction is completed and we have
created the group successfully. Sometime
the data would take a little bit time to
reflect or you can simply do a reload
and we are following the indexing model.
So you can click on this group and here
you got it. You can come back here you
can send the message in the group and
all the user would be reflecting in the
group can simply have the message which
you have sent. So it looks absolutely
incredible the transaction in the
process once the transaction would
complete we'll have the message in the
group and all the user will get the
notification and we have sent the
message successfully in the group and
here we got the message in the same way
if you want to create a new friend you
can click click on this and you can add
the user into your friend list simply
add this user and I can send the message
click on this send message and I can
simply sign the message and here you
will find the transaction in the process
once we get the confirmation the message
would be sent and the user will receive
the message and finally the transaction
is completed and we got the message. So
every single thing is looking good. I
hope you have understood about the
feature functionality we have included
that how new user can interact and
create their account and simply perform
all the action in the smart contract. So
if I come back to the main account which
is account number two it can have all
the details. So I can simply reload
below the page and here you will find
all the four user. If I come back to the
groups, I will find all the groups and
this is the new group which is got
created. Click on this and I will have
the message. I can come back here. I can
check the chat and I can see all the
messages which I have got for different
users. So that's all is looking
absolutely incredible. Hope you have
understood all the feature and
functionality we have included in this
project. It's a really powerful project
which you have to include in your
portfolio to understand that how you can
able to build a gasless transactional
model for different application. So
sometime you have to include the same
model for social media dab for
decentralized application. So there you
have to understand that how you can able
to build this model. If the user don't
have the fund how they can able to sign
the transaction. Now let me provide you
all the assets that you need to develop
this application from scratch. So when
the complete project will come you can
start falling straight away. And I will
also provide you the final source code.
So if you want you can take that code
and you can fast your development. So
I'll provide you the link in the
description. You can click here or you
can come back to the blockchain coder.
Open a new type. T type blockchain
blockchain coder. Hit enter and you will
come back to the official website. There
you will find all the project we have
built on our channel. So we have more
than 100 plus project on our website. So
make sure to login create your account.
Once you will do that you will have the
option called source code and you will
come back here and you can also see all
the project we have developed 100 plus
project for different EVM compatible
chain. So make sure to build at least
five of them. Then you can able to
understand and master. So build this
one, this one, this one crowdfunding
chat application. This is really
powerful. So to get the assets you can
click here go back to the recents and
here you will come click here and you
will come back here make sure to click
on the starter file and you will come
back to the GitHub repository and here
you can able to understand the complete
architecture we have utilized in this
project that what UI model we are
following what are we using in the front
end side what we are using in the back
end side what type of contract we have
that's all is given in details right up
here so make sure to clone this
repository when the complete project
will come we'll start working straight
away so make sure to clone it and save
in your system now let me show you do
that once you will get the final source
code how you have to do the setup. So
get the final code you can come back to
the blockchain coder and get it once you
will get it you will get a zip file. So
make sure to take the final source code
to fast your development and when you
will take it you will give your valuable
contribution to my team. When you will
download the final source code you will
get the zip file. Make sure to extract
the zip file and you will get this
folder in which you will see the
complete source code of the project
which you have seen in the demos. We
have the contract front end and all the
important folder and file structure. So
make sure to install a zip extractor.
then you will get this folder and this
is the one you have to open in your VS
code. So let's do that. So I'll click on
my VS code. I'll come back here. I'll go
back to open. I'll go back to desktop
and I will select this particular folder
and open in my code editor. So let me
give you a complete walkthrough of the
entire folder file structure we have
designed for this particular project
which is the most important thing you
have to understand that how the entire
protocol and designing of the system is
happening. So make sure to do the setup
the way I'm doing it. follow exactly in
the same way before you make any changes
in the contract or in the front end
side. So the very first folder you will
find is the contract in which you will
have this two contract. One is the
blockchain WhatsApp I have called and
you will find that where we have all the
logic for reading, writing and
performing the transaction in the
contract for the user for creating the
group. That's all we have. So you don't
need to make any changes just keep it as
it is. Close this one. The next one we
have is the minimal forwarder. So this
going to handle all the transactional
model. So, so when it's come to building
a decentralized DAB followed by gasless
transactional model, we have the most
popular one ERC2771
protocol which you can use to design the
entire model to perform the transaction
where one particular wallet means the
deploy of the contract beer all the
transactional cost and user can able to
perform all the transaction smoothly. So
this is the complete contract which
handle all of that model including the
data signup and user signing model. So
just keep it as it is. Don't need to
make any changes. I would suggest you to
simply go through this understand the
contract structure but don't make any
changes as of now just test the way I'm
doing it. So that's what we have in the
contract. The next one we have is the
front end where we are allowing user to
perform all the transaction. So we have
this SRC in which we have the complete
code for our front end. We have the app.
We can see the layout. You can see the
pages. Just keep it as it is. The red
warning. I have a different
configuration in my pier. That's why I'm
getting simply ignore that one. Close
this one. Close this one. We have the
component for all the component we have.
We have the chat window, group model,
header, spinner, user registration, and
sidebar. Keep it as it is. Don't need to
make any changes. Close this one. Come
back to the configuration. And here you
will find the AI of the contract. So we
have the AI of our WhatsApp contract. We
have the contract and we have the minor
forward. So just keep it as it is. Don't
need to make any changes as of now. When
you will simply deploy the contract,
this file will be generated and
automatically stored right up here. So
let's close this one. Close this one.
Come back to the context and there you
will find the context management we have
built. So we have the chat context for
the user interface for function and
interaction. We have the web3 context
which allow us to communicate with the
contract and different model and signing
the data. So keep it as it is. Close
this one. Close this one. Come back to
the style. Then you will find that we
are using Telvin which is the very
prominent and we have all of this code
which we have written in the global
scope as well as in the component. So
don't need to make any changes just test
as it is. Let's close this one. And we
have some regular files like environment
variable. So you don't need to copy
paste the environment variable because
when you will deploy the contract it
would be automatically placed and set in
the places. So just keep it as it is.
Close this one. This is what we have.
Next config file packages and file. So
we are focusing on stability. So no
matter when you are developing this
project it will work absolutely fine. So
make sure to keep it keep it as it is of
this packages and just follow the way
I'm doing it. We have the post CSS tin
and we have this TS configuration which
is our web pack. So just keep it as it
is. Close this one. And that's the
complete code for our front end. Close
this one. Come back to the relayer. And
this one is very important and very
interesting because this will allow us
to interact and activate our backend
model which can handle and just
calculate all the pricing. So if you
come back to the package file that is
follow a very simple package. We are
using express core ether and dev
environment and that's what we are
passing here. We have our server which
getting executed and running behind the
scene and giving all of this data. So
just keep it as it is. Don't need to
make any changes. Just keep it as it is.
It's a simple back end server we have.
Let's close this one. Come back here.
And here we have the script file in
which you will find this two script. One
is the check balance. And this will
check the balance of the admin because
when you going to perform the
transaction or any user will perform the
transaction, the admin is going to pay
the transactional cost in the cashless
transaction model. So that's what we
have. Just keep it as it is. Come back
to the deployer. So this is the complete
deploying script of our smart contract.
So altogether we have to deploy these
two contract and that's what we are
doing. We are simply saving the files
generating the ABI. That's all we have.
So keep it as it is. Close this one.
Close this one. Close this one. Now come
back to the most important thing which
is the environment variable. And all you
have to do is to provide the environment
variable. So click here. And here you
have to get your own environment
variable. So just keep it as it is. This
one is our backend server. I'm testing
this contract on Sofali. So that's what
I have done the configuration. You just
keep this as empty because when we'll
deploy it will automatically set in our
environment variable. You can also keep
this as a as a empty because we have
multiple models which we can use to
perform the gasless transaction. But in
this model we are following the deployer
of the contract who going to pay all the
transactional cost. And here we have the
ether scan API which you can get it very
easily. This is the one which I have
provided. But I would highly encourage
you to create your etherscan API and you
have to provide it your and here you
have to provide your wallet private key
which you want to use for deploying the
contract. That's what you have to
provide and make sure you should have
some fun in that. And here you have to
provide the API key for acme because
that's where we're going to do and
perform all the transaction. I'll tell
you how you can get all of these two
variable that looks fine. So this is
what we have in the m variable. Just
wait and we have the get ignore. Just
keep it as it is. We have the hard
configuration where we are focusing on
deployment in Sofali. But if you want to
do the external configuration for
different network, you can do it from
here and you can also do in the script
as well. So let's close this one. Come
back to the packages and file and here
you will find that we have written all
the script which allow us to execute our
front end, back end and running the
entire application. So just test as it
is. Don't change anything. Just test as
it is. Once you understand after that do
all the experiment from your end. If you
come back to the readm file there, I
have given some important links, some
important information which you can
check. You can also check this most
advanced project. If you want to deploy,
you can deploy there and you can check
other links right up here. So that's all
is given. Let's close this one. So I
hope you have understood the complete
folder and file structure we have in
this particular project. Now let's try
to get our environment variable. After
that we're going to start our
application. So come back to the
environment variable and let's get first
our ACME. So what I will do, I'll come
back to the browser. I'll simply
minimize this one. I'm going to close
this one. Close this one. Open a new tab
and type Elkme. It's a really powerful
platform which allow you to give you
node provider, web hooks. That's all you
can use to build a decentralized
infrastructure. So that's what we have
and it's free to use at your initial
stage. So I already have my account. So
I will log in straight away. Make sure
to create your account and verify your
account. So let me sign in quickly. Once
you will create your account, verify
your account. You will have a similar
dashboard just like this. And you can
see that I have already created couple
of project. So if you don't have any
project you can click on this create and
you can create a new project. Although
it's my free account and I have already
created five different endpoints. So I
cannot create more. So I can use any
existing one. So I'll simply click on
this endpoints and here you will find
all the blockchain endpoint. So we are
looking for Ethereum. So simply type
Ethereum and here you will find the
network list. So we are looking for
solali. So simply copy that one. Copy
the URL. Come back here and that's what
you have to provide here. So I'll simply
replace remove this one and paste here.
This is going to be your unique API key.
So make sure to use your own because
this has a limited number of requests.
Once you get that now we have to get
these two private key of my wallet which
I want to use for deploying the contract
and the ether scan API key. So let's get
the Etherscan API key first. I'll come
back here open a new tab type ether scan
and you will come back here. Make sure
to click and go back to the main net and
login. Make sure to create your account
and verif. So once you will log in
successfully you will have a simple
interface just like that. Click on this
API dashboard and you will be here and
you can see that I have already created
three API endpoint in my free account.
So that's what I have. So if you don't
have any API you can simply created
here. I have already created three in my
free account. That's why I cannot
getting the option. So I will copy this
particular one. Just copy this one. Come
back here. I can copy this one. I can
copy any one of that. And that's what I
can provide here. That's what I can
provide here. And I got my API key. Now
you have to get your private key of your
wallet. That one is the most important
thing. So come back here, save it, and
come back to the browser. I'll simply
close this one. Close this one. And open
up your Metamas. Now you will see one
thing that I already have Sofali network
right up here. So in your case, if you
don't have this test network activated,
you have to activate because by default,
Sofali would be there in your metamas.
So you don't need to add your custom RPC
endpoint. It would be there. So make
sure to activate your test network and
it will be it would be reflecting right
up here. That's the first thing you have
to do. My test network is activated. So
file is there. And now I want to use
this particular account. Account number
two. If I come back here in my token,
you can see I already have enough fund
which I can use to deploy the contract
and use for the transactional cost. But
if you don't have this fund, you can use
it the web3 provider to get the free
foret. So I'll simply copy my wallet
address which is this and in which I
will get the fund. So right now I have
this much. So I'll come back here type
web 3 Google foret. It's a very powerful
platform which help you to give you the
free foret. Click here on ethereum
sofali and here you will have so it
selected etheum sofali but if you are
see it has a different network available
but I will go with etheali and it will
give me 05 which is enough. I'll simply
paste the address and I can click on
this get. And right now you can see that
I'm getting this particular error
message because you can only call once
in 24 hours and I have already made a
request yesterday. I have to wait for
11:00 means one more clock I have to
wait then I can able to make a claim but
I already have enough fund for
performing the transaction. So this is
how you can get the free foret. Got it?
That's the first thing. That's the first
thing you have to do. Make sure you
should have enough fund. Now we have to
get the private key of our wallet. So
this is the account which I'm going to
use. So to get the private key you can
click here go back to the account
details and here you will have the
details. So click on this private key
and you have to give your password and
you have to copy the private key. So let
me give my password. I got my password.
Now I'm going to simply copy my private
key. So I'm going to hide it. So finally
I got my private key. Now I will come
back to my code editor and I'm going to
provide it here. So let me provide then
I will come back once again. So finally
I provided my private key. Every single
thing is looking good. I already have a
phone. I have given all the environment
variable. Now we are ready to start our
application and deploy the contract. So
let's open up our terminal and you can
see I'm on the main directory on the
main directory. If I check my node
version, you will find that I'm using
the latest node version. So it will work
absolutely fine. If I show you my npm
version, it's working absolutely fine.
So make sure to use the exact node
version or npm version for better
stability. Okay. So no matter when you
are developing this project, as long as
you follow this particular packages
versions, every single thing would be
working fine. Now what I will do I have
to go in each one of these component and
do the installation of the packages.
Do the installation of the package. So
let's start with the first one for the
main directory. I simply type npm I hit
enter and it's going to do the
installation of the package. This might
takes a little bit time depending on
your internet speed and your system
configuration and how fast your laptop
is. Just wait once the installation will
complete then we'll move to front end
and relay. And finally the installation
is completely simply ignore this warning
because we are focusing on stability and
that's what you have to focus as a
developer. So I'll simply clear my
terminal and I got my node modules in
which I have the complete packages. Now
I have to get into the front end and I
have to do the installation of these
packages as well. So let's come back
here. Let's call cd front end and you
will find that I'm into the front end
directory this one. Now I have to type
simply npm mi. Hit enter and it's going
to do the installation of the package.
So just wait soon the installation will
complete and we'll have our package
models right up here. And finally the
installation is complete. Simply ignore
this warnings. Now we have to clear our
terminal and we have to get out of this
particular folder. So I'll type cd dot
dot hit enter. And right now you will
find that we are on the main directory.
I'll simply close this one. Now I have
to go in this particular directory. So
I'll say cd r e l a y e r. Hit enter and
we are on this particular directory. Now
we have to do the installation. So we
type npm I hit enter and it's going to
do the installation of our packages. And
finally we're done with the
installation. If you come back here you
can see we got the package model and the
script. That's all looking great. So we
are done with the installation of all
the packages. Let me get out of this
particular directory. Now I'm in the
main directory. So we are done the
installation of the packages. Now we
have to deploy our smart contract. So we
can come back here and this is the
command we have to execute for
compiling. Then we're going to deploy
our contract to Sophile test network. So
what I will do I simply open up my
terminal. We are on the main directory.
Now we have to compile our contract and
this will generate the ABA and the
important folder file. So simply type
npm run and give this compile. Hit enter
and it's going to compile our smart
contract. So just wait. It's compiling.
This might takes a little bit time. And
finally we have compiled our smart
contract and we have followed the Paris
model and you got the artifact in which
you will come back to the contract and
you got the true contract API which we
are using. So we got that artifact. Now
once we're done with that now we have to
call this deploy script. This is going
to deploy our smart contract to Sofali.
So I'll simply clear my terminal and I'm
going to type npm run deploy and hit
enter. It's going to deploy our smart
contract. you can able to find the
details that deploying contract address
and the balance I have in that. So make
sure you should have some enough fund to
deploy the contract and perform all the
transaction for the user for different
wallet. But this fund is enough and you
know how to get it using Google 3 Google
web3 foret. So just wait let the
contract get deployed. Once we'll get
the confirmation then we'll start
working on the front end side and
activating our front end and the back
end. So our contract is deployed and we
are getting waiting for the
confirmation. Altogether we have to
deploy two contract. This might takes a
little bit time because we have added a
waiting period. So just wait, let the
deployment get complete and we'll get
the confirmation. So once we're done
with the first one, then we will go to
the next stage. And you can see we got
the confirmation. Now we are moving
towards the other smart contract for
deployment. And you can see we got the
contract deployed successfully. We are
waiting for the confirmation. So just
wait. Don't be in hurry. This might
takes a little bit time because this
time we are interacting on the actual
network. So once you done with the
deployment we'll get the confirmation
then we are ready to start our
application. So we are waiting for the
confirmation because we have a 6 to 7
minutes waiting time for getting the
block confirmation. And finally the
transaction is completed. You can see
that we have deployed the contract
successfully. You can see the network
details. You can see the two contract
addresses. It has also generated our AI
file and you got the confirmation. So
don't interrupt when it's the contract
is deploying. This might takes a little
bit time for 1 minute to 2 minute
because we have added a waiting log. So
just wait just wait let it be complete.
You will get the success message. Okay.
Once you will deploy it successfully you
don't need to paste anything and you can
also verify the transaction which you
have here or you can simply run this
one. Now just keep it as it is. Now if
you come back here you will find all the
folder and file structure is looking
absolutely great. Now I'm going to clear
my terminal. Got it? So we have
compiled, we have deployed. Now we have
to start our front end and the back end.
So we are on the main directory. I would
suggest you to split your terminal. Here
you got it the terminal. Now what you
have to do? You have to start your back
end. So this is the command which you
have to execute. So come back here type
npm
run and give this hit enter and you will
find that our back end is started. You
can see this particular account is going
to pay all the transactional cost and
it's running on look like 3001. So just
keep this running. Don't need to stop
this one. Keep this running. Now we have
to activate our front end and let's
start that. So this is the command we
have to run. npm rundev. Hit enter and
it will start our front end. So both is
running absolutely fine. We are
following the stable model. Every single
thing is looking good. I'll simply close
this one. Don't delete the terminal. If
you delete application would be shut
down. We can simply minimize it just
like this or you can do it in this way
but don't delete it. This both should be
running. Got it? So we got all the
important variables. Every single thing
is set. Now I will minimize this one.
Now I'll open a new tab and I'm going to
simply paste this local 3000. So let me
open this one. And this is the one which
I have to simply copy. And that's what I
have to paste here. So let's give this
one. Hit enter. And you will find that
our application is looking absolutely
great on our front side. So let's make
on the big screen or you can see that
it's looking great. I can come back here
and you will find that I'm connected
with the account number two. See I'm
connected with account number two. This
is the same account I have used for
deploying the contract and it's going to
pay all the transactional cost because
someone has to pay the transaction cost
if you want to write the data on the
blockchain. So this is the account we're
going to pay and it has enough fund. So
I have already connected. I can click on
this correct wallet and here it's going
to reload and you will find that I'm
getting this option because it's a brand
new account we have deployed. So let me
give the name. So I'll say I'll say
chain coder. I can click on this
register glass list and you will find
that it's performing a transaction and
signing it all the data. So click on
this confirm and the transaction is the
process. You can click back here and you
can find that here we got the details.
Right now the activities is not
displaying because all the things are
taken care by the contract we have
developed which handle the entire
gasless transaction model. So soon you
will get the confirmation and you will
see you would be logged into the
application and your account would be
created successfully. So just wait and
finally the transaction is created
successfully and finally the transaction
is completed successfully. Now you can
simply give a quick re and you will have
this option. Click on this connect
wallet to start and you will have your
dashboard back and you can see your
username and your dashboard. Right now
you can click here. Right now there is
no user because other users have to
create their account. If you come back
here and if you see the groups there is
no group. If you want to create a new
group, you can call it and you can
simply call the new group. But there's
no user to be activated. So you cannot
create because there is no user and you
need to have some user then you can able
to create the user. Okay. Group. So I'll
simply close this one. Now what I will
do? I'll come back here and I'll go back
to account number three and I don't have
any fund in that. But I still I can able
to create and perform all the
transactions. So I'll simply give a
reload because when you change your
account make sure to reload and it would
be set according to this particular
account. So I'm connected with account
number three. Click on this connect to
start. And here I have this one. Now I
can call this
three. Click on this register. And here
is perform the transaction. You can see
we are interacting with the contract
which handles our transaction model and
provide the signer details. So click on
this confirm and it's going to take care
of all the transactional cost. So just
wait. Soon the transaction will complete
and our account would be created and we
would be registered in the smart
contract to perform all the transaction
and send the messages. So just wait and
finally the transaction is completed and
we have created our account. So you can
see I got into my dashboard and I can
simply give a quick reload and click on
this and you will find that I have zero
person in chat and zero group. So I can
click here and I can add the user which
is already there and here I'm selected.
I can simply send the message or I can
do anything. I can simply send the
message and the message would be sent
and you can see we are interacting with
our forwarder smart contract. Click on
this and the transaction in the process.
Once we'll get the confirmation our
message would be reflecting. So just
wait soon we got the confirmation and
the message is sent. When you will
create your account the very first time
it might take a little bit time for
creation but once you done with that you
will have the details reflecting
absolutely fine. So just wait and you
can see the message is taking a little
bit time. So you can simply give a
reload. Click on this connect and you
will find the message is going to be
displayed here and we got it. In the
same way if you want to create a group
you can come back here you can select
the user I'll say new and you can create
a group because you need at least one
person to create a group and perform the
transaction. So you can see the
transaction is happening and here we
have performed the transaction and if
you look at the fund still it's same
because it's a dummy fund. Got it? So
once we'll get the confirmation and our
group would be created and it would be
reflecting in our smart contract and
here you can see the group is created.
You can simply reload the page, click on
this and come back to the group and you
will find that you have created the
group. So first the user who's added in
the group need to send the message then
the group would be activated because
that's the double layer we have
included. Got it? So what I will do I'll
simply come back here and let's go back
to the account number two to check the
group. So here we got it again account
number two and let's me reload the page.
Click on this and here I got it. I can
see the messages which you have sent
from the account number three. If I
check the group there we have the group.
If I want I can send the details. I'll
say hi and I can send the message and
the transaction is happening. We are
signing it. Click on this confirm and
the transaction is processing and the
message would be sent successfully. So
just wait. The transaction is processed.
Once we'll get the confirmation from the
chain, the data will going to reflect
because we have two different contract
which communicating with one another.
One for transactional handle and one for
the data management and we got the
confirmation and the transaction is
successful. So soon it will reflect and
here we got it. Now if I come back here
if I created another account for a brand
new. So I'll come back to account number
six and you will find here I got this
option. Click on this connect account
and I'm going to reload the page and you
will find that I'm out. Click on this
connect and it will tell me to create a
new account. So I'll say and I will
click on this register and I don't have
any fund in that. So click on this
confirm and you can see the transaction
in the process. If I show you my metamas
I really don't have any fund but still I
can able to perform the transaction and
we have created our account. If I click
on this reload, click on this connect
wallet to start and here you will find
that we got into our dashboard. There we
can able to chat with other friends. So
click here and you will find the user
and you can send the message and click
on this send and the message would be
sent.
So when it takes a little bit time for
fetching the data you can simply do a
reload and the data would be reload from
fresh.
So here we got the message successfully
and just wait soon is going to reflect
here. If it's not reflecting quickly,
you can simply do the reload and you
will find the data would be there
absolutely fine. So that's how you can
able to perform all the transaction
without having any fund in your wallet.
It's a really powerful application and
you must have this in your portfolio.
This will help you to understand that
how gasless transaction work on a
decentralized ecosystem. When you go to
work on a decentralized social media
platform, NFD models, airdrop, there you
need to simply provide your tokens, your
cryptos, your assets where you don't
want to charge the user for performing
the transaction and this is how you can
do it. So this model is very important
which you must include in your
portfolio. So I hope you have understood
every single thing about the feature
functionality. Make sure to come back
here in the blockchain coder, get the
starter file and save it. So when your
complete project will come you can
faster your development or you can
simply take the final source code and
just do the setup and test every single
thing from your end or if you really
want to master complete blockchain
development then check this particular
boot camp once you will have the
understanding of the solid smart
contract all the important technology
which you have to know to learn in 2025
or beyond to master blockchain
development. So if you understand if you
complete this particular boot camp and
all the project we have developed you
are ready for building any kind of
application. So make sure to have a look
if you want you can get yourself into
this and start following and taking the
complete boot camp. So with that I'm
ending this video. If you have any
question any doubt do let me know in the
comment section or you can simply mail
it where we can able to provide you all
the details. So it's a really powerful
platform which you can develop where you
can provide all the feature to your
client to your user. So with that I'm
ending this video. Have a wonderful day.
bye-bye.
Source Code: https://www.theblockchaincoders.com/sourceCode/create-and-deploy-a-gasless-messaging-dapp-using-next.js-hardhat-and-solidity-or-web3-message-app-project Blockchain Course: https://bit.ly/Pro-NFT-Marketplace All Project Code: https://www.theblockchaincoders.com/SourceCode Donate Please: https://linktr.ee/daulathussain 1 - 1 Consultancy: https://www.theblockchaincoders.com/consultancy Pro Blockchain Courses: https://www.theblockchaincoders.com/ Public Discord: https://discord.gg/Gah6YGuBFS Create & Deploy a Gasless Messaging DApp Using Next.js, Hardhat & Solidity | Web3 Message App Project Build a fully functional Gasless Blockchain Messaging DApp from scratch! In this step-by-step tutorial, you’ll learn how to create a Web3 Message App where users can send messages without paying gas fees, using a relayer-based architecture. We will cover everything—from writing the smart contract in Solidity, testing and deploying with Hardhat, to building a clean and responsive Next.js frontend that interacts seamlessly with the blockchain. 📌 Timestamps 00:00:00 ➤ Introduction 00:00:28 ➤ Overview 00:02:11 ➤ Features Demo 00:12:40 ➤ Starter File 00:13:53 ➤ Final Source Code 00:20:43 ➤ Environment Variables 00:25:09 ➤ Installation 00:31:17 ➤ Testing Live 🚀 What You Will Learn How gasless transactions work (meta-transactions + relayers) Writing a secure Messaging smart contract in Solidity Setting up Hardhat for compilation, testing & deployment Integrating gasless logic into your Web3 DApp Building a Next.js UI for sending/receiving on-chain messages Connecting wallet + signing messages Deploying the entire DApp live (frontend + smart contract) 🧰 Tech Stack Next.js 14 Hardhat Solidity (Smart Contracts) EVM Chains (Polygon / BSC / Ethereum) Gasless Meta-Transactions / Relayer 📌 Who Is This For? Beginners & advanced Web3 developers who want to build real-world gasless blockchain applications. Save NFT Marketplace PlayList: https://youtube.com/playlist?list=PLWUCKsxdKl0olgEF4OxXVk2B-jwpGqL5d API PlayList: https://youtube.com/playlist?list=PLWUCKsxdKl0oAFAVuRZxQSYC07UTcl_v_ Solidity PlayList: https://youtube.com/playlist?list=PLWUCKsxdKl0oksYr6IG_wRsaSUySQC0ck Complete JavaScript Course: https://youtube.com/playlist?list=PLWUCKsxdKl0qROhA0XO4_ek9bIwZ4j4Xr HTML Course Code: https://www.daulathussain.com/complete-html-course-daulat-hussain/ =================== HOSTING ++++++++++++++++++++ Best Hosting: https://clients.domainracer.com/aff.php?aff=28826 Follow Me: Instagram: https://www.instagram.com/daulathussain92/ Facebook: https://www.facebook.com/daulat.hussain.18 Twitter: https://x.com/TheBCoders Pinterest: https://in.pinterest.com/daulathussainhealthfitness/ Linkedin: https://www.linkedin.com/in/daulat-hussain/ Quora: https://www.quora.com/q/schahkxkdudpgjvh Facebook Group: https://www.facebook.com/groups/59011 Facebook Page: https://www.facebook.com/yourdhfitness Subscribe to My Channel: https://www.youtube.com/channel/UCz6_...