Hot answers tagged

2

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 the program counter to the next line. Transactions are also atomic, and cannot be interrupted by other transactions. This also means that a call into a ...


2

I was able to reproduce your issue with the following code on Remix (You can check the different behavior between calling extcodesize in the same tx or in a subsequent one) pragma solidity ^0.8.10; contract Test { SelfDestruct instance; constructor() { redeploy(); } function redeploy() public { instance = new ...


2

One could write an entire book answering all the questions you've lined up, but let me take a stab at 50,000 feet: Contracts aren't attached to the blockchain, they ARE part of the blockchain, as in, the code is inside the block itself. This is the part that is mined, that way you know it's not tacked on later by a malicious party. (it gets compiled down ...


1

For starters let's not equate smart contracts with people, that's a very OOP idea and it just confuses the entire issue, in my opinion. I definitely agree that technical documentation and teaching material like this are very lacking. You often get very surface level information. can listen to certain events A smart contract can not listen to events. A ...


1

what actually happens when one "deploys a smart contract on the blockchain"? Is it You will send a transaction to address 0x00000...0 with the EVM bytecode of your contract. This will result to the deployment of the contract in an address that is derived from the sender address and sender's nonce. what happens, exactly, under-the-hood, when a ...


1

No. When you deploy the contract, it will get a new address (it doesn't matter here that the bytecode is the same), and therefore a new account state with its own balance. If you ever manage to attempt to create a contract with an address that already exist, for example with the CREATE2 OPCODE from EIP-1014. EIP-684 states that the tx throws immediately. ...


1

You simply have so much addresses to import that your transaction exceed the block gas limit. On a testnet, you can circumvent this by adding the addresses in multiple small transactions, each lower than the block gas limit. However, on mainnet no matter how you do it, it will cost you several thousands dollars do import all of those. One full Ethereum block ...


1

Each client implements the evm. Different clients exists in different languages. Check each client GitHub repos for instance https://github.com/hyperledger/besu/tree/main/evm/src/main/java/org/hyperledger/besu/evm for the Besu client.


1

The go-to implementation that I use is the one included in go-ethereum available here. As it is part of the most used Ethereum client, I believe it is safe to assume that it is amongst the most up-to-date implementations.


Only top voted, non community-wiki answers of a minimum length are eligible