-
Hi everyone! I'm doing the Cyfrin Updraft course on how to code smart contracts in Solidity. Here is the code and then my question: // SPDX-License-Identifier: MIT contract SimpleStorage {
} I cannot input the values into addPerson and then get the output on listOfPeople. It just returns nothing. I asked ChatGPT why that is and it said I have to manually add a getter function. But I went back and it shouldn't be necessary to do that, since I added "public" on line 12 in the code. I asked ChatGPT about that as well and it said that's correct that you don't have to add a getter then, but you still have to do that to run the code? I was a little bit confused. Is there something wrong with the curriculum or did I just miss something? I'm just trying to learn everything correctly and not skip anything. Would be grateful if someone could explain this to me. Thank you! // Elias |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello @ElijahT5C, So I copied your code and ran it in Remix, and everything worked fine for me. So I am unsure what the problem is for you. Maybe add a person and try to retrieve the person and show your remix, as I have shown mine above, so we can maybe catch the issue with your process. |
Beta Was this translation helpful? Give feedback.
Hello @ElijahT5C, So I copied your code and ran it in Remix, and everything worked fine for me.
So I am unsure what the problem is for you. Maybe add a person and try to retrieve the person and show your remix, as I have shown mine above, so we can maybe catch the issue with your process.