Does a selfdestruct affect child contracts?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Say, I create a smart contract A and this contract creates another smart contract B. If I call selfdestruct on A, will this affect in any way contract B? Or can I still call functions on B after A is killed?



I found this example on Etherscan:



  • Original contract A: https://etherscan.io/address/0x14fea711dca8fcea6be47e14ea1406384f18c7cc

  • Contract B created by A: https://etherscan.io/address/0x02820e4bee488c40f7455fdca53125565148708f

Contract A is selfdestructed and therefore has no code anymore. B also has empty code, but it does not have the red SelfDestruct label on Etherscan. So did the SelfDestruct of A lead to a deletion of B's code or is this just coincidence and this contract B never had any code associated with it at all?










share|improve this question

























    up vote
    1
    down vote

    favorite












    Say, I create a smart contract A and this contract creates another smart contract B. If I call selfdestruct on A, will this affect in any way contract B? Or can I still call functions on B after A is killed?



    I found this example on Etherscan:



    • Original contract A: https://etherscan.io/address/0x14fea711dca8fcea6be47e14ea1406384f18c7cc

    • Contract B created by A: https://etherscan.io/address/0x02820e4bee488c40f7455fdca53125565148708f

    Contract A is selfdestructed and therefore has no code anymore. B also has empty code, but it does not have the red SelfDestruct label on Etherscan. So did the SelfDestruct of A lead to a deletion of B's code or is this just coincidence and this contract B never had any code associated with it at all?










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      Say, I create a smart contract A and this contract creates another smart contract B. If I call selfdestruct on A, will this affect in any way contract B? Or can I still call functions on B after A is killed?



      I found this example on Etherscan:



      • Original contract A: https://etherscan.io/address/0x14fea711dca8fcea6be47e14ea1406384f18c7cc

      • Contract B created by A: https://etherscan.io/address/0x02820e4bee488c40f7455fdca53125565148708f

      Contract A is selfdestructed and therefore has no code anymore. B also has empty code, but it does not have the red SelfDestruct label on Etherscan. So did the SelfDestruct of A lead to a deletion of B's code or is this just coincidence and this contract B never had any code associated with it at all?










      share|improve this question













      Say, I create a smart contract A and this contract creates another smart contract B. If I call selfdestruct on A, will this affect in any way contract B? Or can I still call functions on B after A is killed?



      I found this example on Etherscan:



      • Original contract A: https://etherscan.io/address/0x14fea711dca8fcea6be47e14ea1406384f18c7cc

      • Contract B created by A: https://etherscan.io/address/0x02820e4bee488c40f7455fdca53125565148708f

      Contract A is selfdestructed and therefore has no code anymore. B also has empty code, but it does not have the red SelfDestruct label on Etherscan. So did the SelfDestruct of A lead to a deletion of B's code or is this just coincidence and this contract B never had any code associated with it at all?







      selfdestruct






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 days ago









      hefeleal

      284




      284




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote













          No. selfdestruct of a contract does not effect any contracts created by the contract to be destroyed.






          share|improve this answer




















          • Thanks, do you have a source or maybe even a concrete example where this is the case?
            – hefeleal
            2 days ago










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "642"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fethereum.stackexchange.com%2fquestions%2f58450%2fdoes-a-selfdestruct-affect-child-contracts%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote













          No. selfdestruct of a contract does not effect any contracts created by the contract to be destroyed.






          share|improve this answer




















          • Thanks, do you have a source or maybe even a concrete example where this is the case?
            – hefeleal
            2 days ago














          up vote
          3
          down vote













          No. selfdestruct of a contract does not effect any contracts created by the contract to be destroyed.






          share|improve this answer




















          • Thanks, do you have a source or maybe even a concrete example where this is the case?
            – hefeleal
            2 days ago












          up vote
          3
          down vote










          up vote
          3
          down vote









          No. selfdestruct of a contract does not effect any contracts created by the contract to be destroyed.






          share|improve this answer












          No. selfdestruct of a contract does not effect any contracts created by the contract to be destroyed.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 days ago









          Rob Hitchens

          21.8k43368




          21.8k43368











          • Thanks, do you have a source or maybe even a concrete example where this is the case?
            – hefeleal
            2 days ago
















          • Thanks, do you have a source or maybe even a concrete example where this is the case?
            – hefeleal
            2 days ago















          Thanks, do you have a source or maybe even a concrete example where this is the case?
          – hefeleal
          2 days ago




          Thanks, do you have a source or maybe even a concrete example where this is the case?
          – hefeleal
          2 days ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fethereum.stackexchange.com%2fquestions%2f58450%2fdoes-a-selfdestruct-affect-child-contracts%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          What does second last employer means? [closed]

          Installing NextGIS Connect into QGIS 3?

          One-line joke