Cyfrin Updraft.

专家问答

向Cyfrin Updraft社区的专家提问

Sui.X.Peera.

赚取你的 1000 Sui 份额

获取声誉积分,并因帮助 Sui 社区成长而获得奖励。

帖子

191
  • thegreatfeez.
    Feb 25, 2025
    专家问答

    使用 VPS 运行节点

    我需要明白一些东西...我买了一个 VPS 来运行节点. 根据我关注的推特话题,我们使用了 termius. 但是为什么我需要保持终端开启并连接到互联网才能继续通过 VPS 运行节点... 而我购买 VPS 的主要本质是这样我才能在电脑无法运行的时候运行节点

    • Cyfrin Updraft
    • DeFi
    • Blockchain
    0
    1
  • 0xe85d...ab53.
    Jan 30, 2025
    专家问答

    第 1 层部署

    我已经学会了使用Remix在测试网上部署一个简单的智能合约. 将 DeFi 协议部署到任何第 1 层或第 2 层网络的最佳实践程序是什么? 你使用 Remix 吗,你使用任何 CLI 或任何其他替代方案吗? 它们中的任何一个比另一个更安全吗?为什么选择这个程序来对抗其他 2 个程序? 例如,当 Uniswap 团队将 Uniswap 代码部署到以太坊第 1 层时,他们是如何部署代码的? 谢谢

    • Cyfrin Updraft
    • Blockchain
    • Smart Contract
    0
    1
  • thegreatfeez.
    Jan 04, 2025
    专家问答

    铸造厂坚固性测试

    我的代码可能出什么问题? function testFundUpdatesFundedDataStructure() public { fundMe.fund{value: 10e18}(); uint256 amountFunded = fundMe.getAddressToAmountFunded(address(this)); assertEq(amountFunded, 10e18); } 出现这个错误: [14658] FundMeTest:: testfundUpdatesFundedDatesFundedDatesFundedD ├─ [2658] FundMe:: fund {价值:100000000000000000} () │ ├─ [0] 0x000000000000000000000000000000000000000000:: latestRoundData () [静态调用] │ │ └─ ← [停止] │ └─ ← [还原] evmError:还原 └─ ← [还原] evmError:还原

    • Cyfrin Updraft
    • Foundry
    • Solidity
    1
    3
  • thegreatfeez.
    Dec 19, 2024
    专家问答

    zksync 铸造厂安装

    看来安装了 zksync foundry 的,已经不在 github 存储库里了,我试着在终端中键入命令行 “权限被拒绝,无法从远程存储库读取”

    • Cyfrin Updraft
    • Foundry
    • Solidity
    1
    2
  • thegreatfeez.
    Dec 14, 2024
    专家问答

    设置 SimpleStorage 部署器

    AI 问道,为什么我在尝试在 VS 代码中部署我的代码时一直遇到这个错误,但还是一样. 这是错误: [] 正在编译... [] 使用 Solc 0.8.18 编译 14 个文件 [] Solc 0.8.18 在 149.20 毫秒内完成 错误:编译器运行失败: 错误 (2314):预期为 ';' 但得到了标识符 --> 脚本/deploySimpleStorage.sol: 11:9: | 11 | vm.stopBroadcast (); | ^^ 这是我的代码. solidity “' //SPDX 许可证标识符:麻省理工学院 pragma solidity ^0.8.18; 从 “forge-std/Script.sol” 导入 {脚本}; 从 “...” 导入 {simpleStorage}/src/SimpleStorage.sol “; 合约部署简单存储是脚本 { 函数 run () 外部返回 (simpleStorage) { vm.startBroadcast (); SimpleStorage SimpleStorage = new SimpleStorage ( vm.stopbroadcast (); 返回 SimpleStorage; } } “'

    • Cyfrin Updraft
    • Foundry
    • Solidity
    1
    1
  • thegreatfeez.
    Dec 12, 2024
    专家问答

    设置铸造厂

    在使用 “forge init” 命令安装后尝试设置我的铸造厂时,我遇到了这个错误: 错误:提交失败 (code=some (128)、stdout= "”、stderr= "作者身份未知\n\n* 请告诉我你是谁. \n\n 运行\n git config--global user.email\” you@example.com\”\n git config--global user.name\ “你的名字\”\n\n 来设置账户的默认身份. \n 省略--global 以仅在此存储库中设置身份. \n\n 致命:无法自动检测电子邮件地址(收到 “用户 @MACs-MBP”. (无)')”) 尽管我能够获得除了 “lib” 和 “.gitmodules” 之外的所有我需要的文件夹,但希望将来这不会影响我. 而且我还试着用 “forge init--force” 还是一样

    • Cyfrin Updraft
    • Foundry
    • Solidity
    1
    2
  • Cyfrin Moderator Pst.
    Mar 29, 2024
    专家问答

    What are the recommended protocols for smart contract audit?

    I am looking to conduct a smart contract audit and would like to know the best protocols to follow. Can anyone suggest a wide range of protocols that are commonly used in competitive audits? Any insights or recommendations would be greatly appreciated. Thank you.

    • Foundry
    • Security
    • Blockchain
    0
    1
    官方答案
  • Cyfrin Moderator Pst.
    Mar 29, 2024
    专家问答

    Error `make deploy` in VS Code - `bash: make: command not found`

    I am encountering an issue while trying to deploy using make deploy in VS Code with Foundry and Anvil. Despite Anvil launching properly without any errors, when I attempt to deploy using the command make deploy, I consistently receive the error message bash: make: command not found. Has anyone faced a similar problem or can provide guidance on resolving this issue? Any assistance would be greatly valued as I have been unable to progress since yesterday. Thank you.

    • Foundry
    0
    1
    官方答案
  • Cyfrin Moderator Pst.
    Mar 29, 2024
    专家问答

    Which function selector and input data should be used in solveChallenge?

    I am working on the solveChallenge function which requires a function selector and input data to be passed. I am unsure about which function I should get the function selector for, and what the input data should be that needs to be turned into bytes. Any guidance on this would be greatly appreciated. Thank you in advance for your help. function solveChallenge(bytes4 selectorOne, bytes memory inputData, string memory yourTwitterHandle) external { (bool successOne, bytes memory responseDataOne) = i_helperContract.call(abi.encodeWithSelector(selectorOne)); if (!successOne || uint256(bytes32((responseDataOne))) != 1) { revert S1__WrongSelector(); } (bool successTwo, bytes memory responseDataTwo) = i_helperContract.call(inputData); if (!successTwo || uint256(bytes32((responseDataTwo))) != 1) { revert S1__WrongData(); } _updateAndRewardSolver(yourTwitterHandle); } I am motivated to understand how to find the solution, not just for obtaining the NFT. Thank you for your assistance.

    • Transaction
    • Solidity
    • Smart Contract
    0
    1
    官方答案
  • Cyfrin Moderator Pst.
    Mar 29, 2024
    专家问答

    How to Report Multiple Instances of an Attack Vector in Base Code?

    I have encountered the same attack vector multiple times in a base code. Should I include each instance separately in my report or consolidate them into a single entry? For instance, if I identify a Denial of Service (DOS) attack in three different functions, should I classify these findings as three distinct high-severity issues in my report, or combine them into a single report entry for efficiency and clarity? Any insights on the best approach for reporting such repeated vulnerabilities would be greatly appreciated. Thank you.

    • Security
    0
    1
    官方答案
我们使用 cookie 确保您在我们的网站上获得最佳体验。
更多信息