Questions tagged [invalid-opcode]

Questions about and related to invalid opcode.

Filter by
Sorted by
Tagged with
2 votes
2 answers
231 views

What does FE stand for in "InvalidFEOpcode"?

I've seen the name InvalidFEOpcode used in client implementations, e.g. in REVM: https://github.com/bluealloy/revm/blob/8206193e65ad199a1dde1e79e38bf9ffe38118c9/crates/interpreter/src/...
Paul Razvan Berg's user avatar
0 votes
1 answer
2k views

Could not coalesce error. invalid opcode

I am trying to deploy a simple storage smart contract to Ganache using ethers. The contract is getting deployed but still I am getting this error and can not access the contract functions. the error: ...
MASHUKUR RAHMAN's user avatar
0 votes
1 answer
486 views

Invalid opcode in smart contract ( solidity ) while using ganache-cli

The inbox.sol file is - //SPDX-License-Identifier: UNLICENSED pragma solidity ^ 0.8.9; contract Inbox { string public message; function myInbox(string memory initialMessage) public { ...
Swetha N's user avatar
1 vote
1 answer
193 views

Warning! Error encountered during contract execution [invalid opcode: opcode 0x29 not defined]

hello every one hope you are doing fine. i was trying to communicate with my smart contract which is deployed on the goeril test network but i m facing this error Warning! Error encountered during ...
Aditya Sharma's user avatar
0 votes
2 answers
431 views

What is causing this invalid opcode error when I call the transfer function?

I am working through the process of developing a simple ERC-20 token to learn more about smart contract development. I am running into an issue on my coin sale contract, however. When I wish to end ...
ho88it's user avatar
  • 21
1 vote
1 answer
605 views

another "invalid opcode" error

I am stuck on this little problem in my chat app smart contract(this is only the faulty piece of code) contract ChatApp { struct user{ bool acceptReq; uint nreq; ...
Newdude's user avatar
  • 61
2 votes
1 answer
96 views

Which fork implemented EIP-141? (invalid opcode)

EIP-141 https://eips.ethereum.org/EIPS/eip-141 was introduced in 2017, but I cannot find it in any of the meta lists for forks https://eips.ethereum.org/meta. Is there a fork under which it was ...
Peteris's user avatar
  • 1,005
4 votes
1 answer
14k views

I'm getting "invalid opcode: opcode 0xfe not defined", when trying to estimate the gas fees

I'm trying to estimate gas fees of a contract that I'm about to execute. My code is as follows. import Web3 from "web3"; const web3 = new Web3(); const estimateGasLimit = async ( ...
Gaurav 's user avatar
0 votes
0 answers
480 views

A lot of transactions stuck in local node pool

Geth node does not release the transactions to pool. Transactions are stuck. When I realized this problem I saw there weas a new version. I updated Geth from 1.9.12 to 1.9.17 but the problem was not ...
Mahsum UREBE's user avatar
7 votes
2 answers
6k views

How to handle enums as arguments for public functions?

Assume this simple contract: pragma solidity 0.6.3; contract InvalidOpcode { enum Dir {UP, LEFT, DOWN, RIGHT} Dir public currentDir; function changeDir(Dir newDir) public { ...
Newti's user avatar
  • 365
0 votes
1 answer
141 views

REMIX debugger invalid opcode before JUMP

I am testing simple ERC20 token creation with the following in remix: pragma solidity ^0.5.0; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.4.0/contracts/token/ERC20/ERC20....
user462003's user avatar
2 votes
1 answer
3k views

Is it normal to have Invalid opcode in a contract?

I was debugging my smart contract, while I did not encounter an invalid opcode error, I saw a lot of invalid opcodes in my deployed contract. Screenshot is from remix debugger. Is it normal to have ...
Huadong Feng's user avatar
0 votes
0 answers
176 views

Invalid OPCode on passing address parameter through Java wrapper on smart contract using Ganache

I have been facing this issue for some time and I realized there must be a problem with Ganache or maybe someone has any idea why it doesn't work. I have created a very simple contract as below, it ...
wolvorinePk's user avatar
3 votes
2 answers
1k views

Does a string message increase the gas usage of a `require` statement?

In solc 0.4.22 onward, it is possible to provide a string message containing details about the error that will be passed back to the caller (in require, assert and revert statements). Does the gas ...
goodvibration's user avatar
1 vote
3 answers
2k views

Test array values if key/value exists - Does not work

I have a problem with the following contract. When I deploy it, normally on calling the function addBalance() it should go into the false. But instead, it completely does not work and I get the ...
dkb's user avatar
  • 713
0 votes
1 answer
279 views

Solidity: VM Exception while processing transaction: invalid opcode - What happens?

If VM Exception while processing transaction: invalid opcode is thrown, does it have the same effect than revert?
Senju's user avatar
  • 701
0 votes
1 answer
990 views

When I use remix,there is a issue "Gas estimation failed,VM Exception while processing transaction: invalid opcode"

When I use function setDailyAssessmentInfo, error is raised: Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force ...
Kyrie's user avatar
  • 1
3 votes
2 answers
688 views

Invalid opcode 0x3d

Trying to submit a transaction using remix on local javascript vm and it succeeds. When I submit it on my real private network it fails with "invalid opcode 0x3d".. I can't seem to find 0x3d online......
user3705308's user avatar
0 votes
0 answers
283 views

Invalid op code from truffle console

I'm following this tutorial for a simple contract. https://blog.zeppelin.solutions/the-hitchhikers-guide-to-smart-contracts-in-ethereum-848f08001f05 After running testrpc, compiled with truffle ...
D.Giunchi's user avatar
  • 101
0 votes
1 answer
1k views

VM Exception while processing transaction: invalid opcode

I am trying to save string into a contract and hit this error. My contract is pragma solidity ^0.4.18; contract MyRecord { address owner; address guest; string note; modifier ...
Bing Lan's user avatar
  • 101
0 votes
1 answer
686 views

Invalid opcode on estimateGas

This is my contract pragma solidity ^0.4.20; contract Test { struct TestStruct { bytes32 name; mapping(uint => address) tesMapping; } TestStruct[] public testStructs; ...
imfabio's user avatar
  • 11
0 votes
2 answers
854 views

Truffle TestRPC Error: VM Exception while executing eth_call: invalid opcode

I've created a project from a Truffle Box. I have created my own contract for voting. At this point i want to be able to vote, which seems to be working, and return the total votes for all candidates, ...
Derek Hannah's user avatar
3 votes
1 answer
330 views

error: invalid opcode using modifier

Im getting the following error when trying to run my js test file using truffle: Error: VM Exception while executing eth_call: invalid opcode The js test file is the following: var DebitService = ...
Willian Siquieri's user avatar
1 vote
1 answer
213 views

Truffle. Type index error (Error: Error: VM Exception while executing eth_call: invalid opcode)

I have got error if i try call method getArrayData() contract ManagerDb { struct ManagerStruct { bytes32 firstname; bytes32 lastname; bytes32 email; uint index; ...
user3243823's user avatar
2 votes
1 answer
3k views

What does this error "invalid opcode 0xfd" mean?

I found an error message, 'invalid opcode 0xfd'. What does this mean? I googled, and found just one result here. Quote: "I the invalid opcode 0xfd is never hit (Some compilers encode safety ...
Satoshi Nakanishi's user avatar
2 votes
1 answer
4k views

Why is this test failing with an invalid opcode error at the transferFrom() call?

I get the following error: 1) Contract: Bencoin should send Bencoin correctly via transferFrom(address, address, uint256): Uncaught Error: VM Exception ...
the8thbit's user avatar
  • 123
0 votes
2 answers
310 views

Error while creating the contract with ethereum in the initial tx

I get this error when I try to create the contract with some ETH, but if I just click create without sending ether the contract is correctly deployed.
Paolo Guerra's user avatar
2 votes
1 answer
864 views

Why does Solidity use an invalid jump instead of an invalid opcode for throws?

In Solidity's 0.4.9 release: Internal exceptions are now thrown by using an invalid opcode (0xfe), manual exceptions still use an invalid jump. and Code generator: Internal errors (array out ...
eth's user avatar
  • 85.6k
3 votes
2 answers
3k views

invalid opcode for this.balance when contract balance > 0

I get an exception when I call getBalance in Remix and the contract balance is greater than 0 (ie. I sent some ether using the fallback function): Exception during execution. (invalid opcode). ...
szerte's user avatar
  • 1,221
1 vote
1 answer
2k views

(Solidity Browser) VM Exception: invalid opcode

I access the solidity browser from the following URL. https://ethereum.github.io/browser-solidity/ There are one basic sample code and one "Ballot" sample code when the page is opened by default. I ...
Thomas Lau's user avatar
3 votes
1 answer
6k views

TestRPC undeterministically throw "invalid opcode"

We have contract test suites running against TestRPC, it could fail the first run and succeed the consecutive second run. What can cause this weird behavior and how can I fix it? The CI histories: ...
Yuanfei Zhu's user avatar
4 votes
1 answer
2k views

Difference between STOP and INVALID opcode

STOP halts execution and according to this mentions INVALID is used as an abort. Is the difference between these opcodes purely semantical?
everconfusedGuy's user avatar
5 votes
1 answer
16k views

Getting 'invalid opcode' error

First of all, sorry for the code in Portuguese, this was a choice of the team and I had no saying on that. I'm writing a Billet Manager, the code is as follows: contract GerenciadorBoletos { ...
Henrique Barcelos's user avatar
27 votes
4 answers
6k views

Why does a Solidity throw consume all gas?

When you throw an exception, all gas is consumed. What is the rationale for this design decision?
Peter Hall's user avatar