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

Add ERC721 example app #230

Merged
merged 4 commits into from
Jun 22, 2023
Merged

Add ERC721 example app #230

merged 4 commits into from
Jun 22, 2023

Conversation

0xOlias
Copy link
Collaborator

@0xOlias 0xOlias commented Jun 22, 2023

This PR adds an ERC271 example app for the Smol Brains NFT collection on Arbitrum. I also noticed some RPC provider inconsistencies while testing this out. Specifically, Alchemy seems to rename transaction.type to transaction.arbType for some bizarre reason. Quicknode works as expected.

I've ran into enough issues related to this specific field that it may be worth making it nullable in the database, but for now I added a default of "0x0" so that Alchemy still works.

Also fixed a bug where block.baseFeePerGas was (wrongly) assumed to be non-null when formatting event objects coming out of the event store.

@changeset-bot
Copy link

changeset-bot bot commented Jun 22, 2023

🦋 Changeset detected

Latest commit: 0079b4e

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

@vercel
Copy link

vercel bot commented Jun 22, 2023

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

Name Status Preview Updated (UTC)
ponder-docs ✅ Ready (Inspect) Visit Preview Jun 22, 2023 1:00am

@0xOlias 0xOlias merged commit c9afd1b into main Jun 22, 2023
9 checks passed
@0xOlias 0xOlias deleted the olias/example-erc721 branch June 22, 2023 01:17
@github-actions github-actions bot mentioned this pull request Jun 22, 2023
@wyze
Copy link

wyze commented Jun 22, 2023

Specifically, Alchemy seems to rename transaction.type to transaction.arbType for some bizarre reason. Quicknode works as expected.

Thanks, I noticed as well and I couldn't tell where this was used in the codebase and seemed to be stored for history. I patched my local version to make the database field nullable and things were working as expected.

@0xOlias
Copy link
Collaborator Author

0xOlias commented Jun 22, 2023

Specifically, Alchemy seems to rename transaction.type to transaction.arbType for some bizarre reason. Quicknode works as expected.

Thanks, I noticed as well and I couldn't tell where this was used in the codebase and seemed to be stored for history. I patched my local version to make the database field nullable and things were working as expected.

Ah, makes sense. While we're here - any other patches you had to make?

FYI, the reason we store transaction.type (and many other somewhat niche transaction and block data) is that the event.transaction object passed to user-provided event handlers aims to match the viem Transaction type. Same goes for event.block.

@wyze
Copy link

wyze commented Jun 23, 2023

Ah, makes sense. While we're here - any other patches you had to make?

I haven't got it tested yet, waiting on historical sync. But I exposed the findMany API to the Model/Entities. I always found that missing from subgraphs, so we'd have to store IDs and loop over them for some things.

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.

2 participants