Linked Questions

2 votes
0 answers

Why is the code on a contract address different from the compiled code? [duplicate]

There seem to be clear differences between the hex that the solidity compiler spits out and the hex that is displayed by eth.getCode() after you have published the contract. for example the original ...
Omnidip's user avatar
  • 123
64 votes
7 answers

How can I verify that a contract on the blockchain matches the source code?

Given the (Solidity) source code of a smart contract, is there a way to deterministically compile the code and compare it with the code on the blockchain? I want to verify that the contract does what ...
J-B's user avatar
  • 8,961
34 votes
3 answers

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
7 votes
3 answers

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
11 votes
1 answer

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
4 votes
1 answer

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
2 answers

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:
j4ys0n's user avatar
  • 193
4 votes
1 answer

Truffle Bytecode Different from Etherscan Bytecode

I am having difficulty verifying my contract code on Etherscan using the code generated by Truffle. Using Etherscan VerifyContract V1: Truffle produced ...
Nyxynyx's user avatar
  • 1,167
2 votes
1 answer

How to get "Contract creation code" when it's not verified yet?

Is there any possibility to get the "creation bytecode" of the contract when it's not yet verified? I have a token smart contract:
Ender's user avatar
  • 265
1 vote
1 answer

Smart Contract byte code using web3

How Could I pull out smart contract bytecode using web3 and contract address?
Damian Klepacki's user avatar
0 votes
1 answer

Truffle console: How to retrieve a specific opcode from a smart contract? and contract's name also

I am working on Truffle console using commands like:(i.e. web3.js, if I am not wrong) module.exports = async function(callback) { try { // Fetch accounts from wallet - these are unlocked const ...
zak100's user avatar
  • 1,406