Skip to content

platone my_contract_cpp_abi_setName parameters should judgment msg parameter is empty #1313

@Cavalierliu

Description

@Cavalierliu

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));

Metadata

Metadata

Assignees

Labels

Priority/P1High priority. Features that will be implemented in the latest or next major/minor version.Severity/majorImportant features.bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions