Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [callcode]

The tag has no usage guidance.

1
vote
1answer
30 views

How to prevent the code of my contract being used in a CALLCODE?

Simple question but I couldn’t find the answer anywhere. How to know if the code of my contract is used in a CALLCODE or DELEGATECALL by third party sinceaddress(this)returns the address of the caller ...
1
vote
1answer
55 views

Is it possible for a smart contract to relay raw signed transaction

I am rethinking the flow for token transfer and confirmation on the network (ERC20,ERC721...). I am unaware of a way presently to: 1- transfer tokens and 2- trigger a call in different contract, ...
1
vote
1answer
122 views

Understand an EVM call instruction with gas as 0x00

I am trying to understand the following EVM call instruction generated from here: https://ethervm.io/decompile memory[temp3:temp3 + 0x00] = address(msg.sender).call.gas(0x00).value(var1)(memory[...
0
votes
1answer
24 views

How does the network / EVM handle same contract call within same block with same gas?

As an example take the following test contract: pragma solidity ^0.4.24; contract DoubleCall { address public superHero; uint256 public price = 1 ether; function becomeSuperHero() ...
1
vote
1answer
569 views

Solidity - selfdestruct

I'm just wondering what would happen if I don't put a selfdestrut() method in my smart contract. As I read from the Solidity documentation (Self-destruct): Even if a contract’s code does not ...
0
votes
1answer
79 views

When using Delegatecall or callcode, which Ether balance is used?

Simple question, but I couldn’t find the answer. When contract A CALLCODE B, B will uses A’s ledger. But which Ether balance will be used if B makes a normal transfer, the balance of A or the balance ...
0
votes
1answer
23 views

When a delgatecalled Callcalled contract calls an other contract normally, who is msg.sender?

If I understand correctly both DELEGATECALL and CALLCODE substitute/replace (and not add) the ledger of the target contract with the one the calling contract, isn’t it ? So that when contract Victor ...
0
votes
1answer
38 views

Call a smart contract from the protocol level

I am wondering if it is possible to call a function of a smart contract every time a block is mined, perhaps as part of the coinbase transaction? The result of the call would be to send a percentage ...
2
votes
1answer
279 views

Why `address.call` function “saves” unnecessary gas for after the internal execution?

I deployed a contract of a multisig wallet to ropsten and try to test its abilities: https://ropsten.etherscan.io/address/0x8bf20c41ee6a9fd84e81d6f6df872d9628cd08b2 Things that worked fine: Withdraw ...
1
vote
0answers
434 views

abstract way of calling internal function instead of `this.call(callData)`

In Solidity I can call an internal function (inside the same contract that is calling it) the "usual" way: myFunc(); or I can call it via .call, as discussed here or here: callData = bytes4(sha3("...
0
votes
0answers
113 views

call wont work in order to update another contract's storage

Storage(variable n) of E won't get updated when I use call from contract D. addressOfE = "0x13fac93069c10e977204b9b64502439740cbe46a"; //Contract E's address that exist on my private chain. call ...
1
vote
1answer
429 views

Instantiate a deployed Smart Contract

After deploying a Smart Contract and knowing that: address = 0x20e4ac9385ea45919b9709c2b38d3190efa42ee4 ABI = [{ constant: false, inputs: [], name: "kill", outputs: [],...
6
votes
2answers
383 views

What are some ways to decode bytecode?

For example, the withdraw method on WithdrawDAO has methodID 0x3ccfd60b. Given the methodID, could it be decoded to know what method it calls ?
3
votes
1answer
685 views

Callcode | Delegatecall don't work

I was playing around with call, delegatecall and callcode and discovered that the function reset stopped working after I had made a callcode call (here are my actions): FROM JS SIDE: — A.makeCall({...
7
votes
1answer
136 views

Can a contract know at what position in a callcode an argument begins?

using for example inline assembly with calldatacopy(t, f, s), which copies s bytes from calldata at position f to memory at position t in a call to for example function newContract(bytes data) { ... }...
56
votes
2answers
17k views

Difference between CALL, CALLCODE and DELEGATECALL

CALL and CALLCODE take the same number of operands (in the execution stack). For the exception flag being pushed on top of the stack: 0 means exception, 1 means successful execution. CALL is easy to ...