Skip to content

Releases: trader-xyz/nft-swap-sdk

v0.20.0 - 128bit order nonces

07 Apr 03:35
Compare
Choose a tag to compare

(Somewhat) Breaking change: Now building orders default to 128bit numbers as nonces. Previously was using hex strings as nonces.

v0.19 - Helper functions for v4 orders

03 Apr 15:49
Compare
Choose a tag to compare

Adds a bunch of useful utility/helper functions for working with 0x v4 assets and orders.

Changeset:

  • Adds typedoc documentation for all public functions in NftSwapV4 class
  • getMakerAsset function added
  • getTakerAsset function added
  • validateSignature function added
  • fetchBalanceForAsset function added
  • checkOrderCanBeFilledMakerSide function added
  • checkOrderCanBeFilledTakerSide function added
  • getErc20TotalIncludingFees function added
  • Adds tests for all convenience functions

v0.18.0 Bug fixes + dependency updates

25 Mar 05:35
Compare
Choose a tag to compare
  • Updates to TypeChain v8
  • Handle buying NFT with ETH (or native token) better (bugfix-ish)
  • Better order building guard rails (e.g. an NFT sell [i.e. NFT as the taker asset] order cannot use ETH.

v0.16.2 Fixes 0x v4 ERC1155 NFT fill order arguments

19 Mar 00:33
Compare
Choose a tag to compare

v0.16.1 - Fix V4 ERC1155 signatures

18 Mar 04:52
Compare
Choose a tag to compare

Fixes V4 ERC1155 signatures w/ EIP712 typed data.

v0.16.0 - 0x v4 multichain support

14 Mar 05:06
Compare
Choose a tag to compare

🎉 Enables multichain support for 0x v4. 🎉

Swap SDK v4 now supports Ethereum Mainnet, Polygon, Optimism, BSC, Fantom, and Celo, and Ropsten Testnet.

Arbitrum support coming soon.

Note: No breaking changes; Just wanted to increment to pin the multichain contract versions.

PRs:
#36

v0.15.2 Fixes 0x v3 `verifyOrderSignature` fn to validate correctly

12 Mar 04:23
Compare
Choose a tag to compare

Previously there would be a mismatch between 0x order signature and the type data signature (and the verifyOrderSignature would return false despite an order signature being valid). Now we use ethers to standardize the signature type and compare signatures from there, so any kind of signature passed should work. Special thanks to @rahuldamodar94 for reporting.

v0.15 - Expose SwapSdkV4 types

01 Mar 02:17
Compare
Choose a tag to compare

Feature request: #31
PR: #32

Note: This is technically a breaking change because some types were renamed. If you have types that suddenly don't work, add V3 or V4 to the end of them. This release specifies the SDK version of these types since we have two versions (v3 and v4) in the codebase at one time. (e.g. SwappableAsset -> SwappableAssetV4)

v0.14 0x v4 Mainnet support

28 Feb 21:27
Compare
Choose a tag to compare

🎉 Official mainnet support for Swap SDK is now live 🎉

v0.13 Orderbook support

28 Feb 21:25
Compare
Choose a tag to compare

Overview

Adds official hosted orderbook support for all supported 0x v4 chains.

Save Order

To save an order to the hosted orderbook:

await nftSwapSdk.saveOrder(signedOrder);

Fetch orders

// Search the orderbook for all offers to sell this NFT (CryptoCoven #9757)
const orders = await nftSwap.getOrders({
  nftToken: "0x5180db8f5c931aae63c74266b211f580155ecac8",
  nftTokenId: "9757",
  sellOrBuyNft: "sell", // Only show asks (sells) for this NFT (excludes asks)
});
 
// Or search by unique nonce
const orders = await nftSwap.getOrders({
  nonce: "0x31f42841c2db5173425b5223809cf3a38fede360",
});

https://docs.swapsdk.xyz/0x-v4/hosted-orderbook (Comprehensive docs forthcoming)

Relevant links:

All orders: https://api.trader.xyz/orderbook/orders
Status page: https://status.trader.xyz
Example from ETHDenver workshop: https://slides.com/johnj/nft-workshop#/40/0/6