Deposit mDAI into the decentralized application and yield DAPP, a reward token. This is based on the pricinciple of yield farming, which is popular in DeFi today.
- React
- Node
- Solidity
- DAI
- Dapp token
- TokenFarm
truffle console
> tokenFarm = await TokenFarm.deployed()
> tokenFarm.address
# Check mDai balance
> mDai = await DaiToken.deployed()
# get accounts
> accounts = await web3.eth.getAccounts()
> balance = await mDai.balanceOf(accounts[1])
> balance.toString()
'100000000000000000000'
> formattedBalance = web3.utils.fromWei(balance)
truffle compile
truffle migrate --reset
Error
Error: Could not find
import from any sources; imported from /Users/kunal/dev/eth/defi_tutorial/src/contracts/TokenFarm.sol
Solution: use Semicolors (;
) after lines of solidity code
truffle test