Hello welcome everyone my name is
Hugo Chai and today we are going to do a
remix workshop and it is for web
street beginners and you are going to learn a little bit of
solidity with remix and yes that is what we are going to
do today but before we start we
have some links that I think are a
little bit easier for you if you
go to that link here Well there is like
a cuaco or also the links that you
can use And so it is going to be easier
during the presentation that you
can see it and you can just
click on it and you don't have to
do
So if I continued Well if you do
that now and then we are going to do how we are
going to make an effect and for that we
need
yours and you have to install
metamask and then change
Network optimism and then you can
share your address here So we
can do it we
can do it to you So you
can paint the nft and you can also
give it a little bit of
is so you can do it in optimism So
if you before during I am planning
and doing the presentation you
can already go here and when you have the meta
plus you have your address you
can just put it here and good And that's fine
if you already do it now So later we do
n't have to wait for all that so I
hope everyone is okay there with the
link and we understand everything
well wait a little bit
[Music]
Okay perfect well
Ah it didn't work
well
so what we're going to do today is at the
beginning we're going to do a
meteorological introduction And we can make that a little
shorter And you already know everything so it does
n't make sense for me to make it
longer but if you want to ask
questions or want to know a little more if I
start with that introduction so you
know what we do and it's going to be a little
high level So there may
be things that you already know but we'll
see how it goes and if I see that they are
interested I'll make it a little longer and if
not we make it a little faster and then
and that's what we're going to do if we're going to do it
as long as we have we're going to look at
the introduction of solicity which I think
for all of you that's going to be the most
important thing how to learn the
solidity language to make
intelligent contacts are homicide So
that's going to be the most important thing and
then we're going to go to
what we're going to do later and for
that you now have that they enter their
address and they have to
if they have that they received a little of that so they
can they
can mint it Okay if that's going to be
the agenda for today And we start with the
introduction it
may be that it's less than 30 minutes
let's see
Well I think you all know at a
high level why we're here but for
me and because I'm here and because I think
that this is such an important thing I
like to put it in just a
few words as to
condense what is the thing that is so
important and the thing that is
important to me is that
blockchain technology allows us to dawn data
in an
immutable form So it may be that we have
data in the form that nobody nobody
can change it Nobody can can take it
out Nobody can do anything
with it And that is I think the important thing
that a lot of people not only do not
fully understand what it means because that what
that means I think that this is going to
be the one very very big thing that is going to
change everything almost like 30 years ago if you
told people that the Internet is a
place where people can communicate
also nobody knew what you do with it
so that is that one thing that we have
data that Naruto can Changing that is
very, very important and there are going to be
a lot of things that can be done
that no one can handle at the moment.
Well, if the illusions that we have on
sheets in all very centralized, we
know it like Facebook, Google, Amazon,
all these likes always, if not, it was not
possible before to have data in a way that
nothing could be done, no one could change it,
there were always people who at some
point could change it if they wanted and so on. That is
the revolution, that is the
new thing if we put it at a very, very high level,
well, the blockchain, as I think you all
know, consists of blocks of
data and transactions that cannot be
modified and also,
as each one has like a copy,
a floor of the copy and so it is very, very
difficult to change something there, you cannot.
Well, let's go, yes. We want to know a little
more, like the history of that, how it
changed. It is that the blockchain technology, if it was
invented as a ledger, a letter
for which the transactions are typical,
the idea was that bitcoin is a currency
towards a digital currency that no one
can control and for that, to have
that, it had to have
a way where
data can be stored without changing that no
one could change it and that is why the
blockchain I was invented
Yes and the bitcoin blockchain tames
value transactions not bitcoin transactions that is
what bitcoin consists of and it only
only exists that is why it is used to
make transactions not from David
now it is like the revolution is that it is not
only used for transactions
not transactions of a currency but it is
used for programs not for
intelligent programs and there
the data is stored And also the programs
And that is the thing that is not that now
is the important thing the thing that changed
and with that the the and Silvio if
the creation of
a lot of applications that could be
done there drown like
blockchain now it is not only for
currencies So there were also currencies
as if like in
2020 17 like there was all the Oh yes me and
all the people uploaded their copies in
currencies no And that could be people
can do it people icía but they
can also do a lot of other things
like defines like social networks and like
tokens that in that year the nfts that that
year last year started that was very
very big no and and all these
applications is that that can be done
with with isirium and which is much more
difficult to do for example with
bitcoin
Well and those applications are called like they are
called 10 like decentralized application
there
if they can't connect via WiFi I think that's where
the WiFi key is So if you
have a problem I think
that works well
OK Well yes but that is the the aunt is the
decentralized application and and I know that they are
built on the blockchain and at
least it has like an
intelligent contact the Smart Contract And that is
what we are going to and that is what we are going to see today
how like how we can
write our own Smart control
to start with that and then there is
like a user interface that people
can interact with that Smart Contract
and Here there is like a structure or
like you know if you are from the web you are
from the old world from there How is it a
little bit it is like you can make it
a little bit easier to understand how it
works so if the Front in the we
started here as if you don't normally have
like a decades now you don't have
all your data And again it is who
Google Cloud or Samsung you have it in your
own Maybe
but in the in the structure of diet
you have it in the blockchain Or at least
the data that is very sensitive are very
important because it is very expensive so you
have to think about what data you put
where not and that is why the most important data is
put in the blockchain and then in the in the
non normal ep you have the code you
understand where you can
execute the programs on the server and
now the difference is here we have the
Smart Controls the
intelligent contacts that now are those are
not only also for functions
that are important but that is like in
programs that cannot be changed and
that are executed in the blockchain and
then you also have the background
which is normally almost the same but there are
some libraries like industries
that we are going to use today also a little that you
can With what you can connect with the
blockchain and with How is it as if you
had an idea and you can
communicate it with the data that you have in the
Smart Contract in the functions that
you have in the Smart control
Well yes that is the structure and we
are going to look a little at the
intelligent contacts to that the Smart control today
Well and now by the end of this
presentation we are going to see what are the
attributes of the days that because there are that is that I
know that they are like cases where yes
Where would it be good to create a 10 or in what
case would be better to create a traditional ep
then well that you have to know
that normally they are transparent
So people can see can't also
you can the data can be
in code and not all
the data can be sent in code but people can or
see how how the contract works and
what transactions what transactions
people made are very very transparent
which is different than
normally when people only
have their episode nobody knows what happens to
the data nobody knows how people
interact with it and nobody knows if no yes no they did not
give the data to other
people so for all these things
that could be a case where where It would be
good a while ago because because it is
transparent and also that is also
interesting is that many people like take
code from other people and interact with
with contacts of other people that it
becomes very interoperable no so
many people can interact And that is
because they are transparent and other people
can use it is not that each one has it
on their own server and nobody can
use it well that they are transparent and
then and that is capable the most important thing
immutable you cannot Well yes you can
change if you write it that what it's an
upgrade so yes you can
change it there but if you didn't intend to
change it you can't change it either and
that's what's interesting is that
now people have the security that
it's not going to change and it's like and it's like it
was written I mean if it's not
like a blockchain where someone
commits it
airgex but you're going to make it immutable and
people can't change it and that's the
other thing that's interesting maybe
also in countries like here yes yes many
times people don't know if things are going to
change or someone is going to pay for it or
something like that there it can be
interesting if you have something that is
immutable and no one can change it to
use it for those cases and if you have to
think about those cases where it does make
sense because the houses don't make sense
because it's also more or less slow
located we are not all working so
that it is not so slow and stuck or but
until now it is much slower and much
more expensive if you have your own you have or
something like that no So you have to think
when to use it and when not
well Yes that is more or less the
theoretical instruction and I do now we are going to go to the
introduction to solidity or I don't know if
anyone has comments or questions
about that part
in a
text question they asked me if at one age you
can handle a lot of information Thank you
but here with so many computers and the
redundancy that I see difficult a lot of
data And with great care part and part
No I want that would be the best that
only parts that have that have the
sensitive data Those are the data
that have to be managed by the blogs
in all the other data that I don't know with
only are like no that everything makes
the experience better for that data no you don't have to
put only the data
that is very sensitive like I don't know
yes that are very sensitive like
finances I don't know
Yes you also another thing that can be
done is that only as you can
create like an esh can it get fat So
people know that the data was not changed
but also they do not have to
put all the data inside So it
is only like that you can know if
there is something changed and no but you do not have to
put everything So yes you have to be a
little sensitive with that but also they are
all working to do it a little
faster
well other questions
comments
[Music]
the most important solution that is not has
WhatsApp for like I do
n't know if you understood the question
that in general that it is a
determining factor for
yes Well I think that those would have to be
like something like that no that yes it would have to
be something that
Aaron is people think that it is so so
important that the data is that the
data is secure and giving it can change
and it had to be such an important thing
that that people also don't Or that it
is also okay if you have to pay of
course the time if you already have a redo
a transaction and you want to
interact with that and it is going to be very slow
and so well I don't think it is a
question that I know that it can be that that
God I know because I don't know if people are going to
use it or not but it is like it has those
traders it has to be because of the way that it
is transparent and mutable But on the other hand it
is cao and slow and yes you have to know
when when it is going to be the decision one and
until now more than there are the tones
all the finance applications no that are
that people like because there it does
make a lot of sense that the data is
immutable and also transparent but
yes here at the conference There are a
lot of people talking about
the social networks
in a new way because there too
Nobody wants people like that have
control over that no and And that could be
another other There are a lot of ideas that
can be done but if it is a little nobody
knows if it will work or not
Well now we are going to go to the introduction
and for that and well I am also here
with the remix team that here also there are
very good t-shirts that I don't know
where they are there it could be Yes and and we
can use remix too which is like the
way that almost all the people I
know who entered that space used
remix at the beginning because it is an ID so you
see everything you do
if you can call it functions
inside only with a tie and it is
all very very easy and we are going to
use remix now to learn in
solidity and there is also like a module
called learned and with that we go to
some tutorials and today we are going to
see those tutorials and for that well you
can go here or if not if you already went to that
at&t
there you have to press that link And I
hope that the page speaks so
if you already have it just go here
and if not also you can get it here through
that link So I'm going to wait a little bit and
see if it works for everyone
And also if you have problems you can call me
and well I came
if everything doesn't work
well someone has a problem
yes Well there is the WiFi, I don't know if it could
be that it's a little faster
because
Well I'm going to wait a little longer
and I'm going to try it too so I'm going
to press here after that link
too
and from there if you had to see that which is
called your Lety for beginners and here
are the chapters
well
Yes that is the Remix and we are going to use it a
little more a little later but for
now
yes we are going to use the plugin
called Monday that said that
where it was left
if here it is like there are different plugins and that
is Monday and that we are going to use it with
that dipling you I hope that you already go
directly to that learning solicity
for beginners
tutorials So it works for everyone Yeah
well then maybe I'm going to sit down
now we are going to see at the beginning the
basic syntax that's what we are going to
start and here there are always Like some
missions
at the end of the chapter And this is that
you I hope are not that difficult but
to learn in for you we go a
perfectly
Ah ok
if anyone has the problem I think the
same problem like he has is that they
only go to remix that looks like this
no and from there you can go here on Monday
and here you can import it And here you import that one that
was also happening to him
because
and the direct link didn't work either it
's because it takes so long
Okay there are other people who have that
problem yes Because some
because I don't know why that didn't work
well
[Music]
OK OK So I don't know what the Wi-Fi is like that
you're using
Ok and the other one doesn't work either
the defwith
the purpose
Although
[Music]
the deposit also
for them
for me it's fine the problem for them
here is the purpose is that one that's also
here in the if it doesn't work but I
hoped it worked like this with the direct link
ok it
worked with the other Wi-Fi some people
still have problems it may
take a little while maybe it's
okay and there is everything fine OK So I
hope everyone is well Okay well
And if not Yes you can also see it you can
see my page here and then
maybe you can go here water with other people
and see blessings together
OK But let's start I
hope that you can see it well
OK Well now we're going to see at the beginning
like that is the Hello World contracts not
the contact the initial program that is
very very simple just only for
you to learn it and start to
learn it
what I don't know all the people still have
some problems
Okay well
continued I wait a little
Okay maybe I can see there too
Yes that doesn't work if you go there
yes I think it's just everything is a little
slow with the WiFi
[Music]
yes
[Music] that's what I
can do
is do it
that I put here here
if you have a problem here
[Music]
Ok there are more people with problems
yes here are all the links And yes here you
can also put your address so we
can send it some
parents because to make the cash
[Music]
so you can edit it here
maybe one last time because some
people come a little late
if they are going to say here you can press and you
can change it and you can
put it to your address
[Music]
Here is the link by the hekend no
again the last time and if not maybe other
people here can ask and you can
give them the link
And if you have that
go here it's going to look like this
and you can put your address here
just by editing the day here and here you
can put it and from there you are good to go. They are fine
for now and we will use that later
okay and if you have problems here you
can also ask for some information people who
already did it but I hope that everything
worked for everyone
okay and now now the lions issue you will
also find in that AT&T
only that link had to work
if it doesn't work the alternative is that it
only goes to remix
and from there you can activate the
plugin here on Monday and from there you can
import that group
and well it depends on the wifi it had to
work and there it is called solicity for
beginners
And that is what we look at now
okay if you have problems
maybe other people here can help you
or I can also do like a pause
when when we finish that so there
after when I go
when we finish that contact after
that it will be a small mission and
you can work on that and people who
have problems can let me know
okay well we start with that like Hello
Wells So it is the very very
simple contact for you so that you already
understand the basic syntax not at the
beginning here we see the license no What
license does that contact have and that is not
so important per hour but here they also
have like licenses that you can
see which one is the good one for you
but if you start now no that is not going to
be very important besides you
licenses one that many people use it
Well but if you don't have it it
's not that bad but you are going to have like
a Warning here No it's not a business It would be
good I had like a license here
well that is the first line here and
then we are going to have the keyword
pragma and solidity and there we have that
now we have to that decided which
Celebrity shipment we are going to use to
write the contact and now here we have
in the ceiling I don't know in English
although it tells us that we are going to
use a version in 8
8.3 I leave you 8.3 or higher but no more
than 9 and that is why we have that the ceiling
here because with the with the
big changes like 9
that is empty I had there yes
things are changed that can break and that
the contact can be bought and that it will not
work anymore If you use it with an older sentence I
see with the like if there are like
small changes if you have 4 and 5 there they will
only hit you So if there
we are going to aritziar now but for
paella And on top of that other people want to use
the program and request if it changes very
quickly so to know how it is the
creation with which this time to write it we
have to define we have to decide
which version we are using water
Well then we have here the
keyword contracts it is not like the
smart contact the Smart control like the
name of the program that we are going to write
and if with that we initialize it and
then we give it a name and Normally it is
believed that it is not necessary to
capitalize it but it is like a good
practice and we call it elowell
because it is the beginning of the program and the
beginner program for you and and
if that is the name it is and
then here we have the program that the
Smart contracts m which is very very simple
and there we see here we have a variable and
the variable that we can see a little
later what it means is a m State
verble a State variable And that
means that that variable
the value of that variable we are going to put
in the blockchain that is going to be something that
you will that goes until in the blockchain And we have
that variable and then we
assign a value to that variable and the
value is that it is a String, which is what you
see here very very easy
and we also have to say what
type is that variable and because we know
that it is a String we put the type here which
is String then there is a new thing here
which is visibility And in this case it is
in public which means that we can
access it from
outside of contact
then there is also more for
visibility and what it means but for
now you just have to know Although that
is like the simplest,
easiest thing that you can create
Well that is the contact and we
can also interact with that
Ok well here is a capable that
before we are going to see the mission
that you have only for
you also you can how to use it a
little bit is that the good thing about
remix is ​​that I am going to teach it a little bit
so here the file Explorer and now
We are all in the tutorial So
now that is not that important but
later we will see how with that you can
create new
programs new files solidity or you
can also do it well there would be and well
all these things you can do here in the
file explore then here is the compay la
now we can't compile it but you
can also do it with control and
if you want to compile the contact like
solidity is the hailer a
highlavel language and then that is in the
blockchain is the bitcoin here what the
compayla does and with that we also
know if we have some problems
but it is not that important for now and
then here we have the tap bodyploy and
transactions And that we are going to use
later but now I have like a
Machine like a version of the blockchain
that is in my browser that I can use
And that did it here and now I'm going to
deepploy to put the contact in
my
Demi brother's blockchain by just pressing that
button diploe
and here is the contact
in my blockchain and here now you can see
that we do not have a function to
return the value of Great but it has
But we have a button here not the rest And
that is because if we have
Public visibility with
State betters we also
automatically have that function
But that is not so important
for well you can see that we can
interact with that contact very very
simple well that for now is not so
important
and then we go to come back again for that so
Pau until we start everything all right
just continue with
the tutorial
Okay it's a little small here
so I better start again
here we are Okay now that you
I hope you
understood all of that Here there is a mission that
is
you to vote the contact that and
created your same new contact that is
called now it is no longer called Hello
roads but it is called myconstrict and
also
the variable is no longer called grid but it is
called name And that is important it is not
name but it is name and also still
this guy Twin and we are going to teach him a
value that is he is the new one and well that is that is
the mission Paola so
that you learn it and it is very very
easy I know but it is good for all of
you maybe you can do it and see how it goes
Well I am going to give it like five minutes or
10 minutes
Yes yes you can go to the documentation request
[Music]
and there
always It is good there test
to know how what version is the
best and there Reason
that is the one that is now stable but
that is and it is important if yes if you see it
on Google that you do not only go to
some Aviation because it's always going to be
an old operation so it's
important that you go straight to the milk here
Okay, so yes, I'm going to give it like
five or ten minutes,
let's start with 5
And
yes, if you have problems, something that
and also I think that tablet there, the
remix can also help you if you have
problems
ok, I
think the topic is already turned off
[Music]
Can you put me here Yes, well, it
worked for everyone you can Yes and well, it
had to be seen
Well, very easy, it's
called
only for the first time to see
how to use it,
very easy, no,
there we are
and saving errors So we're fine, yes, that's how it
had to work, if not, I
shouldn't have a problem
Okay, I hope everyone is okay So let's
go to the next
chapter,
primitive data types So now
we know how to create a contact very, very
easily
and now we're going to see primitive data
water, very, very primitive only
and the address, the Heroes, maybe
you don't know it yet, the
other layers that you do know,
yes, here also, one thing that I said to other
people here is that we use the
contacts that we use in that class in
those tutorials are from solicity
example which is a very good project
also with the community where there are
a lot of Best
contact prostheses here you can see like a lot
of contacts that difa and all those
contacts And what we do now
is we go for these contacts
but with a little more explanation
but here if you want to know more Also
here a lot of different contacts and
here we for example now we are
not in primitive data but yes that
also the link is also inside
the tutorial but only for you
to know why we use those contacts
it is something that the community
is creating and the contacts that
were with all the time that they are that
people helped a lot so now we are going to
see the primitive data the first thing
here is William which can be to see
Diego or false and in our case here we
call it
also public you can access
what can be accessed from outside
and the type is that it is here and here we
put it true which is true it
can also be
false false well that for no there is not
much to say there and then we have
something here that is And
that can be capable of learning it is that it is
a little easier
for so that I knew what it means is that
the
sign is like something like
negative here no less than we have like that
is a sign but we the ansaint
is that it does not have So it can only
be like in positive I tell you because those do
not have
something a sign in front of that so that is why it is
called before already And that does
mean that they are that they are not negative
then
Yes and that we have the ute and then with
that then we
can select here how to declare
like how big it is that we have in
that in that variable So here we
can specify we have
8 bits and so we can call it
8 like that and there we put like a number that we
can put inside here they are also
like the rangers that like with
that they can put it inside here in
and if we do not have anything it
is like a it is the same like
256
So that is the same if we put
that
here well And that is Juventus are
positive numbers and then if we can
specify if we know like How big they are going to be
we can specify like that
win which is how many bits and the same
almost the same we have here with Interjet
the difference is that they can also be
negative
and lastly we have the e3 address
which is used a lot in which is the
address that you have as if
like an
external account like one that you
have with one of those here because you
can manage it that you can do things
in the universe
with that then also the contacts
have the address So if
you want to interact with in
contact so you also use That one And
yes the Heroes address here has 20
bytes
And yes that is the size of the heroes and
then also other versions like a
special prayer respect where you
can send receive that is not so
important here the last thing here also
capable and so chapter is not that
important either but only that you
know some primitive data and you are going to
use that data a lot and here the
value that you are going to have like that if it is not
defined So here the bullying is going to
be false you in French I have been while it has
arrived and eh And the address plus that
address
Okay if that's very easy now let's see
here is the mission again
if Create a new variable
that has to be Public which is a
edros and now that is a little complicated
So there you have to think a little
because no no We have the
easy solution here, but you will be able to
do it. No, it's not that difficult either. If you
have to put a value here that
works, you can't put just any
value. But it has to be a value that
could be an address.
So that's the mission. The first one is
that variable, and then a negative variable
again,
which is public. And there you have to
know what the type is. But I think that
after we lived that, you will also
know what it should be. And then the last
new variable is going to be New in. And that's
also a little difficult. It could be. There you
also have to think about what the
smallest size is and also the
smallest value, like this, here they are. Yes, that's the
mission. Third, and the first and the
third, maybe a little difficult.
Okay, but we're going to put 5 minutes again,
what happens, a little more, 7 minutes,
if it's German, so
yeah, okay. You
can also see how yes, yes, yes,
you still don't know the question.
Here you can also
answer.
If not, you can also have more
time later, and you can try it. And
that's why I'm not going to, we're not going to
see the solution. Or if you want, we
can also give away the solution. but maybe
you if you you want to
continue later we
don't see it
we will see the resolution and continue
well let's go
here check answer here the well the
address here the easiest thing would be to
just put the address here which
is the defaultress here but the best thing
would be if you were already using
meta plus you could also copy it into
your class and put it inside here
which
could also work later here that was
easy only a negative integer it
couldn't be
any and then take it out more if the
smallest is the 8 bit and then the
smallest value is from it So if
those would be the solutions for that for
that Mission and
well we continue
Yes but it had to be one that
works which is a a bellet and Siri
address But if the easiest thing would be
just to take it from here an
even easier one to do only
Okay now let's see
if a little quickly to the variables here it
's not something very very interesting something
very difficult and yes but today we are going to see
the easier things and then you
can continue a little so we have
three different types of variables
that we have the state variables that we have
already seen we did not
States although they are those that we are
going to put in the blockchain And if
something changes the value of that
variable that is also changed in the
blockchain and I can also change it
we have to make a transaction that is why
you believe that we want to
change
something in the blockchain And yes Those also
cost money So
and Syrian not money and so yes so
those are the ones of why the state changes
the contact and if that here we have here are
outside of a function then we have
here local variables in which we have
here inside a function and
then we are going to see others also to
functions that will be the next
chapter and there we have like a
teaching function we are going to see in more detail in the
next next chapter in functions
but you can also see that that is like
a variable that only exists in
between this function So it is a crazy
variable Maybe
most of you also know it already
And that would be the Balloons but they are not global
those are verbs and those are the
global ones but yes these are the local ones
that we are not going to put in the in this
case the blockchain will not change they
only exist when we execute it and
call the function in that case too
and then we have the global variables
that and this also someone said that it would be
good if we could have it and in that
Heroes of a and in this choice of a
direction and yes with with that
that would be a little different but those in
global variables are also called
special variables like 100 are
variables that we can use
to know something about the blockchain
like the status of the blockchain things about the
blockchain is more than just
a function for a variable that
gives us more information for example
we have two here one is the blog timesteam
that many people use that there is no
easy way to know what your time
is but the Times blog as it is a way
to know that so there we can know
what the timestamp is that
some maina put like a new blog
and this has the timestamp And that we can
know later here we have that is a very
important one that they are going to use a lot that with
the
point Senda And that is what we call
the value of that
global will have the value of the
person or the entity that calls that
function So with that it is not the person
the entity does not have to put their
address in here but because we
can use that Global variable in
months
with that we can know what the
What is the address of that person yes
the everse of the color and yes and there are a
lot of different
global variables that you can see here
also in the solicitation documentation
here you can see some And that is also
going to be good for the next mission
because there the mission is for you to create
a new variable to be
public state Call blog namba
which is a Us I think that maybe it is not
said here but it is a yunt and
what we want to do is that so the
value
of the current number of blocks of the
State variable blog number that you are going to It is going to
be a little bit capable sounds a little bit
vague But if you come to the
documentation maybe you are going to find
something that is going to work for that So yes so
here we lived in that in that chapter to
different variables not the
global trees and That is good have
played a little bit with those
global variables And yes with the with the link that is
here go back to the documentation and
then maybe you can
find the solution for that for that
mission with that
OK So I give it another
five minutes and I think that after that we have
one more mission and after that we are going to
let's see how how how to
use Script
so one more one more mission and we're
ready with that
Okay
I hope
that was enough time to
see it
if I already had some people who
had
the solution here we have a
public yuns called block number that we have
here
and then here we use that
global variable cycle or global special variable
that we use blog dot number and there it is and
there we have it
Ok we have
a little little time so let's go to the
next
chapter
the last chapter over here
OK Let's see now the functions So
here we have that contact called
simple storage also again it's part
of
example I do
n't know where it is now but
Silvia is here at the beginning and that's going to
be very easy we have like a number a
yen So it's like a the variable is
called it's a
public the
same thing we did before it's also a
State verb state variable and now we have the
new thing that if we only
declare it but no no no no no we're going
to teach a value to sheets So now
we have the functions to make it a little
more Dynamic where what we're going to
give a new value and also that we
have read the value of that
of that variable so that's why
we use a function and the keyword
very easy is also called function and
then we can give it a name in
our case we use the name set because
what we are going to put a new value
then here we have the in the
parentheses here we will have the parameters
for that function that in our case we
call it also
but to know the difference we have an
underscore here So if that is like the
to know that that one is different from that one
but it will also have it we are going to use it
for that and then we also have caress
what type it is and in our case it is
a also because we are going to use it to
enter a new value in in So in
the state variables that we have here
So that has to be the same and
then we have to say again here we have
the visibility so who
can use that in function and if we
put public
for everything they can call it so that
we and all the people in the whole
world can speak I can call it from
outside of contact So that is what we are
going to do to also use it
and at the end here inside the function we
show the value of the parameter
underscore nun to
only in and from there we are very
easy So we could put a new value
to our variable
and now we have here How to read a
[Music]
a state variable and that is why
we created a new function called
get and now in the speakers here we do not
have anything inside because there is only
one we do not have to specify what we
want there is only one thing that we
can return And that is in a and so we do
not have to put anything special here
again it will be public and Here there is a
new thing that is now
a keyword called View and
with that we
can differentiate that function and that is
a new thing about
blockchain that you will not see I think
in other
programming languages ​​And that is that with the view
now we say that we are not going to change the
state of the blockchain we are not going to change
to win only
God read something from the blockchain but I do not
want to change something so we do not have to
make a transaction with that because
we change something so the value that
we have here inside that variable in the
blockchain that is going to change and why we
change it we have to make a
transaction So you have to pay for
that And that is going to be a new part of the
blockchain if that transaction is going to be
part of a blog that is based on the
blockchain And that is because we want to
change something and that is going to change everything
in the blockchain all the people who have
a copy of that so we have to pay
for that but here as we only
want to read it we do not have to make a
transaction well And that can be said
with the word View there is also another
word called Pure that we are not going to
use
today but you will also find it here in
that tutorial if you want to continue with that And
that is worse is that we are going to read something we
only do a computation
But that we are not going to No we are not going to use
sheet and then here we have to define
Now as they are the types that we are going to
detonate and in our case we are going to
return only Juventus because
we are going to return what we have here
from the bags And that is not a United So it is
going to be the Juventus team and
then We are only going to return the
numb with the return keyword return
and well that is it and with that you can
compile it and also
here we can know how it works
we are going to press here
and here with we are
going to put two
and here we have the two
three three
in negative
that doesn't work because it's a Juventus and
here we also have Because it's public
here we also have the other
function that we have automatic that already
said goes to return the value
Well that's
good that was the the final chapter here and I
think here in omission that it is very easy
if you want to do it that a
public State variable called in B Which is
of type Bull and starts with true and
then Create a public function called
getsby that returns the value of B Yes
that should be I think that's going to be easy
no We're not going to have many problems with
that so I'm going to put
[Music]
three minutes
and there was also a question I think not
Okay yes the last half hour that we have so
yes let's see the
solution for that
Okay as we said created a
public State variable called B Yes and
Starts with with true true that we have
here and then we create another
function that we call gets underscore B
And that the That does return the value of B
if I had to see how like that and yes I
hope that you that I think no it
was not so difficult that there are many
problems I saw it is with the one that if you go
to checkenses and it takes a while and the
page
says Time out or something like that so
normally it
should work a little better if
the internet if the WiFi is fast but
if they are going to have like problems also
at home or something like that they can't
notify us And again you can also
just press reload and from there it
should work but yes notify us
if there are problems with that But well
let's see that here as we see
the basic syntax primitive
variables and functions then there are
functions view and pugo that I already talked about that
also like that is the Pure and the View
that we already saw here then there are
modifiers and constructors that
are also very interesting it is a little
more complicated
control Flow yes data structures a
little more
complex
loops there are a lot of other things that
you
can continue there were all that then
we have like transactions here and that is
yes for beginners it is not something that is that
is more or less easy and all those
contracts come from the
solicity example contacts here that I do think are
very good and it is something that
a lot of people use and then also if you
have more interest you can also
see those here in contracts like very
finesigna very interesting things are here
and I think that is going to be also if it is going to
be very good to learn it. We also
have here like the
721 the NFC contact and that is something that we are
going to see now because that is the
desire part of WhatsApp is to see as if
How can we
an NFT and maybe a little we can see that it
is an NFT we do not have that much time
but I hope that we can. I
mean yes Well let's go here
that was the course requested for
beginners but there are also other
courses health courses
and contact of their pastes here it is like a
little more complicated it is like a
contact how to make if a contactor
and its paste that has that that is already a
little more complex But that is now we are
going to see a little in the contacts in
FT only a little because we do not
have that much time
but well I am
not going to go there the introduction
but you can also read it
I hope that I am going to
try to explain a little bit of that
there are two two different tokens and as they
also touch you now there have
been how to create smart contacts
And with those smart contacts you
can also manage tokens and the
tokens that I hope that one of
you knows it is that it is
heard of NFTs and those tokens have to
be managed somehow and that is what they touch, they
also handle little contacts like the
contacts that you saw it no And
those contacts people write it and
then they have a token and then they can
do things with it they touch if I already
explained at the beginning that there are those
coins the Jersey
2020 tokens that were very very popular in
2017 that there people we did a
lot of Oh God in our touring
their coins outside as a
contact wrote about coin tokens and then
Yes then he said that they are going to do something with
that well that was very very famous in
five years ago and now that it is very
famous in recent years are the
NFTs the difference is with the fungible
that all the tokens are the same it is
like a currency and the Non about token
all the tokens are different so
for example if you want to create a currency
or
something like that it could be that they are all the
same and you can exchange it But if
for example you want to put
an I don't know a a a a work part or something
that is special It's different you use it with
an NFC
yes And with those contacts that also pay
that are interrogable and people
can like it in
their wallets or they can also
interact with these contacts so that
all those touches can be
used can be used on the ecosystem That's why there is
a token standard And that
is the standard called like
yourselty
event and it does 721 for those for
Netflix and we are going to see a little
and it does
720 and I think it's here well That They have
the interface So they have functions
that everyone who has the one who uses that
standard will have their functions and
That's good because that way yes if
you create something back you can do it for
example if you want to interact with
a wallet Or if you want to interact with
another contact you know that it will have its
functions and you can use it Well let's
see here there are also events but we are
not going to go into that there are like
functions for example velens of a where
with that function you know
someone's address How many of
those tokens Those people have and that is
that function lazy has the function 1l
So every token in the nft
standard has a token ID So you
can
minus a new one in this and it's always going to
have another Haiti and so you can know
which of that Haiti Who is the owner of
that What is the address of that
and then you can also transfer it to
another person which is a very important function
here we don't have another way
also
that means that other people can
manage the tokens for those people and
here you can see it like this
And yes that well I'm not going to we're not going to see
everything everything everything is in total but what is
important is that you already see there are not so
many functions there are some that are
important and those that the
officials that you if you want to use
the one if you want to do your same send
Instagram your same touch in contact you
can use those or you are going to use That that that
standard for other people you may
like and an implementation of that
standard we have
here from Open which is
a very famous company to
make contacts that a
lot of people already have many outlets
many people see it see it and you see and everything everything
everything worked And that is an
implementation of that For example where it
goes to have all those functions that we
saw like the proof but we burned
ourselves it was And then and what we see
now is that like
something implemented all the
functions And even more that they have
inside here
Well that's like a contact
in this and that can be done Also
in remix that is very good is that for
example here we
use an Open contact from that
system here and we only import it
from the remove from them and here we create
our same Jersey
the same in contact and it looks like this it does
n't have much more than that because we
use everything that implementation of
them we give it a name we have a
symbol and here we put where where we
put the metadata
well that's just a very
very quick introduction by those at Netflix And if you
want to see more you can see it in
that course it also has the function here
mint So it creates a new token a new
token with an ID a new nt of that
contact
but I wanted to explain that because what we are
going to do now is that we go to a
remix nft which is like a rewards And
that is also another thing that you can
do with remix is ​​to interact with with with
with
excited a scripts and a Script So we
can use a library like
ISIS and with that we can write
javascript as well or type Script in this
case and we can well in that case
the inheritor And that's what we're going to see
now that it's not going to take long but
maybe we're going to have some
complications with it with the WiFi and
that's why it might take a little longer but
yes but I just wanted to give an
introduction to the nft and you
can also ask later like if you want to
know more about it but to know that it
's not that complicated and and you can you
can use contacts that already exist and
we use a contract like that to
give them
Okay well what you have to do is more or
less
even that we register here I hope
that each of you have already put
your address here and I can see that there are a
lot So I hope so what
we are going to do first
So I'm
going to go here
let's
see ok
here we are in the file Explorer and Here there
is a button here to
clone a git repository
here we have to put the
And that is the purpose that we want to use
So that's what I'm going to clone that is
that you are going to find it here
Ok that is this one that said that it may
take a little while
the deposit is a YouTube and
where it is going to give it
if it is
here we already have it you are going to find it here they
are the contacts
if you have yes yes if they
cloned it you are going to find it here and here you
see it we have now it worked
here we have with control and here we have
that contact remix rebound upgrade And that
is a contact and here you are also going to see
that here we also use a lot of the
Open contacts too and that is also
like an nft contract a little more
complicated it may be but here you can
see it but there is no that we are not going to
go over that and now we have to compile that you
can do it like this and that may be that it is
going to take a little while too
Ok that looks good
So we did that clone
birthday and water let's see the Script that we
want to use
let's open the explorer again
and
here we have clips
and here we have the remix too and that is
the Script and here you see that that is
typescript here too
And we have here we imported
a very famous library to connect
and here drown we have the
contact address that contact that you
see here we have already deployed that is Life on
a
therion blockchain in optimism
and then what we have to do is
connect with that contact and we
want to call the savement function
here and for that we want to mint an
nft to a new address So
you the address that you put
is
in here inside I for example put
that
now You can put it in here
and now written it should be ready
now the last thing we have to
do is
connect your optimism So I hope
you saw here to the introductions
here that you can install meta more you
can go here just press Connect and
then they should be connected here to
Optimus It should be optimism here
and now
here you can connect to
optimism as well and here we are going to
use that private ingredient metamask
which means that we no longer use the
shower but we use
the connection that we have as a goal more
than in our case it is the connection to
Optimus
and
now it is that address that has a
little bit of easer here we also see that
we have a little bit of Optimus nicer So
that should be enough
and now we can run
[Music]
like this Now you see that it issues more it tells me that I have to
sign
that transaction
here
and now we see if everything worked public
mint looks good
and here We also have that remix rewards
here below it is like a page to see
the rewards
and I
see if I am already here I
have to connect
if maybe it takes a little bit but it
seems that
here it worked
interacted with the contact and I have that
token
well that was like if like
that particular Script and now I don't know
now I think we are almost ready with
time we are a little more than the
time So if that does not work for
you also I thought that if some
people want to continue with that and
because I know that the ghetta here is a little
slow we can also go
to the hacker space down below and you can try it
there and for her for a few minutes
if you want to try it and we
can also try it
but I don't know if you have any
questions
are trying them and have problems
somewhere let
me know
or so I can see that everyone is doing
something
So I hope it works
or that the question was
that Well after connecting with meta
more that in remix just
run the scripts So I just
went here and pressed that button
but if we have to have it
connected with meta more than you see here
And if we have to be in optimism that
is here which I think is the case 10
Network
and you have to have a little bit of is So you have to
see if you have a little bit of ID
because if not it is not going to work
if not no no you do not have enough is you are going to have
a business here that is said
insufficient I think
the contract is that you that
you do not know but that is that we have
like a whitesst Where did we put the
addresses that you
put here So
you think you can with that
address you can
less an nft2 in Netflix
or no more than that so you can
run it twice But just like that
also for another person if you want you
can
from what to I
think it is one but I don't know
the truth that I don't know I think that
here we have the end here I can open
the contacts that is the contact that
I compiled
that is the contact that you can that you
have to compile and then here there are
scripts that are in typescript that there are that to
run after that compiled and it has to
be connected with metamask by
itself And this should be all to the front part
also also connected to optimism
Ah no the image can't be changed
because half of Data is is is
in contact it can't yes they are in contact
sometimes it says that it can
but but like this no
OK Well I think I don't know what's
next
no there's nothing after OK Well then
also I think you can it's a little further
here but there is official WhatsApp finished
but I'm going to be a little further here if you
have problems you can see it but yes there are
like the t-shirts there and if you want
yes Just continue with it with
WhatsApp and now thank you for everyone who
is Here it's very good until
next time
[Applause]