Skip to content

Deploying contract from within a contract. (is it really "Deploying" ? ) #3228

Answered by EngrPips
EdwinFairchild asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @EdwinFairchild, This simpleStorage = new SimpleStorage(); actually deploys a new SimpleStorage contract to the network. If you say it is instantiating a SimpleStorage contract, that is technically correct, I think. When you want to interact with an already deployed contract, you get the address where the contract was deployed to, and then you wrap that address with an interface, which is actually you creating a contract object from the address and interface that is not a deployment of a new contract. Please ask questions if anything is confusing.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@EdwinFairchild
Comment options

@EngrPips
Comment options

Answer selected by EdwinFairchild
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants