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

Add new flag resolve_last to rpc call function #1397

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

Neylix
Copy link
Member

@Neylix Neylix commented Jan 26, 2024

Description

Add a new flag resolve_last to the json rpc function call_function allowing user to execute the contract to it's last version/time or to the version/time of the requested address.
request_last is a boolean, default to true

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Created a contract with a public function returning a State and an action updating the state. I was able to retrieve state of the selected address.

@version 1

actions triggered_by: interval, at: "*/5 * * * * *" do
  counter = State.get("counter", 0)
  State.set("counter", counter + 1)
end

export fun get_counter() do
  State.get("counter", 0)
end

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Neylix Neylix added feature New feature request smart contracts Involve smart contracts API Involve API facing user labels Jan 26, 2024
@bchamagne bchamagne added this to the 1.4.7 milestone Jan 26, 2024
@Neylix Neylix merged commit 1f8a0a3 into archethic-foundation:develop Jan 26, 2024
2 checks passed
@Neylix Neylix deleted the Add-call-function-flag branch February 12, 2024 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Involve API facing user feature New feature request smart contracts Involve smart contracts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants