Replies: 1 comment
-
Hello @tschnide sorry for the late reply. which already declares the array of contract SimpleStorage, and also you are not assigning that instance to a new variable you are assigning the instance to the array. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, in lesson 2 at about 2:19:00 in the video it goes over this function:
I'm curious about what's happening in the body of the function here
SimpleStorage(address(simpleStorageArray[_simpleStorageIndex])).store(_simpleStorageNumber);
Since it's storing the number using the
.store
function from SimpleStorage, it seems that passing the address to SimpleStorage creates a new instance of SimpleStorage. How can you just call SimpleStorage without thenew
keyword or anything? Can you just pass an address to any contract like this and then interact with the contract stored at that address? Thanks for any help you can provide!Beta Was this translation helpful? Give feedback.
All reactions