-
Hey everyone, Just starting learning solidity and have been following the course for the past few days. I am currently on lesson two but I am getting super confused due to the words "Simple Storage" being used all over the place with essentially just changes in the capitalization. Is there another resource that describes the concepts in this lesson that uses a better example? Or any tips on how to better understand this lesson? I am just getting super confused. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @Grvtian For example you have the contract:
then when you import the contract and use something like: simpleStorage = new SimpleStorage() simpleStorage is the name of the new variable/implementation of that contract. I hope this info might help. Note: you will see this more often when using python since lesson 4 ;) |
Beta Was this translation helpful? Give feedback.
Hello @Grvtian
For convention the names starting with upper case like
Simple Storage
is for declaring superior data types or classes (contracts) and when you use the same name with lower case you usually are referring to a implementation of that data type.For example you have the contract:
contract SimpleStorage{}
then when you import the contract and use something like:
simpleStorage = new SimpleStorage()
simpleStorage is the name of the new variable/implementation of that contract.
SimpleStorage() is just the reference to that data type.
I hope this info might help.
Note: you will see this more often when using python since lesson 4 ;)