When we write a smart contract, we can use the keyword new in the code to generate an instance of a sub-contract. I want to know whether the instance of this sub-contract has an address, and can external addresses access the instance of this sub-contract?

Hope you can give me some help, thanks!

  • 1
    Of course it has an address, what else? And other contracts / accounts can access whatever functions are exposed by this contract (public or external). In fact, there is nothing really "sub-contractish" about it, except for the fact that the initial deployer account is the "parent contract". – goodvibration Dec 11 '20 at 12:21
  • Thanks for your answer! I understand the problem. – wei wang Dec 11 '20 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.