A Stellar Asset Contract deployed from a classic asset
CREATE_CONTRACT (v1 host function) with a contract-ID preimage from the asset XPF: the instance's executable is stellar_asset, not a Wasm hash.
The shape
CREATE_CONTRACT (v1 host function) with a contract-ID preimage from the asset XPF: the instance's executable is stellar_asset, not a Wasm hash. Readers that expect every contract to have Wasm code fail on SACs.
Variants
| Variant | Protocol | Network | Source | Size | sha256 |
|---|---|---|---|---|---|
p30-mainnet-generated | P30 | mainnet passphrase | generated by stellar-core v30.0.0 | 2,652 B | 479c338154e5… |
p28-mainnet-generated | P28 | mainnet passphrase | generated by stellar-core v30.0.0 | 2,644 B | d820d4bd411d… |
p30-testnet-generated | P30 | testnet passphrase | generated by stellar-core v30.0.0 | 2,652 B | b8777a679fe9… |
p28-testnet-generated | P28 | testnet passphrase | generated by stellar-core v30.0.0 | 2,644 B | 56428ae250db… |
What a correct reader returns
| A correct reader finds | Value | Backed by |
|---|---|---|
| The preimage is from the asset XPF. | XPF | constructionsnapshotcorewalker |
| The created instance's executable is stellar_asset. | some change where 1 fields match | snapshotcorewalker |
Check it yourself
make verify # schema, hashes, the byte-for-byte round trip and every fact above
make oracle # the facts' values, re-read by stellar-core and the schema walkerEntry id contract.sac-deploy-from-asset · compiled from catalog/contract.sac-deploy-from-asset.json · entry.json
A contract deployed from an address and salt
CREATE_CONTRACT_V2 from alice with salt sha256("xdrproof:kit:0"): the contract ID is derived from the network ID, the deployer and the salt.
A contract Wasm upload creates a contract-code entry
UPLOAD_CONTRACT_WASM: the result is the Wasm hash; a contract_code entry and its TTL are created.