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?

user2983041
  • 151
  • 10

1 Answers1

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.

Rob Hitchens
  • 55,151
  • 11
  • 89
  • 145