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

platone my_contract_cpp_abi_setName parameters should judgment msg parameter is empty #1313

Open
Cavalierliu opened this issue Dec 12, 2022 · 0 comments
Assignees
Labels
bug Something isn't working Priority/P1 High priority. Features that will be implemented in the latest or next major/minor version. Severity/major Important features.

Comments

@Cavalierliu
Copy link
Contributor

BCHAR *my_contract_cpp_abi_setName(BoatPlatoneTx tx_ptr, BCHAR msg)
{
static BCHAR tx_hash_str[67] = "";
BoatFieldVariable data_field;
RlpEncodedStreamObject *rlp_stream_ptr;
RlpObject rlp_object_list;
RlpObject rlp_object_txtype;
BUINT64 txtype;
RlpObject rlp_object_string_func_name;
RlpObject rlp_object_string_msg;
boat_try_declare;

boat_try(BoatPlatoneTxSetNonce(tx_ptr, BOAT_PLATONE_NONCE_AUTO));

boat_try(RlpInitListObject(&rlp_object_list));

txtype = tx_ptr->rawtx_fields.txtype;
boat_try(RlpInitStringObject(&rlp_object_txtype, UtilityChangeEndian(&txtype, sizeof(txtype)), sizeof(txtype)));
boat_try(0 > RlpEncoderAppendObjectToList(&rlp_object_list, &rlp_object_txtype));

boat_try(RlpInitStringObject(&rlp_object_string_func_name, (BUINT8*)"setName", strlen("setName")));
boat_try(0 > RlpEncoderAppendObjectToList(&rlp_object_list, &rlp_object_string_func_name));

boat_try(RlpInitStringObject(&rlp_object_string_msg, (BUINT8*)msg, strlen(msg)));
boat_try(0 > RlpEncoderAppendObjectToList(&rlp_object_list, &rlp_object_string_msg));
@Cavalierliu Cavalierliu added bug Something isn't working Severity/major Important features. Priority/P1 High priority. Features that will be implemented in the latest or next major/minor version. labels Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority/P1 High priority. Features that will be implemented in the latest or next major/minor version. Severity/major Important features.
Projects
None yet
Development

No branches or pull requests

1 participant