MoralisWeb3 / issue-tracker

25 stars 7 forks source link

Missing type in Web3ExecuteFunctionParameters of react-moralis #109

Open yewyewXD opened 2 years ago

yewyewXD commented 2 years ago

Found in node_modules\react-moralis\lib\hooks\useWeb3ExecuteFunction\useWeb3ExecuteFunction.d.ts after running npm i react-moralis on my React project

Line5:

export declare type Web3ExecuteFunctionParameters = {
    contractAddress?: string;
    abi?: object;
    functionName?: string;
    params?: Record<string, unknown>;
};

Type Web3ExecuteFunctionParameters should also include msgValue. After exploring for hours, I realized this param (msgValue) actually works, when minting NFT or calling a payable smart contract function.

This helped me: https://docs.moralis.io/moralis-server/web3/web3#executefunction