0

Is there a way to know from a Solidity contract that the current transaction is being simulated and is not going to be included in the blockchain? When I mention "from the contract" I mean from the contract of the token that is being exchanged.

I'm mostly referring to Uniswap token swap transactions.

I mean this type of simulation:

is it possible to run pending transactions on local node to see the outcome?

1 Answer 1

0

I don't think there is any property a contract could consult to know if it's live or a simulation. I also don't know of a reason for wanting to.

4
  • This should be a comment rather than an answer. Sep 5, 2021 at 10:19
  • The answer is no. Sep 5, 2021 at 19:39
  • I have proof that there are people who are doing that. Yes, it is possible, but I do not know how they do it. Sep 6, 2021 at 18:10
  • I'm curious. Send it. Sep 7, 2021 at 2:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.