@bannynet/core-v6 0.0.32 → 0.0.33

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bannynet/core-v6",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,7 +24,7 @@ contract Drop1Script is Script, Sphinx {
24
24
  address reserveBeneficiary;
25
25
 
26
26
  function configureSphinx() public override {
27
- // TODO: Update to contain revnet devs.
27
+ // Safe owners and threshold are resolved by the Sphinx project config.
28
28
  sphinxConfig.projectName = "banny-core-v6";
29
29
  sphinxConfig.mainnets = ["ethereum", "optimism", "base", "arbitrum"];
30
30
  sphinxConfig.testnets = ["ethereum_sepolia", "optimism_sepolia", "base_sepolia", "arbitrum_sepolia"];
@@ -39,10 +39,10 @@ contract Drop1Script is Script, Sphinx {
39
39
  );
40
40
 
41
41
  // Get the deployment addresses for the 721 hook contracts for this chain.
42
- bannyverse = BannyverseDeploymentLib.getDeployment(
43
- vm.envOr("BANNYVERSE_CORE_DEPLOYMENT_PATH", string("deployments/")),
44
- vm.envOr("BANNYVERSE_REVNET_ID", uint256(4))
45
- );
42
+ bannyverse = BannyverseDeploymentLib.getDeployment({
43
+ path: vm.envOr("BANNYVERSE_CORE_DEPLOYMENT_PATH", string("deployments/")),
44
+ revnetId: vm.envOr("BANNYVERSE_REVNET_ID", uint256(4))
45
+ });
46
46
 
47
47
  // Get the hook address by using the deployer.
48
48
  hook = JB721TiersHook(address(revnet.owner.tiered721HookOf(bannyverse.revnetId)));
@@ -408,11 +408,11 @@ contract DeployScript is Script, Sphinx {
408
408
  // Deploy it if it has not been deployed yet.
409
409
  resolver = !_resolverIsDeployed
410
410
  ? new Banny721TokenUriResolver{salt: RESOLVER_SALT}({
411
- bannyBody: bannyBodySvg,
412
- defaultNecklace: defaultNecklaceSvg,
413
- defaultMouth: defaultMouthSvg,
414
- defaultStandardEyes: defaultStandardEyesSvg,
415
- defaultAlienEyes: defaultAlienEyesSvg,
411
+ bannyBodySvg: bannyBodySvg,
412
+ defaultNecklaceSvg: defaultNecklaceSvg,
413
+ defaultMouthSvg: defaultMouthSvg,
414
+ defaultStandardEyesSvg: defaultStandardEyesSvg,
415
+ defaultAlienEyesSvg: defaultAlienEyesSvg,
416
416
  owner: operator,
417
417
  trustedForwarder: trustedForwarder
418
418
  })
@@ -24,7 +24,7 @@ contract Drop1Script is Script, Sphinx {
24
24
  address reserveBeneficiary;
25
25
 
26
26
  function configureSphinx() public override {
27
- // TODO: Update to contain revnet devs.
27
+ // Safe owners and threshold are resolved by the Sphinx project config.
28
28
  sphinxConfig.projectName = "banny-core-v6";
29
29
  sphinxConfig.mainnets = ["ethereum", "optimism", "base", "arbitrum"];
30
30
  sphinxConfig.testnets = ["ethereum_sepolia", "optimism_sepolia", "base_sepolia", "arbitrum_sepolia"];
@@ -39,10 +39,10 @@ contract Drop1Script is Script, Sphinx {
39
39
  );
40
40
 
41
41
  // Get the deployment addresses for the 721 hook contracts for this chain.
42
- bannyverse = BannyverseDeploymentLib.getDeployment(
43
- vm.envOr("BANNYVERSE_CORE_DEPLOYMENT_PATH", string("deployments/")),
44
- vm.envOr("BANNYVERSE_REVNET_ID", uint256(4))
45
- );
42
+ bannyverse = BannyverseDeploymentLib.getDeployment({
43
+ path: vm.envOr("BANNYVERSE_CORE_DEPLOYMENT_PATH", string("deployments/")),
44
+ revnetId: vm.envOr("BANNYVERSE_REVNET_ID", uint256(4))
45
+ });
46
46
 
47
47
  // Get the hook address by using the deployer.
48
48
  hook = JB721TiersHook(address(revnet.owner.tiered721HookOf(bannyverse.revnetId)));
@@ -26,11 +26,10 @@ library BannyverseDeploymentLib {
26
26
  internal
27
27
  returns (BannyverseDeployment memory deployment)
28
28
  {
29
- // get chainId for which we need to get the deployment.
29
+ // Match the current chain ID to the Sphinx network name used in deployment artifacts.
30
30
  uint256 chainId = block.chainid;
31
31
 
32
- // Deploy to get the constants.
33
- // TODO: get constants without deploy.
32
+ // `SphinxConstants` exposes Sphinx's supported chain ID to network name mapping.
34
33
  SphinxConstants sphinxConstants = new SphinxConstants();
35
34
  NetworkInfo[] memory networks = sphinxConstants.getNetworkInfoArray();
36
35
 
@@ -119,19 +119,19 @@ contract Banny721TokenUriResolver is
119
119
  mapping(uint256 upc => bytes32) public override svgHashOf;
120
120
 
121
121
  /// @notice The default alien-eye SVG fragment used when rendering a Banny without custom alien eyes.
122
- string public override DEFAULT_ALIEN_EYES;
122
+ string public override defaultAlienEyes;
123
123
 
124
124
  /// @notice The default mouth SVG fragment used when rendering a Banny without a custom mouth.
125
- string public override DEFAULT_MOUTH;
125
+ string public override defaultMouth;
126
126
 
127
127
  /// @notice The default necklace SVG fragment used when rendering a Banny without a custom necklace.
128
- string public override DEFAULT_NECKLACE;
128
+ string public override defaultNecklace;
129
129
 
130
130
  /// @notice The default standard-eye SVG fragment used when rendering a Banny without custom standard eyes.
131
- string public override DEFAULT_STANDARD_EYES;
131
+ string public override defaultStandardEyes;
132
132
 
133
133
  /// @notice The base Banny body SVG fragment used as the starting layer for token rendering.
134
- string public override BANNY_BODY;
134
+ string public override bannyBody;
135
135
 
136
136
  //*********************************************************************//
137
137
  // --------------------- internal stored properties ------------------ //
@@ -180,30 +180,30 @@ contract Banny721TokenUriResolver is
180
180
  // -------------------------- constructor ---------------------------- //
181
181
  //*********************************************************************//
182
182
 
183
- /// @param bannyBody The SVG of the banny body.
184
- /// @param defaultNecklace The SVG of the default necklace.
185
- /// @param defaultMouth The SVG of the default mouth.
186
- /// @param defaultStandardEyes The SVG of the default standard eyes.
187
- /// @param defaultAlienEyes The SVG of the default alien eyes.
183
+ /// @param bannyBodySvg The SVG of the banny body.
184
+ /// @param defaultNecklaceSvg The SVG of the default necklace.
185
+ /// @param defaultMouthSvg The SVG of the default mouth.
186
+ /// @param defaultStandardEyesSvg The SVG of the default standard eyes.
187
+ /// @param defaultAlienEyesSvg The SVG of the default alien eyes.
188
188
  /// @param owner The owner allowed to add SVG files that correspond to product IDs.
189
189
  /// @param trustedForwarder The trusted forwarder for the ERC2771Context.
190
190
  constructor(
191
- string memory bannyBody,
192
- string memory defaultNecklace,
193
- string memory defaultMouth,
194
- string memory defaultStandardEyes,
195
- string memory defaultAlienEyes,
191
+ string memory bannyBodySvg,
192
+ string memory defaultNecklaceSvg,
193
+ string memory defaultMouthSvg,
194
+ string memory defaultStandardEyesSvg,
195
+ string memory defaultAlienEyesSvg,
196
196
  address owner,
197
197
  address trustedForwarder
198
198
  )
199
199
  Ownable(owner)
200
200
  ERC2771Context(trustedForwarder)
201
201
  {
202
- BANNY_BODY = bannyBody;
203
- DEFAULT_NECKLACE = defaultNecklace;
204
- DEFAULT_MOUTH = defaultMouth;
205
- DEFAULT_STANDARD_EYES = defaultStandardEyes;
206
- DEFAULT_ALIEN_EYES = defaultAlienEyes;
202
+ bannyBody = bannyBodySvg;
203
+ defaultNecklace = defaultNecklaceSvg;
204
+ defaultMouth = defaultMouthSvg;
205
+ defaultStandardEyes = defaultStandardEyesSvg;
206
+ defaultAlienEyes = defaultAlienEyesSvg;
207
207
  }
208
208
 
209
209
  //*********************************************************************//
@@ -589,7 +589,7 @@ contract Banny721TokenUriResolver is
589
589
  ";}.a3{fill:#",
590
590
  a3,
591
591
  ";}</style>",
592
- BANNY_BODY
592
+ bannyBody
593
593
  );
594
594
  }
595
595
 
@@ -816,7 +816,7 @@ contract Banny721TokenUriResolver is
816
816
  function _mannequinBannySvg() internal view returns (string memory) {
817
817
  return string.concat(
818
818
  "<style>.o{fill:#808080;}.b1{fill:none;}.b2{fill:none;}.b3{fill:none;}.b4{fill:none;}.a1{fill:none;}.a2{fill:none;}.a3{fill:none;}</style>",
819
- BANNY_BODY
819
+ bannyBody
820
820
  );
821
821
  }
822
822
 
@@ -895,7 +895,7 @@ contract Banny721TokenUriResolver is
895
895
  hasNecklace = true;
896
896
  customNecklace = _svgOf({hook: hook, upc: upc});
897
897
  } else if (category > _NECKLACE_CATEGORY && !hasNecklace) {
898
- contents = string.concat(contents, DEFAULT_NECKLACE);
898
+ contents = string.concat(contents, defaultNecklace);
899
899
  hasNecklace = true;
900
900
  }
901
901
 
@@ -906,8 +906,8 @@ contract Banny721TokenUriResolver is
906
906
  if (category == _EYES_CATEGORY) {
907
907
  hasEyes = true;
908
908
  } else if (category > _EYES_CATEGORY && !hasEyes && !hasHead) {
909
- if (bodyUpc == ALIEN_UPC) contents = string.concat(contents, DEFAULT_ALIEN_EYES);
910
- else contents = string.concat(contents, DEFAULT_STANDARD_EYES);
909
+ if (bodyUpc == ALIEN_UPC) contents = string.concat(contents, defaultAlienEyes);
910
+ else contents = string.concat(contents, defaultStandardEyes);
911
911
 
912
912
  hasEyes = true;
913
913
  }
@@ -915,7 +915,7 @@ contract Banny721TokenUriResolver is
915
915
  if (category == _MOUTH_CATEGORY) {
916
916
  hasMouth = true;
917
917
  } else if (category > _MOUTH_CATEGORY && !hasMouth && !hasHead) {
918
- contents = string.concat(contents, DEFAULT_MOUTH);
918
+ contents = string.concat(contents, defaultMouth);
919
919
  hasMouth = true;
920
920
  }
921
921
 
@@ -59,23 +59,23 @@ interface IBanny721TokenUriResolver {
59
59
 
60
60
  /// @notice The base SVG content for a banny body.
61
61
  /// @return The SVG string.
62
- function BANNY_BODY() external view returns (string memory);
62
+ function bannyBody() external view returns (string memory);
63
63
 
64
64
  /// @notice The default SVG content for alien banny eyes.
65
65
  /// @return The SVG string.
66
- function DEFAULT_ALIEN_EYES() external view returns (string memory);
66
+ function defaultAlienEyes() external view returns (string memory);
67
67
 
68
68
  /// @notice The default SVG content for a banny mouth.
69
69
  /// @return The SVG string.
70
- function DEFAULT_MOUTH() external view returns (string memory);
70
+ function defaultMouth() external view returns (string memory);
71
71
 
72
72
  /// @notice The default SVG content for a banny necklace.
73
73
  /// @return The SVG string.
74
- function DEFAULT_NECKLACE() external view returns (string memory);
74
+ function defaultNecklace() external view returns (string memory);
75
75
 
76
76
  /// @notice The default SVG content for standard banny eyes.
77
77
  /// @return The SVG string.
78
- function DEFAULT_STANDARD_EYES() external view returns (string memory);
78
+ function defaultStandardEyes() external view returns (string memory);
79
79
 
80
80
  /// @notice Get the names associated with a token (product name, category name, and display name).
81
81
  /// @param hook The hook address of the collection.