if the smart contract has terms to be met in a time order(assuming in one year time frame) and transactions corresponding to the terms, what will happen to the variables stored in the contract account when two different user accounts initiate the smart contract one after another and are being mined by the same miner? For example, the smart contract is about paying money at different stages of constructing an apartment building, and is used between a construction company and different apartment buyers.
closed as unclear what you're asking by smarx, Achala Dissanayake, Ismael, shane, Paul S Mar 13 at 17:57
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Transactions are executed sequentially. Let's suppose we have two transaction T1 and T2 that call to contract C.
During T1 execution it can modify the state of C. When T2 start it will see the modified state.
If you only want the first transaction to succeed, the contract have to provide that logic for that. For example C set a variable to at creation to false, when a transaction is executed it check the variable if false continue, and if is true it will fail, on success it will set the variable to true.