@@ -28,7 +28,7 @@ contract DeployLocalScript is Script {
2828 address constant COOKIE_FAN = 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC ; // User B
2929
3030 CookieJarFactory factory;
31- CookieMonsterNFT cookieMonsterNFT ;
31+ CookieMonsterNFT cookieMonsterNft ;
3232 DummyERC20 demoToken;
3333
3434 function run () external {
@@ -70,13 +70,13 @@ contract DeployLocalScript is Script {
7070
7171 // Deploy Cookie Monster NFT collection
7272 console.log (" Deploying Cookie Monster NFT collection... " );
73- cookieMonsterNFT = new CookieMonsterNFT ();
74-
73+ cookieMonsterNft = new CookieMonsterNFT ();
74+
7575 // Mint Cookie Monster NFTs to test users
76- cookieMonsterNFT .mint (COOKIE_MONSTER); // Token #0 to Cookie Monster
77- cookieMonsterNFT .mint (COOKIE_FAN); // Token #1 to Cookie Fan
76+ cookieMonsterNft .mint (COOKIE_MONSTER); // Token #0 to Cookie Monster
77+ cookieMonsterNft .mint (COOKIE_FAN); // Token #1 to Cookie Fan
7878 console.log (" SUCCESS: Cookie Monster NFTs minted to special accounts! " );
79- console.log (" NFT Contract Address: " , address (cookieMonsterNFT ));
79+ console.log (" NFT Contract Address: " , address (cookieMonsterNft ));
8080 console.log (" NOTE: NFT address will change on Anvil restart. Use 'pnpm nft:address' to get current address. " );
8181
8282 // Deploy demo ERC20 token
@@ -111,7 +111,7 @@ contract DeployLocalScript is Script {
111111 console.log ("SUMMARY: " );
112112 console.log (" - CookieJarFactory deployed at: " , address (factory));
113113 console.log (" - 4 Cookie Jars created with different configurations " );
114- console.log (" - Cookie Monster NFT deployed at: " , address (cookieMonsterNFT ));
114+ console.log (" - Cookie Monster NFT deployed at: " , address (cookieMonsterNft ));
115115 console.log (" - DEMO ERC20 token deployed at: " , address (demoToken));
116116 console.log (" - NFTs minted to User A (Cookie Monster) and User B (Cookie Fan) " );
117117 console.log (" - Jars funded with ETH and DEMO tokens " );
@@ -148,28 +148,28 @@ contract DeployLocalScript is Script {
148148
149149 address [] memory emptyTokens = new address [](0 );
150150
151- CookieJarLib.JarConfig memory params1 = CookieJarLib.JarConfig ({
152- jarOwner: DEPLOYER,
153- supportedCurrency: CookieJarLib.ETH_ADDRESS,
154- accessType: CookieJarLib.AccessType.Allowlist,
155- withdrawalOption: CookieJarLib.WithdrawalTypeOptions.Fixed,
156- fixedAmount: 0.1 ether,
157- maxWithdrawal: 1 ether,
158- withdrawalInterval: 7 days,
159- minDeposit: 0.01 ether,
160- feePercentageOnDeposit: 0 ,
161- strictPurpose: false ,
162- feeCollector: DEPLOYER,
163- emergencyWithdrawalEnabled: true ,
164- oneTimeWithdrawal: false ,
165- maxWithdrawalPerPeriod: 0 ,
166- metadata: "Community Stipend - Weekly 0.1 ETH for community members " ,
167- multiTokenConfig: defaultMultiToken
168- } );
151+ CookieJarLib.JarConfig memory params1 = CookieJarLib.JarConfig (
152+ DEPLOYER, // jarOwner
153+ CookieJarLib.ETH_ADDRESS, // supportedCurrency
154+ DEPLOYER, // feeCollector
155+ CookieJarLib.AccessType.Allowlist, // accessType
156+ CookieJarLib.WithdrawalTypeOptions.Fixed, // withdrawalOption
157+ false , // strictPurpose
158+ true , // emergencyWithdrawalEnabled
159+ false , // oneTimeWithdrawal
160+ 0.1 ether, // fixedAmount
161+ 1 ether, // maxWithdrawal
162+ 7 days, // withdrawalInterval
163+ 0.01 ether, // minDeposit
164+ 0 , // feePercentageOnDeposit
165+ 0 , // maxWithdrawalPerPeriod
166+ "Community Stipend - Weekly 0.1 ETH for community members " , // metadata
167+ defaultMultiToken // multiTokenConfig
168+ );
169169
170170 CookieJarLib.AccessConfig memory accessConfig1 = CookieJarLib.AccessConfig ({
171171 allowlist: allowlist1,
172- nftRequirement: CookieJarLib.NFTRequirement ({
172+ nftRequirement: CookieJarLib.NftRequirement ({
173173 nftContract: address (0 ),
174174 tokenId: 0 ,
175175 minBalance: 0
@@ -202,28 +202,28 @@ contract DeployLocalScript is Script {
202202
203203 address [] memory emptyTokens2 = new address [](0 );
204204
205- CookieJarLib.JarConfig memory params2 = CookieJarLib.JarConfig ({
206- jarOwner: DEPLOYER,
207- supportedCurrency: address (demoToken),
208- accessType: CookieJarLib.AccessType.Allowlist,
209- withdrawalOption: CookieJarLib.WithdrawalTypeOptions.Variable,
210- fixedAmount: 0 ,
211- maxWithdrawal: 1000 * 10 ** 18 ,
212- withdrawalInterval: 30 days,
213- minDeposit: 1000 * 10 ** 18 ,
214- feePercentageOnDeposit: 0 ,
215- strictPurpose: true ,
216- feeCollector: DEPLOYER,
217- emergencyWithdrawalEnabled: false ,
218- oneTimeWithdrawal: false ,
219- maxWithdrawalPerPeriod: 0 ,
220- metadata: "Development Grants - Up to 1000 DEMO tokens monthly for contributors " ,
221- multiTokenConfig: defaultMultiToken2
222- } );
205+ CookieJarLib.JarConfig memory params2 = CookieJarLib.JarConfig (
206+ DEPLOYER, // jarOwner
207+ address (demoToken), // supportedCurrency
208+ DEPLOYER, // feeCollector
209+ CookieJarLib.AccessType.Allowlist, // accessType
210+ CookieJarLib.WithdrawalTypeOptions.Variable, // withdrawalOption
211+ true , // strictPurpose
212+ false , // emergencyWithdrawalEnabled
213+ false , // oneTimeWithdrawal
214+ 0 , // fixedAmount
215+ 1000 * 10 ** 18 , // maxWithdrawal
216+ 30 days, // withdrawalInterval
217+ 1000 * 10 ** 18 , // minDeposit
218+ 0 , // feePercentageOnDeposit
219+ 0 , // maxWithdrawalPerPeriod
220+ "Development Grants - Up to 1000 DEMO tokens monthly for contributors " , // metadata
221+ defaultMultiToken2 // multiTokenConfig
222+ );
223223
224224 CookieJarLib.AccessConfig memory accessConfig2 = CookieJarLib.AccessConfig ({
225225 allowlist: allowlist2,
226- nftRequirement: CookieJarLib.NFTRequirement ({
226+ nftRequirement: CookieJarLib.NftRequirement ({
227227 nftContract: address (0 ),
228228 tokenId: 0 ,
229229 minBalance: 0
@@ -243,7 +243,7 @@ contract DeployLocalScript is Script {
243243 function _createJar3 () internal {
244244 // 3. NFT Holder Rewards (NFT-Gated, ETH, Fixed 0.05 ETH)
245245 address [] memory nftAddresses = new address [](1 );
246- nftAddresses[0 ] = address (cookieMonsterNFT );
246+ nftAddresses[0 ] = address (cookieMonsterNft );
247247
248248 // Default configurations for Jar 3
249249 CookieJarLib.MultiTokenConfig memory defaultMultiToken3 = CookieJarLib.MultiTokenConfig ({
@@ -255,29 +255,29 @@ contract DeployLocalScript is Script {
255255
256256 address [] memory emptyTokens3 = new address [](0 );
257257
258- CookieJarLib.JarConfig memory params3 = CookieJarLib.JarConfig ({
259- jarOwner: DEPLOYER,
260- supportedCurrency: CookieJarLib.ETH_ADDRESS,
261- accessType: CookieJarLib.AccessType. ERC721 ,
262- withdrawalOption: CookieJarLib.WithdrawalTypeOptions.Fixed,
263- fixedAmount: 0.05 ether,
264- maxWithdrawal: 1 ether,
265- withdrawalInterval: 14 days,
266- minDeposit: 0.01 ether,
267- feePercentageOnDeposit: 0 ,
268- strictPurpose: false ,
269- feeCollector: DEPLOYER,
270- emergencyWithdrawalEnabled: true ,
271- oneTimeWithdrawal: false ,
272- maxWithdrawalPerPeriod: 0 ,
273- metadata: "NFT Holder Rewards - 0.05 ETH bi-weekly for Cookie Monster NFT holders " ,
274- multiTokenConfig: defaultMultiToken3
275- } );
258+ CookieJarLib.JarConfig memory params3 = CookieJarLib.JarConfig (
259+ DEPLOYER, // jarOwner
260+ CookieJarLib.ETH_ADDRESS, // supportedCurrency
261+ DEPLOYER, // feeCollector
262+ CookieJarLib.AccessType. ERC721 , // accessType
263+ CookieJarLib.WithdrawalTypeOptions.Fixed, // withdrawalOption
264+ false , // strictPurpose
265+ true , // emergencyWithdrawalEnabled
266+ false , // oneTimeWithdrawal
267+ 0.05 ether, // fixedAmount
268+ 1 ether, // maxWithdrawal
269+ 14 days, // withdrawalInterval
270+ 0.01 ether, // minDeposit
271+ 0 , // feePercentageOnDeposit
272+ 0 , // maxWithdrawalPerPeriod
273+ "NFT Holder Rewards - 0.05 ETH bi-weekly for Cookie Monster NFT holders " , // metadata
274+ defaultMultiToken3 // multiTokenConfig
275+ );
276276
277277
278278 CookieJarLib.AccessConfig memory accessConfig3 = CookieJarLib.AccessConfig ({
279279 allowlist: new address [](0 ),
280- nftRequirement: CookieJarLib.NFTRequirement ({
280+ nftRequirement: CookieJarLib.NftRequirement ({
281281 nftContract: nftAddresses[0 ],
282282 tokenId: 0 , // Any token from contract
283283 minBalance: 1
@@ -296,7 +296,7 @@ contract DeployLocalScript is Script {
296296 function _createJar4 () internal {
297297 // 4. NFT Airdrop (NFT-Gated, ERC20, One-time 500 DEMO)
298298 address [] memory nftAddresses = new address [](1 );
299- nftAddresses[0 ] = address (cookieMonsterNFT );
299+ nftAddresses[0 ] = address (cookieMonsterNft );
300300
301301 // Default configurations for Jar 4
302302 CookieJarLib.MultiTokenConfig memory defaultMultiToken4 = CookieJarLib.MultiTokenConfig ({
@@ -308,29 +308,29 @@ contract DeployLocalScript is Script {
308308
309309 address [] memory emptyTokens4 = new address [](0 );
310310
311- CookieJarLib.JarConfig memory params4 = CookieJarLib.JarConfig ({
312- jarOwner: DEPLOYER,
313- supportedCurrency: address (demoToken),
314- accessType: CookieJarLib.AccessType. ERC721 ,
315- withdrawalOption: CookieJarLib.WithdrawalTypeOptions.Fixed,
316- fixedAmount: 500 * 10 ** 18 ,
317- maxWithdrawal: 500 * 10 ** 18 ,
318- withdrawalInterval: 0 ,
319- minDeposit: 100 * 10 ** 18 ,
320- feePercentageOnDeposit: 0 ,
321- strictPurpose: false ,
322- feeCollector: DEPLOYER,
323- emergencyWithdrawalEnabled: false ,
324- oneTimeWithdrawal: true ,
325- maxWithdrawalPerPeriod: 0 ,
326- metadata: "NFT Airdrop - One-time 500 DEMO tokens for Cookie Monster NFT holders " ,
327- multiTokenConfig: defaultMultiToken4
328- } );
311+ CookieJarLib.JarConfig memory params4 = CookieJarLib.JarConfig (
312+ DEPLOYER, // jarOwner
313+ address (demoToken), // supportedCurrency
314+ DEPLOYER, // feeCollector
315+ CookieJarLib.AccessType. ERC721 , // accessType
316+ CookieJarLib.WithdrawalTypeOptions.Fixed, // withdrawalOption
317+ false , // strictPurpose
318+ false , // emergencyWithdrawalEnabled
319+ true , // oneTimeWithdrawal
320+ 500 * 10 ** 18 , // fixedAmount
321+ 500 * 10 ** 18 , // maxWithdrawal
322+ 0 , // withdrawalInterval
323+ 100 * 10 ** 18 , // minDeposit
324+ 0 , // feePercentageOnDeposit
325+ 0 , // maxWithdrawalPerPeriod
326+ "NFT Airdrop - One-time 500 DEMO tokens for Cookie Monster NFT holders " , // metadata
327+ defaultMultiToken4 // multiTokenConfig
328+ );
329329
330330
331331 CookieJarLib.AccessConfig memory accessConfig4 = CookieJarLib.AccessConfig ({
332332 allowlist: new address [](0 ),
333- nftRequirement: CookieJarLib.NFTRequirement ({
333+ nftRequirement: CookieJarLib.NftRequirement ({
334334 nftContract: nftAddresses[0 ],
335335 tokenId: 0 , // Any token from contract
336336 minBalance: 1
0 commit comments