Skip to content

Commit 7f43cf2

Browse files
authored
update deploy scripts (#83)
* WIP: update deploy scripts * rm todo
1 parent 060a0ed commit 7f43cf2

File tree

2 files changed

+2
-26
lines changed

2 files changed

+2
-26
lines changed

script/DeployGnosisSafe.s.sol

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,19 @@ struct SafeSetup {
2020
uint256 saltNonce;
2121
}
2222

23-
address constant OWNER_ONE = 0x1111111111111111111111111111111111111111;
24-
address constant OWNER_TWO = 0x2222222222222222222222222222222222222222;
2523
bytes32 constant SENTINEL_VALUE = 0x0000000000000000000000000000000000000000000000000000000000000001;
2624

2725
contract GnosisScript is Script {
2826
// deploy:
2927
// forge script GnosisScript --sig "deployGnosis()" --rpc-url $RPC_URL --broadcast [signing args]
3028
function deployGnosis()
3129
public
32-
returns (address gnosisFactory, address gnosisSingleton, address gnosisFallbackHandler, address usdcAdmin)
30+
returns (address gnosisFactory, address gnosisSingleton, address gnosisFallbackHandler)
3331
{
3432
vm.startBroadcast();
3533

3634
// deploy gnosis safe singleton & proxy factory
3735
(gnosisFactory, gnosisSingleton, gnosisFallbackHandler) = deployGnosisCore();
38-
39-
// deploy a gnosis safe proxy as the USDC admin
40-
usdcAdmin = deploySafeInstance(gnosisFactory, gnosisSingleton, getUsdcAdminSetup(gnosisFallbackHandler));
4136
}
4237

4338
function deployGnosisCore() public returns (address factory, address singleton, address fallbackHandler) {
@@ -64,25 +59,6 @@ contract GnosisScript is Script {
6459
safe = address(SafeProxyFactory(factory).createProxyWithNonce(singleton, init, setup.saltNonce));
6560
}
6661

67-
// setup the gnosis safe with 2 owners, threshold of 1.
68-
// make the owners recognizable addrs to aid in inspecting storage layout
69-
function getUsdcAdminSetup(address fallbackHandler) public pure returns (SafeSetup memory usdcAdminSetup) {
70-
address[] memory owners = new address[](2);
71-
owners[0] = OWNER_ONE;
72-
owners[1] = OWNER_TWO;
73-
usdcAdminSetup = SafeSetup({
74-
owners: owners,
75-
threshold: 1,
76-
to: address(0),
77-
data: "",
78-
fallbackHandler: fallbackHandler,
79-
paymentToken: address(0),
80-
payment: 0,
81-
paymentReceiver: payable(address(0)),
82-
saltNonce: 17001
83-
});
84-
}
85-
8662
// example run:
8763
// forge script GnosisScript --sig "printOwnerSlots" "[0x1111111111111111111111111111111111111111, 0x2222222222222222222222222222222222222222]"
8864
function printOwnerSlots(address[] memory owners) public pure {

script/ZenithL2.s.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ contract L2Script is Script {
2727

2828
// deploy simple erc20 tokens
2929
wbtc = address(new SimpleERC20{salt: "zenith.wbtc"}(MINTER, "Wrapped BTC", "WBTC", 8));
30-
usdt = address(new SimpleERC20{salt: "zenith.usdt"}(MINTER, "Tether USD", "USDT", 6));
30+
usdt = address(new SimpleERC20{salt: "zenith.weth"}(MINTER, "Wrapped Ether", "WETH", 18));
3131
}
3232
}
3333

0 commit comments

Comments
 (0)