Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 6106

EVM is the Ethereum Virtual Machine, the protected, distributed "sandbox area" (virtual machine) where contract execution occurs, replicated on every node in the network. EVM is also the name of the bytecode that runs on the virtual machine -- what Solidity, Serpent and LL get compiled down to before deployment.

0 votes
1 answer
203 views

Online tool to get EVM code of address

Using the console of an Ethereum client, you can get the binary code of a contract placed on the blockchain. Does an online tool to get this binary code exist?
Thorkil Værge's user avatar
2 votes
Accepted

What is EVM code?

EVM Code is the binary code of Ethereum smart contracts, the code which can be executed by the Ethereum Virtual Machine. … This is the job of the compiler: to translate from a human-readable language, Solidity, to a machine-readable language EVM Code. …
Thorkil Værge's user avatar
1 vote

Ethereum Virtual Machine code

As Michał writes EVM is machine code for a virtual machine and the Yellow Paper not only describes the instructions on the EVM but rather defines them. … If you want to learn EVM, I can recommend compiling some smart contracts through solc (the Solidity compiler) and then use an EVM disassembler to read the assembly instructions that have been generated …
Thorkil Værge's user avatar
9 votes
Accepted

What is the program counter at the start of an Ethereum method execution?

If you write your own compiler or your own EVM, the important thing is to follow the Contract ABI Specification (if you want it to be easy for other people, programs, and contracts to interact with your …
Thorkil Værge's user avatar
6 votes
2 answers
2k views

What is the program counter at the start of an Ethereum method execution?

In other words: Where will code execution start and how does the Ethereum client and the other contracts know where the different methods are located in the EVM? …
Thorkil Værge's user avatar
3 votes
Accepted

How does the EVM execution work

The transactions and calls into other smart contracts are executed synchronously. So the execution of the command calling into another contract will wait for the other contract to return before moving …
Thorkil Værge's user avatar
4 votes

How does the EVM find the entry of a called function?

As BokkyPooBah points out, the function signature is used to find the place in the bytecode that contains the code for the called method. The Ethereum ABI defines how the arguments are passed. The fir …
Thorkil Værge's user avatar
10 votes
Accepted

Why does compiled solidity code do this check on the argument with which it was called?

Code execution in EVM always starts with PC=0. So the method you have called is jumped to in a switch-like code segment in the beginning of the bytecode of the EVM. … In other words: The start of the contract EVM acts as a switch statement that sends you to the correct method inside the contract. This sort of structure is called a jump table. …
Thorkil Værge's user avatar
8 votes
1 answer
1k views

Why does compiled solidity code do this check on the argument with which it was called?

/Callee.sol"; contract Caller{ function call(address callee_address){ Callee callee = Callee(callee_address); callee.callee_function(); } } This becomes the following EVM: http://pastebin.com …
Thorkil Værge's user avatar
1 vote

How do I get a list of function/variable hashes from a already deployed smart contract

The short answer is that it's not possible in the general case. The longer answer is that you can attempt to disassemble the jump table that the contract begins with if the contracts follows the Ether …
Thorkil Værge's user avatar
6 votes
Accepted

How are the arguments of the constructor encoded in the contract creation transaction?

The arguments are then copied from the init byte array to the EVM memory through the CODECOPY opcode with appropriate values on the stack. …
Thorkil Værge's user avatar
4 votes
1 answer
2k views

How are the arguments of the constructor encoded in the contract creation transaction?

The Ethereum ABI defines how arguments are encoded and passed when a method is called. But how are the arguments to the constructor encoded in the contract creation transaction which creates the smart …
Thorkil Værge's user avatar
56 votes
Accepted

How does a contract find out if another address is a contract?

This works: function isContract(address _addr) private returns (bool isContract){ uint32 size; assembly { size := extcodesize(_addr) } return (size > 0); } The assembly language that al …
Thorkil Værge's user avatar
2 votes

Smart contracts and the inherent lack of security in trusting compiled byte code

This is the EVM code of the contract placed on the blockchain). The binary code of these two operations should match. … The Yellow Paper is a good resource if you want to learn EVM. …
Thorkil Værge's user avatar
2 votes
Accepted

Where can I learn to read a flow of opcodes and learn how to debug transactions?

And EVM is no more complicated that most RISC architectures). …
Thorkil Værge's user avatar

15 30 50 per page