Deploys a new instance of a previously declared class.

Signature

pub extern fn deploy_syscall(class_hash: ClassHash, contract_address_salt: felt252, calldata: Span, deploy_from_zero: bool) -> Result), Array> implicits(GasBuiltin, System) nopanic;

Arguments

  • class_hash - The class hash of the contract to be deployed.
  • contract_address_salt - The salt, an arbitrary value provided by the deployer, used in the computation of the contract’s address.
  • calldata - Call arguments for the constructor.
  • deploy_from_zero - Deploy the contract from the zero address.

Returns

  • The address of the deployed contract.
  • The serialized return value of the constructor.