Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
In his lecture, I gave you some additional information about the Ethereum blockchain and design will
continue its own practical stuff.
So what about to create a smart contract?
OK, let's do it.
Let's go to our browsers.
And the president will create a smart contract in a remix IED, so let's open it up and let Sergio for
a remix ethereal remix if he so remix is.
Interactive a development environment.
All right.
And you can access it here.
Remix dot Etherium dot org.
Let's access it.
And with the right mix, if they can do powerful stuff, we can kill a smart contract, we can deploy
them also to Maine, that's to the test.
That's and we can test the smart contracts we can.
And also we can deploy, as I mentioned, we can also create a smart contract and deploy today to the
Maine, but we'll be using it mainly for testing purposes to show you some basic stuff.
OK, so there's that remix I.D. and we'll go.
You shall have the air of some folders on the left side.
I hope it's visible and they can zoom within, I guess.
All right, so on the left hand side, you have a you there.
What we are interested in is only contracts folder.
I was going to create any contractual decorating contracts later in our coding editor and now they can
because here is some contact that are already created here for us.
In some cases, something has to change and you don't see how these contracts don't don't worry, you
don't need to do actually anything here.
You don't see this contract because of what my screen and see what I will be doing later will be coding
the contract.
You are coding ed.
OK, so this is here a very simple smart contract called cloud storage.
OK, so as some maybe some similarity with JavaScript or also other programming languages here are getting
usually classes right.
And in a smart contract, you are creating contracts.
OK, so that your main JavaScript, you would see maybe something like this class storage.
Here you see that contract storage.
Here you see the structure called into 256.
This means unsigned integer 256, which is the integer of two hundred fifty of bits length.
OK, that's a number.
So we'll be starting some number here.
You have here two functions.
You don't need to know any details about them.
You just need to know that their functions.
One function is to starring in numbers.
You are showing the number there is getting into the number here.
On the storage level, function is used for retrieving this number from here.
So very, very, very simple.
Smart contract, just just serving us just as simple storage of numbers and doesn't have any really
very practical usage.
You know, big, big, big scales, but it's very good for it, for testing and just to show you some
basics.
All right, so that's not a smart contract, but 21 to interact with a small smart contract they any
to deployed to the network.
OK, but how can we do it?
Actually, first thing we need to compile it, we need to compete in the bytecode.
As I was mentioning, we need to create a better representation of the smart contract.
So if we get a smart contract to, we need to transform it into bytecode.
Also, the bytecode in much detail.
So we're talking in the Olander lecture.
OK, so compile this smart contract.
I think we can explain it here on the left hand side, and also I didn't tell you here this program
is just specifying a version of the compiler for this so solidly to file.
OK, so it has to be larger than zero point seven zero and smaller than zero point nine zero.
The compiler?
OK, so now let's go to the left hand side here, too, that is solidly decompile that are here.
They are specified in a version of the compiler we have here multiple versions.
I'm going to go with the zero point eight point four version.
You can also click at the same Brigida.
And what we'll do is we'll compile storage.
Dot solemn gave going to change your anything.
Language will stay.
Same EMV variant will stay the same.
It's a composite file.
The ADF will also what's what's very important about the bill be we'll handle it later.
I'll be talking about that even later.
OK, so let's compile this storage dot sol into bytecode essence and click Compile Storage.
Actually, I got here earlier.
I was expecting to see here a result of this compilation process located here, but no worries our contacts
will be complete anyway.
You can see here this a green checkmark.
Everything went good, so that's that's actually all right.
OK, so code was compiled and we can see here compilation details just yet.
If you don't say much to you right now, but I want to show you that a quick compilation details you
can see the bytecode of your code, and here is the the code, which will be deployed to Etherium blockchain,
basically.
OK, so you can see the sequence of hexadecimal the hexadecimal characters, and that's it.
That's the code you see here.
The storage in this, a high level of programming language compiled into this is bottom line.
The bottom level, this a base level.
OK, so into bytes, into segments of the bytes in each bytes that you can reference as the up code
or operation code mean something else?
But how about this, like our guys, I just want to show you that this called what you see.
It's compiled into this up code six zero eight zero six zero four four zero and so on.
This will be deployed to ethereal.
OK, now we want to deploy the smart contracts.
When you want to deploy the whole goal here onto this menu here or deploy and run transactions as the
environment people choose their JavaScript or machine.
So this means this smart contract, there'll be no there are deployed into any any blockchain to any
network, but it'll be around here locally in the JavaScript.
So there will be some kind of simulation.
It also accounts created for us.
We have a couple of times we can we can use and each account has 100 Ether.
All right.
And then we have some guys limit about gas limits and we'll be talking a lot there because that's for
a separate lecture to what I can tell you now, because Limits serves as their way to pay for their
transactions because in Ethereum network going to pay for that transaction.
So then you want to create a transaction or you want to deploy smart contracts only to pay for it,
and you are using this gas units here for it.
But about this, OK, I'm saying all those later, but you need to be patient.
You need to get through that.
All of the lectures.
OK, so then we are happy with the settings, which are the default settings should be completely fine.
We can click here, deploy and it will be deployed to the network.
Of course, everything went fine because it was a simulation.
And but you can see here when you click on the right side that the transaction has to be made.
OK, so you can see it through transaction amount and execution success.
Here you have a transaction hash.
What does it mean also?
Well, actually that are very important part of the of the of the crypto network so that these will
handle in a separate lecture.
What's important here is that the transaction was made from this account you can sit here from and that's
the account here.
This is 0x five the traders account the transaction has been made from and you can see we have paid
for a transaction because we don't have any longer at 134, but we have ninety nine point ninety nine
point ninety nine.
OK.
And there's also gas we have to paid for before and execution costs.
That's not really important, but what's important here is that from and the two and a two here you
can see there is no other us because then you are deploying smart contracts.
The recipient of the of the.
Typekit Alvarez is basically zero other, so this will be not any of this, but this will be zero and
that 32 or 64 zeroes in the case of 64 by the 40 zeros because that addresses to 20 bytes.
OK, so when you are creating smart contract, I can actually drive it here.
When you're creating smart contract Ebola shows here, then your paper?
OK?
So and you're getting smart contract, you're getting transactions, rights are getting transaction
and you need to provide from front is your address from which you are creating transactions from.
So this will be your user, otherwise too many bytes here.
OK, 20 bytes.
But too many are deploying smart contract will be empty, others zero and zero zero zero zero zero zero.
And will have a 20 of these characters because we had actually forty of these characters because it's
so small, it's a little bit in total 20 bytes.
OK, so that's how it's basically is.
OK, and the other parameters to talk about right now, what what's important to the contract is they
put another can interact with the contract.
So on the left side, now you can see here, you can see the storage contract.
Now it's residing at this address of a new venue.
That's my contract.
It's the contracts assigned some specific address here.
You can see zero, except the 91 and so on.
That's the contract is residing.
What we can now use here is this two functions store and there are three.
Those are two functions here a store.
And the retreat will start again, so no, I wasn't there to become the editor of the No.
So let's start here, some number, let's click here to have a little more this year.
Clear it out, screen and story here.
Number 10, let's say, and I will click here on Start.
I just click on this.
And as I told you, when you want to interact with the Etherium, what are those changes in a state
you need to send a transaction and transaction has to be mined.
So essence, I will click here to start a new transaction.
It will be sent.
You can see here is transaction through transaction amount and executed on succeed.
OK.
And then, yeah, the execution of a successful.
You have here from that's my account here.
This will be the second I showed you before this account here that's bothered by the people selected
and the thought now actually, this story is that is the address of some of our smart contract, so
it can see zero exit the nine or nine one four.
And that's that others.
Here are those of a smart contract that can sign up left the bottom side.
You have paid some gas for a transaction as a as the input.
Here is this hexadecimal sequence of the bytes your this input is basically the function you want to
execute if you will transfer it, if you will transfer it into Ramallah, no electricity, it would
be this sort of function you want to basically call here or function.
This is input.
OK, and here we can see how that input, that's their value are sending value of 10 and they're calling
sort of function with the standard so that this is start.
OK, so distance is 30, and we can verify with certainty we'll get to the transaction, OK, maybe
we'll get some value.
OK, so let's clear that out, OK, and we can retrieve the value as well.
Let's get retrieve as it looks like he'll retrieve.
You can notice here a very interesting thing here.
Now, I don't see any transaction I can see here something called call.
And you can see no transaction has been mined now, but we have been clicking here star.
We have been storing.
We have been changing Ethereum's state.
We have to create a transaction.
They have to pay for that transaction to do the changes in Ethereum's state.
But in the case of the reprieve, we didn't have to do this.
We just simply got the number 10 back.
You can see here it goes back number 10 here and elsewhere, but I'll get here.
I should get here.
Then, who can see the output below the output of 10 does a thing.
Then you want to do changes in the Imperium network in your theorem, state your networks and the transactions
and it's paid for them.
But when you want to get a data back from Ethereum network, you don't need to pay for them because
they simply they'll get them.
OK, so for a while, you need two transactions for the other one.
It's called usually different as a message call when you are getting some values and usually these functions
that are required to pay for them.
That's not required to create a transaction for them.
They are marked here as the view functions.
View function means that you are not doing any changes to Ethereum's Ethereum's state.
OK, but that was just a basic overview about a smart contract to have a smart contract.
Now it's residing on the Ethereum network, but they want to interact with that contract.
We need to, of course, was deployed and then need to send the transactions to a contract.
I've been to specify what functions we want to call.
In this case, we have been calling a function and we have been sending in the value value.
10.
This story is number 10 to the number assigned to the storage here and with the directory functions
and then they call directory function to be didn't have to send the transaction, but this was the message
call.
Got back the number of back from the storage.
And that's a simple, the simplest example of smart contract.
I think the best way to learn is by creating and buy practical examples of internet like tools that
will initialize our private network in our local computers and will be creating a of smart contracts.
And we will learn a lot about them.
So guys, that's going to be it and see you in the next two years.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.