[SOLVED] Cannot interact with any function on smartcontract

Hello, I am a beginer.
I deployed my smartcontract and tested the functions on remix, theproblem is that on liveserver i canot interact with any function from contract.The only thing i can interact with is connect with wallet and logout.

const web3 = await Moralis.enableWeb3();    
const options = {
    chain: "bsc testnet", 
    contractAddress: "0x8278f17597E21f39FBA54b5e4243E1a744f07d30",
    function_name: "getRandomNumber",
    abi: [{"inputs":[],"name":"getRandomNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}],
    params: {},
   
 };
 const allowance = await Moralis.executeFunction(options);

what doesn’t work?
do you get any errors?

Uncaught (in promise) TypeError: functionName is undefined,
Sory about that.I forgot to put the error.

You may need to use here functionName then

that is the function name, check in the abi. Is the same.

function_name vs functionName

1 Like

man I feel so stupid, Thank you a lot.Own you a beer.

1 Like