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

feat: add milticall contract #65

Merged
merged 2 commits into from
Oct 14, 2024
Merged

feat: add milticall contract #65

merged 2 commits into from
Oct 14, 2024

Conversation

SlayerAnsh
Copy link
Contributor

@SlayerAnsh SlayerAnsh commented Sep 11, 2024

Pull Request

Description

This pull request introduces the MultiCall contract, which allows for batch processing of multiple queries in a single transaction. This enhancement improves efficiency and reduces the overhead associated with multiple individual calls.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactor/Chore

Queries Implemented

  • MultiQuery: Allows users to submit multiple queries in a single transaction.

Query Type

  • Query: Supports standard query requests using QueryRequest.
  • RawQuery: Enables execution of raw string queries for more flexibility.

Sample JSON

{
  "queries": [
    {
      "bank": {
        "balance": {
          "address": "creator",
          "denom": "test"
        }
      }
    },
    {
      "raw_query": "{\"bank\":{\"balance\":{\"address\":\"creator\",\"denom\":\"test\"}}}"
    }
  ]
}

Related Issue

N/A

Testing

Steps to test:

  1. Deploy the MultiCall contract.
  2. Execute multiple queries using the MultiQuery feature.
  3. Verify that all queries return the expected results in a single response

Checklist

  • Self-review completed
  • Tests added/updated (if applicable)
  • Documentation updated (if applicable)

Screenshots (if applicable)

N/A

Additional Notes

This implementation is designed to streamline interactions with the contract, making it easier for users to perform multiple queries efficiently.

@SlayerAnsh SlayerAnsh marked this pull request as ready for review September 12, 2024 10:03
@SlayerAnsh
Copy link
Contributor Author

Got successful result with on chain testing for queries

@joemonem
Copy link
Contributor

We should map out our current workflows that could benefit from this contract and integrate them.

@SlayerAnsh SlayerAnsh requested a review from joemonem September 24, 2024 08:25
@SlayerAnsh
Copy link
Contributor Author

We should map out our current workflows that could benefit from this contract and integrate them.

Work has been started to make composite graphql queries using multicall to minimize calls to chain nodes

@SlayerAnsh SlayerAnsh merged commit b336415 into development Oct 14, 2024
2 checks passed
@SlayerAnsh SlayerAnsh deleted the feat/cw-multi-call branch October 14, 2024 07:41
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.

2 participants