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

api, tests: streamline invoke return types #319

Merged
merged 1 commit into from
Oct 14, 2024
Merged

api, tests: streamline invoke return types #319

merged 1 commit into from
Oct 14, 2024

Conversation

ixje
Copy link
Member

@ixje ixje commented Oct 14, 2024

Currently all test_* functions of ChainFacade directly return the actual result of the called method on the smart contract. Which is very convenient when only using test invokes, but makes it inconvenient when switching between invoke_ and test_invoke because now the return type changed.

Personally when writing code that ends up persisting to chain (via invoke) I start off with test_invoke (also with debugging) before swapping it over. By streamlining the return types one does not have to change the result handling code.

Changes in this PR

  • all test_invoke* now return an InvokeReceipt just like regular invoke* calls
  • invoke_multi and invoke_multi_raw return InvokeReceipt[Sequence] instead of Sequence

@ixje ixje merged commit e717f0d into 3.0 Oct 14, 2024
11 checks passed
@ixje ixje deleted the align-test-invoke branch October 14, 2024 11:37
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.

1 participant