Skip to content
    Back to all Bounties

    Earn 1,890 ($18.90)

    Time Remainingdue 2 years ago
    Canceled

    Get this NodeJS file working! Instadapp Uniswap Swap + Simulate Transaction - Update: The bounty remain up until working code is posted

    AskProgrammers
    AskProgrammers
    Posted 2 years ago

    Bounty Description

    Problem Description

    Here's the gist: https://gist.github.com/n2nco/eabb6765ffbe895cfa8e2449fce40e2d
    Need to fix this file! Getting error "execution reverted" when running this!

    This file (gist) attempts to use instadapp's dsa-connect to do a uniswap swap.
    Then it attempts to simulate that transaction using alchemy (currently commented out).

    Acceptance Criteria

    Fix this gist's express route to:

    1. perform a DefiSmartAccount (DSA) uniswap swap based on the inputs in the req
    2. & also have this simulate the transaction using the alchemy api call

    This route should return:

    1. uniswap broadcasted spell tx hash 2) the unsigned transaction 3) the alchemy tx preview response

    Ideally this should work on whichever chainid (e.g. 1 = mainnet, 137 = polygon, 5 = goerli testnet) is passed in. Input token address e.g. UNI, and output token address (e.g. USDC) should also be passed in through the req.

    If you post a repl or gist that works I'll accept the 1st answer I see!

    Any questions or clarifications email me at askprogrammers@gmail.com - if your code works well (e.g. dynamic based on args passed in) I'm open to contracting more interesting work to you!

    Technical Details

    Typescript or JS works for me - whichever you prefer.
    You'll need an alchemy api key (free & easy to obtain), and some type of crypto account to test this file out.

    Link to Project

    https://gist.github.com/n2nco/eabb6765ffbe895cfa8e2449fce40e2d