Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make returnValue optional in meta. #100

Merged
merged 3 commits into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Stellar-contract-config-setting.x
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,11 @@ enum ContractCostType {
};

struct ContractCostParamEntry {
int64 constTerm;
int64 linearTerm;
// use `ext` to add more terms (e.g. higher order polynomials) in the future
ExtensionPoint ext;

int64 constTerm;
int64 linearTerm;
};

struct StateExpirationSettings {
Expand Down
24 changes: 17 additions & 7 deletions Stellar-ledger.x
Original file line number Diff line number Diff line change
Expand Up @@ -398,21 +398,31 @@ struct DiagnosticEvent
ContractEvent event;
};

struct TransactionMetaV3
struct SorobanTransactionMeta
{
LedgerEntryChanges txChangesBefore; // tx level changes before operations
// are applied if any
OperationMeta operations<>; // meta for each operation
LedgerEntryChanges txChangesAfter; // tx level changes after operations are
// applied if any
ExtensionPoint ext;

ContractEvent events<>; // custom events populated by the
// contracts themselves.
SCVal returnValue; // return value of the invocation.
SCVal returnValue; // return value of the host fn invocation

// Diagnostics events that are not hashed.
// This will contain all contract and diagnostic events. Even ones
// that were emitted in a failed contract call.
DiagnosticEvent diagnosticEvents<>;
}

struct TransactionMetaV3
{
ExtensionPoint ext;

LedgerEntryChanges txChangesBefore; // tx level changes before operations
// are applied if any
OperationMeta operations<>; // meta for each operation
LedgerEntryChanges txChangesAfter; // tx level changes after operations are
// applied if any
SorobanTransactionMeta* sorobanMeta; // Soroban-specific meta (only for
// Soroban transactions).
};

// This is in Stellar-ledger.x to due to a circular dependency
Expand Down
2 changes: 1 addition & 1 deletion Stellar-transaction.x
Original file line number Diff line number Diff line change
Expand Up @@ -789,10 +789,10 @@ struct SorobanResources
// The transaction extension for Soroban.
struct SorobanTransactionData
{
ExtensionPoint ext;
SorobanResources resources;
// Portion of transaction `fee` allocated to refundable fees.
int64 refundableFee;
ExtensionPoint ext;
};

// TransactionV0 is a transaction with the AccountID discriminant stripped off,
Expand Down