Solidity – Troubleshooting VM Exception: Invalid Opcode in Solidity Browser

invalid-opcoderemixsolidity

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 have compiled the original code (no change on default code) by pressing "Compile" button in "Settings" page.

And I press the "Create" button in "Contract" page. However, only "VM Exception: invalid opcode" is shown even I tried in Google Chrome and IE.

Would anyone advise in this issue?

Best Answer

I think you had set a value in the "value input" before creating the contract.

put 0 and retry to create the contract. the ballot example works fine.

enter image description here

Related Topic