Bouncyknighter / DEX-0x

0 stars 0 forks source link

Connect A Frontend UI With The 0x-API #1

Open Bouncyknighter opened 3 years ago

Bouncyknighter commented 3 years ago

Description Overview: Connect one of the following UI frontend repos in mainnet environment:

to the 0x-API https://0x.org/docs/api#swap and https://0x.org/docs/guides/swap-tokens-with-0x-api with the following additional aspects: pass feeRecipient=0xYOUR_ETH_ADDRESS&buyTokenPercentageFee=PERCENTAGE_FEE_0_to_1 as additional query parameters to /swap/v1/quote endpoint.

Set also the 0x-API contract addresses and packages (https://github.com/0xProject/protocol) where needed to achieve the abovementioned functionality on the mainnet.

Description: Steps of swap functionality: The functionality of below listed swap process steps are already included in the four frontend UI repos. These may vary depending which repo you choose. The 0x-API should be connect to all aspects of the swap process.

Users who visit the swap are prompted to connect to their wallets and to the Ethereum mainnet if they aren't already.

Connect site to wallet : Therefore connecting of the site to the wallet should be seamless on both the desktop and mobile.

Choose from your wallet the token you want to swap.

Then choose from the list the token you want to swap to.

Set slippage: here adhere to the % range provided by the frontend repo you choose.

Custom gas price setting: If provided by the repo you choose, then include it.

"Approve": Confirm the allowance approval

Review order

Place order : Rate and estimated fees are displayed.

Confirm in wallet.

Receipt = link to Etherscan transaction details page.

If there is an error the user gets an error message.

Acceptance of work Proof that the work has been done completely and successfully is given by testing the frontend on the mainnet. This is done by conducting a swap and having the set % buyTokenPercentageFee arriving on the feeRecipientAddress.

Contact In case you have any questions, feel free to reach out by email info@bitmongol.com or by Telegram @bitmongol

Bouncyknighter commented 3 years ago

Hello, guys thanks for visiting by!