Hi @Yomoo,
Thanks so much for your reply!
My dApp will run on PHP (backend) and obviously use Moralis on the frontend.
Hereās a simplified break-down of the intended use-case:
Each time a front-end user (who is not logged in or supposed to log in, not in the classic way nor with a crypto account/wallet) clicks a certain link, a function on a Smart Contract (send()) should be called. This function will simply store a value on the blockchain, in a new transaction.
The way Iām envisioning it is that when the user clicks a link, a function on the backend (PHP) should be called through ajax. Itās in the backend, that the Smart Contract (its send() function) should be called. Itās always the same, known and (if needed) hard-coded Ethereum account (address) that calls the Smart Contract.
I understand how the Smart Contract should work and function, and also how to trigger it through ajax and PHP. The challenge Iām facing is that I need to the above to function on the fly, without anyone (me or anyone else that has access to the system) manually approving the call to the Smart Contract. It should work automatically.
I thought I could use the web3.eth.personal.unlockAccount function for this purpose - but maybe Iām wrong? Should I instead unlock the account manually, once, and keep it it unlocked?
Thanks so much!
Regards,
Roel