-
Hi, I was doing lesson 2: Storage Factory and I tried to implement sfGet() on my own. I ended up writing
Is this correct? I don't use the address() to access the specific SimpleStorage contract at the index in the array, but when I test it seems to work correctly. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @nigeltims well there isn't just one way to code, or to resolve problems so if this worked for you, that's completely ok. Best Regards, Cromewar. |
Beta Was this translation helpful? Give feedback.
Hello @nigeltims well there isn't just one way to code, or to resolve problems so if this worked for you, that's completely ok.
However is also true that is best practice to access directly to the addresses rather than indexes on arrays, if you are interested about good practices with solidity, please read this.
Best Regards, Cromewar.