Skip to content

Commit

Permalink
Merge pull request #3 from Hats-Protocol/migration
Browse files Browse the repository at this point in the history
Version update following Hats migration
  • Loading branch information
gershido authored Aug 1, 2023
2 parents 3004628 + e85e7b3 commit 10197db
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
url = https://github.com/vectorized/solady
[submodule "lib/hats-module"]
path = lib/hats-module
url = https://github.com/hats-protocol/hats-module
url = https://github.com/Hats-Protocol/hats-module
2 changes: 1 addition & 1 deletion script/StakingEligibility.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ contract DeployImplementation is Script {
bytes32 public SALT = bytes32(abi.encode(0x4a75)); // ~ H(4) A(a) T(7) S(5)

// default values
string public version = "0.1.0"; // increment with each deploy
string public version = "0.2.0"; // increment with each deploy
bool private verbose = true;

/// @notice Override default values, if desired
Expand Down
15 changes: 9 additions & 6 deletions test/StakingEligibility.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ contract StakingEligibilityTest is Test, DeployImplementation {
// bytes32 public SALT = bytes32(abi.encode(0x4a75)); // ~ H(4) A(a) T(7) S(5)

// other test variables
IHats public hats = IHats(0x9D2dfd6066d5935267291718E8AA16C8Ab729E9d); // v1.hatsprotocol.eth
IHats public hats = IHats(0x3bc1A0Ad72417f2d411118085256fC53CBdDd137); // v1.hatsprotocol.eth
HatsModuleFactory public factory;
StakingEligibility public instance;
StakingEligibilityHarness public harnessImpl;
StakingEligibilityHarness public harnessInstance;

uint256 public fork;
uint256 public BLOCK_NUMBER = 16_947_805; // the block number where v1.hatsprotocol.eth was deployed
uint256 public BLOCK_NUMBER = 17_671_864; // the block number where v1.hatsprotocol.eth was deployed
string public FACTORY_VERSION = "factory test version";
string public MODULE_VERSION = "module test version";

Expand Down Expand Up @@ -142,8 +142,8 @@ contract StakingEligibilityTest is Test, DeployImplementation {
initData = abi.encode(_minStake, _judgeHat, _recipientHat, _cooldownPeriod);
// deploy the instance
instance =
// StakingEligibility(factory.createHatsModule(address(implementation), _hatId, otherImmutableArgs, initData));
StakingEligibility(deployModuleInstance(factory, address(implementation), _hatId, otherImmutableArgs, initData));
// StakingEligibility(factory.createHatsModule(address(implementation), _hatId, otherImmutableArgs, initData));
StakingEligibility(deployModuleInstance(factory, address(implementation), _hatId, otherImmutableArgs, initData));
}
}

Expand Down Expand Up @@ -227,8 +227,11 @@ contract HarnessTest is StakingEligibilityTest {
harnessImpl = new StakingEligibilityHarness("harness version");
// deploy an instance of the harness and initialize it with the same initData as `instance`
harnessInstance =
// StakingEligibilityHarness(factory.createHatsModule(address(harnessImpl), stakerHat, otherImmutableArgs, initData));
StakingEligibilityHarness(deployModuleInstance(factory, address(harnessImpl), stakerHat, otherImmutableArgs, initData));
// StakingEligibilityHarness(factory.createHatsModule(address(harnessImpl), stakerHat, otherImmutableArgs,
// initData));
StakingEligibilityHarness(
deployModuleInstance(factory, address(harnessImpl), stakerHat, otherImmutableArgs, initData)
);
}
}

Expand Down

0 comments on commit 10197db

Please sign in to comment.