Home
Welcome to Cyfrin Updraft 👋🏼
New Articles
- Sepolia testnet requires high gas feeArticleOct 12, 2024
hi, iam new to this web3 development i started cyfrin updraft course couple of weeks ago. iam trying to follow the instructor and deploy on sepolia testnet but iam getting high gas fee of about 0.4 eth, what should i do please?
0
Posts
190- Sepolia testnet requires high gas feeArticleOct 12, 2024
hi, iam new to this web3 development i started cyfrin updraft course couple of weeks ago. iam trying to follow the instructor and deploy on sepolia testnet but iam getting high gas fee of about 0.4 eth, what should i do please?
- Cyfrin Updraft
- Foundry
- Solidity
- Smart Contract
- Gas
0 - Excited to Continue Learning Solidity!DiscussionJun 16, 2024
Hi everyone, I’m thrilled to share that I’m a new learner who has just completed a Solidity 101 course. The journey so far has been incredibly exciting and insightful. I’m eager to continue exploring and deepening my knowledge in Solidity and blockchain development. Looking forward to engaging with this amazing community and learning together! I’m curious to know what resources have helped others at my level improve. Any recommendations on websites, courses, tools, or any other materials would be greatly appreciated. Cheers, Philip
- Cyfrin Updraft
- Solidity
04 - Reentrancy VulnerabilityDiscussionMay 30, 2024
Hello everyone , I've noticed that the offer function uses the .call{value: amount}("") method to send Ether to the recipient's address. Could anyone provide insight into whether this function is indeed vulnerable to reentrancy and suggest any best practices or modifications to mitigate such risks? function _offer(address to, uint256 amount) internal { balance -= amount; (bool success, ) = to.call{value: amount}(""); if (!success) { revert TransferFailed(address(0), address(this), to, amount); } } `
- Foundry
- Security
- Solidity
- Blockchain
- Smart Contract
00 - Test Question for Cyfrin UpdraftDiscussionApr 08, 2024
Leaving it blank for a test
- Cyfrin Updraft
00 - What are the recommended protocols for smart contract audit?Expert Q&AMar 29, 2024
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
01Official Answer - Error `make deploy` in VS Code - `bash: make: command not found`Expert Q&AMar 29, 2024
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
01Official Answer - Which function selector and input data should be used in solveChallenge?Expert Q&AMar 29, 2024
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
01Official Answer - How to Report Multiple Instances of an Attack Vector in Base Code?Expert Q&AMar 29, 2024
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
01Official Answer - Seeking Small LaTeX Package for Linux InstallationExpert Q&AMar 29, 2024
I attempted to install LaTeX on my Linux machine using sudo apt-get install texlive-full, which consumed over 7 GB of storage, causing my 120 GB SSD system to run out of space. As a result, I had to remove it. Could someone provide a link to a smaller LaTeX package (less than 1 GB) that is sufficient for my needs? Any guidance or recommendations would be greatly appreciated. Thank you.
- Foundry
- Course
01Official Answer - Does mitigation of DoS in Section 4 Lesson 15 work correctly?Expert Q&AMar 29, 2024
I am currently working on Section 4 Lesson 15 and addressing the PuppyRaffle::enterRaffle function. I have identified a potential issue with the second recommended mitigation of DoS. function enterRaffle(address[] memory newPlayers) public payable { require(msg.value == entranceFee * newPlayers.length, 'PuppyRaffle: Must send enough to enter raffle'); for (uint256 i = 0; i < newPlayers.length; i++) { players.push(newPlayers[i]); addressToRaffleId[newPlayers[i]] = raffleId; } for (uint256 i = 0; i < newPlayers.length ; i++) { require(addressToRaffleId[newPlayers[i]] != raffleId, 'PuppyRaffle: Duplicate player'); } } The concern is that the duplicate check in the function will always fail due to the way addressToRaffleId[newPlayers[i]] is being set to raffleId for each new player. This results in the condition addressToRaffleId[newPlayers[i]] != raffleId never being true for new players, rendering the duplicate check ineffective. I would like to confirm if my understanding of this issue is correct. Any insights or feedback on this matter would be greatly appreciated.
- Security
- Solidity
- Smart Contract
01Official Answer
- 1780
- 11
- 10
- 10
- 10
- 10
- 10
- 10
- 10
- 10
- Solidity
- Smart Contract
- Transaction
- Foundry
- Blockchain
- Gas
- Security
- Cyfrin Updraft
- Course
- erc20