Skip to content

Support externally managed contract executables (CAP-85) #1559

Description

@Ryang-21

What

Handle the new SCVal and contract-executable variants from CAP-85:

  • SCV_EXECUTABLE_TAG added to SCValType (and SCLedgerKeyType).
  • CONTRACT_EXECUTABLE_EXTERNAL_REF added to ContractExecutableType, with the ContractExecutableExternalRef struct (owner address + tag string).

Work items:

  • src/base/scval.ts — add a case for SCV_EXECUTABLE_TAG in scValToNative and nativeToScVal. If no native mapping fits, add an explicit unsupported fallthrough so it fails loudly rather than misbehaving.
  • Review src/contract and src/rpc for deploy helpers that may want a convenience path for creating or updating contracts from an external executable ref.
  • Tests for the new SCVal conversion.

Why

CAP-85 lets one contract reference another's executable, enabling atomic upgrades across a fleet of contracts. Clients that read ledger entries or contract data will encounter the new SCVal and executable variants.

Notes

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions