Opensea function

Hello. How can the opensea matchOrders contract function be used with moralis?
Here is its ABI:

{
	"inputs": [{
		"components": [{
			"components": [{
				"internalType": "address",
				"name": "offerer",
				"type": "address"
			}, {
				"internalType": "address",
				"name": "zone",
				"type": "address"
			}, {
				"components": [{
					"internalType": "enum ItemType",
					"name": "itemType",
					"type": "uint8"
				}, {
					"internalType": "address",
					"name": "token",
					"type": "address"
				}, {
					"internalType": "uint256",
					"name": "identifierOrCriteria",
					"type": "uint256"
				}, {
					"internalType": "uint256",
					"name": "startAmount",
					"type": "uint256"
				}, {
					"internalType": "uint256",
					"name": "endAmount",
					"type": "uint256"
				}],
				"internalType": "struct OfferItem[]",
				"name": "offer",
				"type": "tuple[]"
			}, {
				"components": [{
					"internalType": "enum ItemType",
					"name": "itemType",
					"type": "uint8"
				}, {
					"internalType": "address",
					"name": "token",
					"type": "address"
				}, {
					"internalType": "uint256",
					"name": "identifierOrCriteria",
					"type": "uint256"
				}, {
					"internalType": "uint256",
					"name": "startAmount",
					"type": "uint256"
				}, {
					"internalType": "uint256",
					"name": "endAmount",
					"type": "uint256"
				}, {
					"internalType": "address payable",
					"name": "recipient",
					"type": "address"
				}],
				"internalType": "struct ConsiderationItem[]",
				"name": "consideration",
				"type": "tuple[]"
			}, {
				"internalType": "enum OrderType",
				"name": "orderType",
				"type": "uint8"
			}, {
				"internalType": "uint256",
				"name": "startTime",
				"type": "uint256"
			}, {
				"internalType": "uint256",
				"name": "endTime",
				"type": "uint256"
			}, {
				"internalType": "bytes32",
				"name": "zoneHash",
				"type": "bytes32"
			}, {
				"internalType": "uint256",
				"name": "salt",
				"type": "uint256"
			}, {
				"internalType": "bytes32",
				"name": "conduitKey",
				"type": "bytes32"
			}, {
				"internalType": "uint256",
				"name": "totalOriginalConsiderationItems",
				"type": "uint256"
			}],
			"internalType": "struct OrderParameters",
			"name": "parameters",
			"type": "tuple"
		}, {
			"internalType": "bytes",
			"name": "signature",
			"type": "bytes"
		}],
		"internalType": "struct Order[]",
		"name": "orders",
		"type": "tuple[]"
	}, {
		"components": [{
			"components": [{
				"internalType": "uint256",
				"name": "orderIndex",
				"type": "uint256"
			}, {
				"internalType": "uint256",
				"name": "itemIndex",
				"type": "uint256"
			}],
			"internalType": "struct FulfillmentComponent[]",
			"name": "offerComponents",
			"type": "tuple[]"
		}, {
			"components": [{
				"internalType": "uint256",
				"name": "orderIndex",
				"type": "uint256"
			}, {
				"internalType": "uint256",
				"name": "itemIndex",
				"type": "uint256"
			}],
			"internalType": "struct FulfillmentComponent[]",
			"name": "considerationComponents",
			"type": "tuple[]"
		}],
		"internalType": "struct Fulfillment[]",
		"name": "fulfillments",
		"type": "tuple[]"
	}],
	"name": "matchOrders",
	"outputs": [{
		"components": [{
			"components": [{
				"internalType": "enum ItemType",
				"name": "itemType",
				"type": "uint8"
			}, {
				"internalType": "address",
				"name": "token",
				"type": "address"
			}, {
				"internalType": "uint256",
				"name": "identifier",
				"type": "uint256"
			}, {
				"internalType": "uint256",
				"name": "amount",
				"type": "uint256"
			}, {
				"internalType": "address payable",
				"name": "recipient",
				"type": "address"
			}],
			"internalType": "struct ReceivedItem",
			"name": "item",
			"type": "tuple"
		}, {
			"internalType": "address",
			"name": "offerer",
			"type": "address"
		}, {
			"internalType": "bytes32",
			"name": "conduitKey",
			"type": "bytes32"
		}],
		"internalType": "struct Execution[]",
		"name": "executions",
		"type": "tuple[]"
	}],
	"stateMutability": "payable",
	"type": "function"
}

Also an example transaction:

GM there, what do you wanna achieve with Moralis?

I want to call a function - how do I fill out the options correctly?

I can’t find the format to fill in so many parameters ( I get the error code=INVALID_ARGUMENT )

if you want to call a function for a contract, you can call it as any other function on a contract, you need the contract address, abi, function name, parameters

How to correctly fill in param{} when there are many parameters? I get an error

async function matchOrders() {
	let offer = [{
		itemType: 3,
		token: "0xa604060890923ff400e8c6f5290461a83aedacec",
		identifierOrCriteria: "79132292199041247701464544364790907230675470197141384351269695786490110410753",
		startAmount: "1",
		endAmount: "1"
	}];
	let consideration = [{
		itemType: 3,
		token: "0xa604060890923ff400e8c6f5290461a83aedacec",
		identifierOrCriteria: "79132292199041247701464544364790907230675470197141384351269695786490110410753",
		startAmount: "1",
		endAmount: "1",
		recipient: "0xc315f3c6348ced4cef570e0874e73a6276f4488f"
	}];
	let offerComponents = [{
		orderIndex: "0",
		itemIndex: "0"
	}];
	let considerationComponents = [{
		orderIndex: "0",
		itemIndex: "0"
	}];


	let parameters = [{
		offerer: "0xaef34a496d417ca3aecd7eb0af71c07a1c8683fa",
		zone: "0x004c00500000ad104d7dbd00e3ae0a5c00560c00",
		offer: offer,
		consideration: consideration,
		orderType: 3,
		startTime: "1660721418",
		endTime: "1661931000",
		zoneHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
		salt: "31019840899109510",
		conduitKey: "0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000",
		totalOriginalConsiderationItems: "1"
	}];


	let orders = [{
		parameters,
		signature: "0x78134ddfde008b91cd647f28a698b8e3d9e8e48cb002cfde3d3042321c802091200fe6c23e93741a4bf9849fa3407991f0413a5aada3f7b7174053b04703973e1b"
	}];
	let fulfillments = [{
		offerComponents,
		considerationComponents
	}];


	let options = {
		contractAddress: "0x00000000006c3852cbef3e08e8df289169ede581",
		functionName: "matchOrders",
		abi: [{
			"inputs": [{
				"components": [{
					"components": [{
						"internalType": "address",
						"name": "offerer",
						"type": "address"
					}, {
						"internalType": "address",
						"name": "zone",
						"type": "address"
					}, {
						"components": [{
							"internalType": "enum ItemType",
							"name": "itemType",
							"type": "uint8"
						}, {
							"internalType": "address",
							"name": "token",
							"type": "address"
						}, {
							"internalType": "uint256",
							"name": "identifierOrCriteria",
							"type": "uint256"
						}, {
							"internalType": "uint256",
							"name": "startAmount",
							"type": "uint256"
						}, {
							"internalType": "uint256",
							"name": "endAmount",
							"type": "uint256"
						}],
						"internalType": "struct OfferItem[]",
						"name": "offer",
						"type": "tuple[]"
					}, {
						"components": [{
							"internalType": "enum ItemType",
							"name": "itemType",
							"type": "uint8"
						}, {
							"internalType": "address",
							"name": "token",
							"type": "address"
						}, {
							"internalType": "uint256",
							"name": "identifierOrCriteria",
							"type": "uint256"
						}, {
							"internalType": "uint256",
							"name": "startAmount",
							"type": "uint256"
						}, {
							"internalType": "uint256",
							"name": "endAmount",
							"type": "uint256"
						}, {
							"internalType": "address payable",
							"name": "recipient",
							"type": "address"
						}],
						"internalType": "struct ConsiderationItem[]",
						"name": "consideration",
						"type": "tuple[]"
					}, {
						"internalType": "enum OrderType",
						"name": "orderType",
						"type": "uint8"
					}, {
						"internalType": "uint256",
						"name": "startTime",
						"type": "uint256"
					}, {
						"internalType": "uint256",
						"name": "endTime",
						"type": "uint256"
					}, {
						"internalType": "bytes32",
						"name": "zoneHash",
						"type": "bytes32"
					}, {
						"internalType": "uint256",
						"name": "salt",
						"type": "uint256"
					}, {
						"internalType": "bytes32",
						"name": "conduitKey",
						"type": "bytes32"
					}, {
						"internalType": "uint256",
						"name": "totalOriginalConsiderationItems",
						"type": "uint256"
					}],
					"internalType": "struct OrderParameters",
					"name": "parameters",
					"type": "tuple"
				}, {
					"internalType": "bytes",
					"name": "signature",
					"type": "bytes"
				}],
				"internalType": "struct Order[]",
				"name": "orders",
				"type": "tuple[]"
			}, {
				"components": [{
					"components": [{
						"internalType": "uint256",
						"name": "orderIndex",
						"type": "uint256"
					}, {
						"internalType": "uint256",
						"name": "itemIndex",
						"type": "uint256"
					}],
					"internalType": "struct FulfillmentComponent[]",
					"name": "offerComponents",
					"type": "tuple[]"
				}, {
					"components": [{
						"internalType": "uint256",
						"name": "orderIndex",
						"type": "uint256"
					}, {
						"internalType": "uint256",
						"name": "itemIndex",
						"type": "uint256"
					}],
					"internalType": "struct FulfillmentComponent[]",
					"name": "considerationComponents",
					"type": "tuple[]"
				}],
				"internalType": "struct Fulfillment[]",
				"name": "fulfillments",
				"type": "tuple[]"
			}],
			"name": "matchOrders",
			"outputs": [{
				"components": [{
					"components": [{
						"internalType": "enum ItemType",
						"name": "itemType",
						"type": "uint8"
					}, {
						"internalType": "address",
						"name": "token",
						"type": "address"
					}, {
						"internalType": "uint256",
						"name": "identifier",
						"type": "uint256"
					}, {
						"internalType": "uint256",
						"name": "amount",
						"type": "uint256"
					}, {
						"internalType": "address payable",
						"name": "recipient",
						"type": "address"
					}],
					"internalType": "struct ReceivedItem",
					"name": "item",
					"type": "tuple"
				}, {
					"internalType": "address",
					"name": "offerer",
					"type": "address"
				}, {
					"internalType": "bytes32",
					"name": "conduitKey",
					"type": "bytes32"
				}],
				"internalType": "struct Execution[]",
				"name": "executions",
				"type": "tuple[]"
			}],
			"stateMutability": "payable",
			"type": "function"
		}],
		params: {
			orders: orders,
			fulfillments: fulfillments
		},
	}
	await Moralis.executeFunction(options)
}

there should be a way to do it, you can use ethers directly if it is easier for you

Make sure your wallet is on the right chain for this contract (0x00000000006c3852cbef3e08e8df289169ede581).

Also try executing the function on Etherscan with your parameters to make sure it can go through.

And you need to double check each address that you use.