When a smart contract receives two transaction by different users, what is the transaction that the smart contract will deal at first ?


There's no such thing as receiving two transactions at the same time.

A transaction exists inside a block, and transactions within a block are strictly ordered. The miner who successfully mines the block determines that order.

So if two transactions involving the same smart contract are mined into the same block, one happens before the other based on what order they were put into the block by the miner.

  • 1
    When a miner receives transaction, it runs transaction on EVM and includes the transaction input in block to mine. Sir, Is that right please ( correct to me if I'am wrong)
    – amira
    May 16 '19 at 0:00
  • 2
    That sounds right.
    – user19510
    May 16 '19 at 0:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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