Skip to content
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

feat: Liquid staking #7323

Merged
merged 117 commits into from
Sep 29, 2023
Merged

feat: Liquid staking #7323

merged 117 commits into from
Sep 29, 2023

Conversation

chefilip
Copy link
Contributor

@chefilip chefilip commented Jul 10, 2023

πŸ€– Generated by Copilot at 8d714d3

Summary

πŸŽπŸ› οΈπŸ“

This pull request adds the fixed staking feature to the web app, which allows users to stake tokens in pools with different lock periods and earn rewards. It adds new components, hooks, types, constants, and contract helpers for the fixed staking feature, and updates the webpack configuration, package.json, and contract address files.

To stake some tokens and earn more cake
You need to use the fixedStaking contract
So we added some components and hooks to react
And some constants and types to keep track
Of the pools and positions in the fixed staking contract

Walkthrough

  • Add fixed staking feature to the web app
  • Create fixed-staking/index.tsx file to render the FixedStaking component (link)
  • Create FixedStakingCard.tsx, FixedStakingCardBody.tsx, FixedStakingModal.tsx, FixedStakingPosition.tsx, FixedStakingRow.tsx, HarvestFixedStaking.tsx, InlineText.tsx, LockedFixedTag.tsx, and UnlockedFixedTag.tsx components to display the fixed staking pools and the user's staked positions (link, link, link, link, link, link, link, link, link)
  • Create constant.ts and type.ts files to define some constants and types for the fixed staking feature (link, link)
  • Add the fixedStaking contract address to the constants/contracts.ts file (link)
  • Add the getFixedStakingAddress function to the addressHelpers.ts file to get the fixed staking contract address for the current chainId (link)
  • Add the getFixedStakingContract function to the contractHelpers.ts file to create a contract instance for the fixed staking contract with the given signer and chainId (link, link, link)
  • Add the useFixedStakingContract hook to the useContract.ts file to get the fixed staking contract instance with the current signer and chainId (link, link)
  • Export the ActionContainer component from the SingleFarmV3Card.tsx file to reuse it for rendering the farm actions (link)
  • Import the MiniCssExtractPlugin module and add it to the webpack plugins array in the next.config.mjs file to extract CSS from the bundle into a separate file (link, link)
  • Add a missing comma after the last object in the rewrites array in the next.config.mjs file to fix a syntax error (link)
  • Add the mini-css-extract-plugin, polished, @pancakeswap/next-config, and @pancakeswap/tsconfig dependencies to the package.json file (link, link, link)
  • Remove the @pancakeswap/next-config and @pancakeswap/tsconfig dependencies from the devDependencies section of the package.json file, since they are already added to the dependencies section (link)
  • Sort the dependencies in the package.json file alphabetically by name to improve readability and consistency (link)

@changeset-bot
Copy link

changeset-bot bot commented Jul 10, 2023

⚠️ No Changeset found

Latest commit: c9e8e71

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Jul 10, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
web βœ… Ready (Inspect) Visit Preview βœ… 6 resolved Sep 29, 2023 0:32am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
uikit ⬜️ Ignored (Inspect) Visit Preview Sep 29, 2023 0:32am

@vercel
Copy link

vercel bot commented Jul 10, 2023

Someone is attempting to deploy a commit to the PancakeSwap Team on Vercel.

A member of the Team first needs to authorize it.

@socket-security
Copy link

socket-security bot commented Jul 24, 2023

No dependency changes detected. Learn more about Socket for GitHub β†—οΈŽ

πŸ‘ No dependency changes detected in pull request

@chef-huan chef-huan merged commit 1127087 into pancakeswap:develop Sep 29, 2023
12 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants