Skip to content

fix: adjust contract ABI writes to read from contract_interface key instead of contract_abi #2276

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

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

rafaelcr
Copy link
Collaborator

Stacks core changed the name of the key for this data from contract_abi to contract_interface in /new_block events. This PR reads from the new field.

A replay or a manual backfill will be necessary to get all the missing ABIs from recently deployed contracts.

Copy link

Vercel deployment URL: https://stacks-blockchain-5k0g1sr7b-hirosystems.vercel.app 🚀

Copy link

codecov bot commented May 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@@ -287,7 +287,7 @@ function parseDataStoreTxEventData(
block_height: blockData.block_height,
clarity_version: clarityVersion,
source_code: tx.parsed_tx.payload.code_body,
abi: JSON.stringify(tx.core_tx.contract_abi),
abi: JSON.stringify(tx.core_tx.contract_interface),
Copy link
Member

Choose a reason for hiding this comment

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

Should this be something like

abi: JSON.stringify(tx.core_tx.contract_interface ?? tx.core_tx.contract_abi)

so that it works with tsvs containing the previous field name?

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