HUMCOIN / Marketplace

0 stars 0 forks source link

Contract recieves DAI #3

Open cbrzn opened 4 years ago

cbrzn commented 4 years ago

We must implement the function that makes a trade between Ether and DAI.

This was asked on: https://chat.makerdao.com/channel/dev

cbrzn
4:20 PM
Hello guys! I'm trying to integrate DAI to my dapp and i'm having some troubles
- I'd like to send ETH to my smart contract
- When it receives the Ether, interact with the DAI's contract to create a 'vault' so the contract will now own DAI instead of ether

I would like to know how can I make my contract create this Vault or CDP so it can own DAI

Then, i'd like to withdraw it, but I got that from this tutorial: https://github.com/makerdao/developerguides/blob/master/dai/dai-in-smart-contracts/README.md

github.com
makerdao/developerguides
Developer guides to integrate with MakerDAO's smart contracts, SDKs, APIs, products, and partners - makerdao/developerguides

nik
5:45 PM
i think you just want to trade ETH into DAI rather than open up a vault.
cbrzn commented 4 years ago

I found this documentation: https://docs.uniswap.io/smart-contract-integration/interface

Based on this task: https://github.com/daostack/Ecosystem/issues/2 @namesty