We are working on the Batch operator smart contract and we found a blocker since to make createDealProposal
work we need to add another parameter owner
to define who is requesting the deal proposal.
We want to be sure that no-one can create deal proposals on behalf to other users because we want to prevent any kind of spam.
owner
to createDealProposal
so it will be function createDealProposal(address owner, string memory _data_uri, uint256 duration, uint256 collateral, address[] memory _providers, address[] memory _appeal_addresses)
bulkContract
which will contain the address of the allowed contractbulkContract
will be managed by the "Protocol Managers" so it can be changed over timecreateDealProposal
function because we want to be sure it works in this way:
msg.sender == owner
it's all fine, because we know that sender (the address who sent the transaction) is the same of provided owner
.msg.sender != owner
means we have to do another check:
msg.sender == bulkContractAddress
the transaction is valid, because it arrives from a trusted source, the transaction will be acceptedmsg.sender != bulkContract
the transaction is you not valid, bcause it arrives from an untrusted source, the transaction will fail