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

Fix raw_query for mock #400

Merged
merged 1 commit into from
May 20, 2024
Merged

Fix raw_query for mock #400

merged 1 commit into from
May 20, 2024

Conversation

Buckram123
Copy link
Contributor

This PR aims at fixing raw_query method for mock env

@Buckram123 Buckram123 requested a review from Kayanski May 20, 2024 10:05
Copy link

Deploying cw-orchestrator with  Cloudflare Pages  Cloudflare Pages

Latest commit: 049cbb3
Status: ✅  Deploy successful!
Preview URL: https://79be4044.cw-orchestrator.pages.dev
Branch Preview URL: https://fix-mock-raw-query.cw-orchestrator.pages.dev

View logs

Copy link

codecov bot commented May 20, 2024

Codecov Report

Attention: Patch coverage is 80.95238% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 64.6%. Comparing base (33de752) to head (049cbb3).

Additional details and impacted files
Files Coverage Δ
contracts/mock_contract/src/lib.rs 97.4% <95.8%> (-0.5%) ⬇️
packages/cw-orch-mock/src/queriers/wasm.rs 88.7% <61.1%> (+9.0%) ⬆️

@Kayanski
Copy link
Contributor

This PR aims at fixing raw_query method for mock env

Could you elaborate what this is for ?

@Buckram123
Copy link
Contributor Author

Buckram123 commented May 20, 2024

This PR aims at fixing raw_query method for mock env

Could you elaborate what this is for ?

Just a bugfix. Wanted to cw2 raw query in mock env, to see what contract is that addr, got error instead: Error: Error parsing into type alloc::vec::Vec<u8>: Invalid type.

@Kayanski
Copy link
Contributor

This PR aims at fixing raw_query method for mock env

Could you elaborate what this is for ?

Just a bugfix. Wanted to cw2 raw query in mock env, to see what contract is that addr, got error instead: Error: Error parsing into type alloc::vec::Vec<u8>: Invalid type.

Oh, so the to_json_binary function was not working properly ?

@Buckram123
Copy link
Contributor Author

Buckram123 commented May 20, 2024

This PR aims at fixing raw_query method for mock env

Could you elaborate what this is for ?

Just a bugfix. Wanted to cw2 raw query in mock env, to see what contract is that addr, got error instead: Error: Error parsing into type alloc::vec::Vec<u8>: Invalid type.

Oh, so the to_json_binary function was not working properly ?

No, it(raw_query method for mock env) was trying to deserialize raw query response into Vec<u8>, but it can succeed only if response was b"[1, 2, 3]", not if it's b"{"foo": "bar"}

@Buckram123 Buckram123 merged commit 41fc930 into main May 20, 2024
18 checks passed
@Buckram123 Buckram123 deleted the fix-mock-raw_query branch May 20, 2024 12:20
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.

None yet

2 participants