Using node.js.
Read-Only Function has been processed using wait Moralis.Web3API.native.runContractFunction.
Is there a way to execute the code below?
Do you have any other sample code?
Using node.js.
Read-Only Function has been processed using wait Moralis.Web3API.native.runContractFunction.
Is there a way to execute the code below?
Do you have any other sample code?
It has to be a read only function in order to work with runContractFunction
Previously, used âMoralis.executeFunctionâ, but ârunContractFunctionâ is used for reasons not supported.
Writeable functions should be used
Do you have a sample code?
you can still use Moralis.executeFunction
Error: could not detect network (event=ânoNetworkâ, code=NETWORK_ERROR, version=providers/5.6.0)
reason: âcould not detect networkâ,
code: âNETWORK_ERRORâ,
event: ânoNetworkâ
what did you do before that? usually you have to use Moralis.enableWeb3()
await Moralis.start({ serverUrl: global.ENV.MORAL_SERVER, appId: global.ENV.MORAL_API_KEY, moralisSecret: global.ENV.MORAL_SECRET });
// Enable web3
await Moralis.enableWeb3({
gasLimit: {
âtypeâ: âBigNumberâ,
âhexâ: global.ENV.GAS_LIMIT_HEX
},
chainId: global.ENV.CHAIN_ID,
privateKey: global.ENV.MORAL_MASTER_PRIVATE_KEY,
});
ok, this was server side, in this case you will have to use web3 or ethers directly to make that call with a private key, mostly because the speedy node urls are discontinued now
So Iâm asking if I can check the sample code using âweb3â or âethersâ.