@@ -21,7 +21,8 @@ import {
2121 MultiTokenCategoryRegistry,
2222 IChainlinkFeedRegistryLike,
2323 PWNStableProduct,
24- PWNInstallmentsProduct
24+ PWNInstallmentsProduct,
25+ IAaveLike
2526} from "pwn/Deployments.sol " ;
2627
2728import { PWNCrowdsourceLenderVault } from "pwn/periphery/crowdsource/PWNCrowdsourceLenderVault.sol " ;
@@ -100,46 +101,55 @@ forge script script/PWN.s.sol:Deploy --sig "deploy()" \
100101 _loadDeployedAddresses ();
101102 vm.startBroadcast ();
102103
103- __d.loan = PWNLoan (
104- _deploy (
105- PWNContractDeployerSalt.LOAN,
106- abi.encodePacked (
107- type (PWNLoan).creationCode,
108- abi.encode (address (__d.loanToken), address (__d.config), address (__d.categoryRegistry))
109- )
110- )
111- );
112-
113- __d.products.installments = PWNInstallmentsProduct (
114- _deploy (
115- PWNContractDeployerSalt.INSTALLMENTS_PRODUCT,
116- abi.encodePacked (
117- type (PWNInstallmentsProduct).creationCode,
118- abi.encode (address (__d.hub), address (__d.revokedNonce), address (__d.utilizedCredit), address (__d.chainlinkFeedRegistry), __e.chainlinkL2SequencerUptimeFeed, __e.weth)
119- )
120- )
121- );
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+ // );
113+
114+ // __d.products.installments = PWNInstallmentsProduct(
115+ // _deploy(
116+ // PWNContractDeployerSalt.INSTALLMENTS_PRODUCT,
117+ // abi.encodePacked(
118+ // type(PWNInstallmentsProduct).creationCode,
119+ // abi.encode(address(__d.hub), address(__d.revokedNonce), address(__d.utilizedCredit), address(__d.chainlinkFeedRegistry), __e.chainlinkL2SequencerUptimeFeed, __e.weth)
120+ // )
121+ // )
122+ // );
123+
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 ));
122129
123130 console2.log ("PWNLoan: " , address (__d.loan));
124131 console2.log ("PWNInstallmentsProduct: " , address (__d.products.installments));
125132
126- address [] memory addrs = new address [](2 );
127- addrs[0 ] = address (__d.loan);
128- addrs[1 ] = address (__d.products.installments);
133+ // address[] memory addrs = new address[](2);
134+ // addrs[0] = address(__d.loan);
135+ // addrs[1] = address(__d.products.installments);
129136
130- bytes32 [] memory tags = new bytes32 [](2 );
131- tags[0 ] = PWNHubTags.ACTIVE_LOAN;
132- tags[1 ] = PWNHubTags.LOAN_PROPOSAL;
137+ // bytes32[] memory tags = new bytes32[](2);
138+ // tags[0] = PWNHubTags.ACTIVE_LOAN;
139+ // tags[1] = PWNHubTags.LOAN_PROPOSAL;
133140
134- // TODO on what contract this should be called?
135- console2.logBytes (abi.encodeWithSignature ("setTags(address[],bytes32[],bool) " , addrs, tags, true ));
141+ // // TODO on what contract this should be called?
142+ // console2.logBytes(abi.encodeWithSignature("setTags(address[],bytes32[],bool)", addrs, tags, true));
136143
137- address [] memory feedIntermediaryDenominations = new address [](1 );
144+ address [] memory feedIntermediaryDenominations = new address [](0 );
138145 // USDC / USD feed + ETH / USD feed
139- feedIntermediaryDenominations[0 ] = address (840 ); // USD representation in chainlink
140- bool [] memory feedInvertFlags = new bool [](2 );
146+ // feedIntermediaryDenominations[0] = address(840); // USD representation in chainlink
147+ // LINK / ETH feed
148+ // feedIntermediaryDenominations[0] = address(0x42585eD362B3f1BCa95c640FdFf35Ef899212734);
149+ bool [] memory feedInvertFlags = new bool [](1 );
141150 feedInvertFlags[0 ] = false ;
142- feedInvertFlags[1 ] = true ;
151+ // feedInvertFlags[0] = false;
152+ // feedInvertFlags[1] = true;
143153
144154 __d.crowdsourceLenderVault = PWNCrowdsourceLenderVault (
145155 _deploy (
@@ -153,16 +163,30 @@ forge script script/PWN.s.sol:Deploy --sig "deploy()" \
153163 address (__e.aave),
154164 "PWNInstallmentsProduct " ,
155165 "PWNInstallmentsProduct " ,
166+ // USDC CREDIT on Sepolia
167+ // PWNCrowdsourceLenderVault.Terms({
168+ // collateralAddress: address(0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9),
169+ // creditAddress: address(0x94a9D9AC8a22534E3FaCa9F4e7F2E2cf85d5E4C8),
170+ // feedIntermediaryDenominations: feedIntermediaryDenominations,
171+ // feedInvertFlags: feedInvertFlags,
172+ // loanToValue: 7500, // 75%
173+ // interestAPR: 1000, // 10%
174+ // postponement: 2592000, // 30 days in seconds
175+ // duration: 63072000, // 730 days (2 years) in seconds
176+ // minCreditAmount: 5000000000, // 5000 tokens (assuming 6 decimals)
177+ // expiration: block.timestamp + 10368000 // 120 days from now
178+ // })
179+ // LINK CREDIT on Sepolia
156180 PWNCrowdsourceLenderVault.Terms ({
157181 collateralAddress: address (0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9 ),
158- creditAddress: address (0x94a9D9AC8a22534E3FaCa9F4e7F2E2cf85d5E4C8 ),
182+ creditAddress: address (0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5 ),
159183 feedIntermediaryDenominations: feedIntermediaryDenominations,
160184 feedInvertFlags: feedInvertFlags,
161185 loanToValue: 7500 , // 75%
162186 interestAPR: 1000 , // 10%
163187 postponement: 2592000 , // 30 days in seconds
164188 duration: 63072000 , // 730 days (2 years) in seconds
165- minCreditAmount: 5000000000 , // 5000 tokens (assuming 6 decimals)
189+ minCreditAmount: 500000000000000000000 ,
166190 expiration: block .timestamp + 10368000 // 120 days from now
167191 })
168192 )
0 commit comments