SC: Implement new sync call host functions#346
Conversation
| * | ||
| * @tparam T - Type of call data, must be serializable by `pack(...)` | ||
| * @param receiver - The name of the account this call is intended for | ||
| * @param flags - The flags |
There was a problem hiding this comment.
* @param flags - flags (bits) representing blockchain level requirements about
* the call. Currently LSB bit indicates read-only. All other bits
* are reserved to be 0
Although, since this is suppose to be an easy to use wrapper. I think this should just be a bool read_only. And call can create the correct flags.
There was a problem hiding this comment.
This call class is low level. I chose to keep it closer to the host function parameters, while make the to-be-implemented wrapper to take read_only argument.
There was a problem hiding this comment.
I think about it more and agree with you. I have changed to take in read_only and another flag no_op_if_receiver_not_support_sync_call as parameters. Thanks.
There was a problem hiding this comment.
Update the comment please.
There was a problem hiding this comment.
I have changed the bools to enums in #351. I have updated the comment there.
…structor; enforce no_op_if_receiver_no_support_sync_call
…t_support_sync_call
Change Description
This is the first PR of sync call support in CDT. Its purpose is to build the basic infrastructure and get things moving. More changes are in future PRs.
The PR implements the new host functions
call(),get_call_return_value(),get_call_data(), andset_call_return_value(). A simple test showscall()andget_call_return_value()can get intonodeoshost side and return back results.get_call_data()andset_call_return_value()cannot be tested at the moment.Resolves #342
API Changes
Documentation Additions