I wonder whether the EVM is used to process transactions? I know it is used to execute (or interpret) the bytecode of contracts, but is it also invoked on transactions for transfering funds between accounts...
Only if the transaction is sent to a contract address. In that case, yes, the bytecode will be loaded, and the EVM will interpret the instructions.
... or sending a message to a contract?
Yes. Assuming you mean a message call, which the yellow paper defines as:
Message Call: The act of passing a message from one Account to another.
In which case, yes, that is processed by the EVM using the CALL
opcode.
If you put this code into remix, then send a transaction to B.getA()
, and look at the debugger, you can see this in action.
pragma solidity ^0.4.10;
contract A {
uint public value = 1;
}
contract B {
A a = new A();
function getA() returns(uint){
return a.value();
}
}
