Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@opensea/seaport-order-validator
Advanced tools
Seaport Order Validator provides a solidity contract which validates orders and order components via RPC static calls. Seaport Order Validator currently supports validation of orders (not advanced orders) and provides minimal validation for criteria based
Seaport Order Validator provides a solidity contract which validates orders and order components via RPC static calls. Seaport Order Validator currently supports validation of orders (not advanced orders) and provides minimal validation for criteria based items. This is an ongoing effort. The Seaport Order Validator is deployed at the address 0xF75194740067D6E4000000003b350688DD770000
.
There are a variety of functions which conduct micro and macro validations on various components of the order. Each validation function returns two arrays of uint16s, the first is an array of errors, and the second is an array of warnings. For a quick lookup of issue codes, see the issue table.
yarn add @opensea/seaport-order-validator
or npm i @opensea/seaport-order-validator
import { SeaportOrderValidator } from "@opensea/seaport-order-validator"
SeaportOrderValidator
const validator = new SeaportOrderValidator(new ethers.providers.JsonRpcProvider(<RPC>));
SeaportOrderValidator
instanceThere are two macro-validation function, isValidOrder
and isValidOrderWithConfiguration
. isValidOrder
simply calls isValidOrderWithConfiguration
with a default configuration as follows:
{
primaryFeeRecipient = address(0),
primaryFeeBips = 0,
checkCreatorFee = false,
skipStrictValidation = false,
shortOrderDuration = 30 minutes,
distantOrderExpiration = 26 weeks
}
isValidOrderWithConfiguration
validateTime
- Called with variables from configurationvalidateOrderStatus
validateOfferItems
validateConsiderationItems
isValidZone
validateStrictLogic
- if skipStrictValidation is false. Called with the parameters from the configurationvalidateSignature
validateTime
- Validates the timing of the orderdistantOrderExpiration
(distant expiration)shortOrderDuration
(either endTime - startTime or endTime - currentTime)validateOrderStatus
- Validates the order status from on-chain datavalidateOfferItems
- Validates the offer item parameters and balances/approvalNested validation call to validateOfferItem
for each offerItem
validateOfferItem
- Validates the parameters and balances/approvals for one offer itemvalidateOfferItemParameters
and if there are no errors, a subsequent call to validateOfferItemApprovalAndBalance
validateOfferItemParameters
- Validates the parameters for one offer itemItemType
.ItemType
is an ERC721minAmount ≠ maxAmount
.validateOfferItemApprovalAndBalance
- Validates the balances/approvals for one offer itemThere is also a nested validation call to getApprovalAddress
to get the associated conduit for checking approvals.
validateConsiderationItems
- Validate the parameters of the consideration itemsFor each consideration item, there is a nested validation call to validateConsiderationItem
which is just a wrapper for validateConsiderationItemParameters
validateConsiderationItemParameters
- Check the parameters for a single consideration itemisValidZone
- Checks if the zone accepts the ordervalidateStrictLogic
- Validate strict order logicThe first consideration item is called the “primary consideration” for this section.
primaryFeeRecipient
and primaryFeeBips
are non-zero, the second consideration item must be set correctly to the primary fee consideration. This must be omitted if the primary fee would be zero.checkCreatorFee
is set to true, the creator fee engine is checked for royalties on the non-fungible item. If the creator fee is non-zero, the creator fee consideration item must be the next consideration item in the sequence.validateSignature
- Validates the signature using current counterCalls validateSignatureWithCounter
using the offerers current counter
validateSignatureWithCounter
- Validates the signature using the given countergetApprovalAddress
- Gets the approval address for a conduit keysortMerkleTokens
To generate a merkle root for a criteria order, the included token ids must first be sorted by their keccak256 hash. This function sorts accordingly.
getMerkleRoot
includedTokens
MerkleError
is given, elements are not sorted correctly, or there are too many elements.getMerkleProof
includedTokens
at index targetIndex
.FAQs
Seaport Order Validator provides a solidity contract which validates orders and order components via RPC static calls. Seaport Order Validator currently supports validation of orders (not advanced orders) and provides minimal validation for criteria based
The npm package @opensea/seaport-order-validator receives a total of 3 weekly downloads. As such, @opensea/seaport-order-validator popularity was classified as not popular.
We found that @opensea/seaport-order-validator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.