Deploying contracts
Once you obtain a class hash by declaring a class, it's possible to deploy instances of the class.
With Starkli, this is done with the starkli deploy
command.
ℹ️ Note
You need both a signer and an account for this. The commands shown in this page omit the signer and account options for better readability, and assume you've properly configured the environment variables.
To deploy a contract with class hash <CLASS_HASH>
, simply run:
starkli deploy <CLASS_HASH> <CTOR_ARGS>
where <CTOR_ARGS>
is the list of constructor arguments, if any.
💡 Tips
You might be able to leverage argument resolution to simplify the argument list input.
Under the hood, Starkli sends an INVOKE
transaction to the Universal Deployer Contract, as Starknet does not support native external contract deployment transactions.