From 172a47c08cfbeb245e58dea5f840d1347f6b59d9 Mon Sep 17 00:00:00 2001 From: Dmytro Kozhevin Date: Tue, 3 Sep 2024 17:28:39 -0400 Subject: [PATCH] Update the comment about CREATE_CONTRACT auth payload. (#215) This comment was not in sync with CAP-58. --- Stellar-transaction.x | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Stellar-transaction.x b/Stellar-transaction.x index d0ed328..7d32481 100644 --- a/Stellar-transaction.x +++ b/Stellar-transaction.x @@ -541,12 +541,16 @@ union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; -// This variant of auth payload for creating new contract instances is no -// longer accepted after protocol 22. +// This variant of auth payload for creating new contract instances +// doesn't allow specifying the constructor arguments, creating contracts +// with constructors that take arguments is only possible by authorizing +// `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` +// (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances -// is only accepted in and after protocol 22. +// is only accepted in and after protocol 22. It allows authorizing the +// contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; };