Skip to content

Commit

Permalink
Merge pull request #19 from Hats-Protocol/deploy/beta
Browse files Browse the repository at this point in the history
prep for v1-beta deployment
  • Loading branch information
spengrah authored May 8, 2023
2 parents ade8b7d + 62fc12d commit 7742923
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 24 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cache/
out/
.vscode/
broadcast/*/31337
broadcast/*/*/dry-run
broadcast/
.env
.DS_Store
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ tab_width = 4
wrap_comments = false

[rpc_endpoints]
arbitrum = "${ARBITRUM_RPC}"
ethereum = "${ETHEREUM_RPC}"
optimism = "${OPTIMISM_RPC}"
goerli = "${GOERLI_RPC}"
Expand Down
33 changes: 27 additions & 6 deletions script/DeployParams.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,49 @@
"gnosisFallbackLibrary": "0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4",
"gnosisMultisendLibrary": "0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761",
"gnosisSafeProxyFactory": "0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2",
"hatsProtocol": "0x72c89eb08444bc16396dd9432b3e82d956c412ec",
"hatsProtocol": "0x9D2dfd6066d5935267291718E8AA16C8Ab729E9d",
"moduleProxyFactory": "0x00000000000DC7F163742Eb4aBEf650037b1f588",
"safeSingleton": "0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552"
},
"1": {
"gnosisFallbackLibrary": "0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4",
"gnosisMultisendLibrary": "0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761",
"gnosisSafeProxyFactory": "0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2",
"hatsProtocol": "0x9D2dfd6066d5935267291718E8AA16C8Ab729E9d",
"moduleProxyFactory": "0x00000000000DC7F163742Eb4aBEf650037b1f588",
"safeSingleton": "0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552"
},
"1": {},
"5": {
"gnosisFallbackLibrary": "0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4",
"gnosisMultisendLibrary": "0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761",
"gnosisSafeProxyFactory": "0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2",
"hatsProtocol": "0x2923469a33bd2fa2ab33c877db81d35a9d8d60c6",
"hatsProtocol": "0x9D2dfd6066d5935267291718E8AA16C8Ab729E9d",
"moduleProxyFactory": "0x00000000000DC7F163742Eb4aBEf650037b1f588",
"safeSingleton": "0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552"
},
"10": {},
"10": {
"gnosisFallbackLibrary": "0x017062a1dE2FE6b99BE3d9d37841FeD19F573804",
"gnosisMultisendLibrary": "0x998739BFdAAdde7C933B942a68053933098f9EDa",
"gnosisSafeProxyFactory": "0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC",
"hatsProtocol": "0x9D2dfd6066d5935267291718E8AA16C8Ab729E9d",
"moduleProxyFactory": "0x00000000000DC7F163742Eb4aBEf650037b1f588",
"safeSingleton": "0xfb1bffC9d739B8D520DaF37dF666da4C687191EA"
},
"137": {
"gnosisFallbackLibrary": "0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4",
"gnosisMultisendLibrary": "0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761",
"gnosisSafeProxyFactory": "0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2",
"hatsProtocol": "0xe81597289a249ae725c2d80e7848dbfa9708c22d",
"hatsProtocol": "0x9D2dfd6066d5935267291718E8AA16C8Ab729E9d",
"moduleProxyFactory": "0x00000000000DC7F163742Eb4aBEf650037b1f588",
"safeSingleton": "0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552"
},
"42161": {},
"42161": {
"gnosisFallbackLibrary": "0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4",
"gnosisMultisendLibrary": "0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761",
"gnosisSafeProxyFactory": "0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2",
"hatsProtocol": "0x9D2dfd6066d5935267291718E8AA16C8Ab729E9d",
"moduleProxyFactory": "0x00000000000DC7F163742Eb4aBEf650037b1f588",
"safeSingleton": "0x3E5c63644E683549055b9Be8653de26E0B4CD36E"
},
"11155111": {}
}
27 changes: 11 additions & 16 deletions script/HatsSignerGateFactory.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ contract DeployHatsSignerGateFactory is Script {
address public safeSingleton;

// deployment params to be set manually
string public version = "HSG Beta 5";
string public version = "1.0-beta";
bytes32 public SALT = bytes32(abi.encode(0x4a75)); // ~ H(4) A(a) T(7) S(5)

function getChainKey() public view returns (string memory) {
return string.concat(".", vm.toString(block.chainid));
Expand All @@ -42,14 +43,15 @@ contract DeployHatsSignerGateFactory is Script {
setDeployParams();
uint256 privKey = vm.envUint("PRIVATE_KEY");
address deployer = vm.rememberKey(privKey);
// console2.log("deployer", deployer);
console2.log("deployer balance (wei):", deployer.balance);
vm.startBroadcast(deployer);

// deploy singleton
HatsSignerGate hsgSingleton = new HatsSignerGate();
MultiHatsSignerGate mhsgSingleton = new MultiHatsSignerGate();

/* HatsSignerGateFactory factory = */
new HatsSignerGateFactory(
// deploy singletons
HatsSignerGate hsgSingleton = new HatsSignerGate{ salt: SALT }();
MultiHatsSignerGate mhsgSingleton = new MultiHatsSignerGate{ salt: SALT }();
// deploy factory
HatsSignerGateFactory factory = new HatsSignerGateFactory{ salt: SALT }(
address(hsgSingleton),
address(mhsgSingleton),
hats,
Expand All @@ -61,15 +63,8 @@ contract DeployHatsSignerGateFactory is Script {
version
);

// // uncomment to check if its working correctly when simulating
// (address hsg, address safe) = factory.deployHatsSignerGateAndSafe(
// 1,
// 2,
// 3,
// 4,
// 5,
// 6
// );
factory;

// GnosisSafe _safe = GnosisSafe(payable(safe));
// console2.log("safe threshold", _safe.getThreshold());
// console2.log("hsg is module", _safe.isModuleEnabled(hsg));
Expand Down

0 comments on commit 7742923

Please sign in to comment.