diff --git a/.solhint.json b/.solhint.json index 1408ba4..15b5bb5 100644 --- a/.solhint.json +++ b/.solhint.json @@ -3,7 +3,7 @@ "plugins": ["prettier"], "rules": { "code-complexity": ["error", 7], - "compiler-version": ["error", "^0.8.16"], + "compiler-version": ["error", "^0.8.20"], "const-name-snakecase": "off", "constructor-syntax": "error", "func-visibility": ["error", { "ignoreConstructors": true }], diff --git a/.vscode/settings.json b/.vscode/settings.json index 8710452..7749ad2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "solidity.packageDefaultDependenciesContractsDirectory": "src", "solidity.packageDefaultDependenciesDirectory": "lib", - "solidity.compileUsingRemoteVersion": "v0.8.16", + "solidity.compileUsingRemoteVersion": "v0.8.20", "search.exclude": { "lib": true }, diff --git a/config/allowlist.json b/config/allowlist.json index a425040..541bacb 100644 --- a/config/allowlist.json +++ b/config/allowlist.json @@ -4,8 +4,8 @@ "8ee08fd6aee97549de92e8592d442471": "0x3B706114b380c3741b1Fd43e061F6A1c017e997A" }, "dev": { - "00000000000000000000000000000000": "0x185a4dc360ce69bdccee33b3784b0282f7961aea", - "22222222222222222222222222222222": "0xf5a2fe45f4f1308502b1c136b9ef8af136141382", + "00000000000000000000000000000000": "0x2e234dae75c793f67a35089c9d99245e1c58470b", + "22222222222222222222222222222222": "0x5991a2df15a8f6a256d3ec51e99254cd3fb576a9", "60f9fcb4b3cc5e3add081dd95d4a3705": "0xaf045Cb0dBC1225948482e4692Ec9dC7Bb3cD48b", "8ee08fd6aee97549de92e8592d442471": "0x3B706114b380c3741b1Fd43e061F6A1c017e997A", "205e460b479e2e5b48aec07710c08d50": "0x8626f6940e2eb28930efb4cef49b2d1f2c9c1199" diff --git a/foundry.toml b/foundry.toml index 1f8f084..b033ae7 100644 --- a/foundry.toml +++ b/foundry.toml @@ -4,7 +4,7 @@ ffi = false fuzz_runs = 1000 optimizer = true optimizer_runs = 1000000 -solc_version = "0.8.16" +solc_version = "0.8.20" gas_reports = ["ProtoGravaNFT"] [profile.ci] diff --git a/src/LilBase64.sol b/src/LilBase64.sol index c7c1f3b..22369f2 100644 --- a/src/LilBase64.sol +++ b/src/LilBase64.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.16; +pragma solidity 0.8.20; /// [MIT License] /// @title LilBase64 diff --git a/src/LilENS.sol b/src/LilENS.sol index 88eecdd..0c13518 100644 --- a/src/LilENS.sol +++ b/src/LilENS.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPL-3.0-only -pragma solidity ^0.8.16; +pragma solidity ^0.8.20; /// ============ Internal Imports ============ diff --git a/src/LilOwnable.sol b/src/LilOwnable.sol index 1be2859..13caa82 100644 --- a/src/LilOwnable.sol +++ b/src/LilOwnable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPL-3.0-only -pragma solidity ^0.8.16; +pragma solidity ^0.8.20; /// @title LilOwnable /// @notice Ownable contract drop-in diff --git a/src/Namehash.sol b/src/Namehash.sol index 59deaf2..8cd77d0 100644 --- a/src/Namehash.sol +++ b/src/Namehash.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPL-3.0-only -pragma solidity ^0.8.16; +pragma solidity ^0.8.20; /// @title Strings /// @notice Adapted from https://github.com/ensdomains/reverse-records/blob/master/contracts/Namehash.sol diff --git a/src/ProtoGravaNFT.sol b/src/ProtoGravaNFT.sol index 7b0a6a8..cc16da2 100644 --- a/src/ProtoGravaNFT.sol +++ b/src/ProtoGravaNFT.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPL-3.0-only -pragma solidity ^0.8.16; +pragma solidity ^0.8.20; /*////////////////////////////////////////////////////////////// EXTERNAL IMPORTS diff --git a/src/test/LilENSTest.t.sol b/src/test/LilENSTest.t.sol index 033da76..c992d32 100644 --- a/src/test/LilENSTest.t.sol +++ b/src/test/LilENSTest.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPL-3.0-only -pragma solidity ^0.8.16; +pragma solidity ^0.8.20; import "ds-test/test.sol"; import "forge-std/Vm.sol"; @@ -28,7 +28,7 @@ contract LilENSTestContract is LilENSTest { keccak256( abi.encodePacked( enstest.addrToENS( - 0xaf045Cb0dBC1225948482e4692Ec9dC7Bb3cD48b + 0x0F9Bd2a9E0D30f121c525DB5419A07b08Fce8440 )[0] ) ) == keccak256(abi.encodePacked("davisshaver.eth")), @@ -55,7 +55,7 @@ contract LilENSTestContract is LilENSTest { // Namehash of davisshaver.eth. bytes32 testNameHash = 0x83e599a723b25a15ed6a3b6f4957b094beae097bbbe1c3a205208a67d3cf9063; // Known resolver of davisshaver.eth. - address expectedResolver = 0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41; + address expectedResolver = 0x231b0Ee14048e9dCcD1d247744d114a4EB5E8E63; require( address(enstest.getResolver(testNameHash)) == expectedResolver, "Resolver lookup failed" @@ -78,7 +78,7 @@ contract LilENSTestContract is LilENSTest { function testENSToAddr() public view { require( enstest.ensToAddr("davisshaver.eth") == - 0xaf045Cb0dBC1225948482e4692Ec9dC7Bb3cD48b, + 0x0F9Bd2a9E0D30f121c525DB5419A07b08Fce8440, "ENS to address lookup failed" ); } diff --git a/src/test/ProtoGravaNFT.t.sol b/src/test/ProtoGravaNFT.t.sol index 1d892f0..0b5ce02 100644 --- a/src/test/ProtoGravaNFT.t.sol +++ b/src/test/ProtoGravaNFT.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPL-3.0-only -pragma solidity ^0.8.16; +pragma solidity ^0.8.20; import "@openzeppelin/contracts/utils/Strings.sol"; import "base64-sol/base64.sol"; @@ -14,10 +14,13 @@ contract ProtoGravNFTTestContract is ProtoGravaNFTTest { bytes32[] internal correctProofAlice = [ bytes32( - 0x27a89e7e429a749efe6f0bb28e5b9454dc31d06efa093a771a811c6d0a30974f + 0x779d436bdea59dffcaf91f569386d8ba9b47bb3b6da0858409371af3821fd506 ), bytes32( 0x5ba39d6a23933f83b06f5f4439d7eb891dbbc59250ff8f3109fd821802847b23 + ), + bytes32( + 0xe042314c1bef208596bdfb11227c3519b3ccc0c913455dd6e27630640edb003e ) ]; bytes32[] internal incorrectProofBob = [ @@ -30,10 +33,13 @@ contract ProtoGravNFTTestContract is ProtoGravaNFTTest { ]; bytes32[] internal correctProofCharlie = [ bytes32( - 0x705a8b4d085d439bfde84fe72ff1f879c9483c92176633d114e47022484b85ac + 0x09a9f8ba860a103965d553c18bd96428ad0d67319f62335f870b4d1ea28d4fb1 ), bytes32( 0x5ba39d6a23933f83b06f5f4439d7eb891dbbc59250ff8f3109fd821802847b23 + ), + bytes32( + 0xe042314c1bef208596bdfb11227c3519b3ccc0c913455dd6e27630640edb003e ) ]; string internal approvedGravatarHashAlice = @@ -42,10 +48,10 @@ contract ProtoGravNFTTestContract is ProtoGravaNFTTest { "11111111111111111111111111111111"; string internal approvedGravatarHashCharlie = "22222222222222222222222222222222"; - address internal aliceAddress = 0x185a4dc360CE69bDCceE33b3784B0282f7961aea; - address internal bobAddress = 0xEFc56627233b02eA95bAE7e19F648d7DcD5Bb132; + address internal aliceAddress = 0x2e234DAe75C793f67A35089C9d99245E1C58470b; + address internal bobAddress = 0xF62849F9A0B5Bf2913b396098F7c7019b51A820a; address internal charlieAddress = - 0xf5a2fE45F4f1308502b1C136b9EF8af136141382; + 0x5991A2dF15A8F6A256D3Ec51E99254Cd3fb576A9; /// @notice Default description should be set in constructor function testDescriptionDefaultGet() public view { @@ -301,7 +307,7 @@ contract ProtoGravNFTTestContract is ProtoGravaNFTTest { assertEq(aliceTokenNamePre, aliceAddressString); assertTrue(!aliceTokenHasEnsPre); alice.transferFrom( - address(0xaf045Cb0dBC1225948482e4692Ec9dC7Bb3cD48b), + address(0x0F9Bd2a9E0D30f121c525DB5419A07b08Fce8440), 1 ); ( @@ -349,7 +355,7 @@ contract ProtoGravNFTTestContract is ProtoGravaNFTTest { ); assertTrue( contains( - '"trait_type": "URL", "value": "https://davisshaver.com/"', + '"trait_type": "URL", "value": "https://davisshaver.com"', string(aliceTokenURIPostDecoded) ) ); @@ -361,7 +367,7 @@ contract ProtoGravNFTTestContract is ProtoGravaNFTTest { ); assertTrue( contains( - '"trait_type": "Discord", "value": "davisshaver#4551"', + '"trait_type": "Discord", "value": "davisshaver"', string(aliceTokenURIPostDecoded) ) ); diff --git a/src/test/utils/LilENSTest.sol b/src/test/utils/LilENSTest.sol index 5d71d06..076b317 100644 --- a/src/test/utils/LilENSTest.sol +++ b/src/test/utils/LilENSTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPL-3.0-only -pragma solidity ^0.8.16; +pragma solidity ^0.8.20; /// ============ External Imports ============ diff --git a/src/test/utils/ProtoGravaNFTTest.sol b/src/test/utils/ProtoGravaNFTTest.sol index 73d8e10..adca38b 100644 --- a/src/test/utils/ProtoGravaNFTTest.sol +++ b/src/test/utils/ProtoGravaNFTTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPL-3.0-only -pragma solidity ^0.8.16; +pragma solidity ^0.8.20; /// ============ External Imports ============ @@ -27,10 +27,10 @@ abstract contract ProtoGravaNFTTest is DSTest { "ProtoGravaNFT", "PROTOGRAV", // Merkle root w/ Alice & Charlie allowed, but no Bob - 0xf410dc13458d3fcdf2e6238d6849c17974685fa9b940848daf9f877b99b74c0f + 0x84b89b6fc1e4c5386ace0530319d3b5609933b893ee8f48a1c1c43cd76428ffe ); - alice = new ProtoGravaNFTUser(protogravanft); // 0x185a4dc360ce69bdccee33b3784b0282f7961aea - bob = new ProtoGravaNFTUser(protogravanft); // 0xefc56627233b02ea95bae7e19f648d7dcd5bb132 - charlie = new ProtoGravaNFTUser(protogravanft); // 0xf5a2fe45f4f1308502b1c136b9ef8af136141382 + alice = new ProtoGravaNFTUser(protogravanft); // 0x2e234dae75c793f67a35089c9d99245e1c58470b + bob = new ProtoGravaNFTUser(protogravanft); // 0xf62849f9a0b5bf2913b396098f7c7019b51a820a + charlie = new ProtoGravaNFTUser(protogravanft); // 0x5991a2df15a8f6a256d3ec51e99254cd3fb576a9 } } diff --git a/src/test/utils/ProtoGravaNFTUser.sol b/src/test/utils/ProtoGravaNFTUser.sol index 83d183d..2f18f40 100644 --- a/src/test/utils/ProtoGravaNFTUser.sol +++ b/src/test/utils/ProtoGravaNFTUser.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPL-3.0-only -pragma solidity ^0.8.16; +pragma solidity ^0.8.20; /// ============ Internal Imports ============