I have a Smart Contract that receives transactions proposal, these proposals go through a voting period and when this period ends, the transaction can be executed if it has the necessary approving votes.
This is the code of my Smart Contract, for simplicity purposes I didn't include all the variables, functions, and events.
contract MultiSigWallet {
struct Transaction {
address to;
uint value;
bytes data;
bool executed;
}
Transaction[] public transactions;
mapping(uint => mapping(address => bool)) public approved;
address[] public owners;
function submit(address _to, uint _value, bytes calldata _data)
external
onlyOwner
{
transactions.push(Transaction({
to: _to,
value: _value,
data: _data,
executed: false
}));
emit Submit(transactions.length - 1);
}
}
My question is: After one of the owners submits a transaction proposal, how can the other owners know what is the function that it's going to be executed and with what parameters. I ask that because the only information about the function that is going to be executed is in the bytes _data
received as an argument in the submit function, so the user would need to know what those bytes represent to be able to decide whether voting to approve or not the transaction.