Questions tagged [bytecode]

The tag has no usage guidance.

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

How to get bytecode in Java (all programmatically)?

I am trying to generate a bytecode to deploy a contract to ethereum. I have included node.exe as resource and try to install solcjs programmatically in node, but unfortunately i am stuck. My current ...
0
votes
0answers
30 views

How to separately optimize bytecode?

This question is regarding the bytecode-optimizer of the solidity-compiler, not the yul-optimizer: Is there any way to separately optimize bytecode? Normally the solidity-compiler optimizes the ...
4
votes
1answer
36 views

What kind of bytecode is it in etherscan.io?

I have read some contracts from etherscan.io, and here are something that I don't understand: Why there are some contract addresses that do not have contract source code? Here is an example:https://...
1
vote
1answer
25 views

How to pass constructor parameters to solc?

I'm trying to compile a Smart Contract to bytecode using solc. I'm on a Ubuntu VM so I have to rely on a simple-to-install cmd line application. Compilation works fine but it seems like I can't pass ...
3
votes
0answers
22 views

What is the purpose of DUP1 at the beginning of contact creation bytecode?

I am trying to analyse the bytecode of creating a contract and I can't figure out why there is a need for the 006 DUP1 opcode in the snippet below. 000 PUSH1 80 002 PUSH1 40 004 MSTORE 005 CALLVALUE ...
4
votes
2answers
119 views

Function to execute raw bytecode in EVM

Suppose, I have the following bytecode (0x610101610102016000526001601ff3) that pushes two numbers to the stack, adds them and returns the value. Now I want to write a function in Solidity that will ...
0
votes
0answers
29 views

Can I get a deployable bytecode from a contract?

In my truffle build files there are two types of bytecode for each contract: bytecode deployedBytecode web3.eth.getCode returns only the 2nd one. Can I access the original bytecode from web3? It ...
0
votes
1answer
29 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?
7
votes
4answers
140 views

ABI and Bytecode stored inside Contract

I was scrolling around Ethereum StackExchange and I came across with an interesting thought that I have never read or seen anyone talk about. I'm perfectly aware of how contracts work and are ...
0
votes
1answer
38 views

Why won't a Byte code generate for the below code? The Byte code is not generating in the contract details

pragma solidity ^0.4.24; // ---------------------------------------------------------------------------- // 'NicePoints' token contract // // Deployed to : 0xb9447Ca592c68d56EE481D5D12aDf11DB1008A72 /...
2
votes
1answer
49 views

Map Bytecode of Function to Function Within Entire Bytecode

Is it possible to distinguish a functions bytecode out of an entire contracts bytecode? For example, when I pull the bytecode from a contract address, I get something like: ...
1
vote
1answer
14 views

How do I send funds from a contract to an account using bytecode?

The instruction CREATE will send funds to a new account. Is there another instruction for sending funds to an account that already exists? Or I just have to use CREATE as if the account doesn't exist?
2
votes
1answer
98 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....
0
votes
1answer
53 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 ...
0
votes
1answer
44 views

Get Contract Address by It's ByteCode

I have some bytecode and would like to find the contract address that it belongs to. Is there an easy way to do this?
2
votes
0answers
19 views

Why is it required to know the function selector in a smart contract to call the function? [duplicate]

I understand what a function selector is and how it is computed: The first four bytes of the call data for a function call specifies the function to be called. It is the first (left, high-order ...
3
votes
1answer
366 views

What is the difference between bytecode, init code, deployed bytedcode, 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 bytedcode, creation bytecode, and runtime bytecode?
0
votes
0answers
15 views

Pulling EVM Bytecode of Contract Address [duplicate]

Is there a way to pull the EVM bytecode of a given contract address? Using Web3 perhaps? I believe using the web3.eth.Contract command may get access to the contract, but I am specifically looking ...
0
votes
1answer
34 views

EVM Stack - number of elements

The words in the stack are 256-bit, therefore 32 bytes in hexadecimal representation. The Ethereum Yellow Paper states “the stack as a size of 1024”, although it does not say what (bits/words). A ...
1
vote
1answer
99 views

Can I deploy smart contract written in an older version of solidity ? If yes how to recognize it in EVM?

If I can compile a smart-contract written in an older version say 0.1.3, can I still deploy it? If I can, is there a way to look at EVM bytecode and tell that this smart contract is written with an ...
1
vote
1answer
107 views

How to construct deployable bytecode from runtime bytecode?

For example I want to redeploy/clone a contract to another address but don't have the original source code, so I only have the runtime bytecode stored on the blockchain. If I try to deploy the runtime ...
0
votes
3answers
53 views

Is it possible to find out dynamic array size looking at a smart contract?

This question already answers that in order to get the size of an array programmaticaly, a getter should be defined. However, assuming that there isn't a getter, is there a way to find out size of a ...
0
votes
1answer
41 views

What is the purpose of ISZERO?

I found that ISZERO is an opcode but I can't find what is the purpose of ISZERO. Can somebody please guide me what is the purpose of ISZERO? Zulfi.
0
votes
2answers
98 views

Remix: This contract does not implement all functions and thus cannot be created

I'm new here and code with openzeppelin framework 2.2.0. There is no error occurred when compiling with solidity 0.5.8. But when I'm going to deploy the contract, I have no bytecode and cannot ...
0
votes
1answer
560 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 ...
1
vote
0answers
173 views

Etherscan verification bytecodes don't match

Hi I'm trying to verify a token deployed at 0x87ab739464881af0011052d4ca0b0d657e8c3b48 in tx 0xbaa8f3fe86a35d2e0b7ed16b24782743e7dfb1eb21cfbb12253d0a50ef2ff365. (Mainnet) I compiled and deployed it ...
1
vote
1answer
68 views

EVM bytecode debugging jumps

How can i determine forehand the destination of JUMP for which there is no PUSH instruction thst preceeds it and the entries in the code where they where set, when analysing the bytecode? I looked ...
0
votes
1answer
40 views

How to remove byte code of deployed smart contract which was deployed using Ropsten Test Network?

I 've deployed my smart contract on Etherscan using Ropsten Test network. I can see there is bytecode for my deployed contract on ropsten etherscan. I want to hide or don't want to show the bytecode ...
2
votes
2answers
88 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/...
1
vote
2answers
136 views

verify and publish when using oraclize?

I'm using oraclize in my contract. import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"; When I go to verify and publish on etherscan I get this error myc:4:1: ParserError: Source "github.com/...
2
votes
0answers
51 views

What is the methodID for SafeMath function when SafeMath library is referenced internally?

For the contract below contract Example { using SafeMath for uint256; uint256 internal _amount; function example(uint256 amount) external { _amount = _amount.add(amount);...
1
vote
1answer
98 views

get bytecode in smartcontract ? possible?

is it possbile to get bytecode of already deployed contract on another contract? example : get bytecode of contract A using contract B (using solidity )
1
vote
1answer
276 views

ERC20 Bytecode for Main net

I'm trying to Deploy my ERC20 contract in Ethereum main net, but I'm not sure about the bytecode. I have seen a lot of tutorials but nobody tell something about uploading on main net and bytecode ...
1
vote
1answer
20 views

How to improve web3 when importing and stop doing the same task over and over again?

When using web3js, you will automatically have to make file to create an instance of that contract which you will use in your main project to interact with. For example, smartContract.js import ...
1
vote
2answers
302 views

Encode constructor arguments used when deploying a contract

How can I encode the constructor arguments when deploying a contract? Here is my deployment function: async function deploy(abi, bin, args) { let contract = new this.web3.eth.Contract(JSON.parse(...
0
votes
2answers
126 views

where is the abi stored for a contract?

once a contract is compiled and deployed to the blockchain, it stores the 'runtime bytecode' in the blockchain (as I understand). but to invoke the functions of a contract by an EOA, it requires ABI ...
0
votes
1answer
45 views

Understand an online contract with no EVM bytecode avaliable

Could anyone shed some lights on the following contract? https://etherscan.io/address/0x27d6c4cb2551799a143e1a3291ae002b8c8aa078#code I am quite confused about what's going on here. Why doesn't the ...
1
vote
3answers
80 views

Understand a smart contract semantics

I am writing to understand a smart contract which seems quite "meaningless" to me. The contract is at (https://etherscan.io/address/0xd4fa166d5ffe8f78230fc05e6850881dc08b2da2#code) but indeed over ...
1
vote
1answer
70 views

How to extract “runtime” bin from a EVM bin found on etherscan.io

I would like to extract the runtime bin from the EVM bin that can be found in the etherscan.io. For instance for this famous contract (https://etherscan.io/address/...
0
votes
1answer
243 views

Difference between Binary of the Contracts in Hex and contract bytecode?

I use the command "solcjs --bin mycontract.sol" to get the "Binary of the contracts in hex" and it looks like: It can be used as a parameter of evm in geth after the command "...
7
votes
1answer
259 views

When did the Ethereum “free memory pointer” change? (6060… -> 6080…)

I have been digging a bit deeper into the Ethereum bytecode with the specific goal to do contract verification from the source code. I noticed, while doing some tests, that the initial bytes of the ...
1
vote
1answer
263 views

Smart Contract byte code using web3

How Could I pull out smart contract bytecode using web3 and contract address?
0
votes
1answer
56 views

Deploying custom bytecode on the blockchain

Say I have custom bytecode which I want to deploy to the blockchain, for example, 0x6009 (PUSH1 0x09) and I want to create a contract which executes exactly that bytecode when called. As far as I ...
0
votes
2answers
218 views

Is it possible to recreate the deploy bytecode of a contract in solidity?

So I'd need something like the GetCode.at(address) function presented in the official doc: https://solidity.readthedocs.io/en/v0.5.0/assembly.html#example but which allows me to deploy that contract ...
1
vote
1answer
108 views

Convert contract creation code to contract source code

I already get the bytecode of a contract from web3 through this method: web3.eth.getCode(address), but I am having trouble decoding this code to a human readable form. How do I do it? Take the OMG ...
1
vote
1answer
192 views

Geth Error: Cannot access contractAddress from the transaction receipt

I am trying to instantiate contracts via the geth console. Here are the instructions I am running: var bytecode = "0x6003600501600202600055" var createTx = eth.sendTransaction({ from: eth.accounts[...
1
vote
2answers
131 views

What is the size of byte code stored in the EVM?

Generally, what is the size of the bytecode stored in the EVM. I mean the approx average value of it or bytecode of a simple hello world program (setting and getting a string). On what factors this ...
2
votes
0answers
95 views

STOP after RETURN in bytecode generated by solidity

I am currently analyzing the code generated by the solidity compiler. Let's take this simple example: pragma solidity^0.4.24; contract test { constructor() public { } } The code generated with ...
3
votes
1answer
94 views

What is the purpose of extcodecopy?

I am wondering, what is the purpose of the EXTCODECOPY bytecode instruction? I don't see any advantage in copying the code of another contract in memory. I am a little bit confused, because of the ...
1
vote
1answer
276 views

How to deploy contract with bytecode from etherscan?

For example, I want to deploy a contract to my local testnet. But I only have its opcode from etherscan. How to deploy the contract with just those runtime bytecode?