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

Implement Batch Operations in IPAccountStorage #134

Merged
merged 7 commits into from
Apr 26, 2024

Conversation

kingster-will
Copy link

Description

This PR introduces batch operations to the IPAccountStorage smart contract, aiming to reduce the number of external calls when setting or retrieving multiple values simultaneously. These enhancements optimize interactions with other contracts or front-end applications, thereby reducing gas costs. As there is already a batch executing function, adding batch operations for setter and getter functions will maintain consistency.

Also cleaned up an unused internal function.

Changes

  1. Batch Set Operation: Implemented batch setter function which allows multiple values to be set under multiple keys in a single transaction.
  2. Batch Get Operation: Added the batch getter function which retrieves multiple values across different namespaces using corresponding keys.

Test Plan

100% coverage by unit tests for new and changed code

Related Issue

Closes #109

Copy link

@Ramarti Ramarti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@LeoHChen
Copy link

please rebase the code and resolve the conflict. @kingster-will

@kingster-will
Copy link
Author

please rebase the code and resolve the conflict. @kingster-will

rebased to the latest.

@LeoHChen LeoHChen merged commit bfeb063 into storyprotocol:main Apr 26, 2024
3 checks 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.

Implement Multicall in IPAccount Storage
4 participants