Skip to main content
Looking for Contributors! This Skill needs an implementation.Contributing a Skill involves:
  1. Writing a reference implementation with full functionality
  2. Adding comprehensive tests
  3. Writing documentation with usage examples
See the ethers-provider Skill for an example of a complete Skill implementation.Interested? Open an issue or PR at github.com/evmts/voltaire.
Skill — Copyable reference implementation. Use as-is or customize. See Skills Philosophy.
Create and fulfill NFT orders using OpenSea’s Seaport protocol.

Planned Implementation

Create Order

import { Seaport } from './Seaport.js';

const seaport = Seaport({
  provider,
  seaportAddress: SEAPORT_ADDRESS,
});

// List NFT for sale
const order = await seaport.createOrder({
  offer: [{
    itemType: 2, // ERC721
    token: NFT_ADDRESS,
    identifier: tokenId,
  }],
  consideration: [{
    itemType: 0, // ETH
    amount: parseEther('1'),
    recipient: sellerAddress,
  }],
  signer,
});

Fulfill Order

// Buy NFT
await seaport.fulfillOrder({
  order,
  signer,
  value: parseEther('1'),
});

// Fulfill with criteria (trait-based orders)
await seaport.fulfillAdvancedOrder({
  order,
  criteriaResolvers: [{
    identifier: specificTokenId,
    proof: merkleProof,
  }],
  signer,
});

Collection Offers

// Make offer on any NFT in collection
const order = await seaport.createOrder({
  offer: [{
    itemType: 1, // ERC20
    token: WETH,
    amount: parseEther('0.5'),
  }],
  consideration: [{
    itemType: 4, // ERC721 with criteria
    token: NFT_ADDRESS,
    identifier: 0,
    criteria: collectionMerkleRoot,
    recipient: buyerAddress,
  }],
  signer,
});

Resources

  • permit — Gasless approvals