Skip to content

Commit

Permalink
(test): neither create2 or create work in the test setting; revert an…
Browse files Browse the repository at this point in the history
…d instead mock to set addresses later than constructor
  • Loading branch information
benjaminbollen committed Mar 26, 2024
1 parent ad04407 commit b854ed3
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion test/hub/V1MintStatusUpdate.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,23 @@ pragma solidity >=0.8.13;

import {Test} from "forge-std/Test.sol";
import {StdCheats} from "forge-std/StdCheats.sol";
import "../../src/migration/Migration.sol";
import "../setup/TimeCirclesSetup.sol";
import "../setup/HumanRegistration.sol";
import "../migration/MockHub.sol";
import "./MockMigrationHub.sol";

contract V1MintStatusUpdateTest is Test, TimeCirclesSetup, HumanRegistration {
// Constants

bytes32 private constant SALT = keccak256("CirclesV2:V1MintStatusUpdateTest");

// State variables

MockMigrationHub public mockHub;
MockHubV1 public mockHubV1;

Migration public migration;

// Constructor

Expand All @@ -21,9 +29,23 @@ contract V1MintStatusUpdateTest is Test, TimeCirclesSetup, HumanRegistration {

function setUp() public {
startTime();

mockHubV1 = new MockHubV1();
migration = new Migration(address(mockHubV1), address(1), INFLATION_DAY_ZERO, 365 days);
mockHub = new MockMigrationHub(mockHubV1, address(2), INFLATION_DAY_ZERO, 365 days);

}

// Tests

function testMigrationFromV1DuringBootstrap() public {}
function testMigrationFromV1DuringBootstrap() public {

}

// Private functions

function _calculateContractAddress(address _deployer, uint256 _nonce) private returns (address) {
// predict the contract addresses
bytes memory input = abi.encodePacked(bytes1(0xd6), bytes1(0x94), _deployer, _nonce);
}
}

0 comments on commit b854ed3

Please sign in to comment.