Instead of doing two operations:
1 - originate a contract
2 - transfer tez to the contract,
is it possible to do both in a single operation?
Tezos Stack Exchange is a question and answer site for users, experts, and developers of the Tezos blockchain project. It only takes a minute to sign up.
Sign up to join this communityInstead of doing two operations:
1 - originate a contract
2 - transfer tez to the contract,
is it possible to do both in a single operation?
Yes, the origination operation allows you to provide the contract balance.
In smartpy origination page:
For sure! For instance, when originating with tezos-client
, in this example I send 99 tez from the bootstrap1
account when originating the contract my_contract
:
$ tezos-client originate contract my_contract transferring 99 \
from bootstrap1 running my_contract.tz \
--init Unit --burn-cap 10.0