DeployFromExternalRefRequest
public final class DeployFromExternalRefRequest : Sendable
Request parameters for deploying a Soroban smart contract instance from a CAP-85 external reference (protocol >= 28).
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.
See also:
- [SorobanClient.deployFromExternalRef] for the deployment method that uses this request
- [DeployRequest] for deploying from an installed wasm hash
-
The URL of the RPC instance that will be used to deploy the contract.
Declaration
Swift
public let rpcUrl: String -
The Stellar network this contract is to be deployed
Declaration
Swift
public let network: Network -
Keypair of the Stellar account that will send this transaction. The keypair must contain the private key for signing.
Declaration
Swift
public let sourceAccountKeyPair: KeyPair -
The contract holding the executable tag entry the new instance runs (“C…” strkey or the 64 character hex of the 32 byte id).
Declaration
Swift
public let executableOwner: String -
The tag the owner holds the executable entry under; matched byte for byte. An executable tag is an XDR string and may carry arbitrary bytes, so the canonical representation is
Data; for a text tag use thetag: Stringinitializer, which stores the tag as the UTF-8 bytes of the text.Declaration
Swift
public let tag: Data -
Constructor/Initialization Args for the contract’s
__constructormethod.Declaration
Swift
public let constructorArgs: [SCValXDR]? -
Salt used to generate the contract’s ID. Default: random.
Declaration
Swift
public let salt: WrappedData32? -
Method options used to fine tune the transaction.
Declaration
Swift
public let methodOptions: MethodOptions -
Enable soroban server logging (helpful for debugging). Default: false.
Declaration
Swift
public let enableServerLogging: Bool -
Optional URL session used for every RPC request of the deployment. Defaults to
URLSession/sharedwhen nil; seeinit(endpoint:urlSession:). The SDK does not invalidate an injected session.Declaration
Swift
public let urlSession: URLSession? -
init(rpcUrl:network: sourceAccountKeyPair: executableOwner: tag: constructorArgs: salt: methodOptions: enableServerLogging: urlSession: ) Constructor
Declaration
Swift
public init(rpcUrl: String, network: Network, sourceAccountKeyPair: KeyPair, executableOwner: String, tag: Data, constructorArgs: [SCValXDR]? = nil, salt: WrappedData32? = nil, methodOptions: MethodOptions = MethodOptions(), enableServerLogging: Bool, urlSession: URLSession? = nil)Parameters
rpcUrlThe URL of the RPC instance that will be used to deploy the contract.
networkThe Stellar network this contract is to be deployed.
sourceAccountKeyPairKeypair of the Stellar account that will send this transaction. The keypair must contain the private key for signing.
executableOwnerThe contract holding the executable tag entry (“C…” strkey or the 64 character hex of the 32 byte id).
tagThe tag the owner holds the executable entry under; matched byte for byte.
constructorArgsConstructor/Initialization Args for the contract’s
__constructormethod.saltSalt used to generate the contract’s ID. Default: random.
methodOptionsMethod options used to fine tune the transaction.
enableServerLoggingEnable soroban server logging (helpful for debugging). Default: false.
urlSessionOptional URL session used for every RPC request. Defaults to
URLSession/sharedwhen nil; seeinit(endpoint:urlSession:). -
init(rpcUrl:network: sourceAccountKeyPair: executableOwner: tag: constructorArgs: salt: methodOptions: enableServerLogging: urlSession: ) Constructor for a text tag. Stores
tagas the UTF-8 bytes of the given text; the entry is still matched byte for byte against those bytes.Declaration
Swift
public convenience init(rpcUrl: String, network: Network, sourceAccountKeyPair: KeyPair, executableOwner: String, tag: String, constructorArgs: [SCValXDR]? = nil, salt: WrappedData32? = nil, methodOptions: MethodOptions = MethodOptions(), enableServerLogging: Bool, urlSession: URLSession? = nil)Parameters
rpcUrlThe URL of the RPC instance that will be used to deploy the contract.
networkThe Stellar network this contract is to be deployed.
sourceAccountKeyPairKeypair of the Stellar account that will send this transaction. The keypair must contain the private key for signing.
executableOwnerThe contract holding the executable tag entry (“C…” strkey or the 64 character hex of the 32 byte id).
tagThe tag the owner holds the executable entry under, stored as its UTF-8 bytes.
constructorArgsConstructor/Initialization Args for the contract’s
__constructormethod.saltSalt used to generate the contract’s ID. Default: random.
methodOptionsMethod options used to fine tune the transaction.
enableServerLoggingEnable soroban server logging (helpful for debugging). Default: false.
urlSessionOptional URL session used for every RPC request. Defaults to
URLSession/sharedwhen nil; seeinit(endpoint:urlSession:).
View on GitHub
Install in Dash