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

feat!: add support for dynamic configurables #1555

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

hal3e
Copy link
Contributor

@hal3e hal3e commented Dec 9, 2024

closes: #1481
closes: #1328 as we can read the configurables directly from the binary

Release notes

In this release, we:

  • Added support for dynamic str configurables.
  • Added a new configurables reader to contract, script and predicateabigen that can read configurables directly form the binary.
  • Added struct ConfigurablesReader that can be used to read direct and indirect configurables at runtime and compile time.
  • Added tests for configurables with loades for contracts, scripts and predicates.
  • Updated documentation.

Summary

Breaking Changes

  • Contract Regular and Loader methods code(), contract_id(), code_root, state_root return Result
  • Executable Regular and Loader methods code(), data_offset_in_code, loader_code return Result
  • Configurables's update_constants_in returns Result
  • Predicate's with_configurable returns Result
  • AbiFormatter's decode_configurables argument configurable_data now accepts a &[u8]

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

@hal3e hal3e added the blocked label Dec 9, 2024
@hal3e hal3e self-assigned this Dec 9, 2024
@hal3e hal3e removed the blocked label Feb 6, 2025
@hal3e hal3e marked this pull request as ready for review February 6, 2025 14:12
@hal3e hal3e requested a review from xunilrj February 6, 2025 14:14
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.

Invalid configurables lead to panic Querying configurable constants and storage from SDK
1 participant