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

Ethscriptions Example Added #63

Merged
merged 7 commits into from
Jan 8, 2024
Merged

Ethscriptions Example Added #63

merged 7 commits into from
Jan 8, 2024

Conversation

bgodlin
Copy link
Contributor

@bgodlin bgodlin commented Jan 4, 2024

No description provided.

handlers: [
{
kind: EthereumHandlerKind.Call,
handler: "handleTransaction",
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't tested this but if you filter the function this should greatly speed up indexing by being able to use dictionaries.

The function in this case is data: encoded in hex

Suggested change
handler: "handleTransaction",
handler: "handleTransaction",
filter: {
function: "0x64617461"
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Please test and include if working

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dataSources: [
{
kind: EthereumDatasourceKind.Runtime,
startBlock: 18130011,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this start block picked? Comment on any significance?

@@ -0,0 +1,6 @@
type Inscription @entity {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a created: Date! to this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

block: tx.blockNumber,
creator: tx.from,
});
inscription.save();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
inscription.save();
await inscription.save();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if (!tx.input) {
return;
}
let inscription: Inscription;
Copy link
Contributor

Choose a reason for hiding this comment

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

any reason why this is initialised outside of the below IF?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

solved c6d356e

@jamesbayly jamesbayly merged commit 014e797 into main Jan 8, 2024
1 of 2 checks passed
@jamesbayly jamesbayly deleted the ethscriptions branch January 8, 2024 07:46
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.

None yet

3 participants