> For the complete documentation index, see [llms.txt](https://docs.metatrust.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.metatrust.io/docs-zh/getting-started/getting-started-with-metascan/add-projects.md).

# 添加项目

**扫描项目前需要先添加项目，项目要求：**

必须包含完整的文件：合约(如：contracts), 框架配置(如：hardhat.config.js)、依赖声明(如：package.json)等，并且删除node\_modules、build 目录等中间文件，才能保证编译成功扫描成功。 如下图：

<figure><img src="/files/Dh3mTQiUhZEaekzDCRmr" alt=""><figcaption></figcaption></figure>

框架目前支持：Solidity、Hardhat、Truffle、Foundry、Brownie、Embark、Etherlime、Waffle。

**添加项目方式有三种：**

<figure><img src="/files/spc3S4FquqoODlf1Vx24" alt=""><figcaption></figcaption></figure>

\
**第一种：从GitHub仓储库添加**&#x20;

需要授权仓储库账号，并且选择私有库还是公共库，关联成功后，可以勾选需要导入的项目。如果想取消关联的账号，或者切换公有/私有库需要在“Integration ”中修改。

<figure><img src="/files/HjwE2ByT4S4nWxA1bzs4" alt=""><figcaption></figcaption></figure>

\
**第二种：添加公共仓库Public Repository的地址**&#x20;

把地址粘贴到Repository URL里，目前主要支持github的公共仓库，格式：[https://github.com/xxxxxx/](https://github.com/emptysetsquad/dollar)xxxx

<figure><img src="/files/5dv2d2AHrAmT6x2C7U89" alt=""><figcaption></figcaption></figure>

**第三种：上传本地项目（Upload Files）**

把需要扫描的完整项目，打包成zip文件

<figure><img src="/files/YXkSxKhB352wUW4ZaxVP" alt=""><figcaption></figcaption></figure>

其他说明：

1. 如果不需要配置扫描参数，可以勾选“Start scan after project creation”，项目添加成功后会自动开始扫描。

<figure><img src="/files/YwZQqhm8uIVeEo9Qpkoj" alt=""><figcaption></figcaption></figure>

2. 当前如果没有合适的项目，可以先点击示例项目（Add Sample Projects），进行演示。

<figure><img src="/files/TPn2rKulhqFG2nMkg9bV" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/lJlIhkk14XIIbX0v0yqE" alt=""><figcaption></figcaption></figure>

<br>
