UniswapX Service is an API to propagate signed, executable UniswapX orders. Swappers can post their signed orders which can be fetched by fillers for execution.
-
Install and build the package
yarn && yarn build
-
To deploy the API to your AWS account run:
cdk deploy GoudaServiceStack
Once complete it will output the url of your api:
GoudaServiceStack.Url = https://...
-
(optional) To run dynamo-db integration tests, you need to have Java Runtime installed (https://www.java.com/en/download/manual.jsp).
-
Deploy your API using the intructions above.
-
Add your API url to your
.env
file asUNISWAP_API
UNISWAP_API='<YourUrl>'
-
Run the tests with:
yarn integ-test
To test your changes you must redeploy your service. The dev cycle is thus:
- Make code changes. Make sure all env variables are present in the .env file:
FAILED_EVENT_DESTINATION_ARN=<>
RPC_5=<>
# Only need these if testing against custom contract deployments
DL_REACTOR_TENDERLY=<>
QUOTER_TENDERLY=<>
PERMIT_TENDERLY=<>
-
yarn build && cdk deploy GoudaServiceStack
-
yarn integ-test
-
If failures, look at logs in Cloudwatch Insights
-
Repeat
Depending on the filler preferences, the notification webhook can POST orders with a specific exclusive filler address or all new orders. The following schema is what the filler execution endpoint can expect to receive.
{
orderHash: string,
createdAt: number,
signature: string,
offerer: string,
orderStatus: string,
encodedOrder: string,
chainId: number,
quoteId?: string,
filler?: string,
}