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

[wip] feat: rfox for lpoors #8455

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

[wip] feat: rfox for lpoors #8455

wants to merge 13 commits into from

Conversation

NeOMakinG
Copy link
Collaborator

@NeOMakinG NeOMakinG commented Jan 3, 2025

Description

  • Pass assetId to every hooks needed to support another assetId
  • Use stakeAssetId or selectedAssetId depending if the selected asset it is the fox on ETH
  • Upgrade a bit the keys invalidation so we invalidate queries for every kind of contracts
  • Add market data fetch for the LP token
  • Change claims to support multiple contracts addresses
  • Add a small helper to select the right contract addy depending on the assetId

⚠️ Also blocked by the IPFS data thing, we need to handle both contracts now

Issue (if applicable)

closes #7911

Risk

Let's say high, funds could be at risk somehow, sending to the wrong address

High Risk PRs Require 2 approvals

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

Testing

  • Try to stake, unstake, claim and change address for the LP pair
  • Also try to stake unstake claim and change address for the FOX token
  • Do the same with multi account

Engineering

n/a

Operations

n/a

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Screenshots (if applicable)

image
image
image
image
image
image
image

@0xean
Copy link
Contributor

0xean commented Jan 6, 2025

WIP PR for CLI tooling update and IPFS metadata updates - shapeshift/rFOX#95

@@ -2646,13 +2646,15 @@
"confirmAndBridge": "Confirm & Bridge",
"myStakedBalance": "My Staked Balance",
"myStakedBalanceHelper": "The amount of FOX you have staked",
"pendingRewardsBalance": "Current Estimated Rewards Balance",
"pendingRewardsBalance": "Pending Rewards Balance",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this discussed with @shapeshift/product? We had updated to "Current Estimated" because that is all it is, you may get more or less by epoch close, so to call it "Pending" is a misnomer since the value isn't really truly pending until epoch close.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've taken it from the Figma but it might be outdated, checking with @shapeshift/product which copy is the right one

select,
}: UseGetUnstakingRequestCountQueryProps<SelectData>) => {
// wagmi doesn't expose queryFn, so we reconstruct the queryKey and queryFn ourselves to leverage skipToken type safety
const queryKey: GetUnstakingRequestCountQueryKey = useMemo(
() => [
'readContract',
{
address: RFOX_PROXY_CONTRACT,
address: contractAddress,
Copy link
Collaborator Author

@NeOMakinG NeOMakinG Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto review: in some hooks we pass the contract address, some other has the assetId, choose between one and stick with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rFOX for lpoors
3 participants