@@ -11,7 +11,6 @@ import "@openzeppelin/contracts/utils/Strings.sol";
1111import "contracts/lib/Strings2.sol " ;
1212
1313contract SignatureDropTest is BaseTest {
14-
1514 using StringsUpgradeable for uint256 ;
1615 using Strings2 for bytes ;
1716
@@ -71,7 +70,7 @@ contract SignatureDropTest is BaseTest {
7170 assertEq (nextTokenIdToMintBefore + amountToLazyMint, sigdrop.nextTokenIdToMint ());
7271 assertEq (nextTokenIdToMintBefore + amountToLazyMint, batchId);
7372
74- for (uint256 i = 0 ; i < amountToLazyMint; i += 1 ) {
73+ for (uint256 i = 0 ; i < amountToLazyMint; i += 1 ) {
7574 string memory uri = sigdrop.tokenURI (i);
7675 console.log (uri);
7776 assertEq (uri, string (abi.encodePacked (baseURI, i.toString ())));
@@ -96,7 +95,7 @@ contract SignatureDropTest is BaseTest {
9695 assertEq (nextTokenIdToMintBefore + amountToLazyMint, sigdrop.nextTokenIdToMint ());
9796 assertEq (nextTokenIdToMintBefore + amountToLazyMint, batchId);
9897
99- for (uint256 i = 0 ; i < amountToLazyMint; i += 1 ) {
98+ for (uint256 i = 0 ; i < amountToLazyMint; i += 1 ) {
10099 string memory uri = sigdrop.tokenURI (1 );
101100 assertEq (uri, string (abi.encodePacked (baseURI, "0 " )));
102101 }
@@ -150,7 +149,6 @@ contract SignatureDropTest is BaseTest {
150149 * note: Fuzz testing state changes; lazy mint a batch of tokens with no encrypted base URI.
151150 */
152151 function test_fuzz_lazyMint_noEncryptedURI (uint256 x ) public {
153-
154152 vm.assume (x > 0 );
155153
156154 uint256 amountToLazyMint = x;
@@ -166,10 +164,10 @@ contract SignatureDropTest is BaseTest {
166164 assertEq (nextTokenIdToMintBefore + amountToLazyMint, batchId);
167165
168166 string memory uri = sigdrop.tokenURI (0 );
169- assertEq (uri, string (abi.encodePacked (baseURI, uint (0 ).toString ())));
167+ assertEq (uri, string (abi.encodePacked (baseURI, uint256 (0 ).toString ())));
170168
171- uri = sigdrop.tokenURI (x- 1 );
172- assertEq (uri, string (abi.encodePacked (baseURI, uint (x - 1 ).toString ())));
169+ uri = sigdrop.tokenURI (x - 1 );
170+ assertEq (uri, string (abi.encodePacked (baseURI, uint256 (x - 1 ).toString ())));
173171
174172 /**
175173 * note: this loop takes too long to run with fuzz tests.
@@ -204,7 +202,7 @@ contract SignatureDropTest is BaseTest {
204202 string memory uri = sigdrop.tokenURI (0 );
205203 assertEq (uri, string (abi.encodePacked (baseURI, "0 " )));
206204
207- uri = sigdrop.tokenURI (x- 1 );
205+ uri = sigdrop.tokenURI (x - 1 );
208206 assertEq (uri, string (abi.encodePacked (baseURI, "0 " )));
209207
210208 /**
@@ -251,15 +249,15 @@ contract SignatureDropTest is BaseTest {
251249 bytes memory encryptedURI = sigdrop.encryptDecrypt (secretURI, key);
252250 sigdrop.lazyMint (amountToLazyMint, placeholderURI, encryptedURI);
253251
254- for (uint256 i = 0 ; i < amountToLazyMint; i += 1 ) {
252+ for (uint256 i = 0 ; i < amountToLazyMint; i += 1 ) {
255253 string memory uri = sigdrop.tokenURI (i);
256254 assertEq (uri, string (abi.encodePacked (placeholderURI, "0 " )));
257255 }
258256
259257 string memory revealedURI = sigdrop.reveal (0 , key);
260258 assertEq (revealedURI, string (secretURI));
261259
262- for (uint256 i = 0 ; i < amountToLazyMint; i += 1 ) {
260+ for (uint256 i = 0 ; i < amountToLazyMint; i += 1 ) {
263261 string memory uri = sigdrop.tokenURI (i);
264262 assertEq (uri, string (abi.encodePacked (secretURI, i.toString ())));
265263 }
@@ -382,7 +380,6 @@ contract SignatureDropTest is BaseTest {
382380
383381 // Test with ERC20 currency
384382 {
385-
386383 uint256 totalSupplyBefore = sigdrop.totalSupply ();
387384
388385 bytes memory encodedRequest = abi.encode (
@@ -648,7 +645,10 @@ contract SignatureDropTest is BaseTest {
648645 address owner = sigdrop.ownerOf (0 );
649646 assertEq (deployerSigner, owner);
650647
651- assertEq (currencyBalBefore - mintrequest.pricePerToken * mintrequest.quantity, erc20.balanceOf (deployerSigner));
648+ assertEq (
649+ currencyBalBefore - mintrequest.pricePerToken * mintrequest.quantity,
650+ erc20.balanceOf (deployerSigner)
651+ );
652652
653653 vm.expectRevert (abi.encodeWithSignature ("OwnerQueryForNonexistentToken() " ));
654654 owner = sigdrop.ownerOf (1 );
0 commit comments