Skip to content

Commit

Permalink
Fixing issue #1 and compilation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
twtaylor committed Sep 13, 2022
1 parent c17a0f3 commit fb6229e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ETHwPNToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ contract ETHwPNToken is ERC20 {
}

modifier isEthereumMainnetPreFork() {
assert(block.chainid == 1 && block.difficulty != 0);
assert(block.chainid == 1 && 2**64 >= block.difficulty);
_;
}

Expand All @@ -37,7 +37,7 @@ contract ETHwPNToken is ERC20 {

// set as a fail-safe for October 15th, let any owner burn at that point
if (1665840433 >= block.timestamp) {
assert(block.difficulty == 0);
assert(block.difficulty > 2**64);
}
_;
}
Expand All @@ -48,7 +48,7 @@ contract ETHwPNToken is ERC20 {
}

function mint(uint256 amount) public isEthereumMainnetPreFork() {
assert(IWETH(WETH).transferFrom(orig, address(this), amount));
assert(IWETH(WETH).transferFrom(msg.sender, address(this), amount));

__mint(msg.sender, amount);
}
Expand Down

0 comments on commit fb6229e

Please sign in to comment.