I want to create a OpenSea order which package quotes for multiple items
// javascript
// client uses this method to create sale-multiple-NFTS order
async function createMultipleOrder( ) {
// offerItemList like this -> different NFT type
const nftList= [
// tokenAddres: 0x10b8b56d53bfa5e374f38e6c0830bad4ebee33e6
{
itemType: ItemType.ERC721,
token: "0x10b8b56d53bfa5e374f38e6c0830bad4ebee33e6",
identifier: "001",
},
{
itemType: ItemType.ERC721,
token: "0x10b8b56d53bfa5e374f38e6c0830bad4ebee33e6",
identifier: "002",
},
// tokenAddres: 0xbb1594Cc5C456541B02A24a9132B070B385B7035
{
itemType: ItemType.ERC721,
token: "0x10b8b56d53bfa5e374f38e6c0830bad4ebee33e6",
identifier: "002",
}
];
const accounts = await window.ethereum.request({ method: 'eth_requestAccounts' });
const saleAccount = accounts[0];
const buyerAccount = '0x00....';
const provider = new ethers.providers.Web3Provider(window.ethereum);
const seaport = new Seaport(provider);
const { executeAllActions } = await seaport.createOrder(
{
offer: nftList,
consideration: [
{
// NFTS for 1 ETH
amount: ethers.utils.parseEther("1").toString(),
recipient: buyerAccount ,
},
],
},
saleAccount ,
);
const order = await executeAllActions();
}
console.log(order);
order contains a var => signature
then use the method matchOrder to fulfull this order.
the question is , Any account can use the method createOrder , but only the NFT owner can match this order ??
Now , I can use the openSea SDK to create a sellOrder or buyOrder when I create, the openSea WebSite will display this list or offer, but use the seaportJS's method createOrder how to create a order contains multiple NFT items for sale ??