Is it possible to create and fund a smart contract atomically?

I’m trying to create a smart contract and fund it in the same atomic transaction but the payment txn requires a recipient address. Is this possible?

It is currently not possible to do it.

AVM 1.1 should allow to do it as it should allow smart contract to create other smart contracts.

A question though is: why do you want to do it?
In most cases, you can have a creation method that does nothing.
And then fund the smart contract together with calling an “init” method on the smart contract that will actually do the initialization.

I’m using the language of the current draft ARC-4: ABI ARCs/ at main · algorandfoundation/ARCs · GitHub

Thanks @fabrice. I was hoping to ensure the smart contract was funded upon creation, and I have some TEAL logic verifying this upon creation, but it sounds like I will have to do this in two separate consecutive transactions and move that logic to be executed on an “init” method.

Does this mean there is no direct way to make a user that uses a smart contract to fund it at the exact same time?

The above restriction is for users creating smart contracts and funding at the same time.

There is no issue opting in / using a smart contract and funding it at the same time.