Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [bytecode]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
34 votes
3 answers
11k 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,393
6 votes
1 answer
3k views

How is an ABI stored in bytecode?

I'm trying to understand how a simple hex string like 0x25d8dcf2 is enough information to execute a function in a contract. I've read up on the ABI and understand that the hex string is basically just ...
Earlz's user avatar
  • 471
2 votes
1 answer
5k views

how to decompile smart contract bytecode? [duplicate]

I don't want the whole bytecode to solidity. I just want that bytecode have fallback function and it's content. is feature in the bytecode about fallback function? about external contract call, ...
Ho Now Nahc's user avatar
23 votes
1 answer
15k views

How to find solidity code for a contract address

I need to find out the public contract code i.e. solidity code for a contract address. For eample, here it has a tab for contract code but it's in assembly and byte code only, which is not useful. ...
garg10may's user avatar
  • 724
14 votes
2 answers
1k views

Is there a way to detect which compiler version produced a contract binary?

Given the compiled bytecode on the blockchain, is there a way to detect which compiler version is being used in order to verify source matches bytecode without having to bruteforce all available ...
tayvano's user avatar
  • 16k
5 votes
3 answers
2k views

Where are the smart contract constants stored?

I want to double-check something. I had been writing upgradable smart contact that uses a lot of constants. As far as I can see, smart contracts aren't storing constant variables in their storage. ...
Sky's user avatar
  • 2,312
5 votes
1 answer
6k views

Deploying contract using byteCode

In that example you can see, how to deploy a new contract having just ABI and ByteCode (uses for copy and deploy contracts from mainnet to your testnet for example). /****** Deploying new contract ...
Vladimir's user avatar
  • 181
3 votes
2 answers
1k views

Where is the contract bytecode stored when a contract creates a contract?

When a contract creates a contract, where's the new contract's bytecode stored? For example: This Maker contract was created by their deployment contract: https://etherscan.io/address/...
j4ys0n's user avatar
  • 193
11 votes
1 answer
3k views

Difference between bytecode and runtime bytecode [duplicate]

In Remix, clicking on "details" for a contract reveals the "bytecode" and "runtime bytecode". What is the difference?
will_durant's user avatar
  • 1,154
9 votes
1 answer
2k views

Why does changing comments in the smart contract change its bytecode?

Why are these 2 smart contracts, which differ only in the comments, result in different bytecode: 1st pragma solidity 0.4.20; contract Test { // test function test() pure public { } } 2nd ...
medvedev1088's user avatar
7 votes
3 answers
8k views

Deploying a smart contract with just bytecode

I have the bytecode of a contract, can I deploy it to a private network without the need of source code? Does bytecode contain the deployers signature or somehow the network id? Here is the bytecode. ...
EralpB's user avatar
  • 531
5 votes
3 answers
8k views

Is it possible to get the bytecode of an already deployed contract in Solidity?

Is it possible to get the bytecode of an already deployed contract from another contract? Example: get bytecode of contract A using contract B in Solidity.
alireza vafa's user avatar
5 votes
1 answer
1k views

Why would I not want to use intermediate representation (IR) in Solidity v0.8.13 and above?

In Solidity v0.8.13, the intermediate representation (IR) codegen feature has been brought out of the experimental stage. We can now run the compiler with --via-ir flag to enable Yul IR, which makes ...
Paul Razvan Berg's user avatar
4 votes
2 answers
499 views

Why is the jump address calculation so complex in compiled Solidity code?

I have the following simple Solidity contract: pragma solidity ^0.4.0; contract Test { function Test() { intfunc(5); } uint8 store; function intfunc (uint8 a) internal { ...
Eugene Osovetsky's user avatar
4 votes
1 answer
2k views

web3.eth.getCode doesn't return the data shown on etherscan

For example, let's take contract address 0xdac17f958d2ee523a2206206994597c13d831ec7. Does anybody have an idea why the following two are totally different: The string returned from await web3.eth....
goodvibration's user avatar
3 votes
3 answers
411 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
3 votes
1 answer
600 views

Cannot verify Contract - bytecode has small difference

I forgot to verify the ERC20 token contract after deploying it. Now after 5 months, Im doing it again and completely forget which compiler and if I accidently change anything on the code. After ...
Brian Nguyen's user avatar
3 votes
1 answer
1k views

How to verify smart contracts on different solidity versions

I'd like to build my own smart contract verify system with all solidity versions both on single file and multiple files just like what etherscan or other block explorer does. I was able to verify for ...
kimiro's user avatar
  • 165
3 votes
1 answer
967 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 ...
user1234's user avatar
  • 329
3 votes
2 answers
4k views

Ethereum Virtual Machine code

Does anyone have an example of what EVM bytecode looks like? New to ETH and trying to understand what exactly gets executed by the virtual machine. Is it similar to how JVM bytecode gets executed from ...
user10496's user avatar
1 vote
1 answer
167 views

is there a way to extract smart contract code from bytecode?

I have deployed the smart contract into polygon mainnet but I do not have the smart contract code now, I only had the smart contract address. I have not 'verify and published ' after deploying the ...
Ashok Sandhyala's user avatar
1 vote
1 answer
696 views

Does "eth_getCode" return the init bytecode or the deployed bytecode?

The Ethereum JSON-PRC spec contains an eth_getCode method, but it is not specified what is being retrieved: Init bytecode (including constructor) Deployed bytecode (without constructor) Which one is ...
Paul Razvan Berg's user avatar
0 votes
1 answer
967 views

Calling contract functions using only ABI without source code

I have MyContract.json file of some contract(assume i haven't its source code). In .json file, there is abi and bytecode. If i want to deploy such contract (through web3js), I am facing following ...
Amir Ali's user avatar
  • 447