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

Implement Contract Upgrade and TTL Management Host Functions #47

Merged
merged 9 commits into from
Nov 19, 2024

Conversation

bbyalcinkaya
Copy link
Member

This PR implements two new host functions and a few semantic changes.

Host Functions

  • update_current_contract_wasm: Replaces the current contract’s code with the provided code hash (Wasm code must already be uploaded).
  • extend_contract_data_ttl: Extends TTL for persistent and temporary storage entries.

Some additional semantic changes:

  • Fixed getTag for bools
  • Added live-until metadata to storage entries.
  • put_contract_data now:
    • Sets initial TTL for new entries.
    • Updates values for existing entries without changing live-until.

@bbyalcinkaya bbyalcinkaya marked this pull request as ready for review November 12, 2024 08:34
Copy link

@ACassimiro ACassimiro left a comment

Choose a reason for hiding this comment

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

Seems clear to me, and I don't have issues with the implementation.

@rv-jenkins rv-jenkins merged commit 50117c0 into master Nov 19, 2024
3 checks passed
@rv-jenkins rv-jenkins deleted the fxdao-ledger-hostfuns branch November 19, 2024 08:01
@bbyalcinkaya bbyalcinkaya mentioned this pull request Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants