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

Adding v1 of the new ETH filter for pools #196

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

Gerson2102
Copy link

@Gerson2102 Gerson2102 commented Dec 14, 2024

PR Fixes:

Adding version 1 of the ETH pool filter. This PR is ready for review.

Resolves #192

Vercel website link

https://starkfarm-client-git-eth-filter-gersons-projects-b3389356.vercel.app/

Checklist before requesting a review

  • I have performed a self-review of my code
  • I assure there is no similar/duplicate pull request regarding same issue
  • My PR passes all checks (build, lint, formatting, etc)

@Gerson2102 Gerson2102 marked this pull request as ready for review December 14, 2024 17:40
@Gerson2102
Copy link
Author

I dont know how to create the vercel link needed in the PR. I deleted the initial messages of the PRs description.

@EjembiEmmanuel
Copy link
Collaborator

I dont know how to create the vercel link needed in the PR. I deleted the initial messages of the PRs description.

  1. Create a Vercel account if you don't already have one.
  2. Log in to Vercel and deploy the app from your forked repository.
  3. Configure all necessary environment variables during deployment.
  4. Include the link to your Vercel deployment in the Pull Request (PR) description.

@Gerson2102
Copy link
Author

Gerson2102 commented Dec 16, 2024

I'm banned and I dont know why, I just posted an error that I'm facing in Vercel while deploying the app. @EjembiEmmanuel @akiraonstarknet
image

I'm trying to deploy mi forked version of starkfarm, and I'm getting this error:

at async eV.getTVL (/vercel/path0/.next/server/chunks/951.js:24:88440)
at async y (/vercel/path0/.next/server/app/api/strategies/route.js:1:1385)
at async Promise.all (index 5)
at async q (/vercel/path0/.next/server/app/api/strategies/route.js:1:2248)
at async /vercel/path0/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:42484
at async eI.execute (/vercel/path0/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:32486)
at async eI.handle (/vercel/path0/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:43737)

Error occurred prerendering page "/api/strategies". Read more: https://nextjs.org/docs/messages/prerender-error

@EjembiEmmanuel
Copy link
Collaborator

I'm banned and I dont know why, I just posted an error that I'm facing in Vercel while deploying the app. @EjembiEmmanuel @akiraonstarknet image

I'm trying to deploy mi forked version of starkfarm, and I'm getting this error:

at async eV.getTVL (/vercel/path0/.next/server/chunks/951.js:24:88440)
at async y (/vercel/path0/.next/server/app/api/strategies/route.js:1:1385)
at async Promise.all (index 5)
at async q (/vercel/path0/.next/server/app/api/strategies/route.js:1:2248)
at async /vercel/path0/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:42484
at async eI.execute (/vercel/path0/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:32486)
at async eI.handle (/vercel/path0/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:43737)

Error occurred prerendering page "/api/strategies". Read more: https://nextjs.org/docs/messages/prerender-error

Does the project build locally without errors? If yes, then it might be that you didn't configure the environment variables correctly.

@EjembiEmmanuel
Copy link
Collaborator

@Gerson2102 make sure you set the following env variables

@Gerson2102
Copy link
Author

I'm getting three errors locally: @EjembiEmmanuel

image

image

image

@Gerson2102
Copy link
Author

Gerson2102 commented Dec 17, 2024

These are my env variables:

NEXT_PUBLIC_RPC_URL=https://starknet-mainnet.public.blastapi.io
RPC_URL=https://starknet-mainnet.public.blastapi.io
HOSTNAME=http://localhost:3000

DATABASE_URL=

ACCOUNT_PK=0x0574ba4998dd9aedf1c4d6e56b747b29256a795bc3846437d121cd64b972bdd8
NEXT_PUBLIC_OG_NFT_CONTRACT=0x3cb654f2f557a7f71a0c16d97c05a2dec62a0b744979d11afc95b804e1d7307

CRON_SECRET=

NEXT_PUBLIC_NETWORK=mainnet

@EjembiEmmanuel
Copy link
Collaborator

These are my env variables:

NEXT_PUBLIC_RPC_URL=https://starknet-mainnet.public.blastapi.io
RPC_URL=https://starknet-mainnet.public.blastapi.io
HOSTNAME=http://localhost:3000

DATABASE_URL=

ACCOUNT_PK=0x0574ba4998dd9aedf1c4d6e56b747b29256a795bc3846437d121cd64b972bdd8
NEXT_PUBLIC_OG_NFT_CONTRACT=0x3cb654f2f557a7f71a0c16d97c05a2dec62a0b744979d11afc95b804e1d7307

CRON_SECRET=

NEXT_PUBLIC_NETWORK=mainnet

You don't need to set the HOSTNAME when deploying on vercel

@EjembiEmmanuel
Copy link
Collaborator

I'm getting three errors locally: @EjembiEmmanuel

image

image

image

I will check and revert

@Gerson2102
Copy link
Author

These are my env variables:
NEXT_PUBLIC_RPC_URL=https://starknet-mainnet.public.blastapi.io
RPC_URL=https://starknet-mainnet.public.blastapi.io
HOSTNAME=http://localhost:3000
DATABASE_URL=
ACCOUNT_PK=0x0574ba4998dd9aedf1c4d6e56b747b29256a795bc3846437d121cd64b972bdd8
NEXT_PUBLIC_OG_NFT_CONTRACT=0x3cb654f2f557a7f71a0c16d97c05a2dec62a0b744979d11afc95b804e1d7307
CRON_SECRET=
NEXT_PUBLIC_NETWORK=mainnet

You don't need to set the HOSTNAME when deploying on vercel

Yeah, I was sharing my local env variables. The env variables for vercel are the ones that you told me.

@EjembiEmmanuel
Copy link
Collaborator

These are my env variables:
NEXT_PUBLIC_RPC_URL=https://starknet-mainnet.public.blastapi.io
RPC_URL=https://starknet-mainnet.public.blastapi.io
HOSTNAME=http://localhost:3000
DATABASE_URL=
ACCOUNT_PK=0x0574ba4998dd9aedf1c4d6e56b747b29256a795bc3846437d121cd64b972bdd8
NEXT_PUBLIC_OG_NFT_CONTRACT=0x3cb654f2f557a7f71a0c16d97c05a2dec62a0b744979d11afc95b804e1d7307
CRON_SECRET=
NEXT_PUBLIC_NETWORK=mainnet

You don't need to set the HOSTNAME when deploying on vercel

Yeah, I was sharing my local env variables. The env variables for vercel are the ones that you told me.

Oh okay

@akiraonstarknet
Copy link
Contributor

akiraonstarknet commented Dec 19, 2024

@EjembiEmmanuel can we add this to our .env.sample? Raise a new and PR for this. Also add necessary comments for variables on how people can get them which are not publicly availble.

@EjembiEmmanuel
Copy link
Collaborator

@EjembiEmmanuel can we add this to our .env.sample? Raise a new and PR for this. Also add necessary comments for variables on how people can get them which are not publicly availble.

Alright

@EjembiEmmanuel
Copy link
Collaborator

@Gerson2102 I just pushed a minor fix. Can you try deploying on vercel again?

@Gerson2102
Copy link
Author

Gerson2102 commented Dec 19, 2024

@EjembiEmmanuel
Here is the deployed app: https://starkfarm-client-steel.vercel.app/

CI is failing but dont understand why. Locally is not working either.

@EjembiEmmanuel
Copy link
Collaborator

@EjembiEmmanuel
Here is the deployed app: https://starkfarm-client-steel.vercel.app/

This url is for your private deployment. Please share the public url instead

@Gerson2102
Copy link
Author

@EjembiEmmanuel
Copy link
Collaborator

@Gerson2102
Copy link
Author

Got it. Check this one: https://starkfarm-client-git-eth-filter-gersons-projects-b3389356.vercel.app/?vercelToolbarCode=FcD9vbA8h1rSocV

It's the same thing

Can you explain how to do that? Don't you think is easier?

@Gerson2102
Copy link
Author

Gerson2102 commented Dec 20, 2024

This is what I have:

image

And none of those links works for you. So which link am I supposed to share with you to finally see that my work is done since days ago?

@Gerson2102
Copy link
Author

Try this one: https://starkfarm-client-steel.vercel.app

@EjembiEmmanuel
Copy link
Collaborator

Try this one: https://starkfarm-client-steel.vercel.app

Still doesn't work. Maybe try deleting the deployment and creating a new one

@Gerson2102
Copy link
Author

Try this one: https://starkfarm-client-steel.vercel.app

Still doesn't work. Maybe try deleting the deployment and creating a new one

@Gerson2102 Gerson2102 closed this Dec 20, 2024
@Gerson2102
Copy link
Author

Gerson2102 commented Dec 20, 2024

@EjembiEmmanuel I closed it but it was a mistake.

@Gerson2102
Copy link
Author

Gerson2102 commented Dec 20, 2024

@EjembiEmmanuel
Copy link
Collaborator

@EjembiEmmanuel Here is the deployed app: https://starkfarm-client-steel.vercel.app/

CI is failing but dont understand why. Locally is not working either.

The CI is failing because of unsuccessful RPC calls, it could be that the CI is using the RPC url for sepolia instead of mainnet. Try to create a RPC_URL secret variable with this value https://starknet-mainnet.public.blastapi.io in the settings of your fork. Let me know when you do it so that I can rerun the CI.

@Gerson2102 Gerson2102 reopened this Dec 20, 2024
@EjembiEmmanuel
Copy link
Collaborator

This is the only link that I can share: https://starkfarm-client-steel.vercel.app/ Maybe this one: https://starkfarm-client-f0k22bc11-gersons-projects-b3389356.vercel.app/

Yea, that's why I said you should delete the current deployment and create a new one. Maybe it'll fix it

@Gerson2102
Copy link
Author

Got it. Run the CI now please.

@EjembiEmmanuel
Copy link
Collaborator

Got it. Run the CI now please.

Still failing. How did you set the create variable?

@Gerson2102
Copy link
Author

@Gerson2102
Copy link
Author

Gerson2102 commented Dec 20, 2024

Got it. Run the CI now please.

Still failing. How did you set the create variable?

Just like you said. I went to my fork and create a secret variable. RPC_URL and then the value.

@Gerson2102
Copy link
Author

The CI is failing because there is errors on these paths:

/api/stats/route: /api/stats
/api/strategies/route: /api/strategies

But there is nothing wrong when I check the code in my IDE

@EjembiEmmanuel
Copy link
Collaborator

The CI is failing because there is errors on these paths:

/api/stats/route: /api/stats /api/strategies/route: /api/strategies

But there is nothing wrong when I check the code in my IDE

The error is not coming from the code, the code is fine

@EjembiEmmanuel
Copy link
Collaborator

Got it. Run the CI now please.

Still failing. How did you set the create variable?

Just like you said. I to went my fork and create a secret variable. RPC_URL and then the value.

Alright then, just ignore it for now

@Gerson2102
Copy link
Author

The eth filter is working fine.

@@ -48,14 +48,14 @@ export class Carmine extends Jediswap {
const poolData = myData[config.name];
if (!poolData || !poolData.data) return;

let category: Category;
const category: Category[] = [Category.Others];
Copy link
Contributor

Choose a reason for hiding this comment

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

Dont think having others as default for everything makes sense.

Copy link
Contributor

Choose a reason for hiding this comment

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

Others is only for something that doesn't wallet in one of the known categories.

Copy link
Author

Choose a reason for hiding this comment

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

Got it. So I'm going to just defined the variable and thats it. @akiraonstarknet

@@ -77,7 +78,7 @@ export function getDefaultPoolInfo(): PoolInfo {
apr: 0,
tvl: 0,
aprSplits: [],
category: Category.Others,
category: [Category.Others],
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to validate this. @EjembiEmmanuel

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.

feat: Add filter by ETH token
3 participants