Skip to content

Commit

Permalink
[CAP-0046-02] Updated contract lifecycle CAP.
Browse files Browse the repository at this point in the history
The main updates:

- Change `InvokeHostFunctionOp` to use XDR for contract creation args, as it's getting quite complex and doesn't ever need to be called from the contracts.
- Decouple WASM sources from the contract instances in order to deduplicate contracts that share their code.
- Change the contract-from-contract creation to use the code reference instead of the actual code
- Removed some outdated parts that don't allow well with the current implementation/vision
  • Loading branch information
dmkozh committed Nov 4, 2022
1 parent 97802bb commit 67b8add
Show file tree
Hide file tree
Showing 3 changed files with 382 additions and 253 deletions.
6 changes: 3 additions & 3 deletions contents/cap-0046/Stellar-contract.x
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,14 @@ case NEGATIVE:

enum SCContractCodeType
{
SCCONTRACT_CODE_WASM = 0,
SCCONTRACT_CODE_WASM_REF = 0,
SCCONTRACT_CODE_TOKEN = 1
};

union SCContractCode switch (SCContractCodeType type)
{
case SCCONTRACT_CODE_WASM:
opaque wasm<SCVAL_LIMIT>;
case SCCONTRACT_CODE_WASM_REF:
Hash wasm_id;
case SCCONTRACT_CODE_TOKEN:
void;
};
Expand Down
Loading

0 comments on commit 67b8add

Please sign in to comment.