diff --git a/.gitmodules b/.gitmodules index 0f07815..9369dcb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,9 @@ [submodule "lib/forge-std"] path = lib/forge-std - url = https://github.com/foundry-rs/forge-std -[submodule "lib/solady"] - path = lib/solady - url = https://github.com/vectorized/solady + url = https://github.com/lib/forge-std +[submodule "lib/solmate"] + path = lib/solmate + url = https://github.com/transmissions11/solmate +[submodule "lib/openzeppelin-contracts"] + path = lib/openzeppelin-contracts + url = https://github.com/openzeppelin/openzeppelin-contracts diff --git a/cache/solidity-files-cache.json b/cache/solidity-files-cache.json new file mode 100644 index 0000000..09d0d43 --- /dev/null +++ b/cache/solidity-files-cache.json @@ -0,0 +1,950 @@ +{ + "_format": "ethers-rs-sol-cache-3", + "paths": { + "artifacts": "out", + "build_infos": "out/build-info", + "sources": "src", + "tests": "test", + "scripts": "script", + "libraries": [ + "lib" + ] + }, + "files": { + "lib/forge-std/src/Base.sol": { + "lastModificationDate": 1671785251374, + "contentHash": "1870c8c1d5470db8c3e956c839db8364", + "sourceName": "lib/forge-std/src/Base.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [ + "lib/forge-std/src/StdStorage.sol", + "lib/forge-std/src/Vm.sol" + ], + "versionRequirement": ">=0.6.2, <0.9.0", + "artifacts": { + "CommonBase": { + "0.8.17+commit.8df45f5f.Linux.gcc": "Base.sol/CommonBase.json" + }, + "ScriptBase": { + "0.8.17+commit.8df45f5f.Linux.gcc": "Base.sol/ScriptBase.json" + }, + "TestBase": { + "0.8.17+commit.8df45f5f.Linux.gcc": "Base.sol/TestBase.json" + } + } + }, + "lib/forge-std/src/Script.sol": { + "lastModificationDate": 1671785251374, + "contentHash": "83c39354c1e43190bce4dc43860dc786", + "sourceName": "lib/forge-std/src/Script.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [ + "lib/forge-std/src/Base.sol", + "lib/forge-std/src/StdChains.sol", + "lib/forge-std/src/StdCheats.sol", + "lib/forge-std/src/StdJson.sol", + "lib/forge-std/src/StdMath.sol", + "lib/forge-std/src/StdStorage.sol", + "lib/forge-std/src/StdUtils.sol", + "lib/forge-std/src/Vm.sol", + "lib/forge-std/src/console.sol", + "lib/forge-std/src/console2.sol" + ], + "versionRequirement": ">=0.6.2, <0.9.0", + "artifacts": { + "Script": { + "0.8.17+commit.8df45f5f.Linux.gcc": "Script.sol/Script.json" + } + } + }, + "lib/forge-std/src/StdAssertions.sol": { + "lastModificationDate": 1671785251374, + "contentHash": "93fa608efd4df1e671b043437fddd457", + "sourceName": "lib/forge-std/src/StdAssertions.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [ + "lib/forge-std/src/StdMath.sol", + "lib/solmate/lib/ds-test/src/test.sol" + ], + "versionRequirement": ">=0.6.2, <0.9.0", + "artifacts": { + "StdAssertions": { + "0.8.17+commit.8df45f5f.Linux.gcc": "StdAssertions.sol/StdAssertions.json" + } + } + }, + "lib/forge-std/src/StdChains.sol": { + "lastModificationDate": 1671785251374, + "contentHash": "80138bc1765b08a6db58237c26985fd9", + "sourceName": "lib/forge-std/src/StdChains.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [ + "lib/forge-std/src/Vm.sol" + ], + "versionRequirement": ">=0.6.2, <0.9.0", + "artifacts": { + "StdChains": { + "0.8.17+commit.8df45f5f.Linux.gcc": "StdChains.sol/StdChains.json" + } + } + }, + "lib/forge-std/src/StdCheats.sol": { + "lastModificationDate": 1671785251374, + "contentHash": "fa245ffd8b36936bbb114ab441d5756f", + "sourceName": "lib/forge-std/src/StdCheats.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [ + "lib/forge-std/src/StdStorage.sol", + "lib/forge-std/src/Vm.sol" + ], + "versionRequirement": ">=0.6.2, <0.9.0", + "artifacts": { + "StdCheats": { + "0.8.17+commit.8df45f5f.Linux.gcc": "StdCheats.sol/StdCheats.json" + }, + "StdCheatsSafe": { + "0.8.17+commit.8df45f5f.Linux.gcc": "StdCheats.sol/StdCheatsSafe.json" + } + } + }, + "lib/forge-std/src/StdError.sol": { + "lastModificationDate": 1671785251374, + "contentHash": "64c896e1276a291776e5ea5aecb3870a", + "sourceName": "lib/forge-std/src/StdError.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [], + "versionRequirement": ">=0.6.2, <0.9.0", + "artifacts": { + "stdError": { + "0.8.17+commit.8df45f5f.Linux.gcc": "StdError.sol/stdError.json" + } + } + }, + "lib/forge-std/src/StdJson.sol": { + "lastModificationDate": 1671785251374, + "contentHash": "016de2d7ee55960094cc97ec792025bb", + "sourceName": "lib/forge-std/src/StdJson.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [ + "lib/forge-std/src/Vm.sol" + ], + "versionRequirement": ">=0.6.0, <0.9.0", + "artifacts": { + "stdJson": { + "0.8.17+commit.8df45f5f.Linux.gcc": "StdJson.sol/stdJson.json" + } + } + }, + "lib/forge-std/src/StdMath.sol": { + "lastModificationDate": 1671785251374, + "contentHash": "9da8f453eba6bb98f3d75bc6822bfb29", + "sourceName": "lib/forge-std/src/StdMath.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [], + "versionRequirement": ">=0.6.2, <0.9.0", + "artifacts": { + "stdMath": { + "0.8.17+commit.8df45f5f.Linux.gcc": "StdMath.sol/stdMath.json" + } + } + }, + "lib/forge-std/src/StdStorage.sol": { + "lastModificationDate": 1671785251374, + "contentHash": "1b6b8a6cbaaaf5a72860a56f0cde4e33", + "sourceName": "lib/forge-std/src/StdStorage.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [ + "lib/forge-std/src/Vm.sol" + ], + "versionRequirement": ">=0.6.2, <0.9.0", + "artifacts": { + "stdStorage": { + "0.8.17+commit.8df45f5f.Linux.gcc": "StdStorage.sol/stdStorage.json" + }, + "stdStorageSafe": { + "0.8.17+commit.8df45f5f.Linux.gcc": "StdStorage.sol/stdStorageSafe.json" + } + } + }, + "lib/forge-std/src/StdUtils.sol": { + "lastModificationDate": 1671785251374, + "contentHash": "ec75addbeee075c61fa5aff2faee0465", + "sourceName": "lib/forge-std/src/StdUtils.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [ + "lib/forge-std/src/Vm.sol" + ], + "versionRequirement": ">=0.6.2, <0.9.0", + "artifacts": { + "StdUtils": { + "0.8.17+commit.8df45f5f.Linux.gcc": "StdUtils.sol/StdUtils.json" + } + } + }, + "lib/forge-std/src/Test.sol": { + "lastModificationDate": 1671785251374, + "contentHash": "9ca73393dbc2f8cde2aa628f8d05c5d5", + "sourceName": "lib/forge-std/src/Test.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [ + "lib/forge-std/src/Base.sol", + "lib/forge-std/src/StdAssertions.sol", + "lib/forge-std/src/StdChains.sol", + "lib/forge-std/src/StdCheats.sol", + "lib/forge-std/src/StdError.sol", + "lib/forge-std/src/StdJson.sol", + "lib/forge-std/src/StdMath.sol", + "lib/forge-std/src/StdStorage.sol", + "lib/forge-std/src/StdUtils.sol", + "lib/forge-std/src/Vm.sol", + "lib/forge-std/src/console.sol", + "lib/forge-std/src/console2.sol", + "lib/solmate/lib/ds-test/src/test.sol" + ], + "versionRequirement": ">=0.6.2, <0.9.0", + "artifacts": { + "Test": { + "0.8.17+commit.8df45f5f.Linux.gcc": "Test.sol/Test.json" + } + } + }, + "lib/forge-std/src/Vm.sol": { + "lastModificationDate": 1671785251374, + "contentHash": "7d92321fbeea01d10f89778af1d0e074", + "sourceName": "lib/forge-std/src/Vm.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [], + "versionRequirement": ">=0.6.2, <0.9.0", + "artifacts": { + "Vm": { + "0.8.17+commit.8df45f5f.Linux.gcc": "Vm.sol/Vm.json" + }, + "VmSafe": { + "0.8.17+commit.8df45f5f.Linux.gcc": "Vm.sol/VmSafe.json" + } + } + }, + "lib/forge-std/src/console.sol": { + "lastModificationDate": 1671785251374, + "contentHash": "100b8a33b917da1147740d7ab8b0ded3", + "sourceName": "lib/forge-std/src/console.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [], + "versionRequirement": ">=0.4.22, <0.9.0", + "artifacts": { + "console": { + "0.8.17+commit.8df45f5f.Linux.gcc": "console.sol/console.json" + } + } + }, + "lib/forge-std/src/console2.sol": { + "lastModificationDate": 1671785251374, + "contentHash": "2096b4e5f252c5df9909cccbe3d2da2e", + "sourceName": "lib/forge-std/src/console2.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [], + "versionRequirement": ">=0.4.22, <0.9.0", + "artifacts": { + "console2": { + "0.8.17+commit.8df45f5f.Linux.gcc": "console2.sol/console2.json" + } + } + }, + "lib/solmate/lib/ds-test/src/test.sol": { + "lastModificationDate": 1671781956914, + "contentHash": "962996f0e05d5218857a538a62d7c47e", + "sourceName": "lib/solmate/lib/ds-test/src/test.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [], + "versionRequirement": ">=0.5.0", + "artifacts": { + "DSTest": { + "0.8.17+commit.8df45f5f.Linux.gcc": "test.sol/DSTest.json" + } + } + }, + "lib/solmate/src/auth/Owned.sol": { + "lastModificationDate": 1671781956282, + "contentHash": "11fec455b72d2743b77d783d6017e1e9", + "sourceName": "lib/solmate/src/auth/Owned.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [], + "versionRequirement": ">=0.8.0", + "artifacts": { + "Owned": { + "0.8.17+commit.8df45f5f.Linux.gcc": "Owned.sol/Owned.json" + } + } + }, + "lib/solmate/src/tokens/ERC721.sol": { + "lastModificationDate": 1671781956286, + "contentHash": "ecc06cefc5404b9e1adbc2e459d5757e", + "sourceName": "lib/solmate/src/tokens/ERC721.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [], + "versionRequirement": ">=0.8.0", + "artifacts": { + "ERC721": { + "0.8.17+commit.8df45f5f.Linux.gcc": "ERC721.sol/ERC721.json" + }, + "ERC721TokenReceiver": { + "0.8.17+commit.8df45f5f.Linux.gcc": "ERC721.sol/ERC721TokenReceiver.json" + } + } + }, + "lib/solmate/src/utils/LibString.sol": { + "lastModificationDate": 1671781956286, + "contentHash": "a6389de7be2f21dff5bf9d3f958291b3", + "sourceName": "lib/solmate/src/utils/LibString.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [], + "versionRequirement": ">=0.8.0", + "artifacts": { + "LibString": { + "0.8.17+commit.8df45f5f.Linux.gcc": "LibString.sol/LibString.json" + } + } + }, + "script/Unaboomer.sol": { + "lastModificationDate": 1671785999708, + "contentHash": "3642d05d9c479368231825c40aaa276a", + "sourceName": "script/Unaboomer.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [ + "lib/forge-std/src/Base.sol", + "lib/forge-std/src/Script.sol", + "lib/forge-std/src/StdChains.sol", + "lib/forge-std/src/StdCheats.sol", + "lib/forge-std/src/StdJson.sol", + "lib/forge-std/src/StdMath.sol", + "lib/forge-std/src/StdStorage.sol", + "lib/forge-std/src/StdUtils.sol", + "lib/forge-std/src/Vm.sol", + "lib/forge-std/src/console.sol", + "lib/forge-std/src/console2.sol" + ], + "versionRequirement": "^0.8.13", + "artifacts": { + "ContractScript": { + "0.8.17+commit.8df45f5f.Linux.gcc": "Unaboomer.sol/ContractScript.json" + } + } + }, + "src/Unaboomer.sol": { + "lastModificationDate": 1671786550029, + "contentHash": "dc7a3b2d64abcb2ce07b08d48f6be0e0", + "sourceName": "src/Unaboomer.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [ + "lib/solmate/src/auth/Owned.sol", + "lib/solmate/src/tokens/ERC721.sol", + "lib/solmate/src/utils/LibString.sol" + ], + "versionRequirement": "^0.8.13", + "artifacts": { + "Unaboomer": { + "0.8.17+commit.8df45f5f.Linux.gcc": "Unaboomer.sol/Unaboomer.json" + } + } + }, + "test/Unaboomer.t.sol": { + "lastModificationDate": 1671786295883, + "contentHash": "e7d519d9b20eaf140b82bbd014382633", + "sourceName": "test/Unaboomer.t.sol", + "solcConfig": { + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "metadata": { + "bytecodeHash": "ipfs", + "appendCBOR": true + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "evmVersion": "london", + "libraries": {} + } + }, + "imports": [ + "lib/forge-std/src/Base.sol", + "lib/forge-std/src/StdAssertions.sol", + "lib/forge-std/src/StdChains.sol", + "lib/forge-std/src/StdCheats.sol", + "lib/forge-std/src/StdError.sol", + "lib/forge-std/src/StdJson.sol", + "lib/forge-std/src/StdMath.sol", + "lib/forge-std/src/StdStorage.sol", + "lib/forge-std/src/StdUtils.sol", + "lib/forge-std/src/Test.sol", + "lib/forge-std/src/Vm.sol", + "lib/forge-std/src/console.sol", + "lib/forge-std/src/console2.sol", + "lib/solmate/lib/ds-test/src/test.sol", + "lib/solmate/src/auth/Owned.sol", + "lib/solmate/src/tokens/ERC721.sol", + "lib/solmate/src/utils/LibString.sol", + "src/Unaboomer.sol" + ], + "versionRequirement": "^0.8.13", + "artifacts": { + "UnaboomerTest": { + "0.8.17+commit.8df45f5f.Linux.gcc": "Unaboomer.t.sol/UnaboomerTest.json" + } + } + } + } +} \ No newline at end of file diff --git a/lib/openzeppelin-contracts b/lib/openzeppelin-contracts new file mode 160000 index 0000000..a3b9fac --- /dev/null +++ b/lib/openzeppelin-contracts @@ -0,0 +1 @@ +Subproject commit a3b9fac30e2c5cf24c9dce2eaee18d69a69db99d diff --git a/lib/solady b/lib/solady deleted file mode 160000 index 598c43f..0000000 --- a/lib/solady +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 598c43f675d5abbeb61f277bb8122937a7b9c7b7 diff --git a/lib/solmate b/lib/solmate new file mode 160000 index 0000000..3a752b8 --- /dev/null +++ b/lib/solmate @@ -0,0 +1 @@ +Subproject commit 3a752b8c83427ed1ea1df23f092ea7a810205b6c diff --git a/remappings.txt b/remappings.txt new file mode 100644 index 0000000..79862c7 --- /dev/null +++ b/remappings.txt @@ -0,0 +1,3 @@ +ds-test/=lib/solmate/lib/ds-test/src/ +solmate/=lib/solmate/src/ +forge-std/=lib/forge-std/src/ \ No newline at end of file diff --git a/script/Counter.s.sol b/script/Unaboomer.sol similarity index 84% rename from script/Counter.s.sol rename to script/Unaboomer.sol index 0e546ab..f5cb393 100644 --- a/script/Counter.s.sol +++ b/script/Unaboomer.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.13; import "forge-std/Script.sol"; -contract CounterScript is Script { +contract ContractScript is Script { function setUp() public {} function run() public { diff --git a/src/Counter.sol b/src/Counter.sol deleted file mode 100644 index b480ead..0000000 --- a/src/Counter.sol +++ /dev/null @@ -1,58 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -// .02 or something for a unabomber + 2 bombs -// unabomber alone is free -// bomb has a 20% failure rate, when burned bomb -// "explodes" a pfp by updating the img to an explosion over the pfp -// well if its random -// just have them burn it and if it blows up a pfp thats already blown up -// then bomb wasted -// might be more fun if its random -// rather than targetted -// cause then theres a chance u blow up your own -// if random, we just need to let them know which unaboomer the exploded -// cause thats a lot of the fun, knowing u blew up a rare -// etc. -// i think this time, learning from tulips, we need to push urgency -// 10days has none? -// maybe 3 days or 5 days? -// or just say fuck it and go promothean -// ppl keep buying bombs etc. -// 30K collection, free mint, .01 per bomb -// random "blow-up" -// last 100 unabombers -// get 25% of the contract funds -// that way we sell SHIT TONS of bombs -// the lower the number gets the more likely a bomb hits a blown-up pfp -// ie sell moar bombs -// or last 1K unabombers -// bombs sales halt after we hit 1k -// i think the logic here mite be to use your dual IPFS baseURI contract -// we can do onchain but simplest way would be 2 baseURIs, one of the unabombers non blown up -// and one with blown up -// i can even make a lvl of "rarity" to the explosions -// lol -// then burn envelop = update the base uri of a random tokenid -// if token id already on blown up unabomber -// bomb is a dud -// then no need to code a dud, duds will get more likely -// as more unabombers blown up -// so if u hit a rando tokenid thats already blown up = dud, u dont tell the user it hit an already blown up one -// ujust say BOMB WAS DUD -// cause unabomber mamed more ppl than killed its kinda funny he even mailed duds -// lul -// he was pissed his boms werent killin ppl fuckin psycho lul - - -contract Unaboomer { - uint256 public number; - - function setNumber(uint256 newNumber) public { - number = newNumber; - } - - function increment() public { - number++; - } -} diff --git a/src/Unaboomer.sol b/src/Unaboomer.sol new file mode 100644 index 0000000..6ae279a --- /dev/null +++ b/src/Unaboomer.sol @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + + +/******* Mint Mechanics +.00 per unaboomer (BOOMR) - 10k supply +.02 per bomb (BOMB) - infinite supply +BOMB holders can randomly mail bombs to other owners +1 BOMB kills 1 BOOMR - BOOMR image switches to explosion after being bombed +chaos ensues until 1000 survivors - the game stops +********/ + +import {ERC721} from "solmate/tokens/ERC721.sol"; +import {Owned} from "solmate/auth/Owned.sol"; +import {LibString} from "solmate/utils/LibString.sol"; + +error NotOwnerOfToken(); +error MaxSupplyReached(); +error TooMany(); +error NoContract(); +error WrongEtherAmount(); +error MaxAmountReached(); + +contract Unaboomer is Owned, ERC721 { + using LibString for uint256; + + enum TokenState { + LIVING, + DEAD + } + + mapping(uint256 => TokenState) public tokenState; + + uint256 public constant MAX_SUPPLY = 10000; + uint256 public minted; + string public livingURI; + string public deadURI; + + constructor() ERC721("Unaboomer", "BOOMR") Owned(msg.sender) {} + + function mint(uint256 amount) external payable { + if (msg.sender == tx.origin) { + revert NoContract(); + } + if (amount > 20) { + revert TooMany(); + } + if (minted + amount > MAX_SUPPLY) { + revert MaxSupplyReached(); + } + unchecked { + for (uint256 i; i < amount; i++) { + _mint(msg.sender, minted + 1); + minted++; + } + } + } + + function totalSupply() view public returns (uint256 supply) { + return minted; + } + + function setBaseURI(string calldata _baseURI) external onlyOwner { + livingURI = _baseURI; + } + + function tokenURI(uint256 _tokenId) public view override returns (string memory) { + if (tokenState[_tokenId] == TokenState.LIVING) { + return string(abi.encodePacked(livingURI, _tokenId.toString(), ".json")); + } else { + return string(abi.encodePacked(deadURI, _tokenId.toString(), ".json")); + } + } + + function supportsInterface(bytes4 interfaceId) public view virtual override (ERC721) returns (bool) { + return super.supportsInterface(interfaceId); + } +} diff --git a/test/Counter.t.sol b/test/Counter.t.sol deleted file mode 100644 index 30235e8..0000000 --- a/test/Counter.t.sol +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -import "forge-std/Test.sol"; -import "../src/Counter.sol"; - -contract CounterTest is Test { - Counter public counter; - - function setUp() public { - counter = new Counter(); - counter.setNumber(0); - } - - function testIncrement() public { - counter.increment(); - assertEq(counter.number(), 1); - } - - function testSetNumber(uint256 x) public { - counter.setNumber(x); - assertEq(counter.number(), x); - } -} diff --git a/test/Unaboomer.t.sol b/test/Unaboomer.t.sol new file mode 100644 index 0000000..b918d5e --- /dev/null +++ b/test/Unaboomer.t.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import "forge-std/Test.sol"; +import "../src/Unaboomer.sol"; + +contract UnaboomerTest is Test { + Unaboomer public boomr; + address alice = address(1); + address bob = address(2); + + function setUp() public { + boomr = new Unaboomer(); + } + + function testMint() public { + vm.startPrank(alice); + boomr.mint(5); + assertEq(boomr.totalSupply(), 5); + } +}