I need to send a certain quality of ether from the smart contract to an address, but the problem is that I need that along with that transaction I need information to be recorded in the blockchain for later access. How do I make sure that only the information I want is recorded along with the transaction?
I was trying to do something like this:
function Transaction(address payable _to, bytes memory info) public payable {
//_to.transfer(msg.value);//this works but only performs the transfer
(bool sent, bytes memory data) = _to.call{value: msg.value}(info);
require(sent, "Failed to send Ether");
}
But with this it doesn't work and I don't understand how to register only the information (info) in the blockchain.
Turning TX DATA 0x1e6595ab0000000000000000000000003d1188b926bee218b7980fa23b3c01a222e9806c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000045445535400000000000000000000000000000000000000000000000000000000 to string the result is:
What are the characters before? And how do I make sure they are not stored in the blockchain? But with this it doesn't work because if you turn TX DATA 0x1e6595ab0000000000000000000000003d1188b926bee218b7980fa23b3c01a222e9806c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000045445535400000000000000000000000000000000000000000000000000000000
to string the result is:

