Need direction and some help with 1inch integration

Hello all!

I am currently working on a Dapp in which I plan on integrating 1inch.
Here is the idea/problem

  • It will be an NFT platform on polygon
  • Most NFT platforms need the seller to price their art in Eth and the buyer to buy the art in Eth.
  • I want the seller to be able to price their art in any token that they want
  • I want the buyer to buy the art in any token that they want.

Proposed solution:

  • Integrate 1inch
  • Seller uploads NFTs as in Rarible (Rarible clone from youtube tutorial that I have done)
  • Seller enters the price of art in token of choice (example: 12 Quick Tokens)
  • Buyer likes the art but only has for example Matic and DFyn tokens.
  • Buyer decides to buy the art using DFyn (DFyn is exchanged for 12 Quick tokens via 1inch and sent to seller’s wallet address, NFT ownership is transferred to buyer).

My current issue/roadblock, NEED GUIDANCE!

  • I have researched and found that the swapping function and quote function with respect to 1inch is within this contract:
    But can’t find the contract address on testnet for this. (I plan on using Ropsten for testing).
  • There also exists the 1inch API that could possibly make a lot of this a lot smoother.
    (API doesn’t seem to work on testnet.) … This might also be less secure? Ideally I would assume that it would be the safest for the token transfers to happen on the smart contract level with require/assert statements to make sure that all transactions have taken place correctly and reverting otherwise. I see a higher likelihood for problems using APIs maybe?

Has anyone here integrated 1inch into their Dapps? I would love to hear about how you guys went about integrating it and also if you could share some advice as to how to go about implementing this.

Thank you!

1 Like

Hey @Rishi, hope you are well.

I was not able to find that contract in ropsten neither, the API apparently is available only through the main network. Anyway i could be wrong, let me know if you find something else :nerd_face:

Also you should check this article which basically have all the information need it to integrate 1inch and moralis

Carlos Z