Questions tagged [bytecode]

The tag has no usage guidance.

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

Why would I use interfaces in this case?

I see suggestions here and there to import an interface instead of the whole contract to reduce contract's bytecode and deployment costs. Consider the following structures: contract Storage { ...
0
votes
1answer
24 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
48 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
54 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
60 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
44 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
19 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
45 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
71 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
21 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
51 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
143 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
15 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
108 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
53 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
33 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
66 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
48 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
110 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 "evm --code". When I use ...
7
votes
1answer
151 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
122 views

Smart Contract byte code using web3

How Could I pull out smart contract bytecode using web3 and contract address?
0
votes
1answer
49 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
90 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
74 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
131 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
98 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
68 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
76 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
178 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?
1
vote
1answer
64 views

What does `JUMP [out]` stand for in Remix IDE?

After compiling this contract: pragma solidity ^0.4.25; contract Simplest { constructor() public { } function two_paths(bool _a) public pure returns (uint) { if (_a == true) { ...
2
votes
1answer
164 views

Transfer function gas limit, why 2,300?

I read in the literature that the limit for a Solidity transfer function is 2,300 gas units, because it prevents possible threats like reentrancy, etc. However, I cannot understand why exactly 2,300 ...
2
votes
0answers
35 views

What is the command PUSH29 010..00 in solidity compiled bytecode?

If you take a look to the bytecode of several contracts compiled from solidity you can notice that in the first ".data" basic block there is this command: PUSH29 ...
2
votes
1answer
132 views

How does a contract's constructor work and load input values?

I set up the following contract: pragma solidity ^0.4.25; contract Simplest { uint x; constructor(bool _lucky) public { if (_lucky == true) { x = 7; } else { ...
2
votes
1answer
628 views

Understanding how a simple contract breaks into bytecode

I'm trying to understand how contracts look in terms of bytecode and struggling to do that just based on the yellow paper. In particular, consider the following empty contract: pragma solidity ^0.4....
2
votes
1answer
428 views

How to get byte code from deployed contract in

I want to get the byte code of a deployed contract. How can I get it? Is there a special function in web3.js? I haven't found any.
1
vote
1answer
89 views

ERC20 verification for arbitrary address

I'm trying to verify if an arbitrary contract complies ERC20. While doing so I'm checking if the contract code has the following markers: totalSupply() - 18160ddd balanceOf(address) - 70a08231 ...
0
votes
1answer
112 views

Opcodes PUSH, DUP and SWAP?

I studied EVM implementations and the bytecode sequences used by them. I wondered that there are three opcodes which are recognized by the EVM but actually are invalid opcodes. B0 PUSH B1 DUP B2 ...
1
vote
0answers
25 views

Compiling from remix onto geth console

I found how to deploy a contract onto MEW, but I do not understand, partially due to meta references and missing/assumed knowledge. I'm just looking from help on a walk through. I'm including the ...
0
votes
1answer
227 views

callvalue opcode, for what?

someone know what the opcode CALLVALUE is for? I would like to understand it well. Have you an example on which I can easily understand it?
2
votes
1answer
49 views

how are negative numbers stored within the EVM stack?

for example, I have these opcodes: PUSH60 PUSH40 SUB for sub operations, I believe that the second stack item is subtracted from the first stack item (60 - 40) which would equal to -20 being the new ...
0
votes
1answer
22 views

Does an Ethereum contract address hold two different kinds of files, one for the contract bytecode and another for the ABI?

Does an Ethereum contract address hold two different kinds of file, one for the contract bytecode and another for the ABI?
1
vote
1answer
85 views

It is possible to get bytecode from the evm in golang?

Imagine this scenario, I have a contract that has a function where I call with runtime.Call(). But this function returns an address of a newly created contract, but not the bytecode as runtime.Create ...
1
vote
1answer
94 views

What is the “clone-bin” output in solc?

When it comes to bytecode solc has three types of outputs: --bin Binary of the contracts in hex. --bin-runtime Binary of the runtime part of the contracts in hex. --clone-bin ...
1
vote
1answer
50 views

“Difficulty” opcode pushes always 0x0 to stack

Currently, I do some experiments with Geth-EVM and opcode execution. During the experiments, I observed that the DIFFICULTY opcode always pushs 0x0 to the EVM stack regardless of how I set the ...
0
votes
1answer
232 views

Retrieve contract byte code

How may I find the byte code of an arbitrary contract? Preferably using a website and not writing my own client.
1
vote
1answer
42 views

Pushing bytes to EVM stack

I am sorry if this question seems to be somewhat bad, but I am trying to work out the stack representation of the following opcodes: PUSH1 60 PUSH2 40 would the stack representation of this be: [...
0
votes
1answer
254 views

Get contract bytecode and creator from contract address on Geth console

I can get contract bytecode and it's creator via this URL. https://etherscan.io/address/CONTRACT_ADDRESS [example: https://etherscan.io/address/0x5a3e58c7cf09217d2a5385bf96c02673ed1187bb#code] I ...
0
votes
0answers
34 views

What does #[$] or [$] mean in remix?

Can someone tell me what the #[$] or [$] in the remix assembly output means? I assume it's a placeholder for something yet to be determined but am unable to confirm if and what. For example: PUSH #[...
1
vote
1answer
259 views

How to run local VM from golang?

I am going to run the virtual ethereum machine from the code, pass to it a compiled smart contract code. But I do not know how to do it. It's my code: package main import ( "context" "...
0
votes
2answers
68 views

Remove source code

I am designing a smart contract challenge/enigma where I expect participants to run a given function of the contract to find the "secret treasure". I use truffle to compile the contract, then truffle ...