Welcome to Intellipaat once again. So I hope you guys are doing really
excellent and this time we are going to be talking about smart contract and
essential concept in blockchain. I assume that you have got a fair knowledge about
blockchain but if you do not know about blockchain, nothing to worry you can
simply go to our previous videos on blockchain in our playlist or find the
link below to get the basics of blockchain. If you like this video do
leave your comments or share your queries below and we'll respond to them
at the earliest. Also do subscribe to Intellipaat channel to keep yourself
updated with the latest technologies. So shall we begin? So let me start it off by
quickly going through the agenda of today's session. We are going to know
first of all what is smart contract, its futures, how does it work
followed by platform it works on and then we'll be seeing hands-on. I mean how
to deploy your smart contracts and finally we are going to be talking about
career opportunities you have in this field. Let's begin. So what is a smart
contract. So the term smart contract is used for software code or a protocol
that is used to contribute to verify or implement the negotiation or performance
of a contract. It is plced inside a blockchain to do its task just like that.
so it is nothing but a computer program stored inside a block. It is just like
any other physical contract. The only difference is that it is completely
digital and cannot be amended. I hope you guys have got the clear definition of
smart contracts. Now let's see some of the features of smart contract. Smart
contract comes with two amazing qualities. So first one is immutability
yes it has got immutable quality and the second one is distributed quality of
smart contract. Let's talk a little deeper about all of these. So blockchain
immutability means parties agree to the terms or code of the contract that code
cannot be changed by any party without getting others on board. Now the result
of the execution of the smart contract is similarly unchangeable. Hence you can
rest assured that no kind of trick can be played with regard to the code and
this gives you a level of trust on smart card and hence makes it secure. So smart
contracts eliminate the need of centralized database system or a trusted
third party to enable credible transactions. It can be automatically
initiated and is thoroughly programmablE. So this distributed nature of the smart
contracts on the blockchain brings transparency and Trust in the process
that is visible to all stakeholders and all the regulatory bodies. Now since
there is no third party involved hence it reduces the cost exponentially
and validation is performed by all nodes and hence attempt of any sort of
tampering is just nearly impossible to perform on smart contract. So I hope you
guys have got a broader idea of what actually smart contract is. So now let's
see how does it really work. So let's see how smart contract could be implemented
in a banking system. So suppose you need to take an amount of loan and hence you
need to discuss the EMI you would incur per month with the financial adviser,
interest rate you would be charged, your principal amount deduction per month etc
so in this scenario you might like to make a smart contract between you and
the bank which would remain the same during the entire tenure of your loan
and no amendments can be done in this period sounds exciting isn't it?
that means bank cannot increase your interest rate or you don't have to keep
track of your EMIs being deducted on time or not. Your principal amount is
being decreased or not. So everything can be
mentioned in the smart contract in terms of coding and hence smart contract would
take care of everything here after. So this is the biggest advantage of using a
smart contract in this. So on one hand this would give you a sense of
security and no tricks can be performed on your transaction at the other bank
would be getting there EMIs timely without having the need to
chase their customer for timely EMI so does it not give you a sigh of relief?
now let's move ahead. So now let us see the platform's smart contracts work on
where do we perform these smart contract codes. So Etherium is a blockchain
specifically designed for a smart contract. It is a sort of cryptocurrency
and allows to transfer values in the form of ether and also allows you to
create smart contracts or code to be deployed to blockchain so this is the
platform where we actually write our smart contracts okay? And then solidity
is a contract oriented high-level language and the syntax of solidity is
similar to JavaScript. So you write your smart contract using solidity and execute
it on an etherium virtual machine and do your blockchain transactions simple
right? So now let's move on to the practical session of smart contract and
I hope everything that I had told you guys till now is pretty clear to you
let's go ahead. As I told you that you write your smart contract on ethereum
platform and then using solidity language you write it and then you need
to deploy it. So here that is what I am going to show you guys. So for writing
your smart contract you first have to have this remix solidity IDE this is the
compiler where you actually write your program rights and then you need to have
this wallet okay? and this is nothing but meta mask wallet which performs as an
interface between this compiler and the etherium platform where we are going to
deploy our contract okay? so these two things are essential
in order to get your contract deployed so how do you get it? So simply you go to
your chrome and you just type in remix dot etherium dot org and this will lead
you to this screen just select the first screen on here
so just select the first screen. So this is how it looks like and this is nothing
but a kind of you know it has given you this program just to refer to this and
this program or contract rather is written in the language called solidity
and if you are familiar with Java JavaScript so there should not be any
problem in you to learn this language all this syntax and all, they are pretty
similar. So if you need to write a new contract, you can simply go here, right?
create new file and give you file whatever name you want to select okay
and your new file would be created over here right? so you can simply write it
now once you are done with writing your contract you need to deploy it right? and
for that as I have told you guys you need this meta mask but you need to get
this added to your chrome and how do you do that? you simply go here again let me
type it for you guys so it is meta mas dot IO
okay so this is the screen that you'll be getting and you need to add this
wallet to your room so you can simply go here get Chrome extension click on it
okay so see here it is giving me an option or this is popping me up
stating added to Chrome because I have already added it to my Chrome right if
you are a new person so I'll be giving you an option of add to Chrome and
you'll simply be clicking add to Chrome and just a few security parameters need
to be followed up and then it will get added to your chrome automatically right
so let me come again here okay so this is our contract and this is
unroll it so here you need to you know take care of one thing that this is our
main Network main aetherium network so if you're finally going to deploy your
contract on your aetherium network then you are going to select this right you
need to reload the site let it get downloaded but since here we are doing
it for our testing purposes and that's why you can select any one of these so
I'm going ahead with rupestre test Network reload okay so one more
thing I would like to tell you guys that there's no difference simply no
difference between many the network and Hoopeston test network you are going to
get these same features same ether everything would be same it just this
platform we are using for our testing purpose and this is for our final
deployment right so right now I'm using this one and okay so I have selected
this one okay so once you are done with your smart contract and you have also
got this added to your drone that is a meta mask now what do you need to do so
here see right now it has got zero aetherium I do not have anything reom so
what so what would I do is I need to add some ethereum to my account so I'll go
to this deposit and after that this test faucet so get ether from a faucet for
the route strength so get either click on it okay so here is request one either
from faucet so it just click it twice thrice or four times so you will be
getting that much ether in your account in some time okay so I have done it but
it is not going to be displayed right now after a while it would display it
here now so how do we deploy this contract there should not be any kind of
error if there is any error in your contract you will be getting that ad so
you will be getting that error highlights in help in your right hand
side ok so since there is no error and these warnings you can just ignore it or
you want to implement depends upon you so there is no air okay
so what will I do is I'll go to run so one more thing that you need to be aware
of this account address of yours should be just the same as this account address
so this is zero x f4 double one zero x f4 yeah so this is the same in case in
many cases these address might differ from each other so you don't have to
worry in that case you can simply go and refresh your page okay and when you
refresh your page and then if you go here so see this is going to give you
the same address as your this account address okay 9 f9 v 9 f9 5 so this is
something that you really need to take care of ok now simply go to hell and you
need to deploy this ok so here you can simply select your contract which
contract you actually need to deploy it so I am going to deploy my this contract
balance so I've selected this one and there is no other contract as well now
deploy this so just click on it so this meta mask notification has
popped up and here it is saying that this account 1 is trying to create a new
contract so yes I am trying to create a new contract so let me confirm it now it
has been confirmed now see this once you confirm it you get this because I have
done it twice and that so it is giving me two buildings you can simply click it
once and you will be getting this blue link and you need to click on this one
so see this is how we are deploying our contract and after a few second it would
be created I have got the confirmation as well that transaction 1 confirmed v1
ether scan right so let me refresh it right now it is saying creation in
process so this transaction has been included into block number so this is my
block number that I have created that means my smart contract is under this
block and will be reflected in a short while already and let me check here ok
so see we have got this much ether now in our account credited and also since
we have deployed our contract and I have done it twice and that's why it is
showing me twice so this contract is given over here now let me check my
contract over here okay so finally it is created now what is this so this is
nothing but the unique smart contract address so every Mart contract has got
its unique address right so this is the address so if I click on it this screen
I am going to get over here so what is it so this is nothing but here you are
getting who is the creator I am in the address of the contract creator then
what's the balance amount you have how many transactions you have done right
and under this block this has been created when it was created
so all these informations are available over here so this is how you actually
deploy your you know smart contract on etherium platform so this is route
string because I am using it for testing so I hope this it was clear to you guys
and now what are these if I click on it so these are the functions that I will
be getting it whatever functions that you have included in your smart contract
will be displayed over here so this in baby pink color is nothing but cravat
functions so this can be defined and called by the admin or creator of the
contract only and this function which is in blue color this is the public
function so anyone can access it so this is how you actually write your smart
contract and deploy it on your aetherium platform okay so this is our transaction
this is our contract that we deployed and this is where you request for your
ether so I hope this was pretty clear to you all guys right so let's move ahead
after all this I know you must be thinking that what are the career
opportunities that a blockchain professional has in its bucket so let me
tell you you are not going to be disappointed so blockchain expertise
captured the number one position on the latest skills index by up work for being
the hottest in the u.s. job market and this is one of the many indicators of
how high the demand is for people with blockchain skills and hence employment
is never an issue for a blockchain professional a blockchain professional
can earn around e six thousand dollars for ill exciting
isn't it after all this let us quickly go through
all what we have learned today so we saw what exactly is a smart contract and
then it's amazing features we then saw how it can affect your
real-life transactions effectively followed by the platform it works on and
then we saw how do you deploy your smart contract on aetherium network and then
finally recover your opportunities it has for you so if you feel accelerated
about the course after watching this video learn blockchain course in detail
and you can do that with one of the best elearning platforms in tally pad you can
get a 360-degree knowledge about the course designed by the best of the
industry experts I hope this video was informative for you thank you for
watching the video and for any inquiries feel free to contact us anytime have a
great day and career ahead