[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 服务器)的示例:.env
appId
serverUrl
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]