Skip to content

Conversation

jayantk
Copy link
Contributor

@jayantk jayantk commented Apr 25, 2025

Summary

As the description says -- it turns out that you can't decode the old struct data with the new struct format. This restores the old method signatures and adds new methods for retrieving the new versions of the structs.

I don't love that we have new methods here for retrieving requests / providers, but that's the only way I see to ensure that all users of the contract continue working.

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

I tested getting both a request and a provider from an old contract.

@vercel
Copy link

vercel bot commented Apr 25, 2025

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

Name Status Preview Comments Updated (UTC)
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 25, 2025 4:04pm
5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Apr 25, 2025 4:04pm
component-library ⬜️ Ignored (Inspect) Apr 25, 2025 4:04pm
entropy-debugger ⬜️ Ignored (Inspect) Apr 25, 2025 4:04pm
proposals ⬜️ Ignored (Inspect) Apr 25, 2025 4:04pm
staking ⬜️ Ignored (Inspect) Apr 25, 2025 4:04pm

let contract = Arc::new(PythContract::from_config(
&Config::load(&opts.config.config)?.get_chain_config(&opts.chain_id)?,
)?);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

drive-by. the docs say it gets the provider but it doesn't. It's useful also.

@jayantk jayantk merged commit ad3ee4c into main Apr 25, 2025
12 checks passed
@jayantk jayantk deleted the entropy_error8 branch April 25, 2025 16:09
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