0

If someone transfers funds to a contract address before I create the contract, what will happen to the funds when I create the contract?

For example:

  1. Get address of future contract.
  2. Transfer funds.
  3. Create contract.

Does the new contract get created with a positive balance? Or do the funds get cleared out?

1
  • what's the question?
    – qbsp
    Apr 2, 2018 at 3:20

1 Answer 1

1

If no code is associated with an address the transfer will succeed and the amount will be added to the address balance.

A contract can be created in that address later and it will have an initial balance. But the contract fallback function will not be called.

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.