Questions tagged [static-call]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
76 views

High gas consumption when using `staticcall` on a non-view/pure function

Even though functions called with staticcall cannot modify the state, I ran into an issue when (accidentally) calling a non-view/pure function using staticcall. For example, using this contract: ...
0
votes
0answers
144 views

staticcall - what does this code do?

I'm lost, does anyone understand this code? assembly { success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60) // Use "invalid" to make gas ...
2
votes
2answers
561 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 ...
3
votes
0answers
605 views

The gas-cost of a static-call of a pure function

A pure function doesn't cost anything when called from an off-chain script (or from some other constant function). But it does cost when called from a transaction (i.e., from a non-constant function). ...
1
vote
1answer
255 views

gasCost of opcode "STATICCALL" in Geth VM Trace

{ "pc": 4765, "op": "STATICCALL", "gas": 222711, "gasCost": 219243, "depth": 1, ... } As above, Geth VM Trace (https://etherscan.io/vmtrace?txhash=...
0
votes
1answer
412 views

Staticcall on external function works only, when there is one function's argument

I'm trying to call external function in contract B from contract A using staticcall. Here is code for contract A: contract A { address public addr; bool public success; bytes public ...