diff --git a/.gitignore b/.gitignore index 5773639..533506a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ cache/ out/ broadcast/ node_modules +.env .DS_Store diff --git a/README.md b/README.md index 1950366..c6b0d78 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ No one remembers where bibos came from, but one things for sure - they are imple ### Install Install [Foundry](https://github.com/gakonst/foundry/). -Run `[bash]foundryup` to update to nightly builds. +Run `foundryup` to update to nightly builds. This project uses [pnpm](https://pnpm.io/) for maximum javascript acceleration. @@ -29,7 +29,7 @@ For submodules: forge update ``` -For some scripts, you might need `jq` JSON utility. To install run `[bash]brew install jq`. +For some scripts, you might need `jq` JSON utility. To install on MacOS, run `brew install jq`. --- @@ -41,8 +41,8 @@ pnpm test --- -### Bibos Local Deployment + Inspector +### Bibos Local Inspector -1. Run `anvil` in one terminal instance. -2. Run `pnpm run deploy-anvil` in another. This deploys all the libraries, and Bibos. -3. Run `pnpm run dev`, for the frontend. Navigate to `localhost:3000` in your browser. +```[bash] +pnpm dev +``` diff --git a/deployment/deploy.sh b/deployment/deploy.sh index f1d9dd5..5446e88 100755 --- a/deployment/deploy.sh +++ b/deployment/deploy.sh @@ -1,5 +1,7 @@ #!/bin/bash +# deploy bibos to anvil + # anvil rpc RPC_URL=http://127.0.0.1:8545 # // anvil account 9 @@ -20,10 +22,7 @@ get_return_value() { SCRIPT_OUTPUT="$(forge script --private-key $PRIVATE_KEY --rpc-url $RPC_URL --broadcast --json src/scripts/deploy_bibos.sol:deploy_bibos)" BIBOS_ADDRESS="$(get_return_value "bibos" "$SCRIPT_OUTPUT")" -# # erase deployments.json -echo "{}" > $DEPLOYMENTS_PATH - -# # save the bibos address in deployments.json +# save the bibos address in deployments.json write_deployment_address "Bibos" $BIBOS_ADDRESS echo "$SCRIPT_OUTPUT" \ No newline at end of file diff --git a/deployment/scripts.sh b/deployment/scripts.sh index 99905a5..04a8161 100644 --- a/deployment/scripts.sh +++ b/deployment/scripts.sh @@ -1,11 +1,6 @@ #!/bin/bash -# anvil rpc -RPC_URL=http://127.0.0.1:8545 -# // anvil account 9 -PRIVATE_KEY=0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6 -PUBLIC_KEY=0xa0ee7a142d267c1f36714e4a8f75612f20a79720 - +# scripts to help interact with bibos # forge script --private-key $PRIVATE_KEY --rpc-url $RPC_URL --broadcast --json src/scripts/deploy_bibos.sol:deploy_bibos # cast send --private-key $PRIVATE_KEY --rpc-url $RPC_URL $BIBOS_ADDRESS "withdraw(address)" "$TO" diff --git a/deployment/verify_contracts.sh b/deployment/verify_contracts.sh index 41ebce0..4429c6b 100644 --- a/deployment/verify_contracts.sh +++ b/deployment/verify_contracts.sh @@ -1,5 +1,7 @@ #!/bin/bash +# verify bibos contracts with external library addresses + forge verify-contract --chain-id 1 --compiler-version "0.8.13+commit.abaa5c0e" \ --libraries "src/libraries/Cheeks.sol:Cheeks:0x5a56533924d6694c617172592cfa7d8c63de4b4f" \ --libraries "src/libraries/Data.sol:Data:0x62897c2906035e70470d0b0a37bf31fdadf7bf67" \ diff --git a/lib/forge-std b/lib/forge-std index 9825609..d76af36 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit 98256095f37d83653ba1617d06ccd9604cbd7c6d +Subproject commit d76af36c2878d598d6b63b8af4df48ad91be6b61 diff --git a/lib/solmate b/lib/solmate index d155ee8..1681dc5 160000 --- a/lib/solmate +++ b/lib/solmate @@ -1 +1 @@ -Subproject commit d155ee8d58f96426f57c015b34dee8a410c1eacc +Subproject commit 1681dc505f4897ef636f0435d01b1aa027fdafaf diff --git a/src/Bibos.sol b/src/Bibos.sol index a1f17c6..a8b156c 100644 --- a/src/Bibos.sol +++ b/src/Bibos.sol @@ -19,6 +19,7 @@ pragma solidity 0.8.13; import {ERC721} from "solmate/tokens/ERC721.sol"; import {Owned} from "solmate/auth/Owned.sol"; + import {Render} from "libraries/Render.sol"; error InsufficentValue(); @@ -26,6 +27,8 @@ error MintedOut(); error InvalidTokenId(); error AmountNotAvailable(); +/// @title Bibos +/// @author Bumblebee Systems contract Bibos is ERC721, Owned { /*////////////////////////////////////////////////////////////// STATE diff --git a/src/dev/PaletteUncompressed.sol b/src/dev/PaletteUncompressed.sol index d36742b..07705cf 100644 --- a/src/dev/PaletteUncompressed.sol +++ b/src/dev/PaletteUncompressed.sol @@ -1,6 +1,8 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; +/// @title PaletteUncompressed +/// @author Bumblebee Systems library PaletteUncompressed { function lightest(uint256 _value) internal pure returns (string memory) { string[64] memory lightestValues = [ diff --git a/src/dev/PaletteUtil.sol b/src/dev/PaletteUtil.sol index 4a31d5f..f8d71da 100644 --- a/src/dev/PaletteUtil.sol +++ b/src/dev/PaletteUtil.sol @@ -4,6 +4,8 @@ pragma solidity >=0.8.0; import {Util} from "libraries/Util.sol"; import {PaletteUncompressed} from "dev/PaletteUncompressed.sol"; +/// @title PaletteUtil +/// @author Bumblebee Systems library PaletteUtil { uint256 constant length = 64; diff --git a/src/dev/PointsUncompressed.sol b/src/dev/PointsUncompressed.sol index e8f360f..1567137 100644 --- a/src/dev/PointsUncompressed.sol +++ b/src/dev/PointsUncompressed.sol @@ -1,6 +1,8 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; +/// @title PointsUncompressed +/// @author Bumblebee Systems library PointsUncompressed { uint256 constant length = 64; diff --git a/src/dev/PointsUtil.sol b/src/dev/PointsUtil.sol index 6517ac2..aa4afb5 100644 --- a/src/dev/PointsUtil.sol +++ b/src/dev/PointsUtil.sol @@ -4,6 +4,8 @@ pragma solidity >=0.8.0; import {Util} from "libraries/Util.sol"; import {PointsUncompressed} from "dev/PointsUncompressed.sol"; +/// @title PointsUtil +/// @author Bumblebee Systems library PointsUtil { uint256 constant length = 64; diff --git a/src/dev/TimesUncompressed.sol b/src/dev/TimesUncompressed.sol index f393ca7..b89607a 100644 --- a/src/dev/TimesUncompressed.sol +++ b/src/dev/TimesUncompressed.sol @@ -1,6 +1,8 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; +/// @title TimesUncompressed +/// @author Bumblebee Systems library TimesUncompressed { uint256 constant length = 64; diff --git a/src/dev/TimesUtil.sol b/src/dev/TimesUtil.sol index 126378e..08e86ee 100644 --- a/src/dev/TimesUtil.sol +++ b/src/dev/TimesUtil.sol @@ -1,9 +1,11 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; -import {Util} from "src/libraries/Util.sol"; +import {Util} from "libraries/Util.sol"; import {TimesUncompressed} from "dev/TimesUncompressed.sol"; +/// @title TimesUtil +/// @author Bumblebee Systems library TimesUtil { uint256 constant length = 64; diff --git a/src/dev/Util.sol b/src/dev/Util.sol index 39fa428..38a698f 100644 --- a/src/dev/Util.sol +++ b/src/dev/Util.sol @@ -1,6 +1,8 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; +/// @title TimesUtil +/// @author Bumblebee Systems library Util { /// @notice will revert if any characters are not in [0-9] function hexStringToUint256(string memory _value) internal pure returns (uint256 result) { diff --git a/src/libraries/Background.sol b/src/libraries/Background.sol index 4fe77ca..61966b7 100644 --- a/src/libraries/Background.sol +++ b/src/libraries/Background.sol @@ -1,9 +1,11 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; -import {Palette} from "./Palette.sol"; -import {SVG} from "./SVG.sol"; +import {Palette} from "libraries/Palette.sol"; +import {SVG} from "libraries/SVG.sol"; +/// @title Background +/// @author Bumblebee Systems library Background { /*////////////////////////////////////////////////////////////// RENDER diff --git a/src/libraries/Body.sol b/src/libraries/Body.sol index 84908d5..8e70938 100644 --- a/src/libraries/Body.sol +++ b/src/libraries/Body.sol @@ -1,14 +1,16 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; -import {Palette, DensityType, PolarityType} from "./Palette.sol"; -import {Traits} from "./Traits.sol"; -import {Data} from "./Data.sol"; -import {Util} from "./Util.sol"; -import {SVG} from "./SVG.sol"; +import {Palette, DensityType, PolarityType} from "libraries/Palette.sol"; +import {Traits} from "libraries/Traits.sol"; +import {Data} from "libraries/Data.sol"; +import {Util} from "libraries/Util.sol"; +import {SVG} from "libraries/SVG.sol"; +/// @title Body +/// @author Bumblebee Systems library Body { - uint256 constant circlesCount = 7; + uint256 constant CIRCLE_COUNT = 7; /*////////////////////////////////////////////////////////////// RENDER @@ -24,7 +26,7 @@ library Body { string memory bodyGroupChildren = _bodyBackground(backgroundFill); - for (uint8 index = 0; index < circlesCount; ++index) { + for (uint8 index = 0; index < CIRCLE_COUNT; ++index) { bodyGroupChildren = string.concat( bodyGroupChildren, _bodyCircle(_seed, index, _tokenId, radii[index], mixBlendMode) @@ -51,7 +53,7 @@ library Body { ) internal pure returns (string memory) { uint256 bodySeed = uint256(keccak256(abi.encodePacked(_seed, "body", _index))); string memory bodyFill1 = Palette.bodyFill(_seed, _index, _tokenId); - string memory bodyFill2 = Palette.bodyFill(_seed, _index + circlesCount, _tokenId); + string memory bodyFill2 = Palette.bodyFill(_seed, _index + CIRCLE_COUNT, _tokenId); string memory dur = Data.shortTimes(bodySeed /= Data.length); string[2] memory coords = (_index == 0) ? ["150", "150"] : Data.bodyPoints(bodySeed /= 2); bool reverse = bodySeed % 2 == 0; diff --git a/src/libraries/Cheeks.sol b/src/libraries/Cheeks.sol index f80baba..6de92e5 100644 --- a/src/libraries/Cheeks.sol +++ b/src/libraries/Cheeks.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; -import {Util} from "./Util.sol"; -import {SVG} from "./SVG.sol"; -import {Traits} from "./Traits.sol"; +import {Util} from "libraries/Util.sol"; +import {SVG} from "libraries/SVG.sol"; +import {Traits} from "libraries/Traits.sol"; enum CheekType { NONE, @@ -12,6 +12,8 @@ enum CheekType { BIG } +/// @title Cheeks +/// @author Bumblebee Systems library Cheeks { /*////////////////////////////////////////////////////////////// RENDER diff --git a/src/libraries/Data.sol b/src/libraries/Data.sol index eeeca88..e15c830 100644 --- a/src/libraries/Data.sol +++ b/src/libraries/Data.sol @@ -1,8 +1,10 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; -import {Util} from "src/libraries/Util.sol"; +import {Util} from "libraries/Util.sol"; +/// @title Data +/// @author Bumblebee Systems library Data { /*////////////////////////////////////////////////////////////// POINTS diff --git a/src/libraries/Eyes.sol b/src/libraries/Eyes.sol index 267c374..324e190 100644 --- a/src/libraries/Eyes.sol +++ b/src/libraries/Eyes.sol @@ -22,6 +22,8 @@ enum EyeType { OPALINE } +/// @title Eyes +/// @author Bumblebee Systems library Eyes { string constant fill = "black"; diff --git a/src/libraries/Eyes2.sol b/src/libraries/Eyes2.sol index b2694b9..0480cf1 100644 --- a/src/libraries/Eyes2.sol +++ b/src/libraries/Eyes2.sol @@ -1,6 +1,8 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; +/// @title Eyes2 +/// @author Bumblebee Systems library Eyes2 { function opaline(string memory _fill) external pure returns (string memory) { return diff --git a/src/libraries/Face.sol b/src/libraries/Face.sol index 83ce356..4ac6ca5 100644 --- a/src/libraries/Face.sol +++ b/src/libraries/Face.sol @@ -1,12 +1,14 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; -import {SVG} from "./SVG.sol"; -import {Eyes} from "./Eyes.sol"; -import {Mouth} from "./Mouth.sol"; -import {Cheeks} from "./Cheeks.sol"; -import {Data} from "./Data.sol"; +import {SVG} from "libraries/SVG.sol"; +import {Eyes} from "libraries/Eyes.sol"; +import {Mouth} from "libraries/Mouth.sol"; +import {Cheeks} from "libraries/Cheeks.sol"; +import {Data} from "libraries/Data.sol"; +/// @title Face +/// @author Bumblebee Systems library Face { /*////////////////////////////////////////////////////////////// RENDER diff --git a/src/libraries/Glints.sol b/src/libraries/Glints.sol index bb5dfe2..b651466 100644 --- a/src/libraries/Glints.sol +++ b/src/libraries/Glints.sol @@ -2,11 +2,13 @@ pragma solidity >=0.8.0; import {Traits} from "libraries/Traits.sol"; -import {Palette} from "./Palette.sol"; -import {Data} from "./Data.sol"; -import {Util} from "./Util.sol"; -import {SVG} from "./SVG.sol"; +import {Palette} from "libraries/Palette.sol"; +import {Data} from "libraries/Data.sol"; +import {Util} from "libraries/Util.sol"; +import {SVG} from "libraries/SVG.sol"; +/// @title Glints +/// @author Bumblebee Systems library Glints { /*////////////////////////////////////////////////////////////// RENDER diff --git a/src/libraries/Metadata.sol b/src/libraries/Metadata.sol index 893542e..11a2d2e 100644 --- a/src/libraries/Metadata.sol +++ b/src/libraries/Metadata.sol @@ -1,9 +1,11 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity >=0.8.0; -import {Base64} from "./Base64.sol"; -import {Util} from "./Util.sol"; +import {Base64} from "libraries/Base64.sol"; +import {Util} from "libraries/Util.sol"; +/// @title Metadata +/// @author Bumblebee Systems library Metadata { string constant JSON_BASE64_HEADER = "data:application/json;base64,"; string constant SVG_XML_BASE64_HEADER = "data:image/svg+xml;base64,"; diff --git a/src/libraries/Motes.sol b/src/libraries/Motes.sol index f848b34..ef40b6b 100644 --- a/src/libraries/Motes.sol +++ b/src/libraries/Motes.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; -import {Palette} from "./Palette.sol"; -import {Data} from "./Data.sol"; -import {Util} from "./Util.sol"; -import {SVG} from "./SVG.sol"; -import {Traits} from "./Traits.sol"; +import {Palette} from "libraries/Palette.sol"; +import {Data} from "libraries/Data.sol"; +import {Util} from "libraries/Util.sol"; +import {SVG} from "libraries/SVG.sol"; +import {Traits} from "libraries/Traits.sol"; enum MoteType { NONE, @@ -15,8 +15,10 @@ enum MoteType { GLISTENING } +/// @title Motes +/// @author Bumblebee Systems library Motes { - uint256 constant GLINT_COUNT = 20; + uint256 constant MOTE_COUNT = 20; /*////////////////////////////////////////////////////////////// RENDER @@ -28,7 +30,7 @@ library Motes { MoteType moteType = Traits.moteType(_seed); if (moteType == MoteType.NONE) return ""; - for (uint8 i = 0; i < GLINT_COUNT; i++) { + for (uint8 i = 0; i < MOTE_COUNT; i++) { uint256 moteSeed = uint256(keccak256(abi.encodePacked(_seed, "mote", i))); string memory dur = Data.longTimes(moteSeed /= Data.length); diff --git a/src/libraries/Mouth.sol b/src/libraries/Mouth.sol index 4610227..80d775a 100644 --- a/src/libraries/Mouth.sol +++ b/src/libraries/Mouth.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; -import {Palette} from "./Palette.sol"; -import {Traits} from "./Traits.sol"; +import {Palette} from "libraries/Palette.sol"; +import {Traits} from "libraries/Traits.sol"; enum MouthType { SMILE, @@ -19,6 +19,8 @@ enum MouthType { BLEP } +/// @title Mouth +/// @author Bumblebee Systems library Mouth { string constant fill = "black"; diff --git a/src/libraries/Palette.sol b/src/libraries/Palette.sol index e963f4e..118f489 100644 --- a/src/libraries/Palette.sol +++ b/src/libraries/Palette.sol @@ -1,5 +1,6 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; + import {Traits} from "libraries/Traits.sol"; import {Data} from "libraries/Data.sol"; @@ -13,6 +14,8 @@ enum PolarityType { NEGATIVE } +/// @title Palette +/// @author Bumblebee Systems library Palette { uint256 constant length = 64; uint256 constant opacityLength = 5; diff --git a/src/libraries/Render.sol b/src/libraries/Render.sol index 4263e47..3fea925 100644 --- a/src/libraries/Render.sol +++ b/src/libraries/Render.sol @@ -4,16 +4,18 @@ pragma solidity >=0.8.0; import {Metadata} from "libraries/Metadata.sol"; import {Util} from "libraries/Util.sol"; import {Traits} from "libraries/Traits.sol"; -import {Data} from "./Data.sol"; +import {Data} from "libraries/Data.sol"; import {Palette} from "libraries/Palette.sol"; -import {Background} from "./Background.sol"; -import {Body} from "./Body.sol"; -import {Face} from "./Face.sol"; -import {Motes} from "./Motes.sol"; -import {Glints} from "./Glints.sol"; -import {Traits} from "./Traits.sol"; -import {SVG} from "./SVG.sol"; +import {Background} from "libraries/Background.sol"; +import {Body} from "libraries/Body.sol"; +import {Face} from "libraries/Face.sol"; +import {Motes} from "libraries/Motes.sol"; +import {Glints} from "libraries/Glints.sol"; +import {Traits} from "libraries/Traits.sol"; +import {SVG} from "libraries/SVG.sol"; +/// @title Render +/// @author Bumblebee Systems library Render { string public constant description = "Floating. Hypnotizing. Divine? Bibos are 1111 friendly spirits for your wallet. Join the billions of people who love and adore bibos today."; diff --git a/src/libraries/SVG.sol b/src/libraries/SVG.sol index 4b75adb..5ecb63a 100644 --- a/src/libraries/SVG.sol +++ b/src/libraries/SVG.sol @@ -1,8 +1,10 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; -import {Util} from "./Util.sol"; +import {Util} from "libraries/Util.sol"; +/// @title SVG +/// @author Bumblebee Systems library SVG { /*////////////////////////////////////////////////////////////// ELEMENT diff --git a/src/libraries/Traits.sol b/src/libraries/Traits.sol index f699c37..0448446 100644 --- a/src/libraries/Traits.sol +++ b/src/libraries/Traits.sol @@ -1,14 +1,16 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; -import {DensityType, PolarityType} from "./Palette.sol"; -import {MoteType} from "./Motes.sol"; -import {EyeType} from "./Eyes.sol"; -import {CheekType} from "./Cheeks.sol"; -import {MouthType} from "./Mouth.sol"; -import {Glints} from "./Glints.sol"; -import {Util} from "./Util.sol"; - +import {DensityType, PolarityType} from "libraries/Palette.sol"; +import {MoteType} from "libraries/Motes.sol"; +import {EyeType} from "libraries/Eyes.sol"; +import {CheekType} from "libraries/Cheeks.sol"; +import {MouthType} from "libraries/Mouth.sol"; +import {Glints} from "libraries/Glints.sol"; +import {Util} from "libraries/Util.sol"; + +/// @title Traits +/// @author Bumblebee Systems library Traits { /*////////////////////////////////////////////////////////////// TRAITS diff --git a/src/libraries/Util.sol b/src/libraries/Util.sol index 0eff546..cd215df 100644 --- a/src/libraries/Util.sol +++ b/src/libraries/Util.sol @@ -1,10 +1,9 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity >=0.8.0; -import {Test, console2} from "forge-std/Test.sol"; -/// @title the bibos utility library -/// @notice utility functions +/// @title Util +/// @author Bumblebee Systems library Util { error NumberHasTooManyDigits(); diff --git a/src/scripts/bytecode_size.sol b/src/scripts/bytecode_size.sol index f5de7f1..c03430e 100644 --- a/src/scripts/bytecode_size.sol +++ b/src/scripts/bytecode_size.sol @@ -3,6 +3,8 @@ pragma solidity >=0.8.0; import {Script, console2 as console} from "forge-std/Script.sol"; +/// @title bytecode_size +/// @author Bumblebee Systems contract bytecode_size is Script { function get_bytecode_size(address _target) public view returns (uint256) { return _target.code.length; diff --git a/src/scripts/deploy_bibos.sol b/src/scripts/deploy_bibos.sol index 529c419..db77022 100644 --- a/src/scripts/deploy_bibos.sol +++ b/src/scripts/deploy_bibos.sol @@ -4,6 +4,8 @@ pragma solidity >=0.8.0; import {Script, console2 as console} from "forge-std/Script.sol"; import {Bibos} from "src/Bibos.sol"; +/// @title deploy_bibos +/// @author Bumblebee Systems contract deploy_bibos is Script { function run() public returns (address bibos) { vm.startBroadcast(); diff --git a/src/scripts/deploy_libs.sol b/src/scripts/deploy_libs.sol index 1b5f18d..6cc3f5f 100644 --- a/src/scripts/deploy_libs.sol +++ b/src/scripts/deploy_libs.sol @@ -2,18 +2,21 @@ pragma solidity >=0.8.0; import {Test, console2 as console} from "forge-std/Test.sol"; -import {Mouth} from "src/libraries/Mouth.sol"; -import {Eyes} from "src/libraries/Eyes.sol"; -import {Cheeks} from "src/libraries/Cheeks.sol"; -import {Face} from "src/libraries/Face.sol"; -import {Body} from "src/libraries/Body.sol"; -import {Motes} from "src/libraries/Motes.sol"; - import {CREATE3} from "solmate/utils/CREATE3.sol"; -import {time} from "src/util/time.sol"; -import {io} from "src/util/io.sol"; -contract deploy { +import {Mouth} from "libraries/Mouth.sol"; +import {Eyes} from "libraries/Eyes.sol"; +import {Cheeks} from "libraries/Cheeks.sol"; +import {Face} from "libraries/Face.sol"; +import {Body} from "libraries/Body.sol"; +import {Motes} from "libraries/Motes.sol"; + +import {time} from "util/time.sol"; +import {io} from "util/io.sol"; + +/// @title deploy_libs +/// @author Bumblebee Systems +contract deploy_libs { mapping(string => address) public addresses; function _deploy(string memory _name, bytes memory _creationCode) internal returns (address) { diff --git a/src/scripts/encode_palettes.sol b/src/scripts/encode_palettes.sol index 950ca9a..56c77f3 100644 --- a/src/scripts/encode_palettes.sol +++ b/src/scripts/encode_palettes.sol @@ -5,6 +5,8 @@ import {Script, console2 as console} from "forge-std/Script.sol"; import {PaletteUtil} from "dev/PaletteUtil.sol"; +/// @title encode_palettes +/// @author Bumblebee Systems contract encode_palettes is Script { function encodeAll() public diff --git a/src/scripts/encode_points.sol b/src/scripts/encode_points.sol index 6a3bcfe..da678eb 100644 --- a/src/scripts/encode_points.sol +++ b/src/scripts/encode_points.sol @@ -5,6 +5,8 @@ import {Script, console2 as console} from "forge-std/Script.sol"; import {PointsUtil} from "dev/PointsUtil.sol"; +/// @title encode_points +/// @author Bumblebee Systems contract encode_points is Script { function encodeAll() public diff --git a/src/scripts/encode_times.sol b/src/scripts/encode_times.sol index fa58630..23e697e 100644 --- a/src/scripts/encode_times.sol +++ b/src/scripts/encode_times.sol @@ -5,6 +5,8 @@ import {Script, console2 as console} from "forge-std/Script.sol"; import {TimesUtil} from "dev/TimesUtil.sol"; +/// @title encode_times +/// @author Bumblebee Systems contract encode_times is Script { function getShorter() public pure returns (bytes memory) { return TimesUtil.getShorter(); diff --git a/src/scripts/local_render.sol b/src/scripts/local_render.sol index e083d80..6f9a467 100644 --- a/src/scripts/local_render.sol +++ b/src/scripts/local_render.sol @@ -1,13 +1,15 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; -import {Test, console2 as console} from "forge-std/Test.sol"; +import {Script} from "forge-std/Script.sol"; -import {Bibos} from "../Bibos.sol"; +import {Bibos} from "src/Bibos.sol"; -import {time} from "src/util/time.sol"; +import {time} from "util/time.sol"; -contract local_render is Test { +/// @title local_render +/// @author Bumblebee Systems +contract local_render is Script { function run() external returns (string memory tokenURI) { Bibos bibos = new Bibos(); uint256 price = bibos.price(); diff --git a/src/scripts/withdraw_bibos.sol b/src/scripts/withdraw_bibos.sol index 1a7602b..8c68a61 100644 --- a/src/scripts/withdraw_bibos.sol +++ b/src/scripts/withdraw_bibos.sol @@ -4,6 +4,8 @@ pragma solidity >=0.8.0; import {Script, console2 as console} from "forge-std/Script.sol"; import {Bibos} from "src/Bibos.sol"; +/// @title local_render +/// @author Bumblebee Systems contract withdraw_bibos is Script { address constant bibosAddress = 0xF528e3381372c43F5e8a55b3E6c252E32F1a26e4; diff --git a/src/test/Bibos.t.sol b/src/test/Bibos.t.sol index cdd486e..bdfdc89 100644 --- a/src/test/Bibos.t.sol +++ b/src/test/Bibos.t.sol @@ -2,7 +2,7 @@ pragma solidity >=0.8.0; import {Test, console} from "forge-std/Test.sol"; -import {Bibos} from "../Bibos.sol"; +import {Bibos} from "src/Bibos.sol"; contract BibosTest is Test { Bibos bibos; diff --git a/src/test/Palette.t.sol b/src/test/Palette.t.sol index 46abcb8..4028016 100644 --- a/src/test/Palette.t.sol +++ b/src/test/Palette.t.sol @@ -5,7 +5,7 @@ import {Test} from "forge-std/Test.sol"; import {PointsUtil} from "dev/PointsUtil.sol"; import {Data} from "libraries/Data.sol"; import {PaletteUncompressed} from "dev/PaletteUncompressed.sol"; -import {Palette} from "../libraries/Palette.sol"; +import {Palette} from "libraries/Palette.sol"; contract PaletteTest is Test { function setUp() public {} diff --git a/src/test/SvgValidation.t.sol b/src/test/SvgValidation.t.sol index 34c212a..3d88186 100644 --- a/src/test/SvgValidation.t.sol +++ b/src/test/SvgValidation.t.sol @@ -2,8 +2,8 @@ pragma solidity >=0.8.0; import {Test, console2 as console} from "forge-std/Test.sol"; -import {Bibos} from "../Bibos.sol"; -import {time} from "../util/time.sol"; +import {Bibos} from "src/Bibos.sol"; +import {time} from "util/time.sol"; contract SvgValidationTest is Test { Bibos bibos; diff --git a/src/util/io.sol b/src/util/io.sol index 94f5bdc..5ff209c 100644 --- a/src/util/io.sol +++ b/src/util/io.sol @@ -3,6 +3,8 @@ pragma solidity >=0.8.0; import {vm} from "./vm.sol"; +/// @title io +/// @author Bumblebee Systems library io { function read(string memory filePath) internal returns (bytes memory) { string[] memory readInputs = new string[](2); diff --git a/src/util/time.sol b/src/util/time.sol index f848cd4..b44ffc1 100644 --- a/src/util/time.sol +++ b/src/util/time.sol @@ -3,6 +3,8 @@ pragma solidity >=0.8.0; import {vm} from "./vm.sol"; +/// @title time +/// @author Bumblebee Systems library time { string constant UNIX_TIME_PATH = "scripts/time.sh"; diff --git a/src/util/vm.sol b/src/util/vm.sol index 19b02b8..2052dcd 100644 --- a/src/util/vm.sol +++ b/src/util/vm.sol @@ -3,6 +3,8 @@ pragma solidity >=0.8.0; import {Vm} from "forge-std/Vm.sol"; +/// @title vm +/// @author Bumblebee Systems library vm { Vm constant std_cheats = Vm(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); }