I have im my js file 3 variables:
var stringData = "stingData";
var intNonce = 1234;
var hexData = "0x65225648";
I want to concatenate then and send to my contract:
var data = stringData+intNonce+hexData;
myContract.contractFunction(data);
And im my contract i want to recover the 3 variables;
contract MyContract {
contractFunction(bytes memory _data){
//recover 3 variables
}
}
I read that the best way to do this is through Assembly but I have no idea how to implement this