@bannynet/core-v6 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +53 -0
  2. package/SKILLS.md +94 -0
  3. package/deployments/banny-core-v5/arbitrum/Banny721TokenUriResolver.json +1809 -0
  4. package/deployments/banny-core-v5/arbitrum_sepolia/Banny721TokenUriResolver.json +1795 -0
  5. package/deployments/banny-core-v5/base/Banny721TokenUriResolver.json +1810 -0
  6. package/deployments/banny-core-v5/base_sepolia/Banny721TokenUriResolver.json +1796 -0
  7. package/deployments/banny-core-v5/ethereum/Banny721TokenUriResolver.json +1795 -0
  8. package/deployments/banny-core-v5/optimism/Banny721TokenUriResolver.json +1810 -0
  9. package/deployments/banny-core-v5/optimism_sepolia/Banny721TokenUriResolver.json +1796 -0
  10. package/deployments/banny-core-v5/sepolia/Banny721TokenUriResolver.json +1795 -0
  11. package/foundry.toml +22 -0
  12. package/package.json +53 -0
  13. package/remappings.txt +1 -0
  14. package/script/1.Fix.s.sol +290 -0
  15. package/script/Add.Denver.s.sol +75 -0
  16. package/script/AirdropOutfits.s.sol +2302 -0
  17. package/script/Deploy.s.sol +440 -0
  18. package/script/Drop1.s.sol +979 -0
  19. package/script/MigrationContractArbitrum.sol +494 -0
  20. package/script/MigrationContractArbitrum1.sol +170 -0
  21. package/script/MigrationContractArbitrum2.sol +204 -0
  22. package/script/MigrationContractArbitrum3.sol +174 -0
  23. package/script/MigrationContractArbitrum4.sol +478 -0
  24. package/script/MigrationContractBase1.sol +444 -0
  25. package/script/MigrationContractBase2.sol +175 -0
  26. package/script/MigrationContractBase3.sol +309 -0
  27. package/script/MigrationContractBase4.sol +350 -0
  28. package/script/MigrationContractBase5.sol +259 -0
  29. package/script/MigrationContractEthereum1.sol +468 -0
  30. package/script/MigrationContractEthereum2.sol +306 -0
  31. package/script/MigrationContractEthereum3.sol +349 -0
  32. package/script/MigrationContractEthereum4.sol +352 -0
  33. package/script/MigrationContractEthereum5.sol +354 -0
  34. package/script/MigrationContractEthereum6.sol +270 -0
  35. package/script/MigrationContractEthereum7.sol +439 -0
  36. package/script/MigrationContractEthereum8.sol +385 -0
  37. package/script/MigrationContractOptimism.sol +196 -0
  38. package/script/helpers/BannyverseDeploymentLib.sol +73 -0
  39. package/script/helpers/MigrationHelper.sol +155 -0
  40. package/script/outfit_drop/generate-migration.js +3441 -0
  41. package/script/outfit_drop/raw.json +43276 -0
  42. package/slither-ci.config.json +10 -0
  43. package/sphinx.lock +521 -0
  44. package/src/Banny721TokenUriResolver.sol +1288 -0
  45. package/src/interfaces/IBanny721TokenUriResolver.sol +137 -0
  46. package/test/Banny721TokenUriResolver.t.sol +669 -0
  47. package/test/BannyAttacks.t.sol +322 -0
  48. package/test/DecorateFlow.t.sol +1056 -0
package/foundry.toml ADDED
@@ -0,0 +1,22 @@
1
+ [profile.default]
2
+ solc = '0.8.23'
3
+ evm_version = 'paris'
4
+ optimizer_runs = 800
5
+ libs = ["node_modules", "lib"]
6
+ fs_permissions = [{ access = "read-write", path = "./"}]
7
+
8
+ [profile.ci_sizes]
9
+ optimizer_runs = 200
10
+
11
+ [fuzz]
12
+ runs = 4096
13
+
14
+ [invariant]
15
+ runs = 1024
16
+ depth = 100
17
+ fail_on_revert = false
18
+
19
+ [fmt]
20
+ number_underscore = "thousands"
21
+ multiline_func_header = "all"
22
+ wrap_comments = true
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@bannynet/core-v6",
3
+ "version": "0.0.1",
4
+ "license": "MIT",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/mejango/banny-retail-v6"
8
+ },
9
+ "engines": {
10
+ "node": ">=20.0.0"
11
+ },
12
+ "scripts": {
13
+ "test": "forge test",
14
+ "coverage:integration": "forge coverage --match-path \"./src/*.sol\" --report lcov --report summary",
15
+ "generate:migration": "node ./script/outfit_drop/generate-migration.js",
16
+ "deploy:mainnets": "source ./.env && export START_TIME=$(date +%s) && npx sphinx propose ./script/Deploy.s.sol --networks mainnets",
17
+ "deploy:testnets": "source ./.env && export START_TIME=$(date +%s) && npx sphinx propose ./script/Deploy.s.sol --networks testnets",
18
+ "deploy:testnets:drop:1": "source ./.env && npx sphinx propose ./script/Drop1.s.sol --networks testnets",
19
+ "deploy:mainnets:drop:1": "source ./.env && npx sphinx propose ./script/Drop1.s.sol --networks mainnets",
20
+ "deploy:testnets:airdrop": "source ./.env && npx sphinx propose ./script/AirdropOutfits.s.sol --networks testnets",
21
+ "deploy:mainnets:airdrop": "source ./.env && npx sphinx propose ./script/AirdropOutfits.s.sol --networks mainnets",
22
+ "deploy:testnets:airdrop:batch1": "source ./.env && npx sphinx propose ./script/AirdropOutfitsBatch1.s.sol --networks testnets",
23
+ "deploy:mainnets:airdrop:batch1": "source ./.env && npx sphinx propose ./script/AirdropOutfitsBatch1.s.sol --networks mainnets",
24
+ "deploy:testnets:airdrop:batch2": "source ./.env && npx sphinx propose ./script/AirdropOutfitsBatch2.s.sol --networks testnets",
25
+ "deploy:mainnets:airdrop:batch2": "source ./.env && npx sphinx propose ./script/AirdropOutfitsBatch2.s.sol --networks mainnets",
26
+ "deploy:testnets:airdrop:batch3": "source ./.env && npx sphinx propose ./script/AirdropOutfitsBatch3.s.sol --networks testnets",
27
+ "deploy:mainnets:airdrop:batch3": "source ./.env && npx sphinx propose ./script/AirdropOutfitsBatch3.s.sol --networks mainnets",
28
+ "deploy:testnets:airdrop:batch4": "source ./.env && npx sphinx propose ./script/AirdropOutfitsBatch4.s.sol --networks testnets",
29
+ "deploy:mainnets:airdrop:batch4": "source ./.env && npx sphinx propose ./script/AirdropOutfitsBatch4.s.sol --networks mainnets",
30
+ "deploy:testnets:airdrop:batch5": "source ./.env && npx sphinx propose ./script/AirdropOutfitsBatch5.s.sol --networks testnets",
31
+ "deploy:mainnets:airdrop:batch5": "source ./.env && npx sphinx propose ./script/AirdropOutfitsBatch5.s.sol --networks mainnets",
32
+ "deploy:testnets:airdrop:batch6": "source ./.env && npx sphinx propose ./script/AirdropOutfitsBatch6.s.sol --networks testnets",
33
+ "deploy:mainnets:airdrop:batch6": "source ./.env && npx sphinx propose ./script/AirdropOutfitsBatch6.s.sol --networks mainnets",
34
+ "deploy:testnets:airdrop:batch7": "source ./.env && npx sphinx propose ./script/AirdropOutfitsBatch7.s.sol --networks testnets",
35
+ "deploy:mainnets:airdrop:batch7": "source ./.env && npx sphinx propose ./script/AirdropOutfitsBatch7.s.sol --networks mainnets",
36
+ "deploy:testnets:fix:1": "source ./.env && npx sphinx propose ./script/1.Fix.s.sol --networks testnets",
37
+ "deploy:mainnets:fix:1": "source ./.env && npx sphinx propose ./script/1.Fix.s.sol --networks mainnets",
38
+ "artifacts": "source ./.env && npx sphinx artifacts --org-id 'ea165b21-7cdc-4d7b-be59-ecdd4c26bee4' --project-name 'banny-core-v5'"
39
+ },
40
+ "dependencies": {
41
+ "@bananapus/721-hook-v6": "^0.0.1",
42
+ "@bananapus/buyback-hook-v6": "^0.0.1",
43
+ "@bananapus/core-v6": "^0.0.1",
44
+ "@bananapus/suckers-v6": "^0.0.1",
45
+ "@bananapus/swap-terminal-v6": "^0.0.1",
46
+ "@openzeppelin/contracts": "^5.2.0",
47
+ "@rev-net/core-v6": "^0.0.1",
48
+ "keccak": "^3.0.4"
49
+ },
50
+ "devDependencies": {
51
+ "@sphinx-labs/plugins": "0.33.2"
52
+ }
53
+ }
package/remappings.txt ADDED
@@ -0,0 +1 @@
1
+ @sphinx-labs/contracts/=node_modules/@sphinx-labs/contracts/contracts/foundry
@@ -0,0 +1,290 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity 0.8.23;
3
+
4
+ import {JB721TierConfig} from "@bananapus/721-hook-v5/src/structs/JB721TierConfig.sol";
5
+ import {JB721TiersHook} from "@bananapus/721-hook-v5/src/JB721TiersHook.sol";
6
+
7
+ import "./helpers/BannyverseDeploymentLib.sol";
8
+ import "@rev-net/core-v5/script/helpers/RevnetCoreDeploymentLib.sol";
9
+ import "@bananapus/core-v5/script/helpers/CoreDeploymentLib.sol";
10
+ import "@openzeppelin/contracts/utils/Strings.sol";
11
+
12
+ import {Sphinx} from "@sphinx-labs/contracts/SphinxPlugin.sol";
13
+ import {Script} from "forge-std/Script.sol";
14
+
15
+ import {Banny721TokenUriResolver} from "./../src/Banny721TokenUriResolver.sol";
16
+
17
+ contract Drop1Script is Script, Sphinx {
18
+ /// @notice tracks the deployment of the revnet contracts for the chain we are deploying to.
19
+ RevnetCoreDeployment revnet;
20
+ /// @notice tracks the deployment of the bannyverse contracts for the chain we are deploying to.
21
+ BannyverseDeployment bannyverse;
22
+ /// @notice tracks the deployment of the core contracts for the chain we are deploying to.
23
+ CoreDeployment core;
24
+
25
+ JB721TiersHook hook;
26
+
27
+ bytes32 RESOLVER_SALT = "_BAN_RESOLVERV6__";
28
+ address OPERATOR;
29
+ address TRUSTED_FORWARDER;
30
+
31
+ function configureSphinx() public override {
32
+ // TODO: Update to contain revnet devs.
33
+ sphinxConfig.projectName = "banny-core-v5";
34
+ sphinxConfig.mainnets = ["ethereum", "optimism", "base", "arbitrum"];
35
+ sphinxConfig.testnets = ["ethereum_sepolia", "optimism_sepolia", "base_sepolia", "arbitrum_sepolia"];
36
+ }
37
+
38
+ function run() public {
39
+ // Get the operator address.
40
+ OPERATOR = safeAddress();
41
+
42
+ // Get the deployment addresses for the nana CORE for this chain.
43
+ // We want to do this outside of the `sphinx` modifier.
44
+ core = CoreDeploymentLib.getDeployment(
45
+ vm.envOr("NANA_CORE_DEPLOYMENT_PATH", string("node_modules/@bananapus/core-v5/deployments/"))
46
+ );
47
+
48
+ TRUSTED_FORWARDER = core.controller.trustedForwarder();
49
+
50
+ // Get the deployment addresses for the revnet contracts for this chain.
51
+ revnet = RevnetCoreDeploymentLib.getDeployment(
52
+ vm.envOr("REVNET_CORE_DEPLOYMENT_PATH", string("node_modules/@rev-net/core-v5/deployments/"))
53
+ );
54
+
55
+ // Get the deployment addresses for the 721 hook contracts for this chain.
56
+ bannyverse =
57
+ BannyverseDeploymentLib.getDeployment(vm.envOr("BANNYVERSE_CORE_DEPLOYMENT_PATH", string("deployments/")));
58
+
59
+ // Get the hook address by using the deployer.
60
+ hook = JB721TiersHook(address(revnet.basic_deployer.tiered721HookOf(bannyverse.revnetId)));
61
+ deploy();
62
+ }
63
+
64
+ function deploy() public sphinx {
65
+ string[] memory names = new string[](47);
66
+ bytes32[] memory svgHashes = new bytes32[](47);
67
+
68
+ // Deploy the Banny URI Resolver.
69
+ Banny721TokenUriResolver resolver;
70
+
71
+ string memory _BANNY_BODY =
72
+ '<g class="a1"><path d="M173 53h4v17h-4z"/></g><g class="a2"><path d="M167 57h3v10h-3z"/><path d="M169 53h4v17h-4z"/></g><g class="a3"><path d="M167 53h3v4h-3z"/><path d="M163 57h4v10h-4z"/><path d="M167 67h3v3h-3z"/></g><g class="b1"><path d="M213 253h-3v-3-3h-3v-7-3h-4v-10h-3v-7-7-3h-3v-73h-4v-10h-3v-10h-3v-7h-4v-7h-3v-3h-3v-3h-4v10h4v10h3v10h3v3h4v7 3 70 3h3v7h3v20h4v7h3v3h3v3h4v4h3v3h3v-3-4z"/><path d="M253 307v-4h-3v-3h-3v-3h-4v-4h-3v-3h-3v-3h-4v-4h-3v-3h-3v-3h-4v-4h-3v-6h-3v-7h-4v17h4v3h3v3h3 4v4h3v3h3v3h4v4h3v3h3v3h4v4h3v3h3v3h4v-6h-4z"/></g><g class="b2"><path d="M250 310v-3h-3v-4h-4v-3h-3v-3h-3v-4h-4v-3h-3v-3h-3v-4h-7v-3h-3v-3h-4v-17h-3v-3h-3v-4h-4v-3h-3v-3h-3v-7h-4v-20h-3v-7h-3v-73-3-7h-4v-3h-3v-10h-3v-10h-4V70h-3v-3l-3 100 3-100v40h-3v10h-4v6h-3v14h-3v3 13h-4v44h4v16h3v14h3v13h4v10h3v7h3v3h4v3h3v4h3v3h4v3h3v4h3v3h4v3h3v7h7v7h6v3h7v3h7v4h13v3h3v3h10v-3h-3zm-103-87v-16h3v-10h-3v6h-4v17h-3v10h3v-7h4z"/><path d="M143 230h4v7h-4zm4 10h3v3h-3zm3 7h3v3h-3zm3 6h4v4h-4z"/><path d="M163 257h-6v3h3v3h3v4h4v-4-3h-4v-3z"/></g><g class="b3"><path d="M143 197v6h4v-6h6v-44h4v-16h3v-14h3v-6h4v-10h3V97h-7v6h-3v4h-3v3h-4v3h-3v4 3h-3v3 4h-4v10h-3v16 4h-3v46h3v-6h3z"/><path d="M140 203h3v17h-3z"/><path d="M137 220h3v10h-3z"/><path d="M153 250h-3v-7h-3v-6h-4v-7h-3v10h3v7h4v6h3v4h3v-7zm-3 10h3v7h-3z"/><path d="M147 257h3v3h-3zm6 0h4v3h-4z"/><path d="M160 263v-3h-3v3 7h6v-7h-3zm-10-56v16h-3v7h3v10h3v7h4v6h6v4h7v-4-3h-3v-10h-4v-13h-3v-14h-3v-16h-4v10h-3z"/><path d="M243 313v-3h-3v-3h-10-3v-4h-7v-3h-7v-3h-6v-7h-7v-7h-3v-3h-4v-3h-3v-4h-3v-3h-4v-3h-3v-4h-3v-3h-4v-3h-3v10h-3v3h-4v3h-3v7h3v7h4v6h3v5h4v3h6v3h3v3h4 3v3h3 4v3h3 3v4h10v3h7 7 3v3h10 3v-3h10v-3h4v-4h-14z"/></g><g class="b4"><path d="M183 130h4v7h-4z"/><path d="M180 127h3v3h-3zm-27-4h4v7h-4z"/><path d="M157 117h3v6h-3z"/><path d="M160 110h3v7h-3z"/><path d="M163 107h4v3h-4zm-3 83h3v7h-3z"/><path d="M163 187h4v3h-4zm20 0h7v3h-7z"/><path d="M180 190h3v3h-3zm10-7h3v4h-3z"/><path d="M193 187h4v6h-4zm-20 53h4v7h-4z"/><path d="M177 247h3v6h-3z"/><path d="M180 253h3v7h-3z"/><path d="M183 260h7v3h-7z"/><path d="M190 263h3v4h-3zm0-20h3v4h-3z"/><path d="M187 240h3v3h-3z"/><path d="M190 237h3v3h-3zm13 23h4v3h-4z"/><path d="M207 263h3v7h-3z"/><path d="M210 270h3v3h-3zm-10 7h3v6h-3z"/><path d="M203 283h4v7h-4z"/><path d="M207 290h6v3h-6z"/></g><g class="o"><path d="M133 157h4v50h-4zm0 63h4v10h-4zm27-163h3v10h-3z"/><path d="M163 53h4v4h-4z"/><path d="M167 50h10v3h-10z"/><path d="M177 53h3v17h-3z"/><path d="M173 70h4v27h-4zm-6 0h3v27h-3z"/><path d="M163 67h4v3h-4zm0 30h4v3h-4z"/><path d="M160 100h3v3h-3z"/><path d="M157 103h3v4h-3z"/><path d="M153 107h4v3h-4z"/><path d="M150 110h3v3h-3z"/><path d="M147 113h3v7h-3z"/><path d="M143 120h4v7h-4z"/><path d="M140 127h3v10h-3z"/><path d="M137 137h3v20h-3zm56-10h4v10h-4z"/><path d="M190 117h3v10h-3z"/><path d="M187 110h3v7h-3z"/><path d="M183 103h4v7h-4z"/><path d="M180 100h3v3h-3z"/><path d="M177 97h3v3h-3zm-40 106h3v17h-3zm0 27h3v10h-3zm10 30h3v7h-3z"/><path d="M150 257v-4h-3v-6h-4v-7h-3v10h3v10h4v-3h3z"/><path d="M150 257h3v3h-3z"/><path d="M163 273v-3h-6v-10h-4v7h-3v3h3v3h4v7h3v-7h3z"/><path d="M163 267h4v3h-4z"/><path d="M170 257h-3-4v3h4v7h3v-10z"/><path d="M157 253h6v4h-6z"/><path d="M153 247h4v6h-4z"/><path d="M150 240h3v7h-3z"/><path d="M147 230h3v10h-3zm13 50h3v7h-3z"/><path d="M143 223h4v7h-4z"/><path d="M147 207h3v16h-3z"/><path d="M150 197h3v10h-3zm-10 0h3v6h-3zm50 113h7v3h-7zm23 10h17v3h-17z"/><path d="M230 323h13v4h-13z"/><path d="M243 320h10v3h-10z"/><path d="M253 317h4v3h-4z"/><path d="M257 307h3v10h-3z"/><path d="M253 303h4v4h-4z"/><path d="M250 300h3v3h-3z"/><path d="M247 297h3v3h-3z"/><path d="M243 293h4v4h-4z"/><path d="M240 290h3v3h-3z"/><path d="M237 287h3v3h-3z"/><path d="M233 283h4v4h-4z"/><path d="M230 280h3v3h-3z"/><path d="M227 277h3v3h-3z"/><path d="M223 273h4v4h-4z"/><path d="M220 267h3v6h-3z"/><path d="M217 260h3v7h-3z"/><path d="M213 253h4v7h-4z"/><path d="M210 247h3v6h-3z"/><path d="M207 237h3v10h-3z"/><path d="M203 227h4v10h-4zm-40 60h4v6h-4zm24 20h3v3h-3z"/><path d="M167 293h3v5h-3zm16 14h4v3h-4z"/><path d="M170 298h4v3h-4zm10 6h3v3h-3z"/><path d="M174 301h6v3h-6zm23 12h6v4h-6z"/><path d="M203 317h10v3h-10zm-2-107v-73h-4v73h3v17h3v-17h-2z"/></g><g class="o"><path d="M187 307v-4h3v-6h-3v-4h-4v-3h-3v-3h-7v-4h-6v4h-4v3h4v27h-4v13h-3v10h-4v7h4v3h3 10 14v-3h-4v-4h-3v-3h-3v-3h-4v-7h4v-10h3v-7h3v-3h7v-3h-3zm16 10v-4h-6v17h-4v10h-3v7h3v3h4 6 4 3 14v-3h-4v-4h-7v-3h-3v-3h-3v-10h3v-7h3v-3h-10z"/></g>';
73
+ string memory _DEFAULT_NECKLACE =
74
+ '<g class="o"><path d="M190 173h-37v-3h-10v-4h-6v4h3v3h-3v4h6v3h10v4h37v-4h3v-3h-3v-4zm-40 4h-3v-4h3v4zm7 3v-3h3v3h-3zm6 0v-3h4v3h-4zm7 0v-3h3v3h-3zm7 0v-3h3v3h-3zm10 0h-4v-3h4v3z"/><path d="M190 170h3v3h-3z"/><path d="M193 166h4v4h-4zm0 7h4v4h-4z"/></g><g class="w"><path d="M137 170h3v3h-3zm10 3h3v4h-3zm10 4h3v3h-3zm6 0h4v3h-4zm7 0h3v3h-3zm7 0h3v3h-3zm6 0h4v3h-4zm7-4h3v4h-3z"/><path d="M193 170h4v3h-4z"/></g>';
75
+ string memory _DEFAULT_MOUTH =
76
+ '<g class="o"><path d="M183 160v-4h-20v4h-3v3h3v4h24v-7h-4zm-13 3v-3h10v3h-10z" fill="#ad71c8"/><path d="M170 160h10v3h-10z"/></g>';
77
+ string memory _DEFAULT_STANDARD_EYES =
78
+ '<g class="o"><path d="M177 140v3h6v11h10v-11h4v-3h-20z"/><path d="M153 140v3h7v8 3h7 3v-11h3v-3h-20z"/></g><g class="w"><path d="M153 143h7v4h-7z"/><path d="M157 147h3v3h-3zm20-4h6v4h-6z"/><path d="M180 147h3v3h-3z"/></g>';
79
+ string memory _DEFAULT_ALIEN_EYES =
80
+ '<g class="o"><path d="M190 127h3v3h-3zm3 13h4v3h-4zm-42 0h6v6h-6z"/><path d="M151 133h3v7h-3zm10 0h6v4h-6z"/><path d="M157 137h17v6h-17zm3 13h14v3h-14zm17-13h7v16h-7z"/><path d="M184 137h6v6h-6zm0 10h10v6h-10z"/><path d="M187 143h10v4h-10z"/><path d="M190 140h3v3h-3zm-6-10h3v7h-3z"/><path d="M187 130h6v3h-6zm-36 0h10v3h-10zm16 13h7v7h-7zm-10 0h7v7h-7z"/><path d="M164 147h3v3h-3zm29-20h4v6h-4z"/><path d="M194 133h3v7h-3z"/></g><g class="w"><path d="M154 133h7v4h-7z"/><path d="M154 137h3v3h-3zm10 6h3v4h-3zm20 0h3v4h-3zm3-10h7v4h-7z"/><path d="M190 137h4v3h-4z"/></g>';
81
+
82
+ {
83
+ // Perform the check for the resolver..
84
+ (address _resolver, bool _resolverIsDeployed) = _isDeployed(
85
+ RESOLVER_SALT,
86
+ type(Banny721TokenUriResolver).creationCode,
87
+ abi.encode(
88
+ _BANNY_BODY,
89
+ _DEFAULT_NECKLACE,
90
+ _DEFAULT_MOUTH,
91
+ _DEFAULT_STANDARD_EYES,
92
+ _DEFAULT_ALIEN_EYES,
93
+ OPERATOR,
94
+ TRUSTED_FORWARDER
95
+ )
96
+ );
97
+
98
+ // Deploy it if it has not been deployed yet.
99
+ resolver = !_resolverIsDeployed
100
+ ? new Banny721TokenUriResolver{salt: RESOLVER_SALT}(
101
+ _BANNY_BODY,
102
+ _DEFAULT_NECKLACE,
103
+ _DEFAULT_MOUTH,
104
+ _DEFAULT_STANDARD_EYES,
105
+ _DEFAULT_ALIEN_EYES,
106
+ OPERATOR,
107
+ TRUSTED_FORWARDER
108
+ )
109
+ : Banny721TokenUriResolver(_resolver);
110
+ }
111
+
112
+ // Desk
113
+ names[0] = "Work Station";
114
+ svgHashes[0] = bytes32(0xab22e30cb6daaac109ea557a14af9b65f680d46cc563a0b25dd42483f9286bf7);
115
+ // Hay field
116
+ names[1] = "Hay Field";
117
+ svgHashes[1] = bytes32(0x62f97f668e227ab9d6eaf5bd35504974f3df175ee2d952c39add59b7d141c0de);
118
+ // Pew pew
119
+ names[2] = "Pew Pew";
120
+ svgHashes[2] = bytes32(0x71f6918188cd0bc9eb1d5baed9340491efb41af1d358bbeb10912a02e95323f8);
121
+ // Bandolph staff
122
+ names[3] = "Bandolph Staff";
123
+ svgHashes[3] = bytes32(0x790e607150e343fd457bb0cefe5fd12cd216b722dabfa19adbee1f1e537fd1c7);
124
+ // Block chain
125
+ names[4] = "Block Chain";
126
+ svgHashes[4] = bytes32(0x5e609d387ea091bc8884a753ddd28dd43b8ed1243b29de6e9354ef1ab109a0b9);
127
+ // Astronaut Head
128
+ names[5] = "Astronaut Head";
129
+ svgHashes[5] = bytes32(0x7054504d4eef582f2e3411df719fba9d90e94c2054bf48e2efa175b4f37cc1e9);
130
+ // Nerd
131
+ names[6] = "Nerd Glasses";
132
+ svgHashes[6] = bytes32(0x964356f8cbc40b81653a219d94da9d49d0bd5b745aa6bf4db16a14aa81c129ac);
133
+ // Banny vision pro
134
+ names[7] = "Banny Vision Pro";
135
+ svgHashes[7] = bytes32(0x12702d5d843aff058610a01286446401be4175c27abaaec144d8970f99db34e2);
136
+ // Cyberpunk glasses
137
+ names[8] = "Cyberpunk Glasses";
138
+ svgHashes[8] = bytes32(0x5930f0bb8cb34d82b88a13391bcccf936e09be535f2848ba7911b2a98615585d);
139
+ // Investor shades
140
+ names[9] = "Investor Shades";
141
+ svgHashes[9] = bytes32(0x4410654936785cff70498421a8805ad2f9d5101a8c18168264ef94df671db10e);
142
+ // Proff glasses
143
+ names[10] = "Proff Glasses";
144
+ svgHashes[10] = bytes32(0x54004065d83ca03befdf72236331f5b532c00920613d8774ebd8edbf277c345a);
145
+ // Gap tooth
146
+ names[11] = "Gap Teeth";
147
+ svgHashes[11] = bytes32(0x5b5a29873435b40784f64c5d9bb5d95ecebd433c57493e38f3eb816a0dd9fd7f);
148
+ // Dorthy shoes
149
+ names[12] = "Dorthy Shoes";
150
+ svgHashes[12] = bytes32(0x67a973e1023d2a9a37270e4345f9e93b30828ec64bc81c0d1d56028f8e976491);
151
+ // Astronaut boots
152
+ names[13] = "Astronaut Boots";
153
+ svgHashes[13] = bytes32(0x539f9417dd22ba8aacd4029753f6058b5f905eef2a3b07acb519c964fc57ce50);
154
+ // Flops
155
+ names[14] = "Flops";
156
+ svgHashes[14] = bytes32(0x0a322735b4b89b7a593a86615ccc03e14867ce1cfd57c1aa9a61a841d9498103);
157
+ // Astronaut Body
158
+ names[15] = "Astronaut Suit";
159
+ svgHashes[15] = bytes32(0xdbcfc1891ab9d56cb964f3432f867a77293352e38edca3b59b34061e46a31b83);
160
+ // Sweatsuit
161
+ names[16] = "Sweatsuit";
162
+ svgHashes[16] = bytes32(0xfbb3a6dde059e3e3115c3e83fd675d1739ec29afa62999fa759ed878f48e9aa2);
163
+ // Dorthy dress
164
+ names[17] = "Dorthy Dress";
165
+ svgHashes[17] = bytes32(0xfc0eda6d0165d339239bfda3cf68d630949b03c588e3b6d45175c6fc8f00e289);
166
+ // Geisha body
167
+ names[18] = "Geisha Gown";
168
+ svgHashes[18] = bytes32(0x5f8c77bc896a90a35580078ee7ea51460b5694aec68db3d749fd1dc0e9b05c6c);
169
+ // Baggies
170
+ names[19] = "Baggies";
171
+ svgHashes[19] = bytes32(0x2f0cab70c7d07048ccc7b6855bba39cdd95be15a109c8eaa401d9be6d503ca2a);
172
+ // Jonny utah shirt
173
+ names[20] = "Jonny Utah Shirt";
174
+ svgHashes[20] = bytes32(0xf62770cf77965461df8528baec000228c713e749b4dcc12e278b1025507dc0ff);
175
+ // Doc coat
176
+ names[21] = "Doc Coat";
177
+ svgHashes[21] = bytes32(0x6650b989b4ad53d12fd306bf4a12f5afbca2072c3241fdcb96e434443039d1f7);
178
+ // Goat jersey
179
+ names[22] = "Goat Jersey";
180
+ svgHashes[22] = bytes32(0xcca8b9f46f75822d78e7f3125ba4832e24ffe1711f6f01d00cdccb6669f752f2);
181
+ // Irie tshirt
182
+ names[23] = "Irie Shirt";
183
+ svgHashes[23] = bytes32(0xd26b2eaad19396b85f4ae09c702717969b72b8c63021821e0d35addd85e7bbd1);
184
+ // Punk jacket
185
+ names[24] = "Punk Jacket";
186
+ svgHashes[24] = bytes32(0x44cb972aab236c8c01afef7addb0f19a0fab02cfdc7b5065d662b53ab970f310);
187
+ // Zipper jacket
188
+ names[25] = "Zipper Jacket";
189
+ svgHashes[25] = bytes32(0x7177dfec617d77cf78e8393fe373b68c7bc755edd1541c0decc952e99ec80304);
190
+ // Zucco tshirt
191
+ names[26] = "Zucco Tshirt";
192
+ svgHashes[26] = bytes32(0x2a69ce643e565cb4fe648dc9b03020b0749ec780748d43153ee4c6770c76adbf);
193
+ // Ice Cube
194
+ names[27] = "Ice Cube";
195
+ svgHashes[27] = bytes32(0x032b50792f9929066168187acd5eeb101f8528f538ef850913c81dc4b6452842);
196
+ // Club beanie
197
+ names[28] = "Club Beanie";
198
+ svgHashes[28] = bytes32(0x0a8d7c8ff075db0e66638bb51eea732a53641b09b39de68d1cbeafe9099f9b6e);
199
+ // Dorthy hair
200
+ names[29] = "Dorthy Hair";
201
+ svgHashes[29] = bytes32(0x5f2bec3082d7039474f6cba827a3fbd4d4f8e21f22d304edfbc6de77a8b529cf);
202
+ // Farmer hat
203
+ names[30] = "Farmer Hat";
204
+ svgHashes[30] = bytes32(0xcf90bc8459345bcfae00796c4641c0bc8868c01d6339a54ef4d3c4fa1737cfd8);
205
+ // Geisha hair
206
+ names[31] = "Geisha Hair";
207
+ svgHashes[31] = bytes32(0x17b939b04709c357480bdfa54cf2007d7898f4bf048bf12efa6cd8e3af4d711c);
208
+ // Headphones
209
+ names[32] = "Headphones";
210
+ svgHashes[32] = bytes32(0xf1850876ede53102140881e04a4a0e532ba6a08bc0fb64dee279d11c98d64dbf);
211
+ // Natty dread
212
+ names[33] = "Natty Dred";
213
+ svgHashes[33] = bytes32(0x04ae3342ce08da16f61d32e4ce7034dff0223e462afa48019b90c94afc19b939);
214
+ // Peach hair
215
+ names[34] = "Peach Hair";
216
+ svgHashes[34] = bytes32(0xdf7b9e74c552908290a05388f905a503978a289c44ffb61e510df43f2955d435);
217
+ // Proff hair
218
+ names[35] = "Proff Hair";
219
+ svgHashes[35] = bytes32(0x501769b2b47a8aedf4b328f6cf0076200df07ce2087f5e082f49e815f54595b9);
220
+ // Catana
221
+ names[36] = "Catana";
222
+ svgHashes[36] = bytes32(0xbe7e7bb20da87fffa92e867bf0cd3267df180e24ba6eae7a1d434c56856ef2f5);
223
+ // Chefs knife
224
+ names[37] = "Chefs Knife";
225
+ svgHashes[37] = bytes32(0x705180b5aee8e57d0a0783d22fc30dc95e3e84fac36e9d96fef96fabfa58d1f9);
226
+ // Cheap beer
227
+ names[38] = "Cheap Beer";
228
+ svgHashes[38] = bytes32(0x993a2c657f43e19820f3e23677e650705d0c8c6a0ccd88a381aa54d2da7ba047);
229
+ // Constitution
230
+ names[39] = "Constitution";
231
+ svgHashes[39] = bytes32(0xaf0826d8eac1e57789077f43e6f979488da6f619f72f9f0ff50a52ebcca3bfa3);
232
+ // DJ Deck
233
+ names[40] = "DJ Deck";
234
+ svgHashes[40] = bytes32(0x2c9538556986d134ddec2831e768233f587b242e887df9bb359b3aefffa3c5a6);
235
+ // Gas can
236
+ names[41] = "Gas Can";
237
+ svgHashes[41] = bytes32(0x89808b70d019077e4f986b4a60af4ec15fc72ed022bc5e5476441d98f8ce1d1d);
238
+ // Lightsaber
239
+ names[42] = "Lightsaber";
240
+ svgHashes[42] = bytes32(0xf7017a80e9fa4c3fc052a701c04374176620a8e5befa39b708a51293c4d8f406);
241
+ // Potion
242
+ names[43] = "Potion";
243
+ svgHashes[43] = bytes32(0xefdbac65db3868ead1c1093ea20f0b2d77e9095567f6358e246ba160ec545e09);
244
+ // Dagger
245
+ names[44] = "Dagger";
246
+ svgHashes[44] = bytes32(0xaf60de81f2609b847b7d6e97ef6c09c9e3d91cabe6f955bd8828f342f1558738);
247
+ // Duct Tape
248
+ names[45] = "Duct Tape";
249
+ svgHashes[45] = bytes32(0x962ce657908ee4fb58b3e2d1f77109b36428e7a4446d6127bcb6c06aa2360637);
250
+ // Wheat straw
251
+ names[46] = "Wheat Straw";
252
+ svgHashes[46] = bytes32(0x112b8217bb82aebc91e80c935244dce8aa30d4d8df5f98382054b97037dc0c94);
253
+
254
+ uint256[] memory productIds = new uint256[](47);
255
+ for (uint256 i; i < 47; i++) {
256
+ productIds[i] = i + 5;
257
+ }
258
+
259
+ hook.setMetadata({
260
+ baseUri: "",
261
+ contractUri: "",
262
+ tokenUriResolver: resolver,
263
+ encodedIPFSTUriTierId: 0,
264
+ encodedIPFSUri: bytes32(0)
265
+ });
266
+ resolver.setSvgHashsOf(productIds, svgHashes);
267
+ resolver.setProductNames(productIds, names);
268
+ resolver.setSvgBaseUri("https://bannyverse.infura-ipfs.io/ipfs/");
269
+ }
270
+
271
+ function _isDeployed(
272
+ bytes32 salt,
273
+ bytes memory creationCode,
274
+ bytes memory arguments
275
+ )
276
+ internal
277
+ view
278
+ returns (address, bool)
279
+ {
280
+ address _deployedTo = vm.computeCreate2Address({
281
+ salt: salt,
282
+ initCodeHash: keccak256(abi.encodePacked(creationCode, arguments)),
283
+ // Arachnid/deterministic-deployment-proxy address.
284
+ deployer: address(0x4e59b44847b379578588920cA78FbF26c0B4956C)
285
+ });
286
+
287
+ // Return if code is already present at this address.
288
+ return (_deployedTo, address(_deployedTo).code.length != 0);
289
+ }
290
+ }
@@ -0,0 +1,75 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity 0.8.23;
3
+
4
+ import {JB721TierConfig} from "@bananapus/721-hook-v5/src/structs/JB721TierConfig.sol";
5
+ import {JB721TiersHook} from "@bananapus/721-hook-v5/src/JB721TiersHook.sol";
6
+
7
+ import "./helpers/BannyverseDeploymentLib.sol";
8
+ import "@rev-net/core-v5/script/helpers/RevnetCoreDeploymentLib.sol";
9
+ import "@openzeppelin/contracts/utils/Strings.sol";
10
+
11
+ import {Sphinx} from "@sphinx-labs/contracts/SphinxPlugin.sol";
12
+ import {Script} from "forge-std/Script.sol";
13
+
14
+ contract Drop1Script is Script, Sphinx {
15
+ /// @notice tracks the deployment of the revnet contracts for the chain we are deploying to.
16
+ RevnetCoreDeployment revnet;
17
+ /// @notice tracks the deployment of the bannyverse contracts for the chain we are deploying to.
18
+ BannyverseDeployment bannyverse;
19
+
20
+ JB721TiersHook hook;
21
+ address reserveBeneficiary;
22
+
23
+ function configureSphinx() public override {
24
+ // TODO: Update to contain revnet devs.
25
+ sphinxConfig.projectName = "banny-core";
26
+ sphinxConfig.mainnets = ["ethereum", "optimism", "base", "arbitrum"];
27
+ sphinxConfig.testnets = ["ethereum_sepolia", "optimism_sepolia", "base_sepolia", "arbitrum_sepolia"];
28
+ }
29
+
30
+ function run() public {
31
+ reserveBeneficiary = safeAddress();
32
+
33
+ // Get the deployment addresses for the revnet contracts for this chain.
34
+ revnet = RevnetCoreDeploymentLib.getDeployment(
35
+ vm.envOr("REVNET_CORE_DEPLOYMENT_PATH", string("node_modules/@rev-net/core-v5/deployments/"))
36
+ );
37
+
38
+ // Get the deployment addresses for the 721 hook contracts for this chain.
39
+ bannyverse =
40
+ BannyverseDeploymentLib.getDeployment(vm.envOr("BANNYVERSE_CORE_DEPLOYMENT_PATH", string("deployments/")));
41
+
42
+ // Get the hook address by using the deployer.
43
+ hook = JB721TiersHook(address(revnet.basic_deployer.tiered721HookOf(bannyverse.revnetId)));
44
+ deploy();
45
+ }
46
+
47
+ function deploy() public sphinx {
48
+ uint256 decimals = 18;
49
+
50
+ string[] memory names = new string[](1);
51
+ bytes32[] memory svgHashes = new bytes32[](1);
52
+ JB721TierConfig[] memory products = new JB721TierConfig[](1);
53
+
54
+ names[0] = "Denver 2025";
55
+ svgHashes[0] = bytes32(0x62f97f668e227ab9d6eaf5bd35504974f3df175ee2d952c39add59b7d141c0de);
56
+ products[0] = JB721TierConfig({
57
+ price: uint104(1 * (10 ** (decimals - 2))),
58
+ initialSupply: 250,
59
+ votingUnits: 0,
60
+ reserveFrequency: 0,
61
+ reserveBeneficiary: address(0),
62
+ encodedIPFSUri: bytes32(0x233dd4173ef4ed0f60822a469277bb328b5ae056d8980301f7bd7ad9df780099),
63
+ category: 1,
64
+ discountPercent: 0,
65
+ cannotIncreaseDiscountPercent: false,
66
+ allowOwnerMint: false,
67
+ useReserveBeneficiaryAsDefault: false,
68
+ transfersPausable: false,
69
+ useVotingUnits: false,
70
+ cannotBeRemoved: false
71
+ });
72
+
73
+ hook.adjustTiers(products, new uint256[](0));
74
+ }
75
+ }