eth.build 快速上手 | Web3.0 dApp 开发(一)
Eth.build 是一个聚焦于 Web3.0 的教育型沙盒,具备如下特性——无代码拖拽式编程完全开源可视化地直观地理解以太坊的工作方式主页地址: https://eth.build/ Youtube 学习频道: https://www.youtube.com/playlist?list=PLJz1HruEnenCXH7KW7wBCEBnBLOVkiqIi Repo 地址: https://github.com/austintgriffith/eth.buildEth.build 极速上手加载现成的教学案例点击「learn more」,会弹出很多现成的教学案例,可点击按钮进行加载或查看教学视频!image-20210917102528583image-20210917102633107image-20210917102938705基础操作实践:以以太坊余额抓取为例image-20210917104531017这是一个简单的例子,实现了从以太坊抓取余额的功能。 我们可以通过这个例子来学习eth.build的使用。STEP 0x01. 创建 Text Block通过INPUT>TEX...
Web3.0 dApp Developer Growth Path | Web3.0 dApp Dev 0x02
web3_growth_pathAuthors’ Information:leeduckgo xiaoyue
eth.build 快速上手 | Web3.0 dApp 开发(一)
Eth.build 是一个聚焦于 Web3.0 的教育型沙盒,具备如下特性——无代码拖拽式编程完全开源可视化地直观地理解以太坊的工作方式主页地址: https://eth.build/ Youtube 学习频道: https://www.youtube.com/playlist?list=PLJz1HruEnenCXH7KW7wBCEBnBLOVkiqIi Repo 地址: https://github.com/austintgriffith/eth.buildEth.build 极速上手加载现成的教学案例点击「learn more」,会弹出很多现成的教学案例,可点击按钮进行加载或查看教学视频!image-20210917102528583image-20210917102633107image-20210917102938705基础操作实践:以以太坊余额抓取为例image-20210917104531017这是一个简单的例子,实现了从以太坊抓取余额的功能。 我们可以通过这个例子来学习eth.build的使用。STEP 0x01. 创建 Text Block通过INPUT>TEX...
Web3.0 dApp Developer Growth Path | Web3.0 dApp Dev 0x02
web3_growth_pathAuthors’ Information:leeduckgo xiaoyue
Share Dialog
Share Dialog

Subscribe to leeduckgo

Subscribe to leeduckgo
<100 subscribers
<100 subscribers
Scaffold-eth is a template for Ethereum dApp, and a combination of the best dApps. Scaffold-eth can help developers build app with efficiency and less bugs. It is a great resource for beginner developers of web3.0 dApp.
Scaffold-eth has the following components:
hardhat: run local Ethereum network to deploy and test smart contract
React: build front end with preset UI components and functional hooks
Ant: build customized UI and use Bootstrap or other libraries for front end
Surge: deploy and publish projects
Tenderly / The Graph / Etherscan / Infura / Blocknative...
Supports for L2 / Sidechains
Scafford Eth is based on Node.js, so you need to install node.js and yarn.
Fetch scaffold source code
git clone https://github.com/austintgriffith/scaffold-eth.git
Open up 3 terminals
TIPS: Many Terminal app supports split screen feature.
run 👷 Hardhat chain in the first terminal:
cd scaffold-eth
yarn install
yarn chain

deploy the smart contract at /scaffold-eth/packages/hardhat/contracts/ in the second terminal:
cd scaffold-eth
yarn deploy

run front end app in the third terminal:
cd scaffold-eth
yarn start

The sample contract under main branch stores and read the values. You can find the contract at /scaffold-eth/packages/hardhat/contracts/ and modify it then redeploy.
TIPS:
If you are interested in other contracts, you can checkout other branch to deploy different Dapp services. switchable branches with different contracts for example nft contract branch https://github.com/scaffold-eth/scaffold-eth/tree/simple-nft-example
Back to the previous process. Now we have our contract deployed and front end and local chain network running.
Below is the code of the deployed contract.
pragma solidity >=0.8.0 <0.9.0;
//SPDX-License-Identifier: MIT
import "hardhat/console.sol";
//import "@openzeppelin/contracts/access/Ownable.sol"; //https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
contract YourContract {
//event SetPurpose(address sender, string purpose);
string public purpose = "Building Unstoppable Apps!!!";
constructor() {
// what should we do on deploy?
}
// Storing purpose varible
function setPurpose(string memory newPurpose) public {
purpose = newPurpose;
console.log(msg.sender,"set purpose to",purpose);
//emit SetPurpose(msg.sender, purpose);
}
}
The contract sets a public string variable purpose. The default value for purpose is "Building..." It also provides a setPurpose method to modify the purpose variable.
We built our Dapp with the scaffold scaffold-eth. Using hardhat, we can deploy local test network, switch networks and deploy your contracts in any networks. Here is the Quickstart for scaffold-eth.
Author: Core member of Nonce Geek Studio.
Contact the author:
WeChat: thf056 QQ: 1290017556 Email: 1290017556@qq.com
Github: https://github.com/99kies
Translater:
Scaffold-eth is a template for Ethereum dApp, and a combination of the best dApps. Scaffold-eth can help developers build app with efficiency and less bugs. It is a great resource for beginner developers of web3.0 dApp.
Scaffold-eth has the following components:
hardhat: run local Ethereum network to deploy and test smart contract
React: build front end with preset UI components and functional hooks
Ant: build customized UI and use Bootstrap or other libraries for front end
Surge: deploy and publish projects
Tenderly / The Graph / Etherscan / Infura / Blocknative...
Supports for L2 / Sidechains
Scafford Eth is based on Node.js, so you need to install node.js and yarn.
Fetch scaffold source code
git clone https://github.com/austintgriffith/scaffold-eth.git
Open up 3 terminals
TIPS: Many Terminal app supports split screen feature.
run 👷 Hardhat chain in the first terminal:
cd scaffold-eth
yarn install
yarn chain

deploy the smart contract at /scaffold-eth/packages/hardhat/contracts/ in the second terminal:
cd scaffold-eth
yarn deploy

run front end app in the third terminal:
cd scaffold-eth
yarn start

The sample contract under main branch stores and read the values. You can find the contract at /scaffold-eth/packages/hardhat/contracts/ and modify it then redeploy.
TIPS:
If you are interested in other contracts, you can checkout other branch to deploy different Dapp services. switchable branches with different contracts for example nft contract branch https://github.com/scaffold-eth/scaffold-eth/tree/simple-nft-example
Back to the previous process. Now we have our contract deployed and front end and local chain network running.
Below is the code of the deployed contract.
pragma solidity >=0.8.0 <0.9.0;
//SPDX-License-Identifier: MIT
import "hardhat/console.sol";
//import "@openzeppelin/contracts/access/Ownable.sol"; //https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
contract YourContract {
//event SetPurpose(address sender, string purpose);
string public purpose = "Building Unstoppable Apps!!!";
constructor() {
// what should we do on deploy?
}
// Storing purpose varible
function setPurpose(string memory newPurpose) public {
purpose = newPurpose;
console.log(msg.sender,"set purpose to",purpose);
//emit SetPurpose(msg.sender, purpose);
}
}
The contract sets a public string variable purpose. The default value for purpose is "Building..." It also provides a setPurpose method to modify the purpose variable.
We built our Dapp with the scaffold scaffold-eth. Using hardhat, we can deploy local test network, switch networks and deploy your contracts in any networks. Here is the Quickstart for scaffold-eth.
Author: Core member of Nonce Geek Studio.
Contact the author:
WeChat: thf056 QQ: 1290017556 Email: 1290017556@qq.com
Github: https://github.com/99kies
Translater:
No activity yet