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

Evm ingestion reform #255

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Evm ingestion reform #255

wants to merge 5 commits into from

Conversation

tmcgroul
Copy link
Contributor

@eldargab it would be nice to get feedback on my changes. current state involves a lot of duplications and i don't really know how to avoid it

@tmcgroul tmcgroul requested a review from eldargab March 16, 2024 06:29
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this file is almost identical copy of evm.ts from evm-processor. this one has more fields marked as optional

Copy link
Contributor Author

Choose a reason for hiding this comment

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

code from this file is very simiral to ds-rpc/mapping.ts file from evm-processor but i don't know how to unify them because they are related to different clients: this one for evm-ingest and writer and another one for processor's purposes

...getTxProps(fields.transaction, true),
sighash: fields.transaction?.sighash ? withDefault('0x', BYTES) : undefined,
...getTxReceiptProps(fields.transaction, true)
...project(fields.transaction, {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

even though we have full schema defined we need to merge them and override fields that have different data types in archive. which is kind of ugly...

}
}
return new ObjectValidator(presentProps) as any
): ObjectValidator<Props> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

idk how to tell to ts compiler that this function has to return the same type that is passed to the function but without undefined values 🤷‍♂️

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.

1 participant