Linked Questions

28
votes
2answers
3k views

What's a precompiled contract and how are they different from native opcodes?

The Yellow Paper states: These are four so-called ‘precompiled’ contracts, meant as a preliminary piece of architecture that may later become native extensions. The four contracts in addresses ...
20
votes
1answer
7k views

Is there a table of EVM instructions and their gas costs?

The EVM instructions are in the yellow paper, or they are summed up in this answer. But their gas costs are not there. Where can I find a list of all instructions with their associated gas costs?
12
votes
6answers
549 views

Can a solidity compiler be written in solidity?

Can a solidity compiler be written in solidity? How much gas would it cost?
5
votes
2answers
465 views

Checking the blockchain within Solidity contract

I want my contract to check a given range of blocks and see whether there are any transactions between a given pair of addresses. Is this possible to do in Solidity? Otherwise how would I do it?
3
votes
2answers
449 views

How to get a timestamp of a specified block in solidity?

"block.timestamp" and "now" are known. I would like to know how to get a timestamp of a specified block.number? Like: uint blockDoneTime = (block.number - 1000).now; // Or something like this...? :)
5
votes
1answer
346 views

Can a contract fetch the global block gas limit?

The OPCODE GASLIMIT gets the block's gas limit. Could in-line assembly, uint gasLimit; assembly { gasLimit := gaslimit } fetch the gas limit ? contract B { function ...
3
votes
1answer
423 views

Why doesn't bytecode match the opcodes on Etherscan?

I'm just going through the first few opcodes on this contract: https://etherscan.io/address/0xab7c74abc0c4d48d1bdad5dcb26153fc8780f83e#code. Which are (according to the opcodes view): PUSH1 0x60 ...
4
votes
1answer
200 views

What is “Opcodes view” at etherscan?

Studying the etherscan platform and some contracts, -->> accounts >> contract accounts >> selecting one contract, under Contract Code there is an option to switch between ...
3
votes
0answers
114 views

Is there any reference on writing contracts directly with the bytecode language?

It would be great to have a complete reference of all the opcodes available, their exact effects and costs, and an example "Hello World" in ethereum assembly. Edit: this question isn't a duplicate of ...
0
votes
1answer
48 views

solidity binary code with multiple “stop”

I find some sol contains multiple "stop" instr. For example, this address has binary "0000000000000000", which means they have a lot of "stop". Anybody know what is the source code can cause this ...