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 Envio to feat/pnpm #1

Merged
merged 43 commits into from
Oct 19, 2023
Merged

Adding Envio to feat/pnpm #1

merged 43 commits into from
Oct 19, 2023

Conversation

JonoPrest
Copy link
Member

No description provided.

README.md Outdated

This command will run a codegen for your configured envio indexer, it will install all required packages, handle db-migrations and graphql server, and begin indexing your smart contract events.

Visit the hasura console on: `http://localhost:8085`. You can see the realtime indexing of data in the "data" tab and use the graphql explorer to build queries.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Visit the hasura console on: `http://localhost:8085`. You can see the realtime indexing of data in the "data" tab and use the graphql explorer to build queries.
Visit the hasura console on: `http://localhost:8080`. You can see the realtime indexing of data in the "data" tab and use the graphql explorer to build queries.

README.md Outdated

For more info on writing/updating an indexer visit [docs.envio.dev/docs](https://docs.envio.dev/docs/overview).

5. On a third terminal, start your NextJS app:
Copy link
Member

Choose a reason for hiding this comment

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

Either on a 4th terminal or on step 4 we can say in the same terminal that the hardhat deploy function was called

4. Ensure docker is running and then on a third terminal, start-up indexer:

```
pnpm envio:dev
Copy link
Member

Choose a reason for hiding this comment

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

Need to add pnpm envio:codegen as init is never run when this is cloned

https://github.com/Float-Capital/indexer/issues/974

/*
On localhost, the deployer account is the one that comes with Hardhat, which is already funded.

When deploying to live networks (e.g `pnpm deploy --network goerli`), the deployer account
Copy link
Member

Choose a reason for hiding this comment

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

This is from deploying, comments can be tweaked to performing an add greeting

export const localHasuraEndpoint = "http://localhost:8080/v1/graphql";

const config: CodegenConfig = {
schema: localHasuraEndpoint,
Copy link
Member

Choose a reason for hiding this comment

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

This should maybe try read from the env var first, it might be missed by a user not knowing its set here too

Copy link
Member Author

Choose a reason for hiding this comment

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

Unfortunately it wasn't working with the graphql codegen command! I tried 👍🏼

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok I've added dotenv and reading from the next js .env.local 👍🏼

const unselectedClassName =
"bg-primary-content text-primary hover:bg-secondary hover:text-primary-content hover:border border-primary ease-in duration-100";

console.log("test", selectedContent === "envio-data");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
console.log("test", selectedContent === "envio-data");

@JonoPrest JonoPrest changed the base branch from feat/pnpm to main October 19, 2023 12:29
@JonoPrest JonoPrest merged commit 7fcf95a into main Oct 19, 2023
1 check failed
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.

4 participants