开源
decentradit:如何构建自己的web3 Ethereum社交网络
来源:元经纪     阅读:452
网站管理员
发布于 2023-05-18 07:56
查看主页

概述

该项目是Ethereum Boilerplate的一个分支,演示了如何构建自己的 Web3 Ethereum 社交网络。该项目当然适用于任何 EVM 兼容的区块链,例如 Polygon、Avalanche、Binance Smart Chain 和其他此类链。

快速开始

[hidecontent type="logged" desc="隐藏内容:登录后可查看"]

克隆或分叉web3-social-network-boilerplate

git clone https://github.com/ethereum-boilerplate/web3-social-network-boilerplate

安装所有依赖项:

cd web3-social-network-boilerplate
yarn install

在主文件夹中重命名.env.example为并提供您和来自 Moralis(如何启动 Moralis 服务器)的示例:.envappIdserverUrl

REACT_APP_MORALIS_APPLICATION_ID = xxxxxxxxxxxx
REACT_APP_MORALIS_SERVER_URL = https://xxxxxx.grandmoralis.com:2053/server

设定你的合同

- Deploy smart contracts from this folder https://github.com/ethereum-boilerplate/web3-social-network-boilerplate/tree/main/smart%20contracts
- Add some categories through the addCategory function.
- Set listeners in the Moralis Server to sync all your contracts events.
- Add your contract address in MoralisDappProvider.js contract address as the default value of the state

运行你的应用程序:

yarn start

[/hidecontent]

 
免责声明:本文为用户发表,不代表网站立场,仅供参考,不构成引导等用途。 开源
华为数字能源2024年规划50套液冷超充解决方案
大厂元宇宙的K型分化:字节VR向下,阿里AR向上
中国插混占世界近85%创历史新高 是美国22倍
6类你以为健康的素菜:其实约等于在“吃油”
2024云栖大会 将是史上汇集AI硬科技最多的一届

首页

分类

定制方案

消息

我的