Skip to content

Feat/batch executor v2#55

Merged
Ceejaytech25 merged 4 commits intoceejaylaboratory:mainfrom
Agbasimere:feat/batch-executor-v2
Mar 28, 2026
Merged

Feat/batch executor v2#55
Ceejaytech25 merged 4 commits intoceejaylaboratory:mainfrom
Agbasimere:feat/batch-executor-v2

Conversation

@Agbasimere
Copy link
Copy Markdown
Contributor

Closes: #27

Description

Implement a helper contract to execute multiple Soroban calls in a single transaction. This contract is designed to be gas-efficient by wrapping multiple invoke_contract calls into a single transaction lifecycle, reducing transaction overhead for complex operations.

Features

  • Batch Execution: Takes a list of contract addresses, function symbols, and argument vectors.
  • Gas Efficiency: Optimized iteration and direct host invocation using env.invoke_contract.
  • Atomicity: Standard Soroban behavior ensures that if any call in the batch fails, the entire transaction reverts.
  • Result Retrieval: Returns a Vec<Val> containing the execution results of each sub-call in order.

Implementation Details

  • Location: src/batch/lib.rs
  • Contract Name: BatchExecutor
  • SDK Version: Soroban SDK 22.0.0
  • Workspace Integration: Registered as anchorpoint-batch-executor in the root Cargo.toml.

Testing

  • Added src/batch/test.rs with unit tests.
  • Test suite registers a mock contract and validates that the BatchExecutor correctly handles multiple sequential calls and captures their output values.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 27, 2026

@Agbasimere Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Ceejaytech25
Copy link
Copy Markdown
Contributor

@Agbasimere , lgtm!

@Ceejaytech25 Ceejaytech25 merged commit 4453ecb into ceejaylaboratory:main Mar 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Smart Contract: Batch Contract Call Executor

2 participants