-
Notifications
You must be signed in to change notification settings - Fork 32
SC: Implement new sync call host functions #346
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the comment please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 intonodeos
host side and return back results.get_call_data()
andset_call_return_value()
cannot be tested at the moment.Resolves #342
API Changes
Documentation Additions