I'm trying to understand how the EVM works a bit better.
Imagine I have a smart contract which is calling a uniswap to swap ETH for tokens and then on the Next line I swap back those Tokens for ETH.
uniswap.swapExactETHForTokens{value: amount}(
amountOutMin,
path,
SELF,
deadline);
uniswap.swapExactTokensForETH(
amount,
amountOutMin,
path,
SELF,
deadline);
Does the EVM Execute transactions in an asynchronous manner,
- is it possible that, the transactions on the block chain can affect the price in between those calls?
- OR does the state of a contract "read committed" in the sense that the variable in blocks that are trying to be written are updated
- OR is the state a combination of both, other people who are in the same block of transactions experience the contract as "read commited" but it's a race to see which block gets written first
Edit: How does execution of the code work, is the state of my entire function local to my method call, or is the state local to the block?