Kushal997-das / Project-Guidance

:octocat:🌟 The Ultimate resources for beginner to advanced level projects all in one place 💻 🎯🚀
https://project-guidance.netlify.app/
MIT License
528 stars 413 forks source link

Tanisha0708 patch 1 #1615

Closed Tanisha0708 closed 2 weeks ago

Tanisha0708 commented 2 weeks ago

Optimized for Gas Efficiency: Removed the need to store the cube result (cube_), saving gas. Instead, getCube is a pure function, which calculates and returns the result without modifying the contract’s state. Input Validation: Added a check to ensure _number is small enough to prevent overflow during cube calculation. Flexible Interface: getCube calculates the cube directly without modifying the state, and setAndCube can be used if the input needs to be stored in number.

github-actions[bot] commented 2 weeks ago

@Tanisha0708

It's great having you contribute to this project

Thank you for opening a Pull Request 🙌 , Welcome to Project Guidance 💖 We will review everything and get back to you :)

Tanisha0708 commented 2 weeks ago

@Kushal997-das please once go trhough pr