Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Kickstart solidity code. "false transaction mined but execution failed" in createRequest(). #47

Open
Sunny-64 opened this issue Jul 5, 2023 · 0 comments

Comments

@Sunny-64
Copy link

Sunny-64 commented Jul 5, 2023

The error was caused due to the following line of code. I'm using solidity version ^0.8.0 and i was getting that error because requests Array is dynamic and we're trying to access it's index that doesn't even exist.

Request storage r = requests[numRequests++];

fix :

Request storage r = requests.push(); 

Thanks for detailed explanation btw I got stuck for a while finding the correct version of the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant