<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Developers Forum for XinFin XDC Network: dustinggreenery</title>
    <description>The latest articles on Developers Forum for XinFin XDC Network by dustinggreenery (@dustinggreenery).</description>
    <link>https://www.xdc.dev/dustinggreenery</link>
    <image>
      <url>https://www.xdc.dev/images/gruWcD49XrYfqU49eow_lSdfaCrPqnb6ATxNCwKjBsU/rs:fill:90:90/mb:500000/ar:1/aHR0cHM6Ly93d3cu/eGRjLmRldi91cGxv/YWRzL3VzZXIvcHJv/ZmlsZV9pbWFnZS8x/OTc1LzMxZGQwYTVi/LTc4NzUtNGVhZC1h/NDNmLTBiZWMzYjQx/ZDZmNi5wbmc</url>
      <title>Developers Forum for XinFin XDC Network: dustinggreenery</title>
      <link>https://www.xdc.dev/dustinggreenery</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://www.xdc.dev/feed/dustinggreenery"/>
    <language>en</language>
    <item>
      <title>[Solved]XDC Transaction Error</title>
      <dc:creator>dustinggreenery</dc:creator>
      <pubDate>Tue, 22 Aug 2023 04:54:05 +0000</pubDate>
      <link>https://www.xdc.dev/dustinggreenery/xdc-transaction-error-4n1f</link>
      <guid>https://www.xdc.dev/dustinggreenery/xdc-transaction-error-4n1f</guid>
      <description>&lt;p&gt;When trying to use tx.wait(1) while under the XDC Apothem testnet, I run into an error:&lt;br&gt;
&lt;code&gt;invalid address (argument="address", value="xdc0000000000000000000000000000000000000000", code=INVALID_ARGUMENT, version=address/5.7.0)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The same functionality works on the sepolia testnet, but not here.&lt;/p&gt;

&lt;p&gt;I'm using Moralis in a frontend in this scenario.&lt;/p&gt;

&lt;p&gt;Here is the moralis function:&lt;br&gt;
&lt;code&gt;const { runContractFunction: createProductOrder } = useWeb3Contract({&lt;br&gt;
    abi: factoryAbi,&lt;br&gt;
    contractAddress: factoryAddress,&lt;br&gt;
    functionName: "createProductOrder",&lt;br&gt;
    params: {&lt;br&gt;
        vendorAddress: vendorAddress,&lt;br&gt;
        PONo: PONo,&lt;br&gt;
        timeToAccept: timeToAccept,&lt;br&gt;
        timeToShip: timeToShip,&lt;br&gt;
    },&lt;br&gt;
    msgValue: moneySent * 10 ** 18,&lt;br&gt;
});&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is the part that handles the transaction, also the origin of the error (The body could just be await tx.wait(1) and the same error would be produced)&lt;br&gt;
&lt;code&gt;const handleCreateContract = async function (tx) {&lt;br&gt;
    await tx.wait(1).then((result) =&amp;gt; {&lt;br&gt;
        setAddress(result.events[0].args.PO);&lt;br&gt;
    });&lt;br&gt;
    handleNewNotification(tx);&lt;br&gt;
};&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is the button calling this function:&lt;br&gt;
&lt;code&gt;&amp;lt;button onClick={() =&amp;gt; createProductOrder({ onSuccess: handleCreateContract })}&amp;gt;New Contract!&amp;lt;/button&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I did find this github discussion with the same issue, and one person replied saying it was caused by a different prefix. Is this the case? How can I go about fixing this error?&lt;br&gt;
&lt;a href="https://github.com/ethers-io/ethers.js/discussions/3333"&gt;https://github.com/ethers-io/ethers.js/discussions/3333&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
