Hi, i’m trying execute a payable send method on a contract through a Cloud Function but got some errors, so, got some questions:
- What’s the correct form to send multiple parameters?
I’m trying contract.methods.contractfunction(param1, param2, …).send() according to the ABI structure order but got unknow param1 error. I also tried using a javascript object ({param1, param2}) and an array ([param1, param2]) but got Invalid number of parameters error.
- First parameter it’s an Address account. Must be formatted in any way?
I tried using the property request.user.attributes.ethAddress but didn’t work. By the way, i logged the request attribute and it’s correct (my wallet address).
Finally, i tried to execute the function using Moralis.executeFunction with the same parameters on the front and worked perfect.
So, it’s possible execute payable functions on cloud functions? Moralis SDK will transmit the signature request to front application and await for the approval of the metamask client?
Thanks alot.