[SOLVED] OpenSea Plugin Error

Hi guys,
I am testing to place buy order on Rinkeby/ OpenSea using Moralis Opensea Plugin and Ethereum boiler plate…

I got the error:

MoralisWeb3.js:848 Uncaught (in promise) Error: Unknown trigger: “callPluginEndpoint”
at Function. (MoralisWeb3.js:848)
at tryCatch (runtime.js:63)
at Generator.invoke [as _invoke] (runtime.js:294)
at Generator.next (runtime.js:119)
at asyncGeneratorStep (asyncToGenerator.js:5)
at _next (asyncToGenerator.js:27)

the code bellow (this code is inside a React component):


const placeOffer = async () => {

    console.log("Placing offers..");

    const expirationTime = Math.round(Date.now() / 1000 + duration * 60 * 60);

    await Moralis.Plugins.opensea.createBuyOrder({

      network: "testnet",

      tokenAddress: "0xCae0b79679dC38E045525077Aa949aacBCB17791",

      tokenId: "1",

      tokenType: "ERC721",

      amount: 0.11,

      userAddress: "0x255...dDf75",

      paymentTokenAddress: "0xc778417e063141139fce010982780140aa0cd5ab",

      //expirationTime: expirationTime,

    });

  };

Do you have latest SDK and server versions?

1 Like

My server is v0.0.281
the SDK is updated few weeks ago…
I will try reinstalling it…
My server is connect the mainnet. Should I use Testnet server to try OpenSea Plugin on Rinkeby?

Hey @tungtien

Make sure to use the latest sdk:
<script src="https://npmcdn.com/[email protected]/dist/moralis.js"></script>

docs: https://github.com/MoralisWeb3/plugindocs/tree/main/opensea%20plugin#sdk

Cheers

1 Like

I should uninstall by:

npm uninstall moralis
npm uninstall react-moralis
then

npm install moralis
npm install react-moralis

is it right? ==> SOLVED by this method!
thank you guys!

1 Like