Solidity Contract Error: "call to SimpleStorage.people errored: invalid opcode" #6582
Unanswered
KuldeepSonara
asked this question in
Q&A
Replies: 1 comment
-
It seems to be working fine for me. Here, I am using Remix IDE. Can you tell where you are deploying your contracts? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm encountering an issue with my Solidity contract and could use some help debugging it. I have a simple contract named SimpleStorage that includes a struct People and an array people to store instances of this struct. The contract has a function addPeople to add a new person to the array.
However, when I try to call the addPeople function, I receive the following error message: "call to SimpleStorage.people errored: invalid opcode". I'm not sure what's causing this error.
`// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
contract SimpleStorage {
uint favoriteNumber;
}
`
I've tried increasing the gas limit, but that didn't solve the issue. Can someone please help me understand what's causing this error and how I can fix it?
Beta Was this translation helpful? Give feedback.
All reactions