Stellar PHP SDK API Documentation

DeployFromExternalRefRequest

Request parameters for deploying a Soroban smart contract instance from a CAP-85 external reference

The executable is not a wasm hash: it names an owner contract and a tag, and the owner holds a persistent contract data entry under that tag whose value is the 32-byte hash of an already uploaded wasm. The created instance runs that code. Nothing is installed as part of the deployment; the owner contract already holds the tag entry.

Tags
see
SorobanClient::deployFromExternalRef()

For the deployment method that uses this request

DeployRequest

For deploying from an installed wasm hash

since
1.13.0

Table of Contents

Properties

$constructorArgs  : array<string|int, XdrSCVal>|null
$executableOwner  : Address
$logger  : LoggerInterface|null
$methodOptions  : MethodOptions
$network  : Network
$rpcUrl  : string
$salt  : string|null
$server  : SorobanServer|null
$sourceAccountKeyPair  : KeyPair
$tag  : string

Methods

__construct()  : mixed
Constructor.

Properties

$salt

public string|null $salt

Salt used to generate the contract's ID. 32 bytes that influence the deterministic contract address. Using the same executable reference and salt will produce the same contract ID. Default: random (generates a unique contract ID for each deployment).

$server

public SorobanServer|null $server = null

RPC server instance to use. When null, one is created automatically from $rpcUrl. Provide a preconfigured instance to customize the underlying HTTP client.

$sourceAccountKeyPair

public KeyPair $sourceAccountKeyPair

Keypair of the Stellar account that will send this transaction. The keypair must contain the private key for signing.

Methods

__construct()

Constructor.

public __construct(string $rpcUrl, Network $network, KeyPair $sourceAccountKeyPair, Address $executableOwner, string $tag[, array<string|int, XdrSCVal>|null $constructorArgs = null ][, string|null $salt = null ][, MethodOptions|null $methodOptions = null ][, LoggerInterface|null $logger = null ][, SorobanServer|null $server = 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.

$executableOwner : Address

The contract holding the executable tag entry the new instance runs.

$tag : string

The tag the owner holds the executable entry under; matched byte for byte.

$constructorArgs : array<string|int, XdrSCVal>|null = null

Constructor/Initialization Args for the contract's __constructor method.

$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).

$server : SorobanServer|null = null

RPC server instance to use. When null, one is created automatically from $rpcUrl.

On this page

Search results