@renegade-fi/external-match-example
v1.1.32
Published
Example of fetching and assembling external matches using Renegade SDK
Keywords
Readme
External Match Example
This example demonstrates how to fetch and assemble an external match.
Setup
- Install dependencies:
pnpm install- Set up environment variables:
cp .env.example .envThen replace the values with your own API key and secret.
- Run the example:
pnpm startWhat's happening?
An external match is a match between an order internal to the darkpool, and an order external to the darkpool. An external party (this script) requests a quote for the order, and assembles the quote into a bundle, if the quote is acceptable. The bundle contains a transaction which may be submitted on-chain to settle the match.
The flow of this example is as follows:
- Get a quote for the order
- Assemble the quote into a bundle
- Submit the bundle to the chain
Note: In-kind gas sponsorship is enabled by default. You can see this by inspecting your resulting TX.
