Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove selfdestructs #25

Closed
spalladino opened this issue Oct 4, 2018 · 5 comments
Closed

Remove selfdestructs #25

spalladino opened this issue Oct 4, 2018 · 5 comments
Assignees
Milestone

Comments

@spalladino
Copy link
Contributor

spalladino commented Oct 4, 2018

Until we support initialization of logic contracts in zOS, self-destructable contracts are open to being accidentally killed (see https://github.com/OpenZeppelin/openzeppelin-zos/blob/master/contracts/drafts/BreakInvariantBounty.sol#L68 for an example).

We should remove all selfdestruct calls from the oz-zos codebase.

Thanks @cwhinfrey for the report!

@cwhinfrey
Copy link
Contributor

Sure thing! 👍

@nventuro
Copy link
Contributor

nventuro commented Oct 5, 2018

What do you propose we do in this scenario? selfdestruct sorf ot makes sense there (though it could be argued it also makes sense in the claim scenario), and I'd prefer not to introduce further differences between oz and oz-zos. I'd leave it out of this release altogether, and wait until that is fixed upstream (OpenZeppelin/openzeppelin-contracts#1384).

@nventuro nventuro added this to the v2.0 milestone Oct 5, 2018
@spalladino
Copy link
Contributor Author

@nventuro I'd either remove the contract altogether as you mention, or change the selfdestruct to a owner().transfer(this.balance), since the behaviour we want is to transfer all funds to the owner.

@nventuro
Copy link
Contributor

nventuro commented Oct 8, 2018

This has now been fixed in openzeppelin-solidity (OpenZeppelin/openzeppelin-contracts#1385), and will go into 2.0-rc4. I'll keep it out of this oz-zos release, and add it back once we merge rc4 here.

@nventuro
Copy link
Contributor

Closed via #28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants