Paused contract: burn() behaviour before/after 0.6.0

Am I correct in seeing that pre-0.6.0, a Paused contract would still allow burning, but post-0.6.0 it would not because of the way _beforeTokenTransfer is implemented?

:computer: Environment
Currently on 0.5.16


Hi @jmahhh,

Welcome to the community :wave:

Yes, that is how it appears to me.
In OpenZeppelin Contracts 2.5 burning wasn’t impacted by Pausable, whilst in OpenZeppelin Contracts 3.0 burning is impacted by Pausable.

Is this a problem?

OpenZeppelin Contracts v2.5 (Solidity 0.5)

OpenZeppelin Contracts v3.0 beta release (Solidity 0.6)

Hi @abcoathup! IMO this is a change significant enough to be considered a “breaking change”? People combining these two contracts in 2.5 should be (made) aware of the new behaviour?

1 Like

Hi @jmahhh,

This would be a breaking change going from OpenZeppelin Contracts 2.5 to 3.0.
OpenZeppelin Contracts 2.5 Pausable didn’t pause ERC20 burn.
OpenZeppelin Contracts 3.0 Pausable does pause ERC20 burn.

See OpenZeppelin Contracts API Stability for details on when breaking changes may occur.

Would be great to get your feedback on this change.