I personally would recommend you to construct your payload using the TransactionPayloadBuilder, then you can use BigUintValue or U8Value and it does the conversion for you.
But the manual way would be to convert the number to hex and appending a 0 at the front if the result would have an uneven number of characters otherwise
I personally would recommend you to construct your payload using the TransactionPayloadBuilder, then you can use BigUintValue or U8Value and it does the conversion for you. But the manual way would be to convert the number to hex and appending a 0 at the front if the result would have an uneven number of characters otherwise
Dec to hex