Skip to content

Commit c963052

Browse files
nventurofrangio
andauthored
Draft and lifecycles directories cleanup (#2122)
* Move Pausable into utils * Move Strings into utils * Move Counters into utils * Move SignedSafeMath into math * Remove ERC1046 * Make ERC20Snapshot.snapshot internal * Move ERC20Snapshot into ERC20 * Add drafts deprecation notice * Remove drafts directory * Add changelog entry * Apply suggestions from code review Co-Authored-By: Francisco Giordano <frangio.1@gmail.com> Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
1 parent 8176a90 commit c963052

30 files changed

+79
-299
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
### Breaking changes
66
* `ECDSA`: when receiving an invalid signature, `recover` now reverts instead of returning the zero address. ([#2114](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2114))
7+
* `Pausable`: moved to the `utils` directory. ([#2122](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2122))
8+
* `Strings`: moved to the `utils` directory. ([#2122](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2122))
9+
* `Counters`: moved to the `utils` directory. ([#2122](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2122))
10+
* `SignedSafeMath`: moved to the `math` directory. ([#2122](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2122))
11+
* `ERC20Snapshot`: moved to the `token/ERC20` directory. `snapshot` was changed into an `internal` function. ([#2122](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2122))
712
* `Ownable`: moved to the `access` directory. ([#2120](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2120))
813
* `Ownable`: removed `isOwner`. ([#2120](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2120))
914
* `Secondary`: removed from the library, use `Ownable` instead. ([#2120](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2120))

contracts/drafts/ERC1046/ERC20Metadata.sol

Lines changed: 0 additions & 24 deletions
This file was deleted.

contracts/drafts/README.adoc

Lines changed: 0 additions & 23 deletions
This file was deleted.

contracts/lifecycle/README.adoc

Lines changed: 0 additions & 5 deletions
This file was deleted.

contracts/math/README.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ These are math-related utilities.
66

77
{{SafeMath}}
88

9+
{{SignedSafeMath}}
10+
911
{{Math}}

contracts/mocks/CountersImpl.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pragma solidity ^0.6.0;
22

3-
import "../drafts/Counters.sol";
3+
import "../utils/Counters.sol";
44

55
contract CountersImpl {
66
using Counters for Counters.Counter;

contracts/mocks/ERC20MetadataMock.sol

Lines changed: 0 additions & 12 deletions
This file was deleted.

contracts/mocks/ERC20SnapshotMock.sol

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
pragma solidity ^0.6.0;
22

3-
import "../drafts/ERC20Snapshot.sol";
3+
import "../token/ERC20/ERC20Snapshot.sol";
44

55

66
contract ERC20SnapshotMock is ERC20Snapshot {
77
constructor(address initialAccount, uint256 initialBalance) public {
88
_mint(initialAccount, initialBalance);
99
}
1010

11+
function snapshot() public {
12+
_snapshot();
13+
}
14+
1115
function mint(address account, uint256 amount) public {
1216
_mint(account, amount);
1317
}

contracts/mocks/PausableMock.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pragma solidity ^0.6.0;
22

3-
import "../lifecycle/Pausable.sol";
3+
import "../utils/Pausable.sol";
44

55
contract PausableMock is Pausable {
66
bool public drasticMeasureTaken;

0 commit comments

Comments
 (0)