Solidity Basics

what does the error message in remix say? the red x…

I’ll give u one clue. Indentation. Your error is not at line 23, it starts at line 14 i think.
I believe solidity needs the indentations to be correct to run. I might be wrong but it’s worth a try I think. :wink:

Good luck.
Ivo

1 Like

Hi @Mark1
Solidity doesn’t take the indentation in consideration, but indeed look at where you are openning your functions and where you are closing it.

You will see that a line 14 you are closing the function setMessage, using a better indentation will help you to see that you are not closing your contract bracket. This is your error.

3 Likes

Thank you, will take a look.

Thank you. Was doing this in bed last night, was like spot the difference game with mine and @filip code :slight_smile:

1 Like

OMG! Filip! This is awesome to have this utility “remix” to build smart contracts. It was in 2017 when I started reading about (blockchain) smart contracts (POW/POS). Now, I get my first opportunity to learn what its all about. Thanks Ivan on Tech Academy!

1 Like

Does anyone know how to backup smart contracts written in Remix locally?

2 Likes

Hi David.

That’s right, In Remix we can open files form local storage, but not save to local storage, It’s strange I know… So my solution to just copy&paste the code into Atom editor.

That’s how I do it. I hope this helps you!

Ivo

2 Likes

Thanks Ivo, good idea.

1 Like

I cannot get the remix IDE section to color code my program text like in your videos. It is all black only even with .sol extension

2 Likes

@filip can you help?

Hi. It would be easier to help you if we see the code?
I can only guess, so look for spelling errors in your filename.

That happens when you don’t give the file a proper name the file correctly.

Or try to create a new file and name it something like Hello.sol.
Then it should work.

Ivo

Filip, amazing explanation of mappings!

Yes this is very interesting term “mapping” that is utilized to search using the “public” or “private” key to find a specific “value”.

1 Like

Hey, I was wondering about the gas price. Since theres a lot of defi and future growth in Ethereum potentially, if the price of ETH goes up a lot, wouldnt gas prices rise a lot? Do you think this could be a problem with respect to costs of smart contracts and more complex contracts with a lot of parts?

1 Like

I had .sol with a capital S it’s fixed now

1 Like

the gas prices fluctuate already, so yes that is definitely impacting the DeFi systems.

@filip Really like this course and your teaching style. You also tought me indirectly how to open my own account on GitHub, which will be very useful as well. Love the small steps we’re taking. Makes it easier to digest.

1 Like

@filip You say in the intro to the course to use version 0.5.12 of the compiler. It is now only 7 months since your recording and they offer 0.6.6 as the latest version. That is 12 new releases in that short amount of time, which obviously shows the dynamics in this new field. To your knowledge are there any major changes, that maybe you could touch on in one or two additional videos.

In the video about mappings you mention in the end that there is a bug in the code and that there would be an assignment to work on that bug. I couldn’t find that assignment. The next step comes up as a multiple choice quiz. What bug were you referring to?

@ivga80 @David_Wyness - I am using Brave and I just right clicked on the tab with the name of my .sol file and it gave me a ‘save as’.
image

3 Likes

Hey @filip or anyone else who might be able to help. I’m literally only at Hello World and I’m already having issues. I don’t see the same options on the left on Remix as I see in the course. I tried an older version but that looked totally different. Any help?

AAAAND never mind. Got it. Had to click Solidity. Thanks.

1 Like