Universal Deployer
Alpha Version
v3.0.0-alpha.3. Click here to visit the latest stable release.Reference of the Universal Deployer Contract (UDC) interface and preset.
Interfaces
Starting from version 3.x.x, the interfaces are no longer part of the openzeppelin_access package. The references
documented here are contained in the openzeppelin_interfaces package version 2.1.0-alpha.0.
use openzeppelin_interfaces::deployments::IUniversalDeployer;Functions
Events
Functions
deploy_contract(class_hash: ClassHash, salt: felt252, not_from_zero: bool, calldata: Span<felt252>) → ContractAddress
external
#Deploys a contract through the Universal Deployer Contract.
Events
ContractDeployed(address: ContractAddress, deployer: ContractAddress, not_from_zero: bool, class_hash: ClassHash, calldata: Span<felt252>, salt: felt252)
event
#Emitted when deployer deploys a contract through the Universal Deployer Contract.
Presets
use openzeppelin_presets::UniversalDeployer;The standard Universal Deployer Contract.
0x038a75a9c5a0203e5fa94bb181850a4e6a349fc3fcda6a0ccbcaeb5c2f50c7c3Embedded Implementations
UniversalDeployerImpl
External functions
deploy_contract(ref self: ContractState, address: ContractAddress, deployer: ContractAddress, not_from_zero: bool, class_hash: ClassHash, calldata: Span<felt252>, salt: felt252) -> ContractAddress
external
#Deploys a contract through the Universal Deployer Contract.
When not_from_zero is true, salt is hashed with the caller address and the modified salt is passed to the inner deploy_syscall. This type of deployment is origin-dependent.
When not_from_zero is false, the deployment type is origin-independent.
Emits an ContractDeployed event.