← 开发者

在 kexify 中使用 Foundry 和 Hardhat

Foundry 和 Hardhat 没有 WalletConnect 签名器,所以先在本地构建和测试,再通过 Remix 加载项目文件夹来部署。

  1. 1

    照常构建和测试:forge build 和 forge test(或 npx hardhat compile 和 npx hardhat test)。

  2. 2

    与 Remix 共享项目文件夹:npx @remix-project/remixd -s . --remix-ide https://remix.ethereum.org

  3. 3

    在 Remix 中选择 localhost 工作区(Connect to localhost),并打开你的合约。

  4. 4

    在 Remix 中编译,然后用 WalletConnect 环境部署,方法同 Remix 指南。

  5. 5

    只读调用可使用 cast 或 Hardhat 脚本;交易请从 Remix 发送,由 kexify 签名。

kexify 不能用作 Foundry 或 Hardhat 的签名器(例如 --account 或私钥),也绝不会给你原始私钥,除非你自己用两份密钥文件重建。