Skip to content

Update deploy config #687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update deploy config #687

wants to merge 1 commit into from

Conversation

kumaryash90
Copy link
Member

@kumaryash90 kumaryash90 commented May 21, 2025

Summary by CodeRabbit

  • New Features
    • Reduced the default platform fee from 1% to 0.5% across various contracts, including drops, loyalty cards, marketplaces, open editions, and tokens. This change lowers the default fee applied during sales, auctions, and offer payouts, resulting in lower platform fees for users.

Copy link

coderabbitai bot commented May 21, 2025

Walkthrough

The changes uniformly update the value of the DEFAULT_FEE_BPS constant from 100 (1%) to 50 (0.5%) across multiple smart contracts. This adjustment reduces the default platform fee basis points used in fee calculations for sales, claims, and payouts. No other logic, control flow, or public interfaces were modified.

Changes

File(s) Change Summary
contracts/prebuilts/drop/DropERC1155.sol
contracts/prebuilts/drop/DropERC20.sol
contracts/prebuilts/drop/DropERC721.sol
Changed DEFAULT_FEE_BPS constant from 100 to 50 for platform fee calculations.
contracts/prebuilts/loyalty/LoyaltyCard.sol Changed DEFAULT_FEE_BPS constant from 100 to 50 for fee calculation in loyalty card sales.
contracts/prebuilts/marketplace/direct-listings/DirectListingsLogic.sol
contracts/prebuilts/marketplace/english-auctions/EnglishAuctionsLogic.sol
contracts/prebuilts/marketplace/offers/OffersLogic.sol
Changed DEFAULT_FEE_BPS constant from 100 to 50 for marketplace payout and fee logic.
contracts/prebuilts/open-edition/OpenEditionERC721FlatFee.sol Changed DEFAULT_FEE_BPS constant from 100 to 50 for open edition primary sale fee calculations.
contracts/prebuilts/token/TokenERC1155.sol
contracts/prebuilts/token/TokenERC20.sol
contracts/prebuilts/token/TokenERC721.sol
Changed DEFAULT_FEE_BPS constant from 100 to 50 for token contract primary sale fee calculations.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Contract
    participant Platform

    User->>Contract: Initiate sale/claim/payout
    Contract->>Contract: Calculate platform fee (using DEFAULT_FEE_BPS = 50)
    Contract->>Platform: Transfer platform fee portion
    Contract->>User: Complete transaction (minus platform fee)
Loading

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 30th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e85528e and 26e1639.

📒 Files selected for processing (11)
  • contracts/prebuilts/drop/DropERC1155.sol (1 hunks)
  • contracts/prebuilts/drop/DropERC20.sol (1 hunks)
  • contracts/prebuilts/drop/DropERC721.sol (1 hunks)
  • contracts/prebuilts/loyalty/LoyaltyCard.sol (1 hunks)
  • contracts/prebuilts/marketplace/direct-listings/DirectListingsLogic.sol (1 hunks)
  • contracts/prebuilts/marketplace/english-auctions/EnglishAuctionsLogic.sol (1 hunks)
  • contracts/prebuilts/marketplace/offers/OffersLogic.sol (1 hunks)
  • contracts/prebuilts/open-edition/OpenEditionERC721FlatFee.sol (1 hunks)
  • contracts/prebuilts/token/TokenERC1155.sol (1 hunks)
  • contracts/prebuilts/token/TokenERC20.sol (1 hunks)
  • contracts/prebuilts/token/TokenERC721.sol (1 hunks)
🔇 Additional comments (13)
contracts/prebuilts/marketplace/english-auctions/EnglishAuctionsLogic.sol (1)

42-42: Confirmed fee reduction from 1% to 0.5%

The default platform fee has been reduced from 100 basis points (1%) to 50 basis points (0.5%). This change affects the platform fee calculation in the _payout function (line 473), reducing the fee taken by the platform during auction payouts.

contracts/prebuilts/token/TokenERC721.sol (1)

73-73: Reduced platform fee from 1% to 0.5%

The default platform fee has been reduced from 100 basis points (1%) to 50 basis points (0.5%), halving the fee that's transferred to the DEFAULT_FEE_RECIPIENT. This affects the fee calculation in the collectPrice function (line 381) during primary sales.

contracts/prebuilts/token/TokenERC20.sol (1)

61-61: Decreased default platform fee to 0.5%

The default platform fee basis points have been reduced from 100 (1%) to 50 (0.5%). This change affects the fee calculation in the collectPrice function (line 221), reducing the amount sent to the DEFAULT_FEE_RECIPIENT during token minting transactions.

contracts/prebuilts/loyalty/LoyaltyCard.sol (1)

77-77: Reduced platform fee from 1% to 0.5%

The default platform fee basis points have been lowered from 100 (1%) to 50 (0.5%). This change affects the fee calculation in the _collectPrice function (line 232), reducing the platform's cut during loyalty card minting and transactions.

contracts/prebuilts/open-edition/OpenEditionERC721FlatFee.sol (1)

68-68: Platform fee halved from 1% to 0.5%

The default platform fee has been reduced from 100 basis points (1%) to 50 basis points (0.5%). This change affects the fee calculation in the _collectPriceOnClaim function (line 163), decreasing the amount transferred to the DEFAULT_FEE_RECIPIENT during token claims.

contracts/prebuilts/drop/DropERC1155.sol (1)

76-76: Confirmed default platform fee reduction from 1% to 0.5%

The DEFAULT_FEE_BPS constant has been reduced from 100 to 50 basis points, effectively halving the default platform fee rate. This constant is used in the collectPriceOnClaim function (line 256) to calculate platform fees during primary sales.

contracts/prebuilts/drop/DropERC721.sol (1)

72-72: Consistent fee reduction aligned with other contracts

The change from 100 to 50 basis points matches the reduction in DropERC1155.sol. This ensures consistency across different token standards in the protocol.

contracts/prebuilts/marketplace/direct-listings/DirectListingsLogic.sol (1)

40-40: Platform fee reduction applied to marketplace contracts

The default fee reduction has been consistently applied to marketplace functionality. This change affects the fee calculation in the _payout function (line 506) used during sales in direct listings.

contracts/prebuilts/token/TokenERC1155.sol (1)

70-70: Verified matching fee adjustment across token contracts

The DEFAULT_FEE_BPS constant has been updated to 50 basis points, consistent with changes in other contracts. This change reduces the platform fee calculated in the collectPrice function (line 453).

contracts/prebuilts/drop/DropERC20.sol (2)

60-60: Fee reduction confirmed: DEFAULT_FEE_BPS reduced from 100 to 50

This change reduces the default platform fee from 1% (100 basis points) to 0.5% (50 basis points), which will decrease the platform fee charged during token claims. This aligns with the PR objective to update the deployment configuration.


163-163: Verifying the impact of fee reduction

The reduced DEFAULT_FEE_BPS value (50 instead of 100) is used here to calculate the platform fee, resulting in a lower fee deduction from the total price during token claims. The calculation remains correct, and this change directly supports the PR objective.

contracts/prebuilts/marketplace/offers/OffersLogic.sol (2)

39-39: Fee reduction confirmed: DEFAULT_FEE_BPS reduced from 100 to 50

This change reduces the default platform fee from 1% (100 basis points) to 0.5% (50 basis points), which will decrease the platform fee charged during offers. This aligns with the PR objective to update the deployment configuration.


291-291: Verifying the impact of fee reduction

The reduced DEFAULT_FEE_BPS value (50 instead of 100) is used here to calculate the platform fee, resulting in a lower fee deduction from the total payout amount during offer acceptance. The calculation remains correct, and this change directly supports the PR objective.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@kumaryash90 kumaryash90 requested a review from jakeloo May 21, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants