Blockchain Tutorial for Beginners | Build a DeFi App (Ethereum, Solidity, Web3.js & Truffle)

Dapp University · 336K views · 2020 · 2:29:05

Open on YouTube

Web developmentDistributed systemsSoftware practice, open source & careerstutorialdated

Why Ethereum Stack Exchange recommends it

Ethereum Stack Exchange users cite it as the tutorial they are following when they hit Truffle errors, and some also recommend it for learning Truffle unit testing with Mocha and Chai.

Recommended by 1 people across 1 different months, 2021 to 2022.

What it is

A 2.5-hour beginner tutorial from Dapp University that builds a DeFi token-farming app step by step using Solidity, Truffle, Ganache, Web3.js and a React front end. It covers writing the smart contracts, testing them with Mocha and Chai, staking and issuing tokens, and wiring up the UI.

What people said

Recommends RocketTwitch · 2021-05 · Ethereum Stack Exchange · on “How to properly write Solidity unit tests?”

I'm relatively new to this but from all the tutorials I've seen with respect truffle and unit testing, they all tend to use the Mocha and Chai testing framework. I would recommend looking into those two libraries. There's lots of tutorials on them online. Take a look at this tutorial from DAPP University. He does a pretty good explanation of how to use the libraries for testing. (Unit testing starts around the 47 minute mark) [LINK] There are several out there so feel free to use a different one. In all the tutorials I've watched I can't recall ever seeing someone put a unit test directly into a solidity smart contract. Normally they're either a javascript file or python file that interacts

Cites Subsistence · 2021-01 · Ethereum Stack Exchange · on “Cannot find module react-bootstrap/lib/Breadcrumb”

I'm trying to figure out an issue with this tutorial that i'm following, whenever I try to use truffle test within the CMD in the defi-tutorial folder, it comes up with the issue in the header, cannot find module react-bootstrap/lib/breadcrumb. Here is the tutorial that i'm following: [this video] The time of the error i'm experiencing is what he's doing at around 53:30 Here is the code i'm currently typing: require("chai") .use(require("chai-as-promised")) .should() contract("TokenFarm", (accounts) => { //Write tests here... describe("Mock DAI deployment", async () => { it("has a name", async () => { let daiToken = await DaiToken.new() const name = await daiToken.name() assert.equal(name, "Mock

Cites BlackH3art · 2021-11 · Ethereum Stack Exchange · on “Invalid EVM version requested & Error: Truffle is currently using solc 0.5.0”

I'm starting to learn solidity with Dapp University guide on youtube, and as soon as 20th minute of this guide I'm running into problem with Truffle compiling. I cloned this repository: git clone -b starter-code [LINK] ./ And this is YT link to this tutorial: [this video] Truffle config on this guide looks like this: require('babel-register'); require('babel-polyfill'); module.exports = { networks: { development: { host: "127.0.0.1", port: 7545, network_id: "*" // Match any network id }, }, contracts_directory: './src/contracts/', contracts_build_directory: './src/abis/', compilers: { solc: { optimizer: { enabled: true, runs: 200 }, evmVersion: "petersburg" } } } And at this point in the guide, c

Cites crevulus · 2021-12 · Ethereum Stack Exchange · on “Truffle's artifact is undefined when running truffle migrate”

I'm trying to run truffle migrate on two js files: 1_initial_migration.js and 2_deploy_contracts.js . I can successfully compile my .sol files to .json ABIs but then when I try to migrate I get the following error: const Migrations = artifacts.require("Migrations"); ^ TypeError: Cannot read property 'require' of undefined Here's how I've utilised artifacts in my js files: const { artifacts } = require("truffle"); const Migrations = artifacts.require("Migrations"); truffle version results are as follows: Truffle v5.1.39 (core: 5.1.39) Solidity v0.5.16 (solc-js) Node v14.16.0 Web3.js v1.2.1 Also I'm following this course on youtube [this video] . I've seen a couple of posts about changing solitidy

Cites David Jay · 2022-01 · Ethereum Stack Exchange · on “Why stake tokens function it is not working (solidity/react)?”

Yes fTokens is an instance of FarmTokens, I've also tried to debug stakeTokens using error listeners but I got an error only when I declined the transaction from metaMask. The dapp I'm creating is from this tutorial " [this video] " and I got a stack in the timing of 2:21:27, In order to see more about my code please check out my repo" [LINK] ". Thanks a lot