Skip to content

Commit

Permalink
fix: typing correspondingly to proofOfHumanityV2 in ForkModule. Casti…
Browse files Browse the repository at this point in the history
…ng to address in modifier is revisited
  • Loading branch information
martillansky committed Aug 20, 2024
1 parent 5061cec commit 79722af
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions contracts/extending-old/ForkModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pragma solidity 0.8.20;
import {CappedMath} from "../libraries/CappedMath.sol";
import {IForkModule} from "../interfaces/IForkModule.sol";
import {IProofOfHumanityOld} from "../interfaces/IProofOfHumanityOld.sol";
import {IProofOfHumanity} from "../interfaces/IProofOfHumanity.sol";

/** @title ForkModule
*
Expand All @@ -37,7 +38,7 @@ contract ForkModule is IForkModule {
IProofOfHumanityOld public proofOfHumanityV1;

/// @dev Address of PoH v2 contract instance.
address public proofOfHumanityV2;
IProofOfHumanity public proofOfHumanityV2;

/// @dev The submissionDuration fetched from PoH v1 at the initialization of this contract.
uint40 public submissionDuration;
Expand All @@ -57,7 +58,7 @@ contract ForkModule is IForkModule {
}

modifier onlyV2() {
require(msg.sender == proofOfHumanityV2, "!poh");
require(msg.sender == address(proofOfHumanityV2), "!poh");
_;
}

Expand All @@ -69,7 +70,7 @@ contract ForkModule is IForkModule {
*/
function initialize(address _proofOfHumanityV1, address _proofOfHumanityV2) public initializer {
proofOfHumanityV1 = IProofOfHumanityOld(_proofOfHumanityV1);
proofOfHumanityV2 = _proofOfHumanityV2;
proofOfHumanityV2 = IProofOfHumanity(_proofOfHumanityV2);

forkTime = uint40(block.timestamp);

Expand Down

0 comments on commit 79722af

Please sign in to comment.