All language subtitles for 008 Read And Write To Smart Contract_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

All right.

Now, you have deployed your first smart contract.

You know what is in the compile tab.

You have the right compiler, which is the same as in the primer line.

If auto compile on and we ran our transaction in the deploy and run transaction tab on the JavaScript

VM.

Now all of this is fine, but we didn't change anything.

We didn't do anything with our smart contract, which is deployed a smart contract.

And in this video I want to go and actually change that string to something we can input as a user after

the Smart contract is deployed, of course.

So I'm going to revert this to Helloworld and we are going to add an additional function over here.

We make this a little bit bigger

function.

Every function starts with a keyword function and then we say, update our string.

This one will get one argument that is another string.

And in this case, it's important to add the memory location.

More on that a little bit later.

And we are having an updated string.

I like to make this underscores there that you maybe have seen and some of the.

Code that is out there.

And the reason for that is if you are interacting with outside JavaScript, then it becomes a distinct

difference between getting writing a variable or reading a variable from solidity to the outside world

with the underscore, then directly inside JavaScript.

That is just my style.

I think there is that there is a style guide for this and I don't think it doesn't mention anything

about underscores or so anyway.

So you can name this variable you have of the type string, it's strictly typed and you even have to

give it a location, which in this case is a memory location, which just means that it is our working

horse cheap memory that this variable resides in.

Now we also have to give it a visibility.

More on that again later on when we are writing the first project.

In this case, it is public.

It is not going to return anything because inside solidity you cannot really return anything to the

outside world.

You need to events for that.

Also, we are going to talk about this more in-depth and then we are ready to update our string.

To update string.

Great.

You see, everything still compiles and when we hit deploy, then we can see.

And here in our instance, we have now two different buttons.

One is for the Helloworld and the other one is to update our string.

That actually requires us an input field.

So if you just hit update, it still does it, and then it will overwrite the string with an empty string.

And if we can also make this a little bit bigger so it's more clear what is going on here.

And then we can just say hello from earth and then hit transect and then our string is updated to hello

from Earth.

Now again, you can see everything here is with a call against a blockchain node.

The blockchain or in this case is the JavaScript environment.

So there is no real blockchain node.

You're directly interacting with your browser here, and you can also see that there is one thing with

a little check mark and the other one with a little call.

That's a major difference between a writing transaction, something that would actually cost you money

to get mined.

It's to be sent to the transaction pool.

Then a miner needs to pick it up and then it gets mined and it gets baked into the blockchain.

And the call I call is a reading transaction.

It is still a transaction, but it's virtually free because it's against your blockchain node.

And every blockchain node that is participating in the network has the same information.

It's basically the whole point of the decentralized part of this decentralized ledger.

So everyone has the same kind of information running on this machine, and in your case, you don't

need to query any other thing.

You basically have a copy of the whole ledger and you can directly look into it, but it's still a transaction,

it's just a free of charge, and that's called a call.

If you open it up, you can see that this is from address.

It goes to a specific address and has an execution cost.

Doesn't really matter because it's a call.

But over here with a transaction, you have an execution cost which is in gas, which is very much like

like very much like kilowatt hours for electricity, which you then pay with money.

The whole idea there is the same.

It's an abstraction.

More on that a little bit later.

And you have data that goes in, data that goes out logs and so on and so forth.

And that's the point of this this video here to tell you a little bit more about how you interact with

your smart contracts, how you read and write to smart contracts, what is the difference between a

reading and writing function?

And with this, we can, yeah, conclude our solidity basics and remix and environment section and we

are going into an actual project.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.