Questions tagged [static-call]

The tag has no usage guidance.

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

How can I read the unclaimed fees by Uniswap V3 liquidity providing through another smart contract?

I need to get a precise reading of the fees generated by a liquidity providing position I opened on Uniswap V3, and I need to get it on another smart contract (not on a frontend, so no use in ...
user avatar
1 vote
2 answers
618 views

Is it possible to make a static call to a non-static function from within a smart contract without changing blockchain state?

Ive seen that the web interface from Uniswap is making a "fake" call to the contract holding the liquidity positions, and claims all fees (.collect(..)) without actually claiming them. ...
user avatar
1 vote
0 answers
232 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: ...
user avatar
  • 4,916
0 votes
0 answers
333 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 ...
user avatar
8 votes
2 answers
2k 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 ...
user avatar
  • 8,917
3 votes
0 answers
1k 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). ...
user avatar
1 vote
1 answer
384 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=...
user avatar
1 vote
1 answer
912 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 ...
user avatar