-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: bulk listing creation from orderbook SDK #1885
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, a few thoughts that are not blocking
@@ -9,3 +10,26 @@ export function getOrderComponentsFromMessage(orderMessage: string): OrderCompon | |||
|
|||
return orderComponents; | |||
} | |||
|
|||
export function getBulkOrderComponentsFromMessage(orderMessage: string): OrderComponents[] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like bespoke and error prone logic here? Just observation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeh undeniably not ideal - but unfortunately there is no real way around it because of how we expose the signable message to callers, rather than using the inbuilt seaport-js methods
|
||
const domainData = { | ||
name: SEAPORT_CONTRACT_NAME, | ||
version: SEAPORT_CONTRACT_VERSION_V1_5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something we want to put in to a config/env? Especially now that we use it in multiple places, could be easy to forget if we move to 1.6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those constant values are all imported from seaport/constants.ts. If we move versions updating there will modify all the places we create this message
listingParams: orderParams, | ||
}); | ||
|
||
const signatures = await actionAll(actions, offerer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks clean 👍
626fab9
to
188ef04
Compare
5325c1b
to
6628288
Compare
Summary
Implement bulk listing creation from the orderbook SDK. When the bulk listing methods are called with single items, the existing prepareListing and createListing methods are delegated to instead, reducing the impact on enriched confirmations for the majority of users who will not be listing in bulk.
Detail and impact of the change
Added