Skip to content

Commit

Permalink
Merge pull request #4 from davisshaver/update-resolver
Browse files Browse the repository at this point in the history
✅ Update solidity version, update address
  • Loading branch information
davisshaver authored Oct 9, 2023
2 parents cf826f3 + 2ea19ae commit 7348418
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 }],
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"solidity.packageDefaultDependenciesContractsDirectory": "src",
"solidity.packageDefaultDependenciesDirectory": "lib",
"solidity.compileUsingRemoteVersion": "v0.8.16",
"solidity.compileUsingRemoteVersion": "v0.8.20",
"search.exclude": {
"lib": true
},
Expand Down
4 changes: 2 additions & 2 deletions config/allowlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"8ee08fd6aee97549de92e8592d442471": "0x3B706114b380c3741b1Fd43e061F6A1c017e997A"
},
"dev": {
"00000000000000000000000000000000": "0x185a4dc360ce69bdccee33b3784b0282f7961aea",
"22222222222222222222222222222222": "0xf5a2fe45f4f1308502b1c136b9ef8af136141382",
"00000000000000000000000000000000": "0x2e234dae75c793f67a35089c9d99245e1c58470b",
"22222222222222222222222222222222": "0x5991a2df15a8f6a256d3ec51e99254cd3fb576a9",
"60f9fcb4b3cc5e3add081dd95d4a3705": "0xaf045Cb0dBC1225948482e4692Ec9dC7Bb3cD48b",
"8ee08fd6aee97549de92e8592d442471": "0x3B706114b380c3741b1Fd43e061F6A1c017e997A",
"205e460b479e2e5b48aec07710c08d50": "0x8626f6940e2eb28930efb4cef49b2d1f2c9c1199"
Expand Down
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/LilBase64.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.16;
pragma solidity 0.8.20;

/// [MIT License]
/// @title LilBase64
Expand Down
2 changes: 1 addition & 1 deletion src/LilENS.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.16;
pragma solidity ^0.8.20;

/// ============ Internal Imports ============

Expand Down
2 changes: 1 addition & 1 deletion src/LilOwnable.sol
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Namehash.sol
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/ProtoGravaNFT.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.16;
pragma solidity ^0.8.20;

/*//////////////////////////////////////////////////////////////
EXTERNAL IMPORTS
Expand Down
8 changes: 4 additions & 4 deletions src/test/LilENSTest.t.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -28,7 +28,7 @@ contract LilENSTestContract is LilENSTest {
keccak256(
abi.encodePacked(
enstest.addrToENS(
0xaf045Cb0dBC1225948482e4692Ec9dC7Bb3cD48b
0x0F9Bd2a9E0D30f121c525DB5419A07b08Fce8440
)[0]
)
) == keccak256(abi.encodePacked("davisshaver.eth")),
Expand All @@ -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"
Expand All @@ -78,7 +78,7 @@ contract LilENSTestContract is LilENSTest {
function testENSToAddr() public view {
require(
enstest.ensToAddr("davisshaver.eth") ==
0xaf045Cb0dBC1225948482e4692Ec9dC7Bb3cD48b,
0x0F9Bd2a9E0D30f121c525DB5419A07b08Fce8440,
"ENS to address lookup failed"
);
}
Expand Down
24 changes: 15 additions & 9 deletions src/test/ProtoGravaNFT.t.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -14,10 +14,13 @@ contract ProtoGravNFTTestContract is ProtoGravaNFTTest {

bytes32[] internal correctProofAlice = [
bytes32(
0x27a89e7e429a749efe6f0bb28e5b9454dc31d06efa093a771a811c6d0a30974f
0x779d436bdea59dffcaf91f569386d8ba9b47bb3b6da0858409371af3821fd506
),
bytes32(
0x5ba39d6a23933f83b06f5f4439d7eb891dbbc59250ff8f3109fd821802847b23
),
bytes32(
0xe042314c1bef208596bdfb11227c3519b3ccc0c913455dd6e27630640edb003e
)
];
bytes32[] internal incorrectProofBob = [
Expand All @@ -30,10 +33,13 @@ contract ProtoGravNFTTestContract is ProtoGravaNFTTest {
];
bytes32[] internal correctProofCharlie = [
bytes32(
0x705a8b4d085d439bfde84fe72ff1f879c9483c92176633d114e47022484b85ac
0x09a9f8ba860a103965d553c18bd96428ad0d67319f62335f870b4d1ea28d4fb1
),
bytes32(
0x5ba39d6a23933f83b06f5f4439d7eb891dbbc59250ff8f3109fd821802847b23
),
bytes32(
0xe042314c1bef208596bdfb11227c3519b3ccc0c913455dd6e27630640edb003e
)
];
string internal approvedGravatarHashAlice =
Expand All @@ -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 {
Expand Down Expand Up @@ -301,7 +307,7 @@ contract ProtoGravNFTTestContract is ProtoGravaNFTTest {
assertEq(aliceTokenNamePre, aliceAddressString);
assertTrue(!aliceTokenHasEnsPre);
alice.transferFrom(
address(0xaf045Cb0dBC1225948482e4692Ec9dC7Bb3cD48b),
address(0x0F9Bd2a9E0D30f121c525DB5419A07b08Fce8440),
1
);
(
Expand Down Expand Up @@ -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)
)
);
Expand All @@ -361,7 +367,7 @@ contract ProtoGravNFTTestContract is ProtoGravaNFTTest {
);
assertTrue(
contains(
'"trait_type": "Discord", "value": "davisshaver#4551"',
'"trait_type": "Discord", "value": "davisshaver"',
string(aliceTokenURIPostDecoded)
)
);
Expand Down
2 changes: 1 addition & 1 deletion src/test/utils/LilENSTest.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.16;
pragma solidity ^0.8.20;

/// ============ External Imports ============

Expand Down
10 changes: 5 additions & 5 deletions src/test/utils/ProtoGravaNFTTest.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.16;
pragma solidity ^0.8.20;

/// ============ External Imports ============

Expand Down Expand Up @@ -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
}
}
2 changes: 1 addition & 1 deletion src/test/utils/ProtoGravaNFTUser.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.16;
pragma solidity ^0.8.20;

/// ============ Internal Imports ============

Expand Down

0 comments on commit 7348418

Please sign in to comment.