I have created a smart contract template which acts as a submission form for complaints, eg. pothole on 3rd street.
A user will fill out only basic fields in the smart contract, eg Name, Address, etc (just hashes of course) and severity of the issue. On submission, a template smart contract will be called requesting payment if issue is valid for the severity level. Then the body in charge of maintenance can only sign and validate the contract if they pay the amount correlated to the severity level and nothing less.
I have not created the payment processing yet because from my understanding of Ethereum Smart Contracts, it is not possible to directly request money in the smart contract. Is there a workaround I can use to not have to draft hundreds of smart contracts with hard coded amounts?
I wanted to know if there was some way to force the Maintenance party to move a predetermined amount of Ether on their contract signature. This while keeping a single Smart Contract template that does not hold Ether and is also flexible on payment amount but forces a predetermined amount.
Here is a real world example. Susan reports a level 5 issue to maintenance that is advertised as paying $20. Smart contract is created from template for $20. Maintenance sees the issues as valid and accepts the contract and has to pay exactly $20.
acceptIssue()
method. – foba