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

Soroban: Add extendPersistentTtl Builtin Method #1709

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

tareknaser
Copy link
Contributor

This PR adds support for extendPersistentTtl() method in Soroban, along with a test and documentation. Also, the Soroban testing infrastructure has been refactored to allow more flexible environment manipulation.

Documentation for extend_ttl
Fixes #1669

Changes

  • Added support for extendPersistentTtl as a method on uint64 for the Soroban target.
    • In the Soroban SDK, extend_ttl is a generic function (IntoVal<Env, Val>)
pub fn extend_ttl<K>(&self, key: &K, threshold: u32, extend_to: u32)
where
    K: IntoVal<Env, Val>,

but Solidity does not support that, so it's implemented as a method instead.

  • One assertion in the different_storage_types test is affected due to changes in diagnostic capture. A follow-up PR will address this.

@tareknaser tareknaser force-pushed the soroban_builtin_extend_ttl branch from 1f0b9ea to 8ca427d Compare February 9, 2025 20:36
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.

Add builtin to extend TTL for Soroban storage variables
1 participant