I want to create a function that receives two addresses and saves them into a bytes array. later a matching function will receive this bytes array and parse the two addresses.
function addressesToBytes(address add1, address add2) public view returns(bytes combined) {
combined = new bytes(40); //since each address is 20 bytes
//store the two addresses in the bytes array
}
function bytesToAddresses(bytes combined) returnes(address add1, address add2) {
// here set add1 and add2 values from combined bytes array
}
I saw this answer. but it was not enough :(.