-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[docs] Add WASM interface C++ reference documentation #9508
Conversation
int32_t get_active_producers(legacy_span<account_name> producers) const; | ||
|
||
/** | ||
* Tests a given public key with the recovered public key from digest and signature. |
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.
It may be worth noting somehow that this assertion does not require the EOSIO canonical check to pass. That is, a signature that would have been disallowed during transaction acceptance would potentially be allowed here. Many contract users probably don't care about that detail.. but it's an important subtle behavior of the interface
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 am somewhat out of my element here, but if you have a suggested text i can add it, let me know what text should i add.
Should the documentation offer any guidance or recommendations on usage patterns of any of these? For example, should the documentation recommend to use the assert_sha256() variant over sha256() if contract's usage pattern allows it. Or, avoiding spamage of eosio_assert() with negative checks. |
Yes, of course. If the usage suggestions are short and to the point they can be added in a "remarks" section within the applicable function. However, I believe a separate "overview" section that includes best practices is also desired for devs to be able to use the WASM interface correctly and effectively. To that end, I have created this issue #9518 to keep this effort active. In the meantime I'm approving this unless there are any hard corrections. @victorj8 please wait at least 24 hours before merging in case there are any additional corrections. Thanks! @larryk85 |
Change Description
Currently there is few documentation about host functions on EOS, this PR provides documentation for some host functions.
Change Type
Select ONE
Consensus Changes
API Changes
Documentation Additions