cancel

nonpayable
Input should be passed in JSON format - Ex: [{ "offerer": "0x...", "zone": "0x...", "offer": [{ "itemType": "0", "token": "0x...", "identifierOrCriteria": "0", "startAmount": "0", "endAmount": "0" }], "consideration": [{ "itemType": "0", "token": "0x...", "identifierOrCriteria": "0", "startAmount": "0", "endAmount": "0", "recipient": "0x..." }], "orderType": "0", "startTime": "0", "endTime": "0", "zoneHash": "0", "salt": "0", "conduitKey": "0", "counter": "0" }]

Use this function in your app

const response = await fetch('https://api.thirdweb.com/v1/contracts/write', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-secret-key': '<YOUR_SECRET_KEY>' }, body: JSON.stringify({ calls: [ { contractAddress: "0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC", method: "function cancel((address offerer, address zone, (uint8 itemType, address token, uint256 identifierOrCriteria, uint256 startAmount, uint256 endAmount)[] offer, (uint8 itemType, address token, uint256 identifierOrCriteria, uint256 startAmount, uint256 endAmount, address recipient)[] consideration, uint8 orderType, uint256 startTime, uint256 endTime, bytes32 zoneHash, uint256 salt, bytes32 conduitKey, uint256 counter)[] orders) returns (bool cancelled)", params: [orders] } ], chainId: 888888888, from: "<YOUR_WALLET_ADDRESS>" }) }); const data = await response.json();