Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
24 views

etherscan api not returning contract bytecode for some contracts

For some contracts, the Etherscan api returns empty bytecode (0x). For example for: 8AB399CBB9FDB9A36518A7E7EDDF89158E56C595 (even though the contract exists: https://etherscan.io/address/...
Albert Hendriks's user avatar
0 votes
1 answer
169 views

Runtime bytecode not contained in creation bytecode

I'm currently delving into EVM and contract bytecode. My understanding is that by sending a transaction to the NULL address with both the initcode and contract code, and ensuring that the init code ...
kaspyjrefluss8's user avatar
2 votes
1 answer
57 views

Should all method hashes be found in a smart contract's opcodes?

I have a compiled/deployed solidity smart contract for which I have encoded all the functions signatures. (4-byte hashes) With the deployed bytecode, I have parsed the pushdata into an array for all '...
jjordan's user avatar
  • 31
3 votes
2 answers
2k views

Difference between `bytecode` and `deployedBytecode` (especially for contracts with constructor args)

Suppose I have a contract like pragma solidity ^0.8.17; contract MyContract { constructor(string arg1, uint arg2) { ... } ... } When I compile the solidity contract (actually ...
ywat's user avatar
  • 217
1 vote
0 answers
80 views

Why am I not able to access the storage of a contract deployed with bytecode?

I'm learning about EVM and I was trying to write a simple smart contract using bytecode only. What the contract is supposed to do is write the number 202 to storage slot 0 read from the storage and ...
Rodrigo Pina's user avatar
1 vote
2 answers
2k views

type(C).creationCode who has access to this?

Who has access to this? For example, if I call type(SimpleStorage).creationCode, wouldn't this cause an issue because there are a lot of SimpleStorage's How does the type() function know the specific ...
MeditationOrBust's user avatar
2 votes
1 answer
565 views

Does address.code return runtime or creation code

You have three options to retrieve bytecode: type(C).runtimeCode which returns the runtime code of a contract, type(C).creationCode which returns the creation code of a contract and address.code which ...
Luex's user avatar
  • 81
0 votes
0 answers
34 views

Figure out the address used at construction time for a regular smart contract

Is there anyway to figure out what was the address used at construction time and find it in the bytecode? For example I know that for libraries they are storing it in the contract in order to be able ...
maxime's user avatar
  • 106
0 votes
0 answers
64 views

How is it the case that a contract's deployed code is longer than 24.576KB given EIP 170?

The deployed code associated with the contract address 0x05c848E3547Bc3Ccd977B84140FDC917Bfff96a1 is longer than EIP 170 permits (I think?). I know I'm misunderstanding something, but am struggling to ...
struggling170's user avatar
4 votes
3 answers
3k views

How to deploy a bytecode-only contract without an ABI

I see a contract's bytecode on chain that I want to re-deploy almost verbatim, but the issue is that there's no verification -- no ABI or source code. Can I still redeploy this contract to a hardhat ...
John Targaryen's user avatar
1 vote
0 answers
39 views

Transaction data for contract creation: What's the data before the contract bytecode? [duplicate]

When a contract is deployed, the bytecode of the contract shows in the raw transaction data for the transaction that created the contract, along with constructor arguments after the contract bytecode ...
John1's user avatar
  • 103
0 votes
1 answer
142 views

Different byteCode generated between block explorer and standard json input

I have deployed a contract and want to verify it, but when I used the same code with same configurations of compiler to verify it, it gave me negative result. Thus I tried to decompile these two ...
llp's user avatar
  • 33
1 vote
0 answers
152 views

How to look up IPFS url in Ethereum Bytecode meta data

I have a solidity contract that is deployed on the Ethereum mainnet. The contract's bytecode ended with (what I assume to be) an IPFS url {ipfs}64736f6c634300060c0033 How do I look up this URL on ipfs?...
Barney Chambers's user avatar
3 votes
3 answers
539 views

Bytecode: Does it Reveal What Language it Was Programmed In?

Does EVM bytecode have some indication to what high-level language it was programmed in?
Daniel Connelly's user avatar
34 votes
4 answers
12k views

What is the difference between bytecode, init code, deployed bytecode, creation bytecode, and runtime bytecode?

I constantly see different types of bytecode and do not know what each of them are. What are the differences between bytecode, init code, deployed bytecode, creation bytecode, and runtime bytecode?
Shane Fontaine's user avatar
17 votes
1 answer
3k views

What's the difference between solc's bin bytecode versus bin runtime?

Solc says that bin-runtime is the runtime part of the contracts. What exactly is the runtime bytecode part and how does it differ from bin bytecode output?
dbryson's user avatar
  • 6,403