@@ -20,6 +20,8 @@ import {
20
20
PWNSimpleLoanElasticChainlinkProposal,
21
21
PWNSimpleLoanListProposal,
22
22
PWNSimpleLoanSimpleProposal,
23
+ PWNSimpleLoanUniswapV3LPIndividualProposal,
24
+ PWNSimpleLoanUniswapV3LPSetProposal,
23
25
PWNLOAN,
24
26
PWNRevokedNonce,
25
27
PWNUtilizedCredit,
@@ -48,6 +50,8 @@ library PWNContractDeployerSalt {
48
50
bytes32 internal constant SIMPLE_LOAN_ELASTIC_PROPOSAL = keccak256 ("PWNSimpleLoanElasticProposal " );
49
51
bytes32 internal constant SIMPLE_LOAN_ELASTIC_CHAINLINK_PROPOSAL = keccak256 ("PWNSimpleLoanElasticChainlinkProposal " );
50
52
bytes32 internal constant SIMPLE_LOAN_DUTCH_AUCTION_PROPOSAL = keccak256 ("PWNSimpleLoanDutchAuctionProposal " );
53
+ bytes32 internal constant SIMPLE_LOAN_UNISWAP_V3_INDIVIDUAL_PROPOSAL = keccak256 ("PWNSimpleLoanUniswapV3LPIndividualProposal " );
54
+ bytes32 internal constant SIMPLE_LOAN_UNISWAP_V3_SET_PROPOSAL = keccak256 ("PWNSimpleLoanUniswapV3LPSetProposal " );
51
55
52
56
}
53
57
@@ -90,59 +94,75 @@ contract Deploy is Deployments, Script {
90
94
91
95
/*
92
96
forge script script/PWN.s.sol:Deploy \
93
- --sig "redeploySimpleLoanMultichain ()" \
97
+ --sig "deployUniswapProposalsMultichain ()" \
94
98
--private-key $PRIVATE_KEY \
95
99
--multi --verify --broadcast
96
100
*/
97
101
/// addresses set in the `deployments/latest.json`.
98
- function redeploySimpleLoanMultichain () external {
99
- string [] memory chains = new string [](8 );
100
- chains[0 ] = "polygon " ;
101
- chains[1 ] = "arbitrum " ;
102
- chains[2 ] = "base " ;
103
- chains[3 ] = "optimism " ;
104
- chains[4 ] = "bsc " ;
105
- chains[5 ] = "cronos " ;
106
- chains[6 ] = "gnosis " ;
107
- chains[7 ] = "world " ;
102
+ function deployUniswapProposalsMultichain () external {
103
+ string [] memory chains = new string [](0 );
104
+
108
105
// linea - gas estimate is always super low and tx is pending for days -> execute separately
109
106
110
107
for (uint256 i; i < chains.length ; ++ i) {
111
- redeploySimpleLoan (chains[i]);
108
+ deployUniswapProposals (chains[i]);
112
109
}
113
110
114
111
}
115
112
116
113
/*
117
114
forge script script/PWN.s.sol:Deploy \
118
- --sig "redeploySimpleLoan (string)" "sepolia" \
115
+ --sig "deployUniswapProposals (string)" "sepolia" \
119
116
--private-key $PRIVATE_KEY \
120
117
--with-gas-price $(cast --to-wei 0.3 gwei) \
121
118
--verify --broadcast
122
119
*/
123
- function redeploySimpleLoan (string memory chain ) public {
120
+ function deployUniswapProposals (string memory chain ) public {
124
121
vm.createSelectFork (chain);
125
122
_loadDeployedAddresses ();
126
123
127
124
vm.startBroadcast ();
128
125
129
- __d.simpleLoan = PWNSimpleLoan (_deploy ({
130
- salt: PWNContractDeployerSalt.SIMPLE_LOAN ,
126
+ __d.simpleLoanUniswapV3LPIndividualProposal = PWNSimpleLoanUniswapV3LPIndividualProposal (_deploy ({
127
+ salt: PWNContractDeployerSalt.SIMPLE_LOAN_UNISWAP_V3_INDIVIDUAL_PROPOSAL ,
131
128
bytecode: abi.encodePacked (
132
- type (PWNSimpleLoan ).creationCode,
129
+ type (PWNSimpleLoanUniswapV3LPIndividualProposal ).creationCode,
133
130
abi.encode (
134
131
address (__d.hub),
135
- address (__d.loanToken ),
132
+ address (__d.revokedNonce ),
136
133
address (__d.config),
134
+ address (__d.utilizedCredit),
135
+ address (__e.uniswapV3Factory),
136
+ address (__e.uniswapV3NFTPositionManager),
137
+ address (__d.chainlinkFeedRegistry),
138
+ address (__e.chainlinkL2SequencerUptimeFeed),
139
+ address (__e.weth)
140
+ )
141
+ )
142
+ }));
143
+
144
+ __d.simpleLoanUniswapV3LPSetProposal = PWNSimpleLoanUniswapV3LPSetProposal (_deploy ({
145
+ salt: PWNContractDeployerSalt.SIMPLE_LOAN_UNISWAP_V3_SET_PROPOSAL,
146
+ bytecode: abi.encodePacked (
147
+ type (PWNSimpleLoanUniswapV3LPSetProposal).creationCode,
148
+ abi.encode (
149
+ address (__d.hub),
137
150
address (__d.revokedNonce),
138
- address (__d.categoryRegistry)
151
+ address (__d.config),
152
+ address (__d.utilizedCredit),
153
+ address (__e.uniswapV3Factory),
154
+ address (__e.uniswapV3NFTPositionManager),
155
+ address (__d.chainlinkFeedRegistry),
156
+ address (__e.chainlinkL2SequencerUptimeFeed),
157
+ address (__e.weth)
139
158
)
140
159
)
141
160
}));
142
161
143
- console2.log ("------ " );
144
162
console2.log ("chain: %s (%s) " , chain, block .chainid );
145
- console2.log ("PWNSimpleLoan: " , address (__d.simpleLoan));
163
+ console2.log ("PWNSimpleLoanUniswapV3LPIndividualProposal: " , address (__d.simpleLoanUniswapV3LPIndividualProposal));
164
+ console2.log ("PWNSimpleLoanUniswapV3LPSetProposal: " , address (__d.simpleLoanUniswapV3LPSetProposal));
165
+ console2.log ("------ " );
146
166
147
167
vm.stopBroadcast ();
148
168
}
0 commit comments