Hot answers tagged

7

It is most likely a transaction that cancels another one. You can cancel a transaction by sending another transaction from the same address with the same nonce, with a gas price at least 10% greater than the gas price of the cancelled transaction. If you want to reduce the gas cost of your cancelling transaction to the minimum, making a transfer to yourself ...


3

Ganache fork allows to rely on an external source to get past chain state. This allows to query necessary data, and only that. Think of it more as a light client. When the fork is created, it means that it will rely on the RPC for past state (a merkle root) that isn't available, however if some state is available here in ganache it will rely on it. So for ...


3

It relies on an external source (fork from) for pre-fork information and then relies on its own block producer and append new blocks after the fork. It will continue to rely on the external source for information about the pre-fork state. You can use it to test interactions. For example, if you want to run unit tests that interact with a liquidity pool and ...


3

It depends, really. Some miners on the Ethereum chain, like Ethermine, use non-conventional ordering for their benefit, aka they generally don't do the by-gas sort. Other miners can choose to sort by gas and nonce, others can choose to sort by gas and first-seen-time, others can first sort by gas and then randomize the order, others can sort by gas first and ...


2

The order of transactions (we are talking about transactions with the best gas price) is decided by the miners to make the most profit out for them. To find out more about the subject google keywords Miner Extractable Value (MEV) For example, if you send a transaction to buy some large amount of tokens, the miner will insert his own transaction to buy this ...


2

The most useful case I can think of is stacking transactions in the block to displace other transactions in the mempool (you may notice that fees are actually higher than usual today for simple ETH transfer). It could be some kind of attack as well as just a form of protest from a miner, for example against the EIP-1559 as it was pretty hype recently, but it ...


1

As far as I know, conversions do cost gas. Even it is sometimes recommended to use uint256 instead of uint8 because converting uint8 to uint256 is more expensive than just using uint256. Since you are converting uint256 to uint256 it won't cost any extra gas. You can use Remix to test gas usage. It has a static analysis tool and you can also run the ...


1

When you specify a value, you are transferring ETH from the calling contract to the called contract. But delegatecall doesn't actually switch which contract is running, instead it loads the other contract's code and runs it as if it was the calling contract. For example, if you call Michael Jordan to dunk the basketball, it makes sense to pass him the ...


1

This is second-hand information and speculation. I tried to reach out to people who did the original event. Logs were intended to be used as a proof for third party systems that something happened in a blockchain. Now logs are used by bridges between different blockchains for this purpose. Logs were intended to be purgeable i.e. full nodes have logged only ...


1

Events use one of the LOG operations. The output of LOG operations is not accessible from smart contracts by design - it allows clients to avoid storing event/log data as an optimization and as a result the LOG operation has a low gas cost reflecting the reduced hardware cost. In other words, SSTORE is expensive because it provides a guarantee that smart ...


1

But I didn't find a mention to why is that, because first: you don't need that in a contract, and event is a message from the inside to the outside, why would a contract need to access events of other contracts? Only for some weird use case. Second, you would spend a lot of Gas and your transaction wouldn't fit inside a block. if it's cheaper to store data ...


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