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: ido #11114

Draft
wants to merge 124 commits into
base: develop
Choose a base branch
from
Draft

feat: ido #11114

wants to merge 124 commits into from

Conversation

Chef-Yogi
Copy link
Contributor

@Chef-Yogi Chef-Yogi commented Jan 7, 2025


PR-Codex overview

This PR focuses on enhancing the IDO (Initial DEX Offering) features in the PancakeSwap platform, including the addition of new components, hooks, and utilities for better asset handling and user experience.

Detailed summary

  • Added useCurrentIDOConfig hook for active IDO retrieval.
  • Introduced VestingStatus enum for managing vesting states.
  • Implemented getIDOAddress utility function.
  • Enhanced asset URL management using ASSET_CDN.
  • Updated multiple components to utilize the new asset management system.
  • Created CurrentIdo component to display current IDO details.
  • Added useIDOUserInfo hook for fetching user-specific IDO data.
  • Added support for W3W account verification.
  • Improved error handling and user notifications throughout IDO processes.

The following files were skipped due to too many changes: apps/web/src/views/Idos/hooks/ido/useIDOCurrencies.ts, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/StakeButton.tsx, apps/web/src/views/Idos/components/IfoQuestions/index.tsx, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/CrossChainVeCakeTips.tsx, apps/web/src/views/Idos/components/ComingSoonSection.tsx, apps/web/src/views/Idos/IfoPlaceholder.tsx, apps/web/src/pages/_app.tsx, apps/web/src/views/Idos/components/IfoVesting/VestingPeriod/Expand.tsx, apps/web/src/views/Idos/hooks/useIfoCredit.ts, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/SyncVeCakeButton.tsx, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/NetworkSwitcherModal.tsx, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/Icons/OkNFT.tsx, apps/web/src/views/Idos/components/IfoFoldableCard/StakeVaultButton.tsx, apps/web/src/views/Idos/hooks/useIfoVesting.ts, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/ClaimButton.tsx, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/Icons/OkProfilePoints.tsx, apps/web/src/views/Idos/hooks/vesting/useFetchVestingData.ts, apps/web/src/views/Idos/hooks/ido/useIDOConfig.ts, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/IfoCardActions.tsx, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/VestingClaimButton.tsx, apps/web/src/views/Idos/components/IfoVesting/VestingPeriod/Claim.tsx, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/ActivateProfileButton.tsx, apps/web/src/views/Idos/hooks/w3w/useW3WAccountSign.ts, apps/web/src/views/Idos/components/IfoVesting/VestingPeriod/TokenInfo.tsx, apps/web/src/components/ConnectW3WButton.tsx, apps/web/src/views/Idos/components/IfoPoolVaultCardMobile.tsx, apps/web/src/views/Idos/hooks/v1/useGetPublicIfoData.ts, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/IfoVestingCard/ReleasedTokenInfo.tsx, apps/web/src/views/Idos/hooks/v1/useGetWalletIfoData.ts, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/IfoVestingCard/TotalPurchased.tsx, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/BridgeButton.tsx, apps/web/src/views/Idos/hooks/ido/useIDOPoolInfo.ts, apps/web/src/views/Idos/hooks/v2/useGetWalletIfoData.ts, apps/web/src/views/Idos/hooks/ido/useIDODepositCallback.tsx, apps/web/src/views/Idos/components/IdoCards/Timer.tsx, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/IFORequirements.tsx, apps/web/src/views/Idos/types.ts, apps/web/src/views/Idos/hooks/ido/useIdoPublicData.ts, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/IfoVestingCard/index.tsx, apps/web/src/views/Idos/components/VeCakeCard.tsx, apps/web/src/views/Idos/components/IfoFoldableCard/IfoRibbon.tsx, apps/web/src/views/Idos/components/IfoVesting/index.tsx, apps/web/src/views/Idos/hooks/v2/useGetPublicIfoData.ts, apps/web/src/views/Idos/hooks/ido/useIDOUserStatus.ts, apps/web/src/views/Idos/components/IdoCards/IdoRibbon.tsx, apps/web/src/views/Idos/components/IfoQuestions/config.tsx, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/ContributeButton.tsx, apps/web/src/views/Idos/components/IfoSteps.tsx, packages/localization/src/config/translations.json, apps/web/src/views/Idos/components/IfoFoldableCard/Timer.tsx, apps/web/src/views/Idos/components/IfoFoldableCard/Achievement.tsx, apps/web/src/views/Idos/components/IfoVesting/VestingPeriod/Info.tsx, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/index.tsx, apps/web/src/views/Idos/hooks/v3/useGetPublicIfoData.ts, apps/web/src/views/Idos/components/CrossChainVeCakeCard.tsx, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/BridgeICakeModal.tsx, apps/web/src/views/Idos/hooks/v8/useGetPublicIfoData.ts, apps/web/src/views/Idos/hooks/v7/useGetPublicIfoData.ts, apps/web/src/views/Idos/hooks/v3/useGetWalletIfoData.ts, apps/web/src/views/Idos/hooks/v8/useGetWalletIfoData.ts, apps/web/src/views/Idos/hooks/v7/useGetWalletIfoData.ts, apps/web/src/views/Idos/hooks/useBridgeICake.ts, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/ContributeModal.tsx, apps/web/src/views/Idos/components/IfoFoldableCard/index.tsx, apps/web/src/config/abi/ido.ts, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/IfoCardDetails.tsx, apps/web/src/views/Idos/components/IfoFoldableCard/IfoPoolCard/IfoCardTokens.tsx, apps/web/src/views/Idos/components/IdoCards/IdoDespositButton.tsx, apps/web/src/views/Idos/components/IdoCards/IdoCards.tsx, pnpm-lock.yaml

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

changeset-bot bot commented Jan 7, 2025

⚠️ No Changeset found

Latest commit: 71e86e1

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

Copy link

vercel bot commented Jan 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 27, 2025 1:42am
web (pcswap-info) ✅ Ready (Inspect) Visit Preview Jan 27, 2025 1:42am
web (pcswap-org) ❌ Failed (Inspect) 💬 Add feedback Jan 27, 2025 1:42am
7 Skipped Deployments
Name Status Preview Comments Updated (UTC)
aptos-web ⬜️ Ignored (Inspect) Visit Preview Jan 27, 2025 1:42am
blog ⬜️ Ignored (Inspect) Visit Preview Jan 27, 2025 1:42am
bridge ⬜️ Ignored (Inspect) Visit Preview Jan 27, 2025 1:42am
games ⬜️ Ignored (Inspect) Visit Preview Jan 27, 2025 1:42am
gamification ⬜️ Ignored (Inspect) Visit Preview Jan 27, 2025 1:42am
uikit ⬜️ Ignored (Inspect) Visit Preview Jan 27, 2025 1:42am
ton ⬜️ Skipped (Inspect) Jan 27, 2025 1:42am

<!--
Before opening a pull request, please read the [contributing
guidelines](https://github.com/pancakeswap/pancake-frontend/blob/develop/CONTRIBUTING.md)
first
-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces functionality for an Initial DEX Offering (IDO)
feature. It adds new hooks, constants, and contract interactions related
to IDOs, allowing users to deposit, claim, and retrieve information
about their participation in IDOs.

### Detailed summary
- Added `getIDOAddress` function in `addressHelpers.ts`.
- Introduced IDO-related constants in `contracts.ts`.
- Created `useIDOContract` hook in `useContract.ts`.
- Added hooks for user info, status, deposit, and claim related to IDOs.
- Defined IDO ABI in `ido.ts`.
- Implemented queries for IDO pool info and user details.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->
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.

4 participants