This sets the private key of the account used to deploy the contracts.
这会设置用于部署合约的帐户的私钥。
Build the contracts by running the command:
通过运行命令构建合约:
Deploy the Token contract by running the command:
通过运行命令部署代币合约:
Navigate to the contracts/limit_orders directory and build the Limit Order contract by running the command:
导航到contracts/limit_orders目录并通过运行以下命令构建限价订单合约:
Deploy the Limit Order contract by running the command:
通过运行以下命令部署限价订单合约:
运行前端 (Running the Frontend)
Navigate to the frontend directory and install the required packages by running the command:
导航到frontend目录并通过运行以下命令安装所需的包:
Start the frontend by running the command:
通过运行以下命令启动前端:
This will start the frontend in your default browser.
这将在您的默认浏览器中启动前端。
运行图表数据推送后端 (Running the Chart Data Feed Backend)
Open new terminal
打开新终端
Unfortunately, we do not yet have instructions on how to launch the backend data feed due to the trading view privacy policy. But you can contact us and we will help you launch a lightweight trading view chart.
不幸的是,由于交易视图隐私政策,我们还没有关于如何启动后端数据推送的说明。但是您可以联系我们,我们会帮您推出轻量级交易视图图表。
运行匹配者服务 (Running the Matcher Service)
15.Navigate to the services/matcher directory and create an .env file with the following content:
导航到services/matcher目录并创建一个包含以下内容的.env文件:
This sets the private key of the account used to deploy the contracts.
这会设置用于部署合约帐户的私钥。
Run the Matcher service by running the command:
通过运行以下命令运行 匹配者Matcher 服务:
This will start the Matcher service in your terminal.
这将在您的终端中启动 Matcher 服务。
That's it! You should now have a local Fuel network running with the Token and Limit Order contracts deployed, the frontend running in your browser, and the Matcher service running in your terminal.
To test the frontend, you can connect Alice's or Bob's wallet (which are given at the beginning of this tutorial), they will have ETH on their balance to pay fees
要测试前端,您可以连接 Alice 或 Bob 的钱包(在本教程开头给出),他们的余额中将有 ETH 来支付费用