Module soroban_sdk::deploy
source · Expand description
Deploy contains types for deploying contracts.
Contracts are assigned an ID that is derived from a set of arguments. A contract may choose which set of arguments to use to deploy with:
- Deployer::with_current_contract – A contract deployed by the currently executing contract will have an ID derived from the currently executing contract’s ID.
The deployer can be created using Env::deployer.
Examples
let deployer = env.deployer().with_current_contract(&salt);
let contract_id = deployer.deploy(&wasm_hash);
Structs
Deployer provides access to deploying contracts.
A deployer that deploys a contract that has its ID derived from the current
contract ID and the provided salt.