Skip to main content

All Questions

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

How do I call delegatecall and how do I change it to use the following contract to call?

a is the contract that contains the delegate call, b is the calling contract, I wonder if this B contract can be used for another contract also which contains delegate call? In the end, I'm interested ...
tomas's user avatar
  • 41
22 votes
2 answers
8k views

What is the difference between the STATICCALL and CALL EVM opcodes?

Besides the regular and very common CALL, the Ethereum Virtual Machine has the STATICCALL opcode. In which ways does it differ from the regular CALL? Edit: This is not a duplicate because this ...
Jesbus's user avatar
  • 10.5k
0 votes
1 answer
794 views

How to get the returned value from the delegate call on the function of another contract?

Here is my example: contract A { function a() public returns(uint256) { return 1; } } contract B { address addrOfA; function b() public returns(uint256) { (, bytes ...
xxs's user avatar
  • 31
1 vote
1 answer
840 views

How to use call, delegate call?

I have created two contracts A and B as follow: Contract A: pragma solidity 0.4.25; contract A{ // uint public X ; event MyName(address _from, address sender); function checkMe(uint val)...
Fariha Abbasi's user avatar
1 vote
1 answer
674 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 ...
user2284570's user avatar
  • 1,029
1 vote
1 answer
1k 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 ...
Louisio95's user avatar
  • 101
0 votes
1 answer
271 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 ...
user2284570's user avatar
  • 1,029
0 votes
0 answers
136 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 ...
alper's user avatar
  • 8,404
3 votes
1 answer
1k 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({...
manidos's user avatar
  • 4,308
117 votes
6 answers
53k 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 ...
Loi.Luu's user avatar
  • 2,113