DeployRequest
in package
Request parameters for deploying a Soroban smart contract instance
This class encapsulates all parameters needed to deploy a new contract instance from previously installed WASM code. The deployment process creates a contract with a unique ID and optionally calls the contract's constructor with initialization arguments.
The WASM code must be installed on the network first using InstallRequest.
Tags
Table of Contents
Properties
- $constructorArgs : array<string|int, XdrSCVal>|null
- $logger : LoggerInterface|null
- $methodOptions : MethodOptions
- $network : Network
- $rpcUrl : string
- $salt : string|null
- $sourceAccountKeyPair : KeyPair
- $wasmHash : string
Methods
- __construct() : mixed
- Constructor.
Properties
$constructorArgs
public
array<string|int, XdrSCVal>|null
$constructorArgs
Constructor/Initialization Args for the contract's __constructor method.
$logger
public
LoggerInterface|null
$logger
= null
PSR-3 logger for debug output. Default: null (no logging).
$methodOptions
public
MethodOptions
$methodOptions
method options used to fine tune the transaction.
$network
public
Network
$network
The Stellar network this contract is to be deployed to
$rpcUrl
public
string
$rpcUrl
The URL of the RPC instance that will be used to deploy the contract.
$salt
public
string|null
$salt
Salt used to generate the contract's ID. A 32-byte hex string that influences the deterministic contract address. Using the same WASM hash and salt will produce the same contract ID. Default: random (generates a unique contract ID for each deployment).
$sourceAccountKeyPair
public
KeyPair
$sourceAccountKeyPair
Keypair of the Stellar account that will send this transaction. The keypair must contain the private key for signing.
$wasmHash
public
string
$wasmHash
The hash of the Wasm blob (in hex string format), which must already be installed on-chain.
Methods
__construct()
Constructor.
public
__construct(string $rpcUrl, Network $network, KeyPair $sourceAccountKeyPair, string $wasmHash[, array<string|int, XdrSCVal>|null $constructorArgs = null ][, string|null $salt = null ][, MethodOptions|null $methodOptions = null ][, LoggerInterface|null $logger = null ]) : mixed
Parameters
- $rpcUrl : string
-
The URL of the RPC instance that will be used to deploy the contract.
- $network : Network
-
The Stellar network this contract is to be deployed.
- $sourceAccountKeyPair : KeyPair
-
Keypair of the Stellar account that will send this transaction. The keypair must contain the private key for signing.
- $wasmHash : string
-
The hash of the Wasm blob (in hex string format), which must already be installed on-chain.
- $constructorArgs : array<string|int, XdrSCVal>|null = null
-
Constructor/Initialization Args for the contract's
__constructormethod. - $salt : string|null = null
-
Salt used to generate the contract's ID. Default: random.
- $methodOptions : MethodOptions|null = null
-
method options used to fine tune the transaction. Default: new MethodOptions()
- $logger : LoggerInterface|null = null
-
PSR-3 logger for debug output. Default: null (no logging).