Does morals v2 provide direct access to contracts?

So In my previous version of my DAPP, I used the Moralis.executeFunction wrapper to submit requests to the blockchain.

Is this system now deprecated? It looks like there is an API to submit calls through Moralis API but that is essentially centralized submission of transactions which I am a little hesitant to use.

Hi @jerome

The executeFunction is not available in v2 SDK. With API calls we can only call read-only smart contract functions. It is not possible to call smart contract to write functions. So there is no submission of transactions through API.

Check this doc for more details on the API endpoint to call the read-only functions.

You could still use Moralis v1 sdk in front end for specific functionalities like execute function.
We are working on a new sdk specific to front end only.

Can you use v1 with react-moralis without selfhosting the entire stack ?

You can try to use it. In theory it should work even without a server url and app id as some functionality doesn’t depend on that.

Doesn’t this part rely on accessing moralis quick nodes ? I was expecting this to be deprecated ?

On what you are referring with quick nodes? For what functionality?

Calling smart contract functions

It uses current MetaMask functionality for write functions. Similar how you would use ethers in front end or web3.js

“message”:“Function store is not read only” i get this error when i try to store value ,be cause i dont know how to set params in jason format , any one help me

Hi @bbaktech
Can you create a new post for your question and share more details on the code that is causing the error.
Thanks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.