-
Notifications
You must be signed in to change notification settings - Fork 202
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
feat(world): add batchCallFrom
#1594
Conversation
🦋 Changeset detectedLatest commit: 2028558 The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
/** | ||
* Batch calls to multiple systems into a single transaction, return the array of return data. | ||
*/ | ||
function batchCallFrom(SystemCallFromData[] calldata systemCalls) public returns (bytes[] memory returnDatas) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably best to go with this approach for extensibility/flexibility, but I wonder how often we'll want to batch call from different addresses vs the signature being
function batchCallFrom(address from, SystemCallData[] calldata systemCalls)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to get that you can do this:
world.callFrom(from, coreSystemId, abi.encodeCall(BatchCallSystem.batchCall, (systemCalls)));
05a9838
to
eed80d1
Compare
82b6d1f
to
2028558
Compare
Fixes #1582