Does a selfdestruct affect child contracts?
Clash 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?
selfdestruct
add a comment |Â
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?
selfdestruct
add a comment |Â
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?
selfdestruct
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
selfdestruct
asked 2 days ago
hefeleal
284
284
add a comment |Â
add a comment |Â
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.
Thanks, do you have a source or maybe even a concrete example where this is the case?
â hefeleal
2 days ago
add a comment |Â
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.
Thanks, do you have a source or maybe even a concrete example where this is the case?
â hefeleal
2 days ago
add a comment |Â
up vote
3
down vote
No. selfdestruct
of a contract does not effect any contracts created by the contract to be destroyed.
Thanks, do you have a source or maybe even a concrete example where this is the case?
â hefeleal
2 days ago
add a comment |Â
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.
No. selfdestruct
of a contract does not effect any contracts created by the contract to be destroyed.
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
add a comment |Â
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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password