@@ -101,56 +101,90 @@ forge script script/PWN.s.sol:Deploy --sig "deploy()" \
101101 _loadDeployedAddresses ();
102102 vm.startBroadcast ();
103103
104- // __d.loan = PWNLoan(
105- // _deploy(
106- // PWNContractDeployerSalt.LOAN,
107- // abi.encodePacked(
108- // type(PWNLoan).creationCode,
109- // abi.encode(address(__d.loanToken), address(__d.config), address(__d.categoryRegistry))
110- // )
111- // )
112- // );
104+ // !!! TODO LOADING ADDRESSES FROM JSON DOES NOT WORK SOMEHOW, SO I AM JUST HARDCODING THE ADDRESSES HERE !!!
105+
106+ // __d.loan = PWNLoan(0x7f53449251EF28991C99EA25698B37BC13b173B8);
107+ __e.aave = IAaveLike (address (0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951 ));
108+ __d.hub = PWNHub (0x37807A2F031b3B44081F4b21500E5D70EbaDAdd5 );
109+ __d.revokedNonce = PWNRevokedNonce (0x972204fF33348ee6889B2d0A3967dB67d7b08e4c );
110+ __d.utilizedCredit = PWNUtilizedCredit (0x8E6F44DEa3c11d69C63655BDEcbA25Fa986BCE9D );
111+ __d.chainlinkFeedRegistry = IChainlinkFeedRegistryLike (0x8D5e90706E52a52853dA9A14fA1c63889a412851 );
112+ __e.chainlinkL2SequencerUptimeFeed = address (0x0000000000000000000000000000000000000000 );
113+ __e.weth = address (0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9 );
114+ __d.products.installments = PWNInstallmentsProduct (0x68669e7ec29070e3dfa684cb4893282Cd4C9E608 );
115+
116+
117+ __d.loanToken = PWNLOAN (0x4440C069272cC34b80C7B11bEE657D0349Ba9C23 );
118+ __d.config = PWNConfig (0xd52a2898d61636bB3eEF0d145f05352FF543bdCC );
119+ __d.categoryRegistry = MultiTokenCategoryRegistry (0xbB2168d5546A94AE2DA9254e63D88F7f137B2534 );
120+
121+ __d.loan = PWNLoan (
122+ _deploy (
123+ PWNContractDeployerSalt.LOAN,
124+ abi.encodePacked (
125+ type (PWNLoan).creationCode,
126+ abi.encode (
127+ address (__d.loanToken),
128+ address (__d.config),
129+ address (__d.categoryRegistry)
130+ )
131+ )
132+ )
133+ );
113134
114135 // __d.products.installments = PWNInstallmentsProduct(
115136 // _deploy(
116137 // PWNContractDeployerSalt.INSTALLMENTS_PRODUCT,
117138 // abi.encodePacked(
118139 // type(PWNInstallmentsProduct).creationCode,
119- // abi.encode(address(__d.hub), address(__d.revokedNonce), address(__d.utilizedCredit), address(__d.chainlinkFeedRegistry), __e.chainlinkL2SequencerUptimeFeed, __e.weth)
140+ // abi.encode(
141+ // address(__d.hub),
142+ // address(__d.revokedNonce),
143+ // address(__d.utilizedCredit),
144+ // address(__d.chainlinkFeedRegistry),
145+ // __e.chainlinkL2SequencerUptimeFeed,
146+ // __e.weth
147+ // )
120148 // )
121149 // )
122150 // );
123151
124- // !!! LOADING ADDRESSES FROM JSON DOES NOT WORK SOMEHOW, SO I AM JUST HARDCODING THE ADDRESSES HERE !!!
125-
126- __d.loan = PWNLoan (0x7f53449251EF28991C99EA25698B37BC13b173B8 );
127- __d.products.installments = PWNInstallmentsProduct (address (0xEc22A11214567f580ef0f1eD8541c6Ff10d1880d ));
128- __e.aave = IAaveLike (address (0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951 ));
129-
130152 console2.log ("PWNLoan: " , address (__d.loan));
131- console2.log ("PWNInstallmentsProduct: " , address (__d.products.installments));
153+ // console2.log("PWNInstallmentsProduct:", address(__d.products.installments));
154+ // console2.log("Aave:", address(__e.aave));
132155
133156 // address[] memory addrs = new address[](2);
134157 // addrs[0] = address(__d.loan);
135158 // addrs[1] = address(__d.products.installments);
136159
160+ address [] memory addrs = new address [](1 );
161+ addrs[0 ] = address (__d.loan);
162+
137163 // bytes32[] memory tags = new bytes32[](2);
138164 // tags[0] = PWNHubTags.ACTIVE_LOAN;
139165 // tags[1] = PWNHubTags.LOAN_PROPOSAL;
140166
167+ bytes32 [] memory tags = new bytes32 [](1 );
168+ tags[0 ] = PWNHubTags.ACTIVE_LOAN;
169+
141170 // // TODO on what contract this should be called?
142- // console2.logBytes(abi.encodeWithSignature("setTags(address[],bytes32[],bool)", addrs, tags, true));
171+ console2.logBytes (abi.encodeWithSignature ("setTags(address[],bytes32[],bool) " , addrs, tags, true ));
143172
144- address [] memory feedIntermediaryDenominations = new address [](0 );
173+ address [] memory feedIntermediaryDenominations = new address [](1 );
174+ feedIntermediaryDenominations[0 ] = address (0x0000000000000000000000000000000000000348 );
145175 // USDC / USD feed + ETH / USD feed
146176 // feedIntermediaryDenominations[0] = address(840); // USD representation in chainlink
147177 // LINK / ETH feed
148178 // feedIntermediaryDenominations[0] = address(0x42585eD362B3f1BCa95c640FdFf35Ef899212734);
149- bool [] memory feedInvertFlags = new bool [](1 );
179+ // EUR / ETH feed
180+ // feedIntermediaryDenominations[0] = address(0x1a81afB8146aeFfCFc5E50e8479e826E7D55b910);
181+ bool [] memory feedInvertFlags = new bool [](2 );
150182 feedInvertFlags[0 ] = false ;
183+ feedInvertFlags[1 ] = true ;
151184 // feedInvertFlags[0] = false;
152185 // feedInvertFlags[1] = true;
153186
187+
154188 __d.crowdsourceLenderVault = PWNCrowdsourceLenderVault (
155189 _deploy (
156190 PWNContractDeployerSalt.CROWDSOURCE_LENDER_VAULT,
@@ -177,17 +211,34 @@ forge script script/PWN.s.sol:Deploy --sig "deploy()" \
177211 // expiration: block.timestamp + 10368000 // 120 days from now
178212 // })
179213 // LINK CREDIT on Sepolia
214+ // PWNCrowdsourceLenderVault.Terms({
215+ // collateralAddress: address(0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9),
216+ // creditAddress: address(0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5),
217+ // feedIntermediaryDenominations: feedIntermediaryDenominations,
218+ // feedInvertFlags: feedInvertFlags,
219+ // loanToValue: 7500, // 75%
220+ // interestAPR: 1000, // 10%
221+ // postponement: 2592000, // 30 days in seconds
222+ // duration: 63072000, // 730 days (2 years) in seconds
223+ // minCreditAmount: 500000000000000000000,
224+ // expiration: block.timestamp + 10368000 // 120 days from now
225+ // })
226+ // EURS CREDIT on Sepolia
180227 PWNCrowdsourceLenderVault.Terms ({
181228 collateralAddress: address (0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9 ),
182- creditAddress: address (0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5 ),
229+ creditAddress: address (0x6d906e526a4e2Ca02097BA9d0caA3c382F52278E ),
183230 feedIntermediaryDenominations: feedIntermediaryDenominations,
184231 feedInvertFlags: feedInvertFlags,
185232 loanToValue: 7500 , // 75%
186233 interestAPR: 1000 , // 10%
187- postponement: 2592000 , // 30 days in seconds
188- duration: 63072000 , // 730 days (2 years) in seconds
189- minCreditAmount: 500000000000000000000 ,
190- expiration: block .timestamp + 10368000 // 120 days from now
234+ // postponement: 2592000, // 30 days in seconds
235+ postponement: 1200 , // 20 minutes in seconds
236+ // duration: 63072000, // 730 days (2 years) in seconds
237+ duration: 7200 , // 2 hours in seconds
238+ // minCreditAmount: 50000, // 500 EURS
239+ minCreditAmount: 10000 , // 100 EURS
240+ // expiration: block.timestamp + 10368000 // 120 days from now
241+ expiration: block .timestamp + 36000 // 10 hours from now
191242 })
192243 )
193244 )
0 commit comments