I'm asking myself if the call to a function like transfer in solidity is asynchronous.

In other words, I'm working with the following contract

function count_and_pay() public {
    if (lockCon == true)
    if (positiveVote > negativeVote) {
    } else {
    lockCon = true

I'm a little worried here because I'm not able to find any resource where it saying the call escrow.transfer(proprietyContract); make the transaction and will continue in the execution of the call.

In my knowledge the method is asynchronous and it will create only the transaction of the blockchain and will continue the execution. With this scenario, my code should be technically correct (but without meaning).


<address>.transfer in Solidity is synchronous.

That means it completes, before the next line lockCon = true runs.

Note: the argument to transfer is an amount in wei, not a contract.


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.