DEV Community

Danijel-Enoch
Danijel-Enoch

Posted on • Updated on

Small but mighty Bugs(greatest solidity bug)

What are the small but mighty bug?

What are the small but mighty bugs are bugs that you have solved multiple times but keep up showing and any time you face this bug you tend to always go to stack overflow flow for an answer. They always make to keep tampering with your code **

Note: The called function should be payable if you send value and the value you send should be less than your current balance.
Debug the transaction to get more information.
Enter fullscreen mode Exit fullscreen mode

**

I encountered this Bug when i was working a multi-sender smart contract for a client, so the smart contract is a kinda ERC20 contract but with a simple multi-send functionalities , so it during the period of me testing the multi-send function on the smart contract that i came accross this SMALL BUT MIGHTY BUGS.

**

How i solved it

**

Stack Overflow...Yes Stack overflow the cheat engine for programmers where we copy and paste code from and basically just copied and pasted the error to google and stack overflow showed the right answer which was for me to make some variables and the whole functions in it self payable. This was what i did and it worked.

https://stackoverflow.com/questions/61388743/solidity-transaction-error-the-called-function-should-be-payable-if-you-send-va

After this bug wasted my time i learnt never to proud again as a developer but to copy the damn small but mighty bugs to google to solve. Let us be humble guys to our code.

Top comments (0)