title: Web3.eth.abi.encodeFunctionCall Is not working
body: <p>I'm creating a dapp that charges users a specific amount of eth depending on their input.</p>
  <p>Whenever I attempt to create the transaction, I specify the amount of Eth in Wei. It throws an Error with no description as to why it couldn't fulfill the transaction</p>
  <p><strong>Error: Error Minting New NFT
  at MintNewNFT (Transactions.js:68)
  at Object.onClick (index.js:62)</strong></p>
  <p><em>(Line 62 is the catch block)</em></p>
  <p><strong>AmountIn is 0.02166 ETH</strong></p>
  <p>Here is my code :</p>
  <pre><code> export const MintNewNFT = async (WalletABI,address, network, mediaID, amountIn) =&gt; {
  
    try {
      
      
      //adjust this to take an argument for media id
      
      const web3 = new Web3('https://rinkeby.infura.io/v3/key');
      const weiValue = Web3.utils.toWei(amountIn.toString(), 'ether');
      console.log(weiValue , mediaID);
      
      const transactionParameters = {
        to: WalletABI._address, // Required except during contract publications.
        from: address, // must match user's active address.
        value: weiValue.toString(), 
        data: web3.eth.abi.encodeFunctionCall(    
          {
            &quot;inputs&quot;: [
            {
              &quot;internalType&quot;: &quot;bytes32&quot;,
              &quot;name&quot;: &quot;mediaID&quot;,
              &quot;type&quot;: &quot;bytes32&quot;
            }
          ],
          &quot;name&quot;: &quot;mintNewNFT&quot;,
          &quot;outputs&quot;: [],
          &quot;stateMutability&quot;: &quot;payable&quot;,
          &quot;type&quot;: &quot;function&quot;,
          &quot;payable&quot;: true
          
        },[mediaID]),
        chainId: `0x${network}`, // Used to prevent transaction reuse across blockchains. Auto-filled by MetaMask.
      };
      
    
      
      // txHash is a hex string
      // As with any RPC call, it may throw an error
      await window.ethereum.request({
        method: 'eth_sendTransaction',
        params: [transactionParameters],
      }).then((result) =&gt; {
  
        // The result varies by by RPC method.
        // For example, this method will return a transaction hash hexadecimal string on success.
  
        console.log(`Transaction Result ${result}`)
  
  
      })
      .catch((error) =&gt; {
        // If the request fails, the Promise will reject with an error.
  
        console.log(`Transaction ERROR :  ${error.message}`)
      });
  
      
  
  } catch (error) {
      throw Error(&quot;Error Minting New NFT&quot;, error)
  }
  }
  </code></pre>
  <p>Any indication as to what I may be doing wrong would be very much appreciated</p>