Giter Club home page Giter Club logo

uniswapx-service's Introduction

UniswapX Service

Unit Tests

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.

Getting Started

  1. Install and build the package

    yarn && yarn build
    
  2. 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://...
    
  3. (optional) To run dynamo-db integration tests, you need to have Java Runtime installed (https://www.java.com/en/download/manual.jsp).

Integration Tests

  1. Deploy your API using the intructions above.

  2. Add your API url to your .env file as UNISWAP_API

    UNISWAP_API='<YourUrl>'
    
  3. Run the tests with:

    yarn integ-test
    

Development Cycle

To test your changes you must redeploy your service. The dev cycle is thus:

  1. 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=<>
  1. yarn build && cdk deploy GoudaServiceStack

  2. yarn integ-test

  3. If failures, look at logs in Cloudwatch Insights

  4. Repeat

Order Notification Schema

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,
}

uniswapx-service's People

Contributors

rileydcampbell avatar conjunctivenormalform avatar zhongeric avatar marktoda avatar raghava-pamula avatar willpote avatar dannydaniil avatar dankurka avatar weishuaiyang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.