Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

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

@Sunny-64

Description

@Sunny-64

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions