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 a mechanism to return in a query more information #129

Open
luiseel opened this issue Feb 10, 2022 · 0 comments · May be fixed by #138
Open

Add a mechanism to return in a query more information #129

luiseel opened this issue Feb 10, 2022 · 0 comments · May be fixed by #138
Assignees
Labels
feature New feature or request

Comments

@luiseel
Copy link
Contributor

luiseel commented Feb 10, 2022

The return type for any query is Promise<T>.

What we want to do here is that per Contract Client have the ability to wrap the query response into another object that has more information about the query itself and other contract related information.

interface Metadata {
  contractAddress: string;
  block: number;
}

interface QueryResponse<T> {
  meta: Metadata;
  data: T;
}

Promise<QueryResponse<T>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants