@croptop/core-v6 0.0.40 → 0.0.42

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": "@croptop/core-v6",
3
- "version": "0.0.40",
3
+ "version": "0.0.42",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -355,19 +355,22 @@ contract ConfigureFeeProjectScript is Script, Sphinx {
355
355
  function deploy() public sphinx {
356
356
  FeeProjectConfig memory feeProjectConfig = getCroptopRevnetConfig();
357
357
 
358
- // Approve the basic deployer to configure the project and transfer it.
359
- core.projects.approve({to: address(revnet.basic_deployer), tokenId: FEE_PROJECT_ID});
360
-
361
- // Deploy the NANA fee project.
362
- revnet.basic_deployer
363
- .deployFor({
364
- revnetId: FEE_PROJECT_ID,
365
- configuration: feeProjectConfig.configuration,
366
- terminalConfigurations: feeProjectConfig.terminalConfigurations,
367
- suckerDeploymentConfiguration: feeProjectConfig.suckerDeploymentConfiguration,
368
- tiered721HookConfiguration: feeProjectConfig.hookConfiguration,
369
- allowedPosts: feeProjectConfig.allowedPosts
370
- });
358
+ // Only deploy if the project hasn't already been configured (restart-safe).
359
+ if (address(core.directory.controllerOf(FEE_PROJECT_ID)) == address(0)) {
360
+ // Approve the basic deployer to configure the project and transfer it.
361
+ core.projects.approve({to: address(revnet.basic_deployer), tokenId: FEE_PROJECT_ID});
362
+
363
+ // Deploy the NANA fee project.
364
+ revnet.basic_deployer
365
+ .deployFor({
366
+ revnetId: FEE_PROJECT_ID,
367
+ configuration: feeProjectConfig.configuration,
368
+ terminalConfigurations: feeProjectConfig.terminalConfigurations,
369
+ suckerDeploymentConfiguration: feeProjectConfig.suckerDeploymentConfiguration,
370
+ tiered721HookConfiguration: feeProjectConfig.hookConfiguration,
371
+ allowedPosts: feeProjectConfig.allowedPosts
372
+ });
373
+ }
371
374
  }
372
375
 
373
376
  function _isDeployed(
@@ -63,7 +63,7 @@ contract CTDeployer is ERC2771Context, JBPermissioned, IJBRulesetDataHook, IERC7
63
63
  /// @notice Mints ERC-721s that represent Juicebox project ownership and transfers.
64
64
  IJBProjects public immutable override PROJECTS;
65
65
 
66
- /// @notice The Croptop publisher.
66
+ /// @notice The Croptop publisher contract that manages post allowances and content rules.
67
67
  ICTPublisher public immutable override PUBLISHER;
68
68
 
69
69
  /// @notice Deploys and tracks suckers for projects.
@@ -344,8 +344,8 @@ contract CTDeployer is ERC2771Context, JBPermissioned, IJBRulesetDataHook, IERC7
344
344
  /// @param context Standard Juicebox payment context. See `JBBeforePayRecordedContext`.
345
345
  /// @return weight The weight which project tokens are minted relative to. This can be used to customize how many
346
346
  /// tokens get minted by a payment.
347
- /// @return hookSpecifications Amounts (out of what's being paid in) to be sent to pay hooks instead of being paid
348
- /// into the project. Useful for automatically routing funds from a treasury as payments come in.
347
+ /// @return hookSpecifications Amounts (out of what's paid in) to send to pay hooks instead of adding to the
348
+ /// project. Useful for automatically routing funds from a treasury as payments come in.
349
349
  function beforePayRecordedWith(JBBeforePayRecordedContext calldata context)
350
350
  external
351
351
  view
@@ -27,7 +27,7 @@ contract CTProjectOwner is IERC721Receiver, ICTProjectOwner {
27
27
  /// @notice The contract from which project are minted.
28
28
  IJBProjects public immutable override PROJECTS;
29
29
 
30
- /// @notice The Croptop publisher.
30
+ /// @notice The Croptop publisher contract that manages post allowances and content rules.
31
31
  ICTPublisher public immutable override PUBLISHER;
32
32
 
33
33
  //*********************************************************************//
@@ -58,7 +58,7 @@ contract CTPublisher is JBPermissioned, ERC2771Context, ICTPublisher {
58
58
  // ---------------- public immutable stored properties --------------- //
59
59
  //*********************************************************************//
60
60
 
61
- /// @notice The directory that contains the projects being posted to.
61
+ /// @notice The directory that contains the projects to post to.
62
62
  IJBDirectory public immutable override DIRECTORY;
63
63
 
64
64
  /// @notice The ID of the project to which fees will be routed.
@@ -92,7 +92,7 @@ contract CTPublisher is JBPermissioned, ERC2771Context, ICTPublisher {
92
92
  // -------------------------- constructor ---------------------------- //
93
93
  //*********************************************************************//
94
94
 
95
- /// @param directory The directory that contains the projects being posted to.
95
+ /// @param directory The directory that contains the projects to post to.
96
96
  /// @param permissions A contract storing permissions.
97
97
  /// @param feeProjectId The ID of the project to which fees will be routed.
98
98
  /// @param trustedForwarder The trusted forwarder for the ERC2771Context.
@@ -190,14 +190,12 @@ contract CTPublisher is JBPermissioned, ERC2771Context, ICTPublisher {
190
190
  /// @param additionalPayMetadata Metadata bytes that should be included in the pay function's metadata. This
191
191
  /// prepends the
192
192
  /// payload needed for NFT creation.
193
- /// @param feeMetadata The metadata to send alongside the fee payment.
194
193
  function mintFrom(
195
194
  IJB721TiersHook hook,
196
195
  CTPost[] calldata posts,
197
196
  address nftBeneficiary,
198
197
  address feeBeneficiary,
199
- bytes calldata additionalPayMetadata,
200
- bytes calldata feeMetadata
198
+ bytes calldata additionalPayMetadata
201
199
  )
202
200
  external
203
201
  payable
@@ -322,7 +320,7 @@ contract CTPublisher is JBPermissioned, ERC2771Context, ICTPublisher {
322
320
  beneficiary: feeBeneficiary,
323
321
  minReturnedTokens: 0,
324
322
  memo: "",
325
- metadata: feeMetadata
323
+ metadata: ""
326
324
  }) {}
327
325
  catch {
328
326
  // slither-disable-next-line low-level-calls
@@ -432,7 +430,7 @@ contract CTPublisher is JBPermissioned, ERC2771Context, ICTPublisher {
432
430
  /// @param posts An array of posts that should be published as NFTs to the specified project.
433
431
  /// @return tiersToAdd The tiers that will be created to represent the posts.
434
432
  /// @return tierIdsToMint The tier IDs of the posts that should be minted once published.
435
- /// @return totalPrice The total price being paid.
433
+ /// @return totalPrice The total price to pay.
436
434
  function _setupPosts(
437
435
  IJB721TiersHook hook,
438
436
  CTPost[] memory posts
@@ -19,7 +19,7 @@ interface ICTDeployer {
19
19
  /// @return The projects contract.
20
20
  function PROJECTS() external view returns (IJBProjects);
21
21
 
22
- /// @notice The Croptop publisher that manages posting criteria and minting.
22
+ /// @notice The CTPublisher contract used to mint NFTs from submitted posts.
23
23
  /// @return The publisher contract.
24
24
  function PUBLISHER() external view returns (ICTPublisher);
25
25
 
@@ -57,7 +57,7 @@ interface ICTPublisher {
57
57
  address[] memory allowedAddresses
58
58
  );
59
59
 
60
- /// @notice The directory that contains the projects being posted to.
60
+ /// @notice The directory that contains the projects to post to.
61
61
  /// @return The directory contract.
62
62
  function DIRECTORY() external view returns (IJBDirectory);
63
63
 
@@ -93,14 +93,12 @@ interface ICTPublisher {
93
93
  /// @param nftBeneficiary The beneficiary of the NFT mints.
94
94
  /// @param feeBeneficiary The beneficiary of the fee project's tokens.
95
95
  /// @param additionalPayMetadata Extra metadata bytes to include in the payment.
96
- /// @param feeMetadata Metadata to send alongside the fee payment.
97
96
  function mintFrom(
98
97
  IJB721TiersHook hook,
99
98
  CTPost[] calldata posts,
100
99
  address nftBeneficiary,
101
100
  address feeBeneficiary,
102
- bytes calldata additionalPayMetadata,
103
- bytes calldata feeMetadata
101
+ bytes calldata additionalPayMetadata
104
102
  )
105
103
  external
106
104
  payable;
@@ -4,10 +4,10 @@ pragma solidity ^0.8.0;
4
4
  import {JBSplit} from "@bananapus/core-v6/src/structs/JBSplit.sol";
5
5
 
6
6
  /// @notice A post to be published.
7
- /// @custom:member encodedIPFSUri The encoded IPFS URI of the post that is being published.
7
+ /// @custom:member encodedIPFSUri The encoded IPFS URI of the post to publish.
8
8
  /// @custom:member totalSupply The number of NFTs that should be made available, including the 1 that will be minted
9
9
  /// alongside this transaction.
10
- /// @custom:member price The price being paid for buying the post that is being published.
10
+ /// @custom:member price The price to pay for buying the post.
11
11
  /// @custom:member category The category that the post should be published in.
12
12
  /// @custom:member splitPercent The percent of the tier's price to route to the splits (out of
13
13
  /// JBConstants.SPLITS_TOTAL_PERCENT).