Skip to main content

Questions tagged [deployed-bytecode]

Filter by
Sorted by
Tagged with
1 vote
1 answer
21 views

How do i fix the issue of Invalid Bytecode, code: invalid argument when deploying?

I am building a dapp on Ethereum using hardhat and next.js() which utilises scaffold-eth-2. When I try to deploy my contracts I get the error processing, invalid bytecode bytecode: value, code=...
Aadil Ahmad's user avatar
1 vote
1 answer
35 views

Can init code of a contract not return the deployed code?

As I understand, when deploying a new smart contract, the transaction has only the init code, which includes the code that will be actually deployed (the deployed code). The init code is executed and ...
Andrew Slock's user avatar
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
62 views

Understanding discrepancies between Etherscan deployed bytecode and locally compiled bytecode for smart contracts

I’m experiencing an issue when examining the bytecode of this smart contract 0x7c21C4Bbd63D05Fa9F788e38d14e18FC52E9557B. After locating the contract on Etherscan and viewing the contract code in the “...
Mere's user avatar
  • 21
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
0 votes
0 answers
119 views

UniswapV3 Fork with updated POOL_INIT_CODE_HASH

I am trying to modify the the standard tests for UniswapV3 staker, which is deployed with different POOL_INIT_CODE_HASH, but so far the tests that are failing resulting the following Error: Error: VM ...
Mark's user avatar
  • 13
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
0 votes
2 answers
70 views

Chainlink UpKeep Registration ABI Error Problem

Everytime I try to register my UpKeep on Chainlink Automation, I get this error, "ABI must be of type { "name": string, "inputs": { "name": string, "type": ...
Vidhan Mangla's user avatar
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
0 votes
1 answer
90 views

How to make sure that a contract's interface and functionality isn't lost after converting it to byte code?

Since Ethereum contracts are stored on the blockchain as byte code but people will want to understand how to interact with contracts, I wonder if there is enough information stored about contracts on ...
Rik Schoonbeek's user avatar
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
0 votes
1 answer
472 views

How can I solve withdraw function not working on a deployed contract which worked on testnet

This is my smart contract and the withdraw function doesn't work , throws a big gas fee amount and seems not to work // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; ...
Turcu Octavian'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
3 votes
1 answer
3k views

New contract deployment pattern (0x60c06040)?

I've been monitoring new contract deployments simply by looking for leading 0x60806040 pattern in a transaction's data field (example). However, I've noticed there is a similar pattern that is less ...
pcko1's user avatar
  • 145
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
0 votes
1 answer
66 views

How much it cost to deploy a smart contract which creates more smart contracts on Ethereum MainNet?

I want to create a smart contract which deploy smart contract to each user who use it "AllUserMetaData", therefore for each user one smart contract will be deploy. How much does it cost to ...
Satoshi_Amadeus_XDS_Stars's user avatar
0 votes
1 answer
181 views

How do I find token amount on Etherscan after the contract is deployed?

When I copy my connected test address from metamask onto etherscan the test tokens from Ganache do not show up. After I deploy a contract, there is no etherscan address. Message: view on etherscan ...
dustycar17's user avatar
1 vote
1 answer
390 views

Querying an ethereum contract without ABI, with only input bytes

I know some transaction has some input bytes to the contract as specified by Etherscan or a mining pool (for instance, this transaction has input data that looks like 0x000000062de258...9b1d). I know ...
John Targaryen'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
2 votes
1 answer
1k views

How to check if transaction is interact with smart contract or deploying smart contract itself?

I'm currently working with go-ethereum, And unable to use etherscan for this case, No ABI for me here. How to check whether if the transaction interacts with/calls a smart contract or deploying the ...
kitta's user avatar
  • 157
0 votes
1 answer
2k views

Error! Invalid constructor arguments provided. Please verify that they are in ABI-encoded format

Update: so these 2 lines in my code seem to be causing the problem and removing them got everything to work but I still need to include them so if someone can figure out why they are breaking that ...
developer's user avatar
  • 185
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
1 vote
0 answers
70 views

Is there situation when using constants instead of literal values in the code will make the contract deploy more expensive?

I was reading a smart contract code in solidity and I found some magic numbers (literal values as function arguments or in some expressions). My first impulse was refactor it to use named constants ...
Claudio Silva's user avatar
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
5 votes
1 answer
2k views

How to get the actual runtime bytecode from creation bytecode and constructor arguments without deploying

Possible outputs of the Solidity compiler include creation bytecode and deployed (runtime) bytecode. However, this compiled deployed bytecode might not be the same as the one that will actually be ...
FabijanC's user avatar
  • 111
1 vote
1 answer
272 views

Several small or one big contract? (deloyment cost)

Does deploying several small contracts use more gas than deploying them as one, bigger contract with the same functions (that don't interact with each other)? How much is the difference?
porton's user avatar
  • 1,854
1 vote
2 answers
199 views

How to publish in ethereum with "imports" ? or how to do?

Hello i have this question in my mind now : How to publish in ethereum with "imports" ? or how to do ? why i say this ? answer : when i wanna "verify and publish Contract Source Code" with a ...
Kypanz's user avatar
  • 39
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