-
Notifications
You must be signed in to change notification settings - Fork 153
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
base: master
Are you sure you want to change the base?
Evm ingestion reform #255
Conversation
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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, { |
There was a problem hiding this comment.
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> { |
There was a problem hiding this comment.
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 🤷♂️
cc23118
to
1f6a573
Compare
@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