feat(polymarket): add buildOnly mode for unsigned transactions - Fixes #53#54
Closed
theluckystrike wants to merge 1 commit intopmxt-dev:mainfrom
Closed
feat(polymarket): add buildOnly mode for unsigned transactions - Fixes #53#54theluckystrike wants to merge 1 commit intopmxt-dev:mainfrom
theluckystrike wants to merge 1 commit intopmxt-dev:mainfrom
Conversation
…sactions Adds a buildOnly parameter to CreateOrderParams that when set to true, returns the signed order data without submitting to the network. This enables non-custodial integrations where users can sign and broadcast transactions themselves or route them through on-chain middleware. Fixes #53
Contributor
|
Why did you close this? I was going to merge it into the latest changes and credit you as a co-author! Please reopen, and I will do so! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a
buildOnlyparameter toCreateOrderParamsthat enables a "build only" mode for the Polymarket exchange. WhenbuildOnlyis set totrue, the order is created and signed but NOT submitted to the network. Instead, the signed order data is returned, allowing users to:Changes
core/src/types.ts: AddedbuildOnly?: booleantoCreateOrderParamsinterfacecore/src/exchanges/polymarket/index.ts: ModifiedcreateOrderto check forbuildOnlyflag:buildOnlyis true: callsclient.createOrder()which builds and signs the order but does NOT submit it, returns the order with statuspendingbuildOnlyis false (default): behaves as before, submits the order viacreateAndPostOrder()Usage Example
Contributed by theluckystrike | Zovo — Chrome Extension Studio