v6.0.0 #1013
JoshuaSchmidt-OpenSea
announced in
Announcements
v6.0.0
#1013
Replies: 2 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Overview
The SDK contained a lot of legacy code from deprecated dependencies and pre-Seaport contracts. OpenSea audited every dependency, function, and utility in the codebase to delete as much code as possible.
Now, this SDK will be focused on functions and convenience wrappers for 2 use cases:
Provider Consistency
In previous versions, the SDK had a random mix of Web3 and ethers usage. Now, the SDK has created consistency by only using ethers. This makes instantiating an instance of the SDK much simpler. As a read-only example:
Big Number Consistency
The SDK had a random mix of
bignumber.js,BN.js, andethers.BigNumberwith many utility functions to convert between the various types. This system was ripe for hidden, uncaught bugs. Now, the SDK only usesethersbuilt in BigNumber.For more information on this type see the Ethers BigNumber documentation.
Naming Changes
Types
Functions
Initial Config
There was a config called
networkNamewhich has been renamed tochainPublic Functions Removed
These functions were a mix of broken, deprecated, or rarely used. If anything was removed that was heavily relied upon by the web3 ecosystem, make sure to comment in the discussions for this release. OpenSea is open to adding back functions that the community needs if there is sufficient support for it and no better alternative.
Wyvern Functions
The following functions still existed in the code base from the legacy Wyvern functions and are now removed.
Deprecated
The following functions were previously marked as deprecated and are now removed.
_computeGasPriceWrapped NFTs
Utility functions existed in the SDK for wrapping NFTs into their corresponding WrappedNFT ERC20 tokens, purchasing Wrapped NFTS, and liquidating NFTs. If users still have a need for these types of transactions, they should learn to use the Uniswap API.
Utility/Convenience Functions
These methods were superfluous and have been removed.
getBalanceprovider.getGasPrice()Additionally, these methods were wrappers on Seaport and can still be called by using
sdkInstance.seaport_v1_5Renamed Functions and Properties
API_KEYrenamed toOPENSEA_API_KEYNetworkenum renamed toChainapiConfig.networkNamerenamed toapiConfig.chainIntegration Tests
Integration test coverage has been dramatically improved. As of now, the integration tests include:
For more information on integration tests, see the README
Dependencies Removed
By removing the following dependencies, the package size was reduced by XX%.
There are now only 3 dependencies left! From 15 in opensea-js v5.
Compilation Target & Browser Build
The compilation target has been bumped from
es5toes6and a browser build is now outputted tolib/bundle.js.TypeScript Compiler Config
esModuleInteropandallowSyntheticDefaultImportsare now disabled by default. See reasoning here: https://www.semver-ts.org/#module-interopThis discussion was created from the release v6.0.0.
Beta Was this translation helpful? Give feedback.
All reactions