Giter VIP home page Giter VIP logo

ldo_coin's Introduction

新手教程

这个代币提供了一种增加论坛活跃度的方法,用户可以在平台上发布对于某个帖子的评论任务,设置此次任务的 LDO 代币奖励,别的用户可以通过评论完成任务,领取 LDO 代币奖励

  1. 在各大插件商店安装 meta mask,这个工具用于和区块链进行交互
  2. 前往 https://sepolia-faucet.pk910.de/ 挖一些 sepolia 以太坊代币(只是模拟挖矿),用作交易 gas 费(因为只能使用 sepolia 以太坊作为 gas 费)
  3. 在 meta mask 手动切换为测试网络 sepolia
alt text alt text
4. 手动导入 LDO 代币,点击 import tokens,输入合约地址:0x90b6Aa21eBC98D525fe6e6Ae2CA7089fCAD89857 5. 进入 LDO 网站 https://www.coinuxdo.me/ 连接钱包,开始使用(okx 钱包似乎有问题,建议 metamask) 6. 添加任务说明: description 填写帖子连接,reward 填写奖励,quantity 填写需要的评论数量(未测试),点击提交 7. 视频教程 https://www.bilibili.com/video/BV1Yx421Q7tk 8. 这是一个[开源项目](https://github.com/14790897/ldo_coin),前端为 next,数据库为 supabase,使用 hardhat 作为智能合约开发工具,部署在测试网 sepolia,未进行非法集资

Quick start

The first things you need to do are cloning this repository and installing its dependencies:

git clone https://github.com/NomicFoundation/hardhat-boilerplate.git
cd hardhat-boilerplate
npm install

Once installed, let's run Hardhat's testing network:

npx hardhat node

Then, on a new terminal, go to the repository's root folder and run this to deploy your contract:

npx hardhat run scripts/deploy.js --network localhost

在 sepolia 测试网部署

npx hardhat run scripts/deploy.js --network sepolia

Finally, we can run the frontend with:

cd frontend
pnpm install
pnpm dev

Last but not least, you can gain some test token:

npx hardhat --network localhost faucet  <your-metamask-address>

Open http://localhost:3000/ to see your Dapp. You will need to have Coinbase Wallet or Metamask installed and listening to localhost 8545.

meta mask 添加本地测试链

http://127.0.0.1:8545 链 ID: 31337 alt text

获得所有测试账户

进入控制台

npx hardhat console

const accounts = await ethers.getSigners();
console.log("Accounts:", accounts.map(account => account.address));

User Guide

You can find detailed instructions on using this repository and many tips in its documentation.

For a complete introduction to Hardhat, refer to this guide.

What's Included?

This repository uses our recommended hardhat setup, by using our @nomicfoundation/hardhat-toolbox. When you use this plugin, you'll be able to:

This project also includes a sample frontend/Dapp, which uses Create React App.

Troubleshooting

  • Invalid nonce errors: if you are seeing this error on the npx hardhat node console, try resetting your Metamask account. This will reset the account's transaction history and also the nonce. Open Metamask, click on your account followed by Settings > Advanced > Clear activity tab data.

Setting up your editor

Hardhat for Visual Studio Code is the official Hardhat extension that adds advanced support for Solidity to VSCode. If you use Visual Studio Code, give it a try!

Getting help and updates

If you need help with this project, or with Hardhat in general, please read this guide to learn where and how to get it.

For the latest news about Hardhat, follow us on Twitter, and don't forget to star our GitHub repository!

Happy building!

ldo_coin's People

Contributors

14790897 avatar imgbotapp avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar lu1020456 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.