Hi all - not sure if this is a silly question however it is quite difficult finding any tutorials regarding this whatsoever.
I am trying to interact with seaport using Moralis in nextjs… The following is my _app.js file
import "../styles/globals.css"
import Head from "next/head"
import { MoralisProvider } from "react-moralis"
const APP_ID = process.env.NEXT_PUBLIC_APP_ID
const SERVER_URL = process.env.NEXT_PUBLIC_SERVER_URL
function MyApp({ Component, pageProps, router }) {
return (
<div>
<Head>
<title>Seaplay</title>
<link rel="icon" href="/favicon.ico" />
<link rel="apple-touch-icon" href="/favicon.ico"/>
</Head>
<MoralisProvider appId={APP_ID} serverUrl={SERVER_URL}>
<Component {...pageProps} key={router.route}/>
</MoralisProvider>
</div>
)
}
export default MyApp
However in the seaport docs provided on Github the following is inferred. I understand it is redundant however I am unsure as to how to integrate the two so as to be able to interact with seaport or if this is even possible at all.
import { Seaport } from "@opensea/seaport-js";
import { ethers } from "ethers";
const provider = new ethers.providers.JsonRpcProvider(
"https://<network>.alchemyapi.io/v2/YOUR-API-KEY"
);
const seaport = new Seaport(provider);
If my question is ill-informed and anyone has any supplementary resources kindly forward them - I have read through the seaport docs extensively