deploy From External Ref
Deploys a contract instance from a CAP-85 external reference (Protocol 28) and returns a ContractClient for it.
The executable of the new instance names an owner contract and a tag; the owner's persistent entry under that tag holds the hash of the WASM the instance runs. Nothing is installed as part of the deployment; the owner contract already holds the tag entry.
The reference is resolved through SorobanServer.getExternalRefWasmHash before the transaction is built, so an unresolvable reference fails here instead of on-chain. The contract spec is loaded from the resolved WASM before submission, like deployFromWasmId.
The tag bytes put on the wire are the UTF-8 encoding of tag; the ByteArray overload carries arbitrary tag bytes.
Return
A ContractClient for the newly deployed contract
Parameters
The contract holding the executable tag entry ("C..." contract id)
The tag the owner holds the executable entry under, as text
Optional arguments passed to the contract constructor
The account id the deployment is issued from
The keypair signing the deployment transaction
The network the contract is deployed to
The Soroban RPC endpoint
32 byte salt for contract id generation; random if not provided
Whether to load the contract spec for the returned client
Throws
if executableOwner is not a valid address, or is not a contract address (before any request is issued)
if the reference cannot be resolved (the tag entry is missing, is not a contract data entry, or does not hold a 32-byte hash; the message names the owner and the tag), or if deployment fails
if the network refuses the deployment transaction at submission
Deploys a contract instance from a CAP-85 external reference (Protocol 28) and returns a ContractClient for it.
The executable of the new instance names an owner contract and a tag; the owner's persistent entry under that tag holds the hash of the WASM the instance runs. Nothing is installed as part of the deployment; the owner contract already holds the tag entry.
The reference is resolved through SorobanServer.getExternalRefWasmHash before the transaction is built, so an unresolvable reference fails here instead of on-chain. The contract spec is loaded from the resolved WASM before submission, like deployFromWasmId.
The one tag value feeds both the resolution and the built operation, so the entry the deployment names on-chain is the entry that resolved: the bytes reach both byte for byte, whether or not they are valid UTF-8.
Return
A ContractClient for the newly deployed contract
Parameters
The contract holding the executable tag entry ("C..." contract id)
The tag bytes the owner holds the executable entry under; matched byte for byte
Optional arguments passed to the contract constructor
The account id the deployment is issued from
The keypair signing the deployment transaction
The network the contract is deployed to
The Soroban RPC endpoint
32 byte salt for contract id generation; random if not provided
Whether to load the contract spec for the returned client
Throws
if executableOwner is not a valid address, or is not a contract address (before any request is issued)
if the reference cannot be resolved (the tag entry is missing, is not a contract data entry, or does not hold a 32-byte hash; the message names the owner and the tag), or if deployment fails
if the network refuses the deployment transaction at submission