Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Feature/action results #810

Merged
merged 7 commits into from
Feb 12, 2020
Merged

Feature/action results #810

merged 7 commits into from
Feb 12, 2020

Conversation

larryk85
Copy link
Contributor

Change Description

Add support for ABI generation and auto code generation for action results.

API Changes

  • API Changes

eosio actions can now have a return type other than void.

Documentation Additions

  • Documentation Additions

eosio actions can now be defined as follows.

[[eosio::action]]
int action1() {
   ...
   return 42;
}
[[eosio::action]]
std::string action2() {
  std::string default_string_value = "action2 action";
   ...
   if (something)
      return "foo";
   ...
   return default_string_value;
}

This will now generate the correct code to call set_action_return_value and populate the fields for action_results in the ABI.

This PR also introduces a new flag for the compiler --abi-version this can be given to generate an ABI that is conformant with currently either v1.1 or v1.2.

@larryk85 larryk85 merged commit 6f16967 into develop Feb 12, 2020
@larryk85 larryk85 deleted the feature/action_results branch February 12, 2020 23:34
@nksanthosh nksanthosh mentioned this pull request May 12, 2021
6 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants