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 types aliases #104

Open
4 tasks
Taztingo opened this issue Jan 25, 2023 · 1 comment
Open
4 tasks

Add types aliases #104

Taztingo opened this issue Jan 25, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request provwasm provwasm (cosmwasm for Provenance) smart contract Smart Contract implementations

Comments

@Taztingo
Copy link
Collaborator

Summary

It would be very helpful to have typed aliases in our provwasm-std. I noticed a lot of projects define these to make it easier to read and write contracts.

Problem Definition

It can be difficult for new contract developers to know what the correct types are in a provwasm contract. It can also confuse people who are newer to Rust.

Proposal

Create the following four type aliases in provwasm-std so that every project can make use of them:

pub type ProvDeps<'a> = Deps<'a, ProvenanceQuery>;
pub type ProvDepsMut<'a> = DepsMut<'a, ProvenanceQuery>;
pub type ProvTxResponse = Result<Response<ProvenanceMsg>, ContractError>;
pub type ProvQueryResponse = Result<Binary, ContractError>;

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@kwtalley kwtalley self-assigned this Feb 3, 2023
@kwtalley
Copy link
Collaborator

kwtalley commented Feb 3, 2023

Definitely agree with this and will see how to incorporate it with the major rewrite to use protos in #101 in progress

@kwtalley kwtalley added enhancement New feature or request smart contract Smart Contract implementations provwasm provwasm (cosmwasm for Provenance) labels Feb 3, 2023
@kwtalley kwtalley moved this from Todo to Backlog in Provenance Core Protocol Team Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request provwasm provwasm (cosmwasm for Provenance) smart contract Smart Contract implementations
Projects
Development

No branches or pull requests

2 participants