2

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

1 Answer 1

3

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.

2
  • 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
    Commented May 16, 2019 at 0:00
  • 2
    That sounds right.
    – user19510
    Commented May 16, 2019 at 0:03

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.