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

Add an error for exceeding refundable fee. #134

Merged
merged 2 commits into from
Aug 18, 2023
Merged
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
16 changes: 9 additions & 7 deletions Stellar-transaction.x
Original file line number Diff line number Diff line change
Expand Up @@ -814,10 +814,6 @@ struct SorobanResources
uint32 readBytes;
// The maximum number of bytes this transaction can write to ledger
uint32 writeBytes;

// Maximum size of the contract events (serialized to XDR) this transaction
// can emit.
uint32 contractEventsSizeBytes;
};

// The transaction extension for Soroban.
Expand Down Expand Up @@ -1793,7 +1789,8 @@ enum InvokeHostFunctionResultCode
INVOKE_HOST_FUNCTION_MALFORMED = -1,
INVOKE_HOST_FUNCTION_TRAPPED = -2,
INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED = -3,
INVOKE_HOST_FUNCTION_ENTRY_EXPIRED = -4
INVOKE_HOST_FUNCTION_ENTRY_EXPIRED = -4,
INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE = -5
};

union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code)
Expand All @@ -1804,6 +1801,7 @@ case INVOKE_HOST_FUNCTION_MALFORMED:
case INVOKE_HOST_FUNCTION_TRAPPED:
case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED:
case INVOKE_HOST_FUNCTION_ENTRY_EXPIRED:
case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE:
void;
};

Expand All @@ -1814,7 +1812,8 @@ enum BumpFootprintExpirationResultCode

// codes considered as "failure" for the operation
BUMP_FOOTPRINT_EXPIRATION_MALFORMED = -1,
BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED = -2
BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED = -2,
BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE = -3
};

union BumpFootprintExpirationResult switch (BumpFootprintExpirationResultCode code)
Expand All @@ -1823,6 +1822,7 @@ case BUMP_FOOTPRINT_EXPIRATION_SUCCESS:
void;
case BUMP_FOOTPRINT_EXPIRATION_MALFORMED:
case BUMP_FOOTPRINT_EXPIRATION_RESOURCE_LIMIT_EXCEEDED:
case BUMP_FOOTPRINT_EXPIRATION_INSUFFICIENT_REFUNDABLE_FEE:
void;
};

Expand All @@ -1833,7 +1833,8 @@ enum RestoreFootprintResultCode

// codes considered as "failure" for the operation
RESTORE_FOOTPRINT_MALFORMED = -1,
RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED = -2
RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED = -2,
RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE = -3
};

union RestoreFootprintResult switch (RestoreFootprintResultCode code)
Expand All @@ -1842,6 +1843,7 @@ case RESTORE_FOOTPRINT_SUCCESS:
void;
case RESTORE_FOOTPRINT_MALFORMED:
case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED:
case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE:
void;
};

Expand Down